:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --white: #f8fafc;
    --border: rgba(255,255,255,0.1);
    --shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: rgba(15,23,42,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trial-badge {
    background: linear-gradient(135deg, var(--warning), #f97316);
    color: var(--dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 1rem;
}

.nav-actions { display: flex; gap: 0.75rem; }

/* Buttons */
.btn {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
}

.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 1rem; font-size: 1rem; }

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
}

.stat-label { color: var(--gray); font-size: 0.875rem; }
.stat-value { font-size: 2rem; font-weight: 700; margin: 0.5rem 0; }

/* Trial Progress */
.trial-progress {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(59,130,246,0.1);
    border-radius: 12px;
    border: 1px solid rgba(59,130,246,0.3);
}

.trial-progress-bar {
    height: 8px;
    background: var(--dark);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.trial-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width 0.5s ease;
}

/* Card */
.card {
    background: var(--dark-light);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title { font-size: 1.5rem; font-weight: 700; }

/* Form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label { font-weight: 600; color: var(--gray); font-size: 0.875rem; }

.form-control {
    background: var(--dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem;
    color: white;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Estimation */
.estimation-box {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.estimation-value { font-weight: 700; color: var(--primary); }

/* Table */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--dark); color: var(--gray); font-size: 0.875rem; text-transform: uppercase; }
tr:hover { background: rgba(255,255,255,0.02); }

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: rgba(16,185,129,0.2); color: var(--success); }
.badge-danger { background: rgba(239,68,68,0.2); color: var(--danger); }

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--dark-light);
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    border: 1px solid var(--border);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: var(--dark);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
}

.modal-header { text-align: center; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.5rem; font-weight: 700; }
.modal-subtitle { color: var(--gray); font-size: 0.875rem; }

/* Trial Limit Modal */
.trial-limit-icon { font-size: 4rem; text-align: center; margin-bottom: 1rem; }
.trial-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--dark);
    border-radius: 12px;
}
.trial-benefits {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}
.benefit-item { font-size: 0.875rem; color: var(--gray); margin: 0.25rem 0; }
.trial-actions { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }

/* Upgrade Card */
.upgrade-card {
    background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.15));
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    color: var(--warning);
}

/* Footer */
.footer {
    background: var(--dark);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--gray);
    margin-top: 2rem;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Utility */
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
    .navbar { padding: 1rem; }
    .container { padding: 1rem; }
    .form-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .trial-stats { flex-direction: column; gap: 1rem; }
}