/* ============================================================
   ACCOUNT PAGES — AUTH + DASHBOARD
   Dark theme consistent with main site
   ============================================================ */

/* ---- Auth Pages (Login / Register / Forgot) ---- */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px 32px;
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 0;
}

/* ---- Form Styles ---- */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.form-group .optional {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.password-toggle:hover {
    opacity: 0.9;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #6366f1;
}

.forgot-link {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.85rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

.form-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 4px;
}

.license-input {
    font-family: 'Courier New', monospace !important;
    letter-spacing: 0.5px;
}

/* ---- Buttons ---- */

.btn-full {
    width: 100%;
    text-align: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.btn-danger {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

/* ---- Alerts ---- */

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.alert a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.welcome-alert {
    margin-bottom: 24px;
}

/* ---- Auth Footer ---- */

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-footer p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}


/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard-page {
    padding: 100px 0 60px;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
}

/* ---- Dashboard Header ---- */

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.dash-greeting h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.dash-subtitle {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    margin: 0;
}

.dash-status {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- Badges ---- */

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-active {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ---- Stats Grid ---- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Dashboard Grid (Two Column) ---- */

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    margin-bottom: 32px;
}

.dash-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 24px;
}

.dash-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 0;
}

/* ---- License Cards ---- */

.license-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.license-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s;
}

.license-card.active {
    border-color: rgba(34, 197, 94, 0.25);
}

.license-card.expired {
    opacity: 0.6;
}

.license-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.license-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.license-status-dot.active {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.license-status-dot.expired {
    background: #ef4444;
}

.license-plan {
    font-weight: 600;
    color: #fff;
    flex-grow: 1;
    font-size: 0.95rem;
}

.license-status-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.license-status-badge.active {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.license-status-badge.expired {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.license-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.license-key {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 8px;
    border-radius: 6px;
    flex-grow: 1;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 4px;
}

.copy-btn:hover {
    opacity: 1;
}

.license-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    flex-wrap: wrap;
}

.license-progress {
    margin-top: 10px;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 2px;
    transition: width 0.3s;
}

.progress-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 4px;
    display: block;
}

/* ---- Empty State ---- */

.empty-state {
    text-align: center;
    padding: 32px 16px;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.empty-state h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 8px;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    margin: 0 0 16px;
}

/* ---- Sidebar sections ---- */

.dash-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-sidebar .dash-section {
    padding: 20px;
}

.download-section p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    margin: 0 0 16px;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dl-icon {
    font-size: 1.1rem;
}

.download-note {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

/* ---- Quick Links ---- */

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.quick-link span {
    font-size: 1rem;
}

/* ---- Account Info ---- */

.account-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.info-label {
    color: rgba(255, 255, 255, 0.4);
}

.info-value {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

.account-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- Today's Usage ---- */

.today-usage {
    margin-bottom: 32px;
}

.today-stats {
    display: flex;
    gap: 12px;
    align-items: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
}

.today-stats strong {
    color: #fff;
}

/* ---- Modal ---- */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 460px;
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #fff;
    font-size: 1.15rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .auth-card {
        padding: 28px 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .dash-header {
        flex-direction: column;
    }
    
    .dash-greeting h1 {
        font-size: 1.4rem;
    }
    
    .license-meta {
        flex-direction: column;
        gap: 4px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 2px;
    }
    
    .info-value {
        text-align: left;
    }
}
