/* ───────────────────────────────────────────
   DASHBOARD STYLES (Sidebar Layout)
   Theme: Indigo (#4f46e5) & Slate (#f8fafc)
   ─────────────────────────────────────────── */
html {
    font-size: 13px; /* Creates an ~81% global zoom out effect */
}

body {
    background-color: #f8fafc;
    /* Slate 50 */
    color: #1e293b;
    /* Slate 800 */
    font-family: 'Inter', sans-serif;
    margin: 0;
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll, layout handles it */
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: #4f46e5;
    color: white;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.logo-text {
    font-weight: 700;
    font-size: 1.125rem;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.badge {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Nav */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.nav-item.active {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.1), 0 2px 4px -1px rgba(79, 70, 229, 0.06);
}

.nav-item svg {
    flex-shrink: 0;
}

/* Sidebar Footer (User Profile) */
.sidebar-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
    margin-top: 1rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.user-details {
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.8125rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 100%;
}

.logout-link:hover {
    color: #ef4444;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    /* Allow scrolling here */
    padding: 2rem 2.5rem;
    background: #f8fafc;
}

.page-title {
    font-size: 1.625rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.page-title.center {
    text-align: center;
}

.page-subtitle.center {
    text-align: center;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.resume-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resume-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.job-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.company-name {
    color: #64748b;
    font-size: 0.875rem;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.status-badge.optimized {
    background: #4f46e5;
    color: #ffffff;
}

.date-added {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ───────────────────────────────────────────
   PROCESSING STATE STYLES
   ─────────────────────────────────────────── */
.processing-container {
    max-width: 800px;
    margin: 4rem auto 0;
}

.processing-card-large {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 3rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.spinner-large {
    width: 64px;
    height: 64px;
    border: 4px solid #e0e7ff;
    border-top-color: #4f46e5;
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 1s linear infinite;
}

.processing-status-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.processing-status-sub {
    color: #64748b;
    margin-bottom: 2rem;
}

.progress-bar-container {
    height: 8px;
    background: #f1f5f9;
    border-radius: 9999px;
    margin-bottom: 2rem;
    overflow: hidden;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar-fill {
    height: 100%;
    background: #4f46e5;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 9999px;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

.security-note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.8125rem;
    padding: 0.75rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}


@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideUp {
    from { transform: translate(-50%, 20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translate(-50%, -20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* ───────────────────────────────────────────
   MOBILE RESPONSIVENESS
   ─────────────────────────────────────────── */

/* Mobile Header & Overlay (Hidden on Desktop) */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1001;
    width: 100%;
    min-height: 60px;
    box-sizing: border-box;
}

.mobile-logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-logo-text {
    font-weight: 700;
    font-size: 1.125rem;
    color: #0f172a;
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

.logo-icon-sm {
    width: 34px;
    height: 34px;
    background: #4f46e5;
    color: white;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.mobile-menu-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.mobile-menu-btn:active {
    background: #f1f5f9;
    transform: scale(0.95);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .app-container {
        flex-direction: column;
        height: 100dvh;
        overflow: hidden;
    }

    body {
        height: 100dvh;
        overflow: auto; /* Allow body scroll as fallback */
    }

    /* Sidebar becomes a drawer */
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 1100;
        width: 290px;
        height: 100dvh;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        padding: 1.5rem 1.25rem 5rem; /* Further increased bottom padding */
        -webkit-overflow-scrolling: touch;
    }

    /* Disable nested scrolling on mobile to ensure the footer is reachable via the main sidebar scroll */
    .sidebar .sidebar-nav {
        overflow-y: visible;
        flex: none; /* Let it take its natural height */
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        padding: 1rem;
        padding-bottom: 6rem; /* Extra space at bottom for mobile */
        -webkit-overflow-scrolling: touch;
    }

    .card-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .btn-primary {
        width: auto;
        min-width: 200px;
        margin: 0.5rem 0;
    }

    /* Ensure logout button is prominent and accessible on mobile */
    .logout-link {
        padding: 0.75rem 0;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
        font-size: 0.875rem;
        color: #ef4444; /* Use a clearer color for logout on mobile */
    }

    .logout-link svg {
        width: 20px;
        height: 20px;
    }
}

/* ───────────────────────────────────────────
   ATS REPORT STYLES
   ─────────────────────────────────────────── */
.ats-report-container {
    max-width: 1200px;
    margin: 0 auto;
}

.report-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #0f172a;
}

.report-title-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}

.report-subtitle {
    color: #64748b;
    font-size: 0.875rem;
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 2rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #0f172a;
}

.tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Grid Layout for Report */
.report-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* Left Sidebar (Scores) */
.score-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.match-rate-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.match-rate-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #0f172a;
}

.circular-progress {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#4f46e5 259.2deg, #e2e8f0 0deg);
    /* 72% */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
}

.circular-progress .inner-circle {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    position: absolute;
}

.circular-progress .percentage {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
}

.circular-progress .percentage span {
    font-size: 1rem;
    font-weight: 600;
}

.btn-secondary {
    background: white;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-secondary.full-width {
    width: 100%;
}

.category-scores {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cat-score {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

.cat-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.cat-issues {
    font-size: 0.75rem;
    font-weight: 500;
}

.cat-issues.blue {
    color: #0ea5e9;
}

.cat-issues.red {
    color: #ef4444;
}

.cat-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.cat-bar .fill {
    height: 100%;
    border-radius: 9999px;
}

.bg-blue {
    background: #0ea5e9;
}

.bg-red {
    background: #ef4444;
}

/* Main Content (Checklists) */
.report-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.report-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-heading-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.report-section h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #0f172a;
}

.tag-important {
    background: #475569;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.section-desc {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.section-tip {
    font-size: 0.875rem;
    color: #0f172a;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border-left: 3px solid #4f46e5;
    margin-bottom: 2rem;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Suggestions Container */
.suggestions-outer-container {
    background: #f8fafc;
    margin: 2rem -2.5rem;
    padding: 2rem 2.5rem;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

/* Suggestions Carousel (Horizontal Scroll) */
.suggestions-grid {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    margin-top: 1rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.suggestions-grid::-webkit-scrollbar {
    height: 6px;
}

.suggestions-grid::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.suggestion-card {
    min-width: 320px;
    max-width: 320px;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .suggestions-outer-container {
        margin: 1.5rem -1rem;
        padding: 1.5rem 1rem;
    }
    
    .suggestions-grid {
        gap: 1rem;
    }
    
    .suggestion-card {
        min-width: 260px;
        max-width: 260px;
        padding: 1rem;
        gap: 0.75rem;
    }

    .suggestion-card .card-title {
        font-size: 0.875rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.25rem !important;
    }

    .suggestion-card .card-description {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }
    
    .suggestion-card .btn-action {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .suggestion-card span[style*="font-size:0.75rem"] {
        font-size: 0.65rem !important;
    }

    .section-heading-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    
    .section-heading-row h2 {
        font-size: 1.25rem !important;
    }
    
    .tag-improvements {
        display: none !important;
    }

    .badge-optimization {
        display: none !important;
    }
}

/* Suggestion Card */
/* Suggestion Card - Modern Grid Style */
.suggestion-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.suggestion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.suggestion-card .card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.suggestion-card .warning-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
}

.suggestion-card .card-title {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    line-height: 1.4;
}

.suggestion-card .card-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    width: fit-content;
}

.suggestion-card .card-description {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    flex: 1;
}

.suggestion-card .btn-action {
    width: 100%;
    padding: 0.75rem;
    background: #334155;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

.suggestion-card .btn-action:hover {
    background: #1e293b;
}

.suggestion-card .btn-action:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.suggestion-card .btn-applied {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Header Elements */
.tag-improvements {
    background: #000;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-optimization {
    background: #2563eb;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-show-applied {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-show-applied:hover {
    color: #0f172a;
}

@media (max-width: 768px) {
    .suggestion-card {
        min-width: 240px;
        max-width: 260px;
        padding: 1rem;
    }
    .suggestion-card strong {
        font-size: 0.85rem !important;
    }
    .suggestion-card p {
        font-size: 0.75rem !important;
    }
    .suggestion-card .btn-primary {
        padding: 0.4rem !important;
        font-size: 0.75rem !important;
    }
}

.check-item {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
}

.check-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: help;
}

.check-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.issue-row {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.issue-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: white;
    margin-top: 0.125rem;
}

.icon-red {
    background: #ef4444;
}

.icon-green {
    background: #22c55e;
}

.text-red {
    color: #b91c1c;
}

.text-green {
    color: #15803d;
}

.text-red a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.text-red a:hover {
    text-decoration: underline;
}

/* Premium Lock Banner */
.premium-lock-banner {
    background: linear-gradient(to right, #fdf4ff, #fff1f2);
    border: 1px solid #fbcfe8;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(236, 72, 153, 0.1);
}

.premium-icon {
    font-size: 2rem;
}

.premium-content {
    flex: 1;
}

.premium-content strong {
    display: block;
    color: #9d174d;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.premium-content p {
    color: #be185d;
    font-size: 0.875rem;
    margin: 0;
}

.btn-upgrade {
    background: #db2777;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-upgrade:hover {
    background: #be185d;
}

/* Placeholder for AI Resume */
.placeholder-card {
    background: white;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.placeholder-card h2 {
    color: #0f172a;
    margin: 0;
}

.placeholder-card p {
    color: #64748b;
    max-width: 400px;
    margin: 0 0 1rem 0;
}

.mt-1 {
    margin-top: 1rem;
}

.view-edit-btn {
    background: #f1f5f9;
    color: #4f46e5;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
    width: 100%;
}

.view-edit-btn:hover {
    background: #e0e7ff;
    border-color: #c7d2fe;
}

/* Responsive updates for Report */
@media (max-width: 1024px) {
    .report-grid {
        grid-template-columns: 1fr;
    }

    .score-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .match-rate-card,
    .category-scores {
        flex: 1;
        min-width: 300px;
    }

    .check-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    /* Fix overlapping elements on mobile */
    .report-title-area {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }

    .report-title-area button {
        width: 100%;
        justify-content: center;
    }

    .settings-input-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .settings-input-group .settings-field {
        width: 100%;
        flex: none;
    }

    .settings-input-group button {
        width: 100%;
        height: auto;
        padding: 0.875rem;
    }
}

/* Skills Pills */
.skills-header {
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.skills-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-pill {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.skill-pill.missing {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.skill-pill.found {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ───────────────────────────────────────────
   OPTIMIZATION SUMMARY CARD
   ─────────────────────────────────────────── */
.optimization-summary-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.opt-score-block {
    text-align: center;
    flex: 1;
}

.opt-score-block .score-label {
    font-size: 0.875rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.opt-score-block .score-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.opt-arrow {
    font-size: 2rem;
    color: #cbd5e1;
    font-weight: bold;
    flex: 0 0 auto;
    padding: 0 1rem;
}

.opt-fixes {
    flex: 2;
    padding-left: 2rem;
    border-left: 1px solid #e2e8f0;
    font-size: 1rem;
    color: #334155;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .optimization-summary-card {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
        align-items: center;
        flex-wrap: wrap;
    }

    .opt-score-block .score-value {
        font-size: 1.75rem;
    }

    .opt-arrow {
        font-size: 1.25rem;
        padding: 0 0.25rem;
    }

    .opt-fixes {
        border-left: none;
        border-top: 1px solid #e2e8f0;
        padding-left: 0;
        padding-top: 1rem;
        width: 100%;
        text-align: left;
        font-size: 0.875rem;
    }
}


/* ───────────────────────────────────────────
   FLOATING EDITOR CONTROLS (Undo/Redo)
   ─────────────────────────────────────────── */
.editor-floating-controls {
    display: flex;
    justify-content: flex-end; /* Move to the right side of the paper */
    position: sticky;
    top: 1rem;
    z-index: 100;
    pointer-events: none;
    height: 0;
    margin-bottom: 0;
    width: 100%;
    max-width: 8.5in;
    margin: 0 auto;
}

.history-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: white;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    opacity: 0; 
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    margin-right: 1.5rem;
}

.history-controls.active {
    opacity: 1;
    transform: translateY(0);
}

/* ──────────────────────────────────────────────────────────────────────────
   PRINT STYLES
   ────────────────────────────────────────────────────────────────────────── */
@media print {
    /* Hide all editor-only UI elements */
    .editor-floating-controls,
    .block-toolbar,
    .btn-micro-edit,
    .btn-tweak,
    .btn-delete-micro,
    .save-status-container,
    .resume-toolbar,
    .sidebar,
    .top-nav {
        display: none !important;
    }

    /* Ensure resume paper looks clean */
    .mock-resume-paper {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        border: none !important;
    }

    body {
        background: white !important;
    }
}

.btn-history {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-history:hover:not(:disabled) {
    background: #f1f5f9;
    color: #4f46e5;
    transform: translateY(-1px);
}

.btn-history:active:not(:disabled) {
    transform: translateY(0);
}

.btn-history:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.history-divider {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 4px;
}

.btn-save-manual {
    color: #10b981;
}

.btn-save-manual:hover:not(:disabled) {
    color: #059669;
}

.save-status {
    color: #64748b;
    font-size: 0.8125rem;
    margin-left: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.save-status.unsaved {
    color: #f59e0b;
}

.save-status.saving {
    color: #4f46e5;
}

@keyframes pulseSave {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@media (max-width: 768px) {
    .history-controls {
        margin-left: 0;
        gap: 0.15rem;
        scale: 0.9;
    }
    .save-status {
        display: none; /* Remove text on mobile for minimal UI */
    }
    .save-status-container {
        gap: 0;
    }
}

/* ATS-standard resume: tight spacing, 10-10.5pt body, single column (Facebook/FAANG style) */
.mock-resume-paper {
    background: white;
    width: 100%;
    max-width: 8.5in;
    margin: 0 auto;
    padding: 0.4in 0.5in;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    outline: none;
    min-height: 11in;
    font-family: 'Times New Roman', Times, serif;
    font-size: 10pt;
    line-height: 1.18;
    color: #000;
    transition: box-shadow 0.2s;
}

/* Scoped reset to avoid browser-default spacing inconsistencies */
.mock-resume-paper h1,
.mock-resume-paper h2,
.mock-resume-paper p {
    margin: 0;
    padding: 0;
}

.mock-resume-paper ul {
    margin: 0;
    padding: 0 0 0 1.2rem;
    list-style-type: disc;
}


.mock-resume-paper li {
    margin: 0;
    padding: 0;
    display: list-item;
}

/* Force links in the resume to be black and clean */
.mock-resume-paper a,
.mock-resume-paper a:visited {
    color: #000;
    text-decoration: none;
}

/* ────────────────────────────────────
   JSON Block Editor Hover Styles
   ──────────────────────────────────── */

#summaryBlock.res-summary-block {
    position: relative;
}

#summaryBlock.res-summary-block .block-toolbar {
    top: 1.25rem; /* align with summary header row */
}

#summaryBlock.res-summary-block:hover .block-toolbar {
    opacity: 1;
    pointer-events: auto;
}

#aiResumePaper li {
    position: relative;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 1px 4px;
    margin-left: -4px;
}

#aiResumePaper li:hover {
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.block-toolbar {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    /* Ignore clicks when hidden */
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9) 15%, white 100%);
    padding-left: 20px;
    z-index: 10;
}

#aiResumePaper li:hover .block-toolbar {
    opacity: 1;
    pointer-events: auto;
}

/* ── Section Deletion Hovers (VP Upgrade) ── */
.res-item, .res-skill-row {
    position: relative;
    transition: background 0.2s ease;
}

.res-item:hover, .res-skill-row:hover {
    background: #f8fafc;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.section-toolbar {
    top: 0 !important; /* Position at top right of the section */
    transform: none !important;
}

.res-item:hover .section-toolbar,
.res-skill-row:hover .section-toolbar {
    opacity: 1;
    pointer-events: auto;
}

/* Specific adjustment for skill row content to not overlap with toolbar */
.skill-row-content {
    padding-right: 40px;
}

/* On touch/mobile devices: Compact absolute positioning next to text */
@media (max-width: 768px) {
    .block-toolbar {
        opacity: 0 !important; /* Hide by default on mobile to save space */
        pointer-events: none !important;
        position: absolute !important;
        right: 4px !important;
        top: 2px !important;
        transform: none !important;
        background: white !important;
        padding: 4px !important;
        z-index: 20;
        display: flex !important;
        gap: 6px !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        margin: 0 !important;
        transition: opacity 0.2s ease, transform 0.2s ease !important;
    }

    /* Show toolbar when the item is being edited or hovered */
    #aiResumePaper li:hover .block-toolbar,
    #aiResumePaper li:focus-within .block-toolbar,
    #summaryBlock.res-summary-block:hover .block-toolbar,
    #summaryBlock.res-summary-block:focus-within .block-toolbar,
    .res-item:hover .section-toolbar,
    .res-item:focus-within .section-toolbar,
    .res-skill-row:hover .section-toolbar,
    .res-skill-row:focus-within .section-toolbar {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    #summaryBlock.res-summary-block .block-toolbar {
        top: -10px !important;
        right: 0 !important;
    }

    /* Hide text labels on mobile to keep it "next to bullet" without squishing text */
    .block-toolbar .btn-label-text {
        display: none !important;
    }

    .btn-micro {
        padding: 6px !important;
        min-width: 32px !important;
        height: 32px !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }

    #aiResumePaper li {
        padding-right: 12px !important; /* Reclaim room for text */
        position: relative !important;
        padding-bottom: 4px !important;
        display: list-item !important;
        transition: padding 0.2s ease;
    }
    
    /* When active, add a tiny bit of padding so icons don't overlap text too much */
    #aiResumePaper li:focus-within {
        padding-right: 74px !important;
    }
}

/* Hide toolbar during PDF generation via our button */
.pdf-mode .block-toolbar {
    display: none !important;
}

.pdf-mode #aiResumePaper li {
    background: transparent !important;
    box-shadow: none !important;
}

.pdf-mode #aiResumePaper [contenteditable="true"] {
    outline: none !important;
}

/* Also hide it natively if the user hits Ctrl+P */
@media print {
    @page {
        margin: 0.75in;
        size: letter portrait;
    }

    body {
        background: #fff;
        height: auto;
        overflow: auto;
    }

    .app-container,
    .main-content {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    .sidebar,
    .mobile-header,
    .report-header,
    .tabs-container,
    .optimization-summary-card,
    #suggestionsContainer,
    .resume-toolbar,
    .btn-primary,
    .btn-secondary,
    .back-btn,
    .block-toolbar {
        display: none !important;
    }

    .mock-resume-paper {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        min-height: auto !important;
    }

    #aiResumePaper li,
    #coverLetterPaper li {
        background: transparent !important;
        box-shadow: none !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
    }

    .res-item,
    .res-item-header,
    .res-skill-row {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    h2, .res-section-title {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }

    .res-bullets {
        page-break-before: avoid !important;
        break-before: avoid !important;
    }


    [contenteditable="true"] {
        outline: none !important;
    }
}

.btn-micro {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    color: #475569;
}

.btn-micro:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

.resume-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 0.75rem 1.25rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.04);
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
    min-height: 80px;
}

.save-status-container {
    display: flex;
    align-items: center;
}

.save-status-pill {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.25rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.save-status-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.save-status-pill:active {
    transform: translateY(0);
}

.save-status-pill svg {
    flex-shrink: 0;
    color: #0f172a;
}

.save-status-pill.saving {
    border-color: #4f46e5;
    background: #f5f3ff;
    color: #4f46e5;
}

.save-status-pill.saving svg {
    color: #4f46e5;
    animation: pulse 1.5s infinite ease-in-out;
}

.save-status-pill.unsaved {
    border-color: #94a3b8;
    color: #64748b;
    background: #f8fafc;
}

.save-status-pill.failed {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.4; transform: scale(0.9); }
}

.save-text {
    white-space: nowrap;
}

.resume-toolbar-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.resume-toolbar-right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    flex: 1;
}

.btn-tweak {
    color: #4f46e5;
    font-weight: 600;
    border-color: #c7d2fe;
    background: #eff6ff;
}

.btn-tweak:hover {
    background: #dbeafe;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.btn-delete-micro {
    color: #64748b;
}

.btn-delete-micro:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

.mock-resume-paper a:hover {
    text-decoration: underline;
}

.res-link-entry {
    display: inline-flex;
    align-items: center;
    gap: 0.2em;
}

.res-link-open {
    font-size: 0.85em;
    text-decoration: none !important;
    opacity: 0.85;
}

.res-link-open:hover {
    opacity: 1;
}

.mock-resume-paper:focus {
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.15), 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Legacy resume typography block removed.
   Resume spacing/typography is now controlled exclusively by `.resumePaper` and its variants. */

/* Small design preview cards for layouts */
.design-preview-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.5rem 0.5rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    cursor: pointer;
    min-width: 90px;
    transition: all 0.15s ease;
}

/* ───────────────────────────────────────────
   QUALITY FEEDBACK WIDGET
   ─────────────────────────────────────────── */

/* ───────────────────────────────────────────
   CUSTOMIZE DROPDOWN POPOVER
   ─────────────────────────────────────────── */
.customize-dropdown-container {
    position: relative;
    display: inline-flex;
}

.customize-popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1.5rem;
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideUpFade 0.3s ease;
}

.customize-popover.active {
    display: flex;
}

.popover-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popover-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.design-picker-group {
    display: flex;
    gap: 0.25rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 10px;
}

.design-pill {
    padding: 0.4rem 1rem;
    border: none;
    background: transparent;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.design-pill:hover {
    color: #475569;
    background: rgba(255, 255, 255, 0.5);
}

.design-pill.active {
    background: #ffffff;
    color: #4f46e5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-btn {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
}

.settings-btn:hover {
    color: #4f46e5;
    background: #f5f3ff;
}

.popover-toggle-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popover-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
}

.toolbar-actions-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-end;
    width: 100%;
}

.toolbar-main-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toolbar-designs-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
    width: 100%;
    white-space: nowrap;
}

.status-badge.optimized {
    white-space: nowrap;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}



/* ───────────────────────────────────────────
   Resume Design System (Rebuilt)
   Classic / Modern / Executive (ATS-safe)
   ─────────────────────────────────────────── */

/* Base paper: single source of truth for spacing + typography rhythm */
.resumePaper {
    /* Typography tokens */
    --rp-font-classic: 'Times New Roman', Times, serif;
    --rp-font-modern: 'Inter', 'Roboto', sans-serif;
    --rp-font-exec: 'Arial', 'Helvetica', sans-serif;

    --rp-body-size: 10.5pt;
    --rp-body-line: 1.15;
    --rp-h1-size: 20pt;
    --rp-h2-size: 11pt;
    --rp-bullet-size: 10.5pt;
    --rp-bullet-line: 1.2;

    /* Spacing scale (ultra-compact) */
    --rp-space-1: 1pt;
    --rp-space-2: 1.5pt;
    --rp-space-3: 2pt;
    --rp-space-4: 3.5pt;

    font-size: var(--rp-body-size);
    line-height: var(--rp-body-line);
}

/* Eliminate UA default spacing inside the resume paper */
.resumePaper h1,
.resumePaper h2,
.resumePaper p {
    margin: 0;
    padding: 0;
}

.resumePaper ul {
    margin: 0;
    padding: 0;
    list-style: none; /* Default for resume lists, overridden by class */
}

.resumePaper li {
    margin: 0;
    padding: 0;
}

/* Vertical rhythm */
.resumePaper .res-section { margin-bottom: var(--rp-space-4); }
.resumePaper .res-name {
    font-size: var(--rp-h1-size);
    font-weight: 800;
    text-align: center;
    margin: 0 0 var(--rp-space-1) 0;
    color: #000;
}
.resumePaper .res-job-title-header {
    font-size: 12pt;
    text-align: center;
    font-weight: 600;
    margin: 0 0 var(--rp-space-1) 0;
}
.resumePaper .res-header .res-contact-info {
    text-align: center;
    margin: 0 0 var(--rp-space-3) 0;
    font-size: 10.5pt;
    line-height: 1.2;
}
.resumePaper .res-pipe { margin: 0 4px; color: #000; }
.resumePaper ul.res-skills-list { 
    list-style-type: disc !important; 
    padding-left: 1.4em;
}
.resumePaper .res-skill-row { 
    margin-bottom: var(--rp-space-1); 
    display: list-item !important;
}
.resumePaper .res-row { 
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    line-height: 1.18; 
}

@media (max-width: 540px) {
    .resumePaper .res-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2pt;
    }
    .resumePaper .res-location,
    .resumePaper .res-date {
        font-size: 0.9em;
        opacity: 0.8;
    }
}

.resumePaper .res-org { font-weight: 500; }
.resumePaper .res-title { font-weight: 700; font-style: normal; }
.resumePaper .res-location,
.resumePaper .res-date { flex-shrink: 0; }
.resumePaper .res-section .res-section-title {
    font-size: var(--rp-h2-size);
    margin: 0 0 var(--rp-space-2) 0;
    padding-bottom: 1pt;
    font-weight: 700;
}
.resumePaper .res-summary-text { margin: 0 0 var(--rp-space-2) 0; line-height: 1.22; }
.resumePaper .res-item { margin-bottom: var(--rp-space-3); }
.resumePaper .res-item-header { margin-bottom: var(--rp-space-1); }
.resumePaper ul.res-bullets { 
    margin: 0; 
    padding-left: 1.4em; 
    list-style-type: disc !important;
}
.resumePaper ul.res-bullets li {
    font-size: var(--rp-bullet-size);
    line-height: var(--rp-bullet-line);
    margin-bottom: var(--rp-space-2);
    display: list-item !important;
}
.resumePaper ul.res-bullets li:last-child { margin-bottom: 0; }


/* Certifications sub-heading (rendered inline under Education) */
.resumePaper .res-section-subtitle {
    font-size: calc(var(--rp-h2-size) - 0.5pt);
    font-weight: 700;
    margin: var(--rp-space-4) 0 var(--rp-space-2) 0;
    padding-bottom: 2pt;
    border-bottom: 1px dashed #aaa;
}
.resumePaper--classic .res-section-subtitle {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #000;
}
.resumePaper--modern .res-section-subtitle {
    color: #1f2937;
    border-bottom: 1px dashed #d1d5db;
}
.resumePaper--executive .res-section-subtitle {
    text-align: center;
}
.res-cert-item { margin-top: var(--rp-space-2); }

/* Variant: Classic (ATS strict) */

.resumePaper--classic { font-family: var(--rp-font-classic); }
.resumePaper--classic .res-section-title {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #000;
    color: #000;
}
.resumePaper--classic .res-summary-text,
.resumePaper--classic .res-skill-row,
.resumePaper--classic .res-row,
.resumePaper--classic ul.res-bullets li {
    color: #000;
}

/* Variant: Modern (light accents, still ATS-safe) */
.resumePaper--modern { font-family: var(--rp-font-modern) !important; }
.resumePaper--modern .res-name { font-weight: 800; letter-spacing: -0.02em; color: #111827; }
.resumePaper--modern .res-section-title {
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
}

/* Variant: Executive (premium header/dividers, ATS-safe) */
.resumePaper--executive { font-family: var(--rp-font-exec) !important; }
.resumePaper--executive .res-name {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.resumePaper--executive .res-section-title {
    text-align: center;
    border-bottom: none;
    position: relative;
    margin-bottom: 12pt; /* intentional premium breathing room */
}
.resumePaper--executive .res-section-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 2px;
    background: #111827;
    margin: 5pt auto 0;
}


/* Link Toggle Component */
.link-style-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.link-toggle-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 18px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4f46e5;
}

input:checked + .slider:before {
    transform: translateX(14px);
}

.mock-resume-paper a {
    color: #4f46e5;
    text-decoration: underline;
}

.mock-resume-paper[contenteditable="true"] a {
    pointer-events: auto;
    cursor: pointer;
}

/* Paper Base — Standardize for high-end look */
#coverLetterPaper {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
    cursor: text;
}

/* Fix for the 'blue highlight on scroll' issue */
/* We reduce the selection intensity and ensure that the container itself isn't highlighting unwanted areas */
#coverLetterPaper::selection,
#coverLetterPaper *::selection {
    background: rgba(79, 70, 229, 0.1); /* Very subtle violet tint instead of jarring blue */
    color: inherit;
}

/* ── COMMON CL COMPONENT CLASSES (Sync with Edge Function Prompt) ── */
.cl-header-layout { margin-bottom: 1.5rem; }
.cl-name { margin: 0; line-height: 1; }
.cl-title { margin-top: 0.15rem; font-weight: 600; }
.cl-contact-info { font-size: 0.85rem; line-height: 1.4; }
.cl-divider { border: none; height: 1px; background: #e2e8f0; margin: 1rem 0; }
.cl-meta-row { display: flex; justify-content: space-between; margin-bottom: 1.5rem; font-size: 0.9rem; }
.cl-closing { margin-top: 1.5rem; line-height: 1.5; font-size: 11pt; }
.cl-signature { font-weight: 700; margin-top: 0.25rem; }

/* ── CLASSIC (THE HARVARD LOOK) ──────────────── */
.cl-design-classic {
    font-family: 'Times New Roman', Times, serif !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
    padding: 0.5in 0.8in;
}

.cl-design-classic .cl-header-layout {
    text-align: center;
    border-bottom: 0.5pt solid #1a1a1a;
    padding-bottom: 1rem;
}

.cl-design-classic .cl-name {
    font-size: 24pt;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cl-design-classic .cl-title {
    font-size: 9pt;
    font-style: italic;
    color: #444;
    margin-top: 0.25rem;
}

.cl-design-classic .cl-contact-info {
    margin-top: 0.5rem;
    font-size: 8.5pt;
    color: #555;
}

.cl-design-classic .cl-divider { display: none; }

.cl-design-classic .cl-meta-row {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    font-style: italic;
}

.cl-design-classic p {
    line-height: 1.6;
    margin-bottom: 10pt;
    text-align: justify;
    font-size: 10.5pt;
}

.cl-design-classic .cl-closing {
    text-align: right; margin-top: 2rem;
}

/* ── MODERN (THE TECH LOOK) ──────────────── */
.cl-design-modern {
    font-family: 'Inter', 'Roboto', sans-serif !important;
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 0.5in 0.6in;
    border-top: 12px solid #4f46e5 !important;
}

.cl-design-modern .cl-header-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cl-design-modern .cl-name {
    font-size: 24pt;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: #4f46e5;
}

.cl-design-modern .cl-title {
    font-size: 10pt;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
}

.cl-design-modern .cl-contact-info {
    text-align: right;
    color: #64748b;
    font-weight: 500;
}

.cl-design-modern .cl-divider {
    height: 1.5px;
    background: linear-gradient(90deg, #4f46e5, transparent);
}

.cl-design-modern .cl-meta-row {
    color: #4f46e5;
    font-weight: 700;
}

.cl-design-modern p {
    line-height: 1.7;
    color: #334155;
    margin-bottom: 12pt;
    font-size: 10.5pt;
}

.cl-design-modern .cl-signature { color: #4f46e5; }

/* ── EXECUTIVE (THE CLEAN BESPOKE LOOK) ──────────────── */
.cl-design-executive {
    font-family: 'Arial', 'Helvetica', sans-serif !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
    padding: 0.4in 0.6in !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
}

.cl-design-executive .cl-header-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.cl-design-executive .cl-name {
    font-size: 24pt;
    font-weight: 800;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cl-design-executive .cl-title {
    font-size: 9pt;
    font-weight: 600;
    color: #0ea5e9;
    margin-top: 0.25rem;
}

.cl-design-executive .cl-contact-info {
    text-align: right;
    font-size: 8.5pt;
    color: #475569;
}

.cl-design-executive .cl-divider {
    height: 3px;
    background: #0ea5e9;
}

.cl-design-executive .cl-meta-row {
    border-left: 4px solid #0ea5e9;
    padding-left: 1rem;
}

.cl-design-executive .cl-recipient {
    font-weight: 800;
}

.cl-design-executive p {
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 10pt;
    color: #1e293b;
}

.cl-design-executive .cl-signature { color: #0ea5e9; }

/* ───────────────────────────────────────────
   MASTER CV SELECTION CARDS (Issue 3 Redesign)
   ─────────────────────────────────────────── */

/* Outer panel that wraps the whole Master CV view */
.master-cv-panel {
    max-width: 860px;
    margin: 0 auto;
}

.master-cv-panel-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.master-cv-panel-header h3 {
    font-size: 1.375rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.35rem 0;
}

.master-cv-panel-header p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Grid of resume choice cards (up to 2 side-by-side on wide screens) */
.mcv-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Individual choice card */
.mcv-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    position: relative;
    user-select: none;
}

.mcv-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Active / selected state */
.mcv-card.mcv-card--active {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), 0 4px 16px rgba(99, 102, 241, 0.12);
    background: #fafbff;
}

/* Top row: icon + name + primary badge */
.mcv-card-top {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.mcv-card-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s;
}

.mcv-card--active .mcv-card-icon-wrap {
    background: #6366f1;
}

.mcv-card--active .mcv-card-icon-wrap svg {
    stroke: #ffffff;
}

.mcv-card-meta {
    flex: 1;
    min-width: 0;
}

.mcv-card-filename {
    font-weight: 700;
    font-size: 0.975rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.mcv-card-date {
    font-size: 0.775rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

/* "Primary" badge pill */
.mcv-badge-primary {
    flex-shrink: 0;
    background: #6366f1;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* Selection radio row */
.mcv-card-select-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.875rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: background 0.15s, border-color 0.15s;
}

.mcv-card--active .mcv-card-select-row {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.mcv-card-select-row input[type="radio"] {
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.mcv-card-select-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    flex: 1;
}

.mcv-card--active .mcv-card-select-row label {
    color: #4338ca;
}

/* Bottom action row: "View PDF" toggle + download */
.mcv-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.mcv-btn-view {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #6366f1;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.875rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.15s, border-color 0.15s;
}

.mcv-btn-view:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.mcv-btn-download {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    transition: color 0.15s;
}

.mcv-btn-download:hover {
    color: #475569;
}

/* Expandable PDF preview (hidden by default) */
.mcv-pdf-preview {
    display: none;
    margin-top: 0.25rem;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.mcv-pdf-preview.mcv-pdf-open {
    display: block;
}

/* Checkmark indicator on active card (top-right corner) */
.mcv-card-check {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6366f1;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

.mcv-card--active .mcv-card-check {
    display: flex;
}

@media (max-width: 640px) {
    .mcv-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Paywall & Security Enhancements */
body.free-tier-active .mock-resume-paper,
body.free-tier-active #aiResumePaper,
body.free-tier-active #coverLetterPaper {
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }

    .mock-resume-paper {
        font-size: 9.5pt !important;
        padding: 1rem !important;
        min-height: auto !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .mock-resume-paper h1.res-name {
        font-size: 18pt !important;
    }

    .res-section h2.res-section-title {
        font-size: 11pt !important;
    }

    .res-org, .res-title, .res-location, .res-date, ul.res-bullets li {
        font-size: 9.5pt !important;
    }

    .suggestions-carousel {
        padding-bottom: 0.5rem !important;
    }

    /* Neater Card Refinements */
    .resume-card .job-title {
        font-size: 0.95rem !important;
    }

    .resume-card .company-name {
        font-size: 0.8rem !important;
    }

    .resume-card .status-badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.5rem !important;
    }

    .resume-card .date-added {
        font-size: 0.7rem !important;
    }

    .resume-card .view-edit-btn {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.75rem !important;
    }

    /* Resume Toolbar Mobile Overrides */
    .resume-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        padding: 1rem;
    }

    .resume-toolbar-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
        width: 100%;
    }

    .resume-toolbar-left .status-badge {
        width: 100%;
        justify-content: center;
    }

    .save-status-container {
        width: 100%;
        justify-content: center;
    }

    .resume-toolbar-right {
        align-items: stretch;
        width: 100%;
    }

    .toolbar-actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        text-align: center;
        white-space: normal;
    }

    .toolbar-main-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .toolbar-main-actions > div {
        width: 100%;
        display: flex !important;
    }

    .toolbar-hint {
        order: 2;
    }

    #btnDownloadPdf {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    .quality-badge {
        justify-content: center;
        width: 100%;
    }

    .toolbar-designs-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .design-preview-card {
        min-width: 70px;
        flex: 1 1 30%;
    }

    .link-style-toggle {
        width: 100%;
        justify-content: center;
        order: 10;
        margin-top: 0.5rem;
    }
}


/* ───────────────────────────────────────────
   TOAST NOTIFICATION STYLES
   ─────────────────────────────────────────── */
#toastContainer {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    color: #1e293b;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    font-size: 0.9375rem;
    font-weight: 500;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(.21,1.02,.73,1);
    transition: all 0.3s ease;
}

.toast.hiding {
    opacity: 0;
    transform: translateX(100%);
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid #4f46e5;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) translateY(0);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* Mobile Toast Optimization */
@media (max-width: 640px) {
    #toastContainer {
        bottom: auto !important;
        top: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .toast {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 420px;
        font-size: 0.85rem !important;
        padding: 0.75rem 1rem !important;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2) !important;
        border-radius: 12px !important;
        animation: toastSlideInTop 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .toast.hiding {
        transform: translateY(-20px) !important;
        opacity: 0 !important;
    }
}

@keyframes toastSlideInTop {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ───────────────────────────────────────────
   KEYWORD HEATMAP & ONBOARDING
   ─────────────────────────────────────────── */
.keyword-highlight {
    background: rgba(99, 102, 241, 0.15);
    border-bottom: 2px solid #6366f1;
    border-radius: 2px;
    padding: 0 0.1em;
    font-weight: 600;
}

@media print {
    .keyword-highlight {
        background: transparent !important;
        border-bottom: none !important;
        padding: 0 !important;
        font-weight: inherit !important;
    }
}

.pdf-mode .keyword-highlight {
    background: transparent !important;
    border-bottom: none !important;
    padding: 0 !important;
    font-weight: inherit !important;
}

/* Shepherd Base Theme Overrides */
.shepherd-theme-custom {
    font-family: 'Inter', sans-serif !important;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.shepherd-theme-custom .shepherd-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.shepherd-theme-custom .shepherd-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.shepherd-theme-custom .shepherd-text {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    padding: 1.25rem;
}
.shepherd-theme-custom .shepherd-button {
    background: #4f46e5;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}
.shepherd-theme-custom .shepherd-button:hover {
    background: #4338ca;
}
.shepherd-theme-custom .shepherd-button-secondary {
    background: #f1f5f9;
    color: #64748b;
}
.shepherd-theme-custom .shepherd-button-secondary:hover {
    background: #e2e8f0;
    color: #475569;
}

/* ───────────────────────────────────────────
   SETTINGS / ACCOUNT PAGE (Issue 5 & 6 Style Fixes)
   ─────────────────────────────────────────── */
.settings-state {
    padding: 2rem;
}

.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-title {
    font-size: 2.25rem;
    color: #0f172a;
    margin-bottom: 2rem;
    font-weight: 700;
}

.settings-grid {
    display: grid;
    gap: 2rem;
}

.settings-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.settings-card-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.settings-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.settings-input-group .settings-field {
    flex: 1;
}

#btnUpdateProfile {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    height: 42px;
}

.settings-field {
    display: flex;
    flex-direction: column;
}

.settings-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.settings-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #fff;
}

#btnCopyEmail:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

#btnCopyEmail:active {
    transform: scale(0.95);
}

.settings-card-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.settings-card-desc {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.settings-usage-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-usage-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.settings-usage-label {
    font-weight: 500;
    color: #0f172a;
}

.settings-badge {
    background: #e0e7ff;
    color: #4f46e5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.settings-usage-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.settings-usage-value {
    font-weight: 700;
    color: #0f172a;
}

.settings-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.settings-progress-fill {
    width: 0%;
    height: 100%;
    background: #4f46e5;
    transition: width 0.3s ease;
}

.settings-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.settings-danger-zone {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #fee2e2;
    border-radius: 12px;
    background: #fffafb;
}

.danger-title {
    font-size: 0.9rem;
    color: #991b1b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.danger-desc {
    font-size: 0.8rem;
    color: #b91c1c;
    margin-bottom: 1rem;
}

.btn-danger-outline {
    background: transparent;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-outline:hover {
    background: #fee2e2;
}

/* ───────────────────────────────────────────
   Shared Modals (needed on dashboard settings)
   Note: tracker.css had these styles, but
   dashboard pages only load dashboard.css.
   ─────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    pointer-events: auto;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #0f172a;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem;
}

/* ───────────────────────────────────────────
   PRINT STYLES (High-Quality Native PDF)
   ─────────────────────────────────────────── */
@media print {
    /* Hide all dashboard UI elements */
    .sidebar,
    .mobile-header,
    .mobile-overlay,
    .resume-toolbar,
    .report-header,
    .tabs-container,
    .optimization-summary-card,
    .pagination-controls,
    #paginationControls,
    #clPaginationControls,
    .view-toggle,
    #resumeSearchContainer,
    #coverLettersState .btn-primary,
    .back-btn,
    .toolbar-hint,
    #designPreviewRow,
    #clDesignPreviewRow,
    .link-style-toggle,
    #step-heatmap {
        display: none !important;
    }

    /* Reset layout for full-page resume */
    .app-container {
        display: block !important;
        background: white !important;
        height: auto !important;
    }

    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        background: white !important;
        width: 100% !important;
        height: auto !important;
    }

    .ats-report-container {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        display: block !important;
    }

    /* Show ONLY the active tab content */
    .tab-content {
        display: none !important;
    }
    .tab-content.active {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Hide UI-only elements for printing */
    .res-link-edit-icon, 
    .block-toolbar, 
    .resume-toolbar, 
    .report-header, 
    .tabs-container, 
    .optimization-summary-card,
    .link-editor-popover {
        display: none !important;
    }

    /* Polish the resume paper for printing */
    .mock-resume-paper {
        border: none !important;
        box-shadow: none !important;
        margin: 0 auto !important;
        padding: 0.5in !important; /* Professional margins */
        width: 100% !important;
        max-width: none !important;
        background: white !important;
        color: black !important;
        min-height: auto !important;
        position: relative !important;
    }

    /* Force standard paper behavior */
    @page {
        size: auto;
        margin: 10mm;
    }

    /* Force backgrounds for color designs if needed (e.g. dividers) */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* ───────────────────────────────────────────
   PREMIUM PRINT GUIDE MODAL
   ─────────────────────────────────────────── */
.print-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.print-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.print-modal-content {
    background: white;
    width: 90%;
    max-width: 540px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.print-modal-overlay.active .print-modal-content {
    transform: translateY(0);
}

.print-modal-header {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    padding: 2.5rem 2rem;
    color: white;
    text-align: center;
    position: relative;
}

.print-modal-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.print-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.print-modal-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.5;
}

.print-modal-body {
    padding: 2.5rem 2rem;
}

.print-tip-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.print-tip-visual {
    width: 120px;
    height: 80px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.print-tip-text h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: #0f172a;
    font-weight: 700;
}

.print-tip-text p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

.print-modal-footer {
    display: flex;
    gap: 1rem;
}

.print-modal-btn {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-print-primary {
    background: #4f46e5;
    color: white;
    border: none;
}

.btn-print-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn-print-secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-print-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
}

/* Link Editor Popover Styles */
.link-editor-popover {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 1000;
    border: 1px solid #e2e8f0;
    width: 280px;
    display: none;
    pointer-events: all !important;
}

.link-editor-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    outline: none;
    transition: border-color 0.2s;
}

.link-editor-input:focus {
    border-color: #4f46e5;
}

.link-editor-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
    display: block;
}



/* Link Warning Styles */
.link-warning {
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    display: none;
}

.link-warning.active {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* AI Suggestion Highlight */
@keyframes ai-fade-out {
    0% { background-color: #e0e7ff; }
    80% { background-color: #e0e7ff; }
    100% { background-color: transparent; }
}

.ai-suggestion-flash {
    animation: ai-fade-out 8s ease-out forwards;
    border-radius: 6px;
}



.recovery-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    border: 1px solid #334155;
    animation: slideUp 0.4s ease forwards;
}

.recovery-banner strong {
    color: #38bdf8;
    display: block;
    margin-bottom: 2px;
    font-size: 0.95rem;
}

.recovery-banner span {
    color: #94a3b8;
    font-size: 0.85rem;
}

.btn-restore {
    background: #38bdf8;
    color: #0f172a;
    border: none !important;
    padding: 0.6rem 1.25rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
    transition: all 0.2s !important;
}

.btn-restore:hover {
    background: #7dd3fc !important;
    transform: translateY(-1px);
}

.btn-dismiss {
    background: transparent !important;
    color: #94a3b8 !important;
    border: 1px solid #334155 !important;
    padding: 0.6rem 1.25rem !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 0.85rem !important;
    transition: all 0.2s !important;
}

.btn-dismiss:hover {
    color: #fff !important;
    border-color: #475569 !important;
}

/* Truth Filter Carousel & Mobile Adjustments */
@media (max-width: 640px) {
    #truthFilterModal .modal-content {
        padding: 1.5rem 1.25rem !important;
        border-radius: 20px !important;
    }
    
    #truthFilterModal h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    #truthFilterModal p {
        font-size: 0.85rem !important;
        margin-bottom: 1.5rem !important;
    }

    #truthFilterSkillsList::-webkit-scrollbar {
        height: 4px;
    }
    
    #truthFilterSkillsList::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 10px;
    }
}

/* ───────────────────────────────────────────
   QUALITY FEEDBACK ENHANCEMENTS
   ─────────────────────────────────────────── */



@media (max-width: 768px) {
    .quality-popover-backdrop.active {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: none;
        z-index: 10000;
        animation: fadeIn 0.3s ease;
    }

    .customize-popover {
        display: none; /* Ensure hidden by default on mobile */
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 1.5rem 1.5rem 2.5rem !important;
        box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.3) !important;
        z-index: 10001 !important;
        animation: slideInBottom 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        background: white !important;
    }

    .customize-popover.active {
        display: flex !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


@keyframes slideInBottom {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ============================================
   CVGlide Tour Manager Styles
   ============================================ */
.cvglide-tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: none;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.cvglide-tour-tooltip {
    position: absolute;
    z-index: 10001;
    background: #ffffff;
    border-radius: 16px;
    width: 320px;
    max-width: calc(100vw - 32px); /* Mobile-first responsiveness */
    padding: 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.cvglide-tour-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

.cvglide-tour-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.cvglide-tour-title {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.cvglide-tour-text {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.45;
}

.cvglide-tour-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-tour {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-tour:not(.shepherd-button-secondary) {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-tour.shepherd-button-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.cvglide-tour-highlight {
    position: relative;
    z-index: 10002 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.5), 0 0 30px rgba(79, 70, 229, 0.4) !important;
    transition: box-shadow 0.3s ease;
}

@media (max-width: 640px) {
    .cvglide-tour-tooltip {
        width: calc(100vw - 40px);
        padding: 1rem;
    }
    
    .cvglide-tour-title {
        font-size: 0.95rem;
    }
    
    .cvglide-tour-text {
        font-size: 0.8rem;
    }
}

/* ───────────────────────────────────────────
   ASYNC GENERATION UI
   ─────────────────────────────────────────── */

.card-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #cbd5e1;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: card-spin 0.8s linear infinite;
}

@keyframes card-spin {
    to { transform: rotate(360deg); }
}

.processing-badge {
    animation: pulse-subtle 2s infinite ease-in-out;
    border: 1px solid #e2e8f0;
}

@keyframes pulse-subtle {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.status-badge.failed-badge {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
}


