:root {
    /* Light Theme (Shadcn-like) */
    --background: #ffffff;
    --foreground: #09090b;
    --muted: #f4f4f5;
    --muted-foreground: #71717a;
    --card: #ffffff;
    --card-foreground: #09090b;
    --border: #e4e4e7;
    --primary: #18181b;
    --primary-foreground: #fafafa;
    --accent: #f4f4f5;
    --accent-foreground: #18181b;
    --destructive: #ef4444;
    --destructive-foreground: #fafafa;
    --ring: #18181b;
    --radius: 0.5rem;
    --glass: rgba(255, 255, 255, 0.8);

    /* CV Document Standard A4 metrics (scaled for preview) */
    --cv-bg: #ffffff;
    --cv-text: #000000;
    --cv-primary: #2563eb;
}

[data-theme="dark"] {
    --background: #09090b;
    --foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --card: #09090b;
    --card-foreground: #fafafa;
    --border: #27272a;
    --primary: #fafafa;
    --primary-foreground: #18181b;
    --accent: #27272a;
    --accent-foreground: #fafafa;
    --destructive: #7f1d1d;
    --destructive-foreground: #fafafa;
    --ring: #d4d4d8;
    --glass: rgba(9, 9, 11, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* --- Typography & Global Utilities --- */
a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea {
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

.force-hidden {
    display: none !important;
}

/* --- Navbar --- */
.navbar {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.navbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.navbar-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .navbar-bottom {
    background-color: rgba(255, 255, 255, 0.02);
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}


@media (max-width: 768px) {
    .navbar-top {
        padding: 0.75rem 1rem;
    }

    .navbar-bottom {
        padding: 0.75rem 0.75rem;
    }

    .nav-actions {
        gap: 0.75rem;
        width: 100%;
    }

    .nav-actions .btn {
        flex: 1;
        min-width: 120px;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .btn-text {
        display: inline;
    }

    .logo span {
        font-size: 1.125rem;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--primary);
    color: var(--primary-foreground);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Template Change Toast */
.toast-template {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: rgba(239, 68, 68, 0.3);
    /* Red 30% */
    color: var(--foreground);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 200;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.2);
}


.toast-template.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--muted);
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--accent);
}

.btn-outline {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--foreground);
}

.btn-outline:hover {
    background-color: var(--accent);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
    color: var(--foreground);
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: var(--accent);
}

.btn-danger {
    color: var(--destructive);
}

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

[data-theme="dark"] .btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

.full-width {
    width: 100%;
}

/* --- Main Layout --- */
.container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 110px);
    /* Adjusted for 2-tier navbar */
}

.panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Base states for mobile (Tabs pattern) */
.panel-editor {
    display: none;
}

.panel-preview {
    display: none;
    background-color: var(--muted);
}

.panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Tabs Bar */
.mobile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--background);
    position: sticky;
    top: 110px;
    z-index: 40;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    border-bottom: 3px solid transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
    border-top: none;
    border-left: none;
    border-right: none;
}

.tab-btn:hover {
    background-color: var(--muted);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: var(--accent);
}

/* --- Forms & Accordion --- */
.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.accordion {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--card);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    font-weight: 600;
    background: transparent;
    color: var(--foreground);
}

.accordion-header .header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.accordion-header .chevron {
    transition: transform 0.3s;
}

.accordion-header[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
}

/* Form Fields */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.form-group input,
.form-group textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: transparent;
    color: var(--foreground);
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.1);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: 0 0 0 2px rgba(250, 250, 250, 0.1);
}

/* Dynamic List Items */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    background-color: var(--accent);
}

.form-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Template Selector */
.template-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.template-option input {
    display: none;
}

.template-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.template-option input:checked+.template-card {
    border-color: var(--primary);
    background-color: var(--accent);
}

.template-preview {
    width: 100%;
    height: 120px;
    background-color: #e5e5e5;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background-size: cover;
    background-position: top;
}

[data-theme="dark"] .template-preview {
    background-color: #3f3f46;
}

/* Warning Box for Photo Profile */
.docx-warning2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    background: var(--muted);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    border-left: 3px solid #3b82f6;
    width: 100%;
    margin-bottom: 1rem;
}

[data-theme="dark"] .docx-warning2 {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #60a5fa;
}

.docx-warning2 .icon-bullet {
    background: #3b82f6;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

[data-theme="dark"] .docx-warning2 .icon-bullet {
    background: #60a5fa;
}

/* Mock preview gradients for templates */
.modern-thumb {
    background: linear-gradient(135deg, #2563eb 20%, #e5e5e5 20%);
}

.classic-thumb {
    background: linear-gradient(to bottom, #1f2937 15%, #e5e5e5 15%);
}

.minimalist-thumb {
    background: linear-gradient(to bottom, #ffffff 100%, #e5e5e5 0%);
    border: 1px solid #ccc;
}

.min-v2-thumb {
    background: linear-gradient(to left, #eff6ff 0%, #ffffff 50%, #eff6ff 100%);
    border: 1px solid #ccc;
}

.min-v3-thumb {
    background: linear-gradient(to bottom, #eff6ff 15%, #ffffff 15%);
    border: 1px solid #ccc;
    border-left: 3px solid #2563eb;
}

.min-v4-thumb {
    background: linear-gradient(to bottom, #ffffff 100%, #ffffff 100%);
    border: 1px solid #ccc;
    position: relative;
}

.min-v4-thumb::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 10px;
    width: 4px;
    height: 4px;
    background: #2563eb;
    border-radius: 50%;
}

.clas-v2-thumb {
    background: linear-gradient(to bottom, #ffffff 30%, #f3f4f6 30%);
    border: 1px solid #ccc;
}

.clas-v3-thumb {
    background: linear-gradient(to bottom, #ffffff 20%, #f9fafb 20%);
    border: 1px solid #ccc;
    border-top: 3px solid #000;
}

.eng-style-thumb {
    background: #fff;
    border: 1px solid #ccc;
    position: relative;
}

.eng-style-thumb::before {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    top: 20%;
    height: 2px;
    background: #000;
}

.def-style-thumb {
    background: linear-gradient(to right, #ffffff 30%, #f9fafb 30%);
    border: 1px solid #ccc;
}

.industrial-thumb {
    background: linear-gradient(to bottom, #ffffff 25%, #ffffff 25%, #e5e5e5 25%);
    border: 1px solid #ccc;
    position: relative;
}

.industrial-thumb::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    width: 25px;
    height: 30px;
    background: #ccc;
    border-radius: 2px;
}

/* --- Preview Document Wrapping --- */
.preview-wrapper {
    display: flex;
    justify-content: center;
    padding-bottom: 2rem;
}

.cv-document {
    width: 210mm;
    min-width: 210mm;
    flex-shrink: 0;
    min-height: 297mm;
    height: auto;
    background-color: var(--cv-bg);
    color: var(--cv-text);
    padding: 12.7mm;
    box-sizing: border-box;
    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;
    overflow: visible;
    /* must be visible for absolute page-break indicators */
    transform-origin: top center;
    position: relative;
}
[data-theme="dark"] .cv-document {
    box-shadow: 0 0 0 1px #333;
}

.cv-contact-item a,
.contact-link,
.eng-contact-table a {
    color: #000 !important;
    text-decoration: none !important;
}

.cv-contact-item a:hover,
.contact-link:hover,
.eng-contact-table a:hover {
    text-decoration: none !important;
}

/* --- Theme Management --- */
/* Common */
/* Headers Alignment & Profiles */
/* Headers Alignment & Profiles */
.cv-header {
    display: flex;
    gap: 1.5rem;
    transition: all 0.3s ease;
    align-items: center;
}

.cv-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.cv-header[data-align="left"] {
    flex-direction: row;
    justify-content: flex-start;
}

.cv-header[data-align="left"] .cv-header-content {
    text-align: left;
    align-items: flex-start;
}

.cv-header[data-align="left"] .cv-contact-info {
    justify-content: flex-start;
}

.cv-header[data-align="center"] {
    flex-direction: column;
    justify-content: center;
}

.cv-header[data-align="center"] .cv-header-content {
    text-align: center;
    align-items: center;
}

.cv-header[data-align="center"] .cv-contact-info {
    justify-content: center;
}

.cv-header[data-align="right"] {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.cv-header[data-align="right"] .cv-header-content {
    text-align: right;
    align-items: flex-end;
}

.cv-header[data-align="right"] .cv-contact-info {
    justify-content: flex-end;
}

.cv-photo-container {
    display: none;
}

.cv-photo-container.show {
    display: block;
}

.cv-photo {
    width: 90px;
    height: 120px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.cv-name {
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.cv-title {
    font-weight: 500;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: #4b5563;
}

.cv-contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.cv-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.cv-contact-item.force-hidden {
    display: none !important;
}

.cv-contact-item svg {
    width: 14px;
    height: 14px;
}

.cv-body {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    text-align: justify;
}

.cv-section {
    page-break-inside: auto;
    margin-bottom: 1rem;
}

.cv-section-title {
    font-size: 1.15rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.4rem;
    page-break-after: avoid;
    break-after: avoid;
}

.cv-item {
    margin-bottom: 0.75rem;
    display: block;
    width: 100%;
}

#section-skills-table,
#section-languages-new,
#section-certificates,
#section-education,
#section-projects {
    /* natural page flow */
}

/* Side-by-side row wrapper (used by minimalist & klasik v5) */
.cv-section-row {
    display: flex;
    flex-direction: row;
    gap: 0;
    /* NO break-inside:avoid here — rows can span pages naturally to avoid white gaps in PDF */
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 0.5rem;
    align-items: flex-start;
}

.cv-section-row-label {
    flex-shrink: 0;
    align-self: flex-start;
}

.cv-section-row-body {
    flex: 1;
    min-width: 0;
}

/* Page break visual divider in preview — absolutely positioned, does NOT affect layout */
.page-break-indicator {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 2px dashed #ff6b6b;
    pointer-events: none;
    z-index: 100;
    overflow: visible;
}

.page-break-indicator::after {
    content: 'Halaman ' attr(data-page);
    display: block;
    position: absolute;
    left: 50%;
    top: -9px;
    transform: translateX(-50%);
    background: #ff6b6b;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    padding: 1px 8px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0.9;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cv-section-content p {
    white-space: pre-wrap;
    margin-bottom: 0.5rem;
    text-align: justify;
}

/* Ensure bullets display in ALL section content (certificates, skills, etc.) */
.cv-section-content ul {
    padding-left: 1.25rem;
    margin-top: 0.25rem;
    list-style-type: disc;
}

.cv-section-content li {
    margin-bottom: 0.2rem;
}

/* Items (Experience / Education) */
.cv-item {
    margin-bottom: 1rem;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2rem;
}

.cv-item-title {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
}

.cv-item-date {
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
}

.cv-item-subtitle {
    font-weight: 500;
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 0.25rem;
}

.cv-item-desc {
    font-size: 0.9rem;
    text-align: justify;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.cv-item-desc ul {
    padding-left: 1.25rem;
    margin-top: 0.25rem;
    list-style-type: disc;
}

.cv-item-desc li {
    margin-bottom: 0.2rem;
}

.cv-skill-group {
    margin-bottom: 0.5rem;
}

.cv-skill-group strong {
    display: block;
    font-size: 0.85rem;
    color: #4b5563;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}

.cv-skill-group p {
    margin: 0;
}

/* Skills List (Table-based) */
.cv-skills-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.cv-skills-table td {
    vertical-align: top;
}

.cv-skills-table .cv-section-title {
    font-size: 1.05rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.15rem;
    margin-bottom: 0.5rem;
}

.cv-skill-badge {
    display: none;
}

/* Removed badges as per user request */

/* ====== MODERN TEMPLATE ====== */
.template-modern .cv-header {
    border-bottom: 3px solid var(--cv-primary);
    padding-bottom: 1rem;
}

.template-modern .cv-header-content {
    gap: 0.25rem;
}

.template-modern .cv-name {
    color: var(--cv-primary);
    font-size: 1.7rem;
}

.template-modern .cv-section-title {
    color: var(--cv-primary);
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.25rem;
    margin-bottom: 1rem;
}

.template-modern .cv-item-title {
    color: var(--cv-primary);
}

.template-modern .cv-skill-badge {
    color: var(--cv-primary);
}

/* ====== CLASSIC TEMPLATE (ATS Friendly) ====== */
.template-classic {
    font-family: 'Playfair Display', serif;
}

.template-classic .cv-header {
    border-bottom: 1px solid #000;
    padding-bottom: 1rem;
}

.template-classic .cv-name {
    font-size: 1.6rem;
    color: #000;
}

.template-classic .cv-title {
    color: #333;
}

.template-classic .cv-contact-info {
    color: #333;
}

.template-classic .cv-section-title {
    color: #000;
    text-align: center;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 0.25rem 0;
    background: #fafafa;
}

.template-classic .cv-item-title {
    color: #000;
}

/* ====== MINIMALIST TEMPLATE ====== */
.template-minimalist {
    font-family: 'Inter', sans-serif;
}

.template-minimalist .cv-header {
    padding-bottom: 1.5rem;
}

.template-minimalist .cv-name {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: -1px;
}

.template-minimalist .cv-contact-info {
    margin-top: 0.5rem;
}

.template-minimalist .cv-body {
    gap: 0;
}

/* row spacing handled by cv-section-row padding-bottom */
.template-minimalist .cv-section {
    border-top: 1px solid #eaeaea;
    padding-top: 1rem;
    margin-bottom: 0;
}

.template-minimalist .cv-section-row {
    gap: 1.5rem;
    padding-bottom: 0.75rem;
}

.template-minimalist .cv-section-row-label {
    width: 180px;
    padding-top: 0.1rem;
}

.template-minimalist .cv-section-title {
    font-size: 0.85rem;
    color: #9ca3af;
    letter-spacing: 1px;
    margin: 0;
    text-align: left;
}

.template-minimalist .cv-item {
    margin-bottom: 0.5rem;
}

.template-minimalist .cv-item-header {
    flex-direction: column;
}

.template-minimalist .cv-item-date {
    order: -1;
    margin-bottom: 0.1rem;
}

/* ====== MINIMALIST v2 TEMPLATE ====== */
.template-minimalist-v2 {
    font-family: 'Inter', sans-serif;
}

.template-minimalist-v2 .cv-name {
    font-size: 1.6rem;
    color: #1e3a8a;
    letter-spacing: 0.5px;
}

.template-minimalist-v2 .cv-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
}

.template-minimalist-v2 .cv-section-title::before,
.template-minimalist-v2 .cv-section-title::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #bfdbfe;
    margin: 0 1rem;
}

.template-minimalist-v2 .cv-item-title {
    color: #1f2937;
}

/* ====== MINIMALIST v3 TEMPLATE ====== */
.template-minimalist-v3 {
    font-family: 'Inter', sans-serif;
}

.template-minimalist-v3 .cv-name {
    font-size: 1.6rem;
    color: #1e3a8a;
    letter-spacing: 0.5px;
}

.template-minimalist-v3 .cv-section-title {
    background-color: #eff6ff;
    border-left: 4px solid #2563eb;
    color: #2563eb;
    padding: 0.35rem 0.75rem;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    text-transform: none;
    letter-spacing: 0.5px;
}

.template-minimalist-v3 .cv-item-title {
    color: #1f2937;
}

/* ====== MINIMALIST v4 TEMPLATE ====== */
.template-minimalist-v4 {
    font-family: 'Inter', sans-serif;
}

.template-minimalist-v4 .cv-name {
    font-size: 1.6rem;
    color: #1e3a8a;
    letter-spacing: 0.5px;
}

.template-minimalist-v4 .cv-section-title {
    color: #2563eb;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    text-transform: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-minimalist-v4 .cv-section-title::before {
    content: "●";
    font-size: 0.8rem;
}

.template-minimalist-v4 .cv-item-title {
    color: #1f2937;
}

/* ====== CLASSIC v2 TEMPLATE ====== */
.template-classic-v2 {
    font-family: 'Inter', sans-serif;
}

.template-classic-v2 .cv-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.template-classic-v2 .cv-name {
    font-size: 2.2rem;
    color: #111827;
    letter-spacing: -0.5px;
    text-transform: none;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.template-classic-v2 .cv-section-title {
    font-size: 1rem;
    color: #6b7280;
    letter-spacing: 1.5px;
    border-bottom: none;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 700;
}

.template-classic-v2 .cv-item-title {
    color: #111827;
    font-size: 1.1rem;
}

/* ====== CLASSIC v3 TEMPLATE ====== */
.template-classic-v3 {
    font-family: 'Inter', sans-serif;
}

.template-classic-v3 .cv-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.template-classic-v3 .cv-name {
    font-size: 2.5rem;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.template-classic-v3 .cv-section-title {
    font-size: 1.15rem;
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    border-top: 2px solid #000;
    padding-top: 0.5rem;
    margin-bottom: 1.25rem;
}

.template-classic-v3 .cv-item-title {
    color: #000;
    font-size: 1.1rem;
    font-weight: 700;
}

/* ====== ENGLISH STYLE TEMPLATE ====== */
.template-english-style {
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.template-english-style * {
    font-family: 'Times New Roman', Times, serif !important;
    font-size: 12pt !important;
    color: #000 !important;
    line-height: 1.5;
    letter-spacing: normal;
}

.template-english-style h1,
.template-english-style h2,
.template-english-style h3 {
    font-size: 12pt !important;
    font-weight: bold !important;
}

.template-english-style .cv-name {
    text-align: center;
    text-transform: uppercase;
    padding-bottom: 0.25rem;
    margin-bottom: 0.5rem;
    display: block;
    width: 100%;
    border-bottom: 3px double #000;
}

.template-english-style .cv-header-content:has(.cv-title:not([style*="display: none"])) .cv-name {
    border-bottom: none;
    margin-bottom: 0;
}

.template-english-style .cv-header {
    flex-direction: column;
    align-items: center;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    gap: 0;
}

.template-english-style .cv-header-content {
    text-align: center;
    width: 100%;
}

.template-english-style .cv-title {
    display: block;
    font-size: 11pt !important;
    font-weight: bold !important;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.template-english-style .cv-title:not([style*="display: none"]) {
    border-bottom: 3px double #000;
    padding-bottom: 0.25rem;
    margin-bottom: 0.5rem;
}

.template-english-style .cv-contact-info {
    flex-direction: column;
    width: 100%;
    text-align: left;
    align-items: flex-start;
    gap: 0.2rem;
}

.template-english-style .cv-contact-item svg {
    display: none;
}

.template-english-style .cv-contact-info::before {
    content: "DATA PRIBADI";
    display: block;
    width: 100%;
    font-weight: bold !important;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    padding-bottom: 0.15rem;
    margin-bottom: 0.25rem;
    margin-top: 0.5rem;
}

.template-english-style .cv-section {
    border-top: none;
    padding-top: 0;
    margin-bottom: 0.5rem;
}

.template-english-style .cv-section-title {
    font-weight: bold !important;
    text-transform: uppercase;
    border-bottom: 1px solid #000;
    border-top: 1px solid #000;
    padding: 0.2rem 0;
    margin-bottom: 0.5rem;
    text-align: left;
}

.template-english-style #section-summary .cv-section-title {
    display: none;
}

.template-english-style .cv-item-title {
    font-weight: bold !important;
}

.template-english-style .cv-item-subtitle {
    margin-bottom: 0.25rem;
    font-style: normal !important;
}

.template-english-style .cv-item-date {
    font-weight: bold !important;
}

.template-english-style .cv-item-desc {
    text-align: justify;
}

/* Contact Table English */
.template-english-style .eng-contact-table td {
    padding: 0.1rem 0;
    border: none !important;
}

.template-english-style .eng-contact-table {
    margin-top: 5mm;
}

/* ====== DEFAULT STYLE TEMPLATE ====== */
.template-default-style {
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.template-default-style * {
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    color: #000;
    line-height: 1.5;
    letter-spacing: normal;
}

.template-default-style .cv-name {
    font-size: 16pt !important;
    font-weight: bold !important;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    display: block;
    width: 100%;
}

.template-default-style .cv-header {
    flex-direction: column;
    border-bottom: none;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.template-default-style .cv-header-content {
    width: 100%;
    gap: 0.25rem;
}

.template-default-style .cv-contact-info {
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.template-default-style .cv-contact-item svg {
    display: none;
}

.template-default-style .cv-title {
    display: none;
}

.template-default-style .cv-body {
    gap: 0;
}

/* row spacing handled by cv-section-row padding-bottom */
.template-default-style .cv-section {
    border-top: none;
    padding-top: 0;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.template-default-style .cv-section-row {
    gap: 1rem;
    padding-bottom: 1rem;
}

.template-default-style .cv-section-row-label {
    width: 130px;
    text-align: left;
    padding-top: 0.05rem;
}

.template-default-style .cv-section-title {
    font-weight: bold !important;
    font-size: 11pt !important;
    text-transform: uppercase;
    border: none;
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
}

.template-default-style .cv-section-content {
    flex: 1;
    text-align: justify;
    padding-right: 2mm;
    box-sizing: border-box;
    min-width: 0;
}

.template-default-style .cv-item {
    margin-bottom: 0.4rem;
}

.template-default-style .cv-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.1rem;
}

.template-default-style .cv-item-title {
    font-weight: bold !important;
}

.template-default-style .cv-item-subtitle {
    font-style: italic;
    margin-bottom: 0.25rem;
}

.template-default-style .cv-item-date {
    font-weight: normal;
}

/* ====== INDUSTRIAL TEMPLATE ====== */
.template-industrial {
    font-family: 'Inter', sans-serif;
    color: #000;
}

.template-industrial .cv-header {
    display: flex;
    gap: 1.5rem;
    border-bottom: none;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    flex-direction: row !important; /* Force row layout for industrial */
    justify-content: flex-start !important;
    align-items: center !important;
}

.template-industrial .cv-header-content {
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.template-industrial .cv-photo-container {
    flex-shrink: 0;
    display: none;
}

.template-industrial .cv-photo-container.show {
    display: block;
}

.template-industrial .cv-photo {
    width: 105px;
    height: 140px;
    border: 1px solid #000;
    border-radius: 0;
    object-fit: cover;
}

.template-industrial .cv-name {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.35rem;
    color: #000;
    text-transform: uppercase;
}

.template-industrial .cv-contact-info {
    font-size: 0.85rem;
    color: #333;
    width: 100%;
}

.template-industrial .industrial-contact-grid {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
    text-align: left;
}

.template-industrial .cv-contact-item a {
    color: #2563eb;
    text-decoration: underline;
}

.template-industrial .cv-contact-item strong {
    font-weight: 700;
}

.template-industrial .cv-contact-item strong {
    font-weight: 700;
}

.template-industrial .cv-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1.5px solid #000;
    padding-bottom: 0.15rem;
    margin-bottom: 0.5rem;
}

.template-industrial .cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.1rem;
}

.template-industrial .cv-item-title {
    font-weight: 700;
    font-size: 1rem;
}

.template-industrial .cv-item-date {
    font-weight: 700;
    font-size: 0.9rem;
    font-style: italic;
}

.template-industrial .cv-item-subtitle {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.template-industrial .cv-item-desc {
    font-size: 0.95rem;
}

.template-industrial .cv-section-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}


/* --- Desktop Responsive --- */
@media (min-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mobile-tabs {
        display: none;
    }

    .container {
        flex-direction: row;
    }

    .panel-editor {
        display: block;
        flex: 0 0 45%;
        max-width: 600px;
        border-right: 1px solid var(--border);
    }

    .panel-preview {
        display: block;
        flex: 1;
    }

    /* Scale down A4 to fit preview pane vertically */
    .preview-wrapper {
        height: 100%;
        align-items: flex-start;
    }

    .cv-document {
        transform: scale(0.85);
        /* Default scale on slightly smaller screens */
    }
}

@media (min-width: 1400px) {
    .cv-document {
        transform: scale(1);
    }

    /* 100% on large monitors */
}

/* --- Print Styling --- */
@media print {
    :root {
        --cv-bg: #ffffff;
        --cv-text: #000000;
    }

    /* Force browser to print background colors */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    html,
    body {
        background-color: white !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    .hide-on-print,
    .mobile-tabs {
        display: none !important;
    }

    /* Root container: reset all height/flex so nothing stretches */
    .container {
        display: block !important;
        flex-direction: unset !important;
        height: auto !important;
        min-height: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    /* Hide editor */
    #editor,
    .panel-editor {
        display: none !important;
    }

    /* Preview panel: MUST have height:auto to prevent viewport-height gap */
    #preview,
    .panel-preview {
        display: block !important;
        flex: unset !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
        width: 100% !important;
        overflow: visible !important;
    }

    /* Preview wrapper: height auto, no flex stretching */
    .preview-wrapper {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        overflow: visible !important;
    }

    /* CV Document: no transform, no shadow, keep padding for layout match */
    .cv-document {
        display: block !important;
        transform: none !important;
        box-shadow: none !important;
        width: 210mm !important;
        min-width: unset !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        border: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
    }

    /* CV Body: block in print so sections can flow and split across pages naturally.
       flex-direction:column in Chrome/Edge prevents sections from splitting at page breaks. */
    .cv-body {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
    }

    /* Preserve template colors — only remove decorative effects */
    .cv-document * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Critical: ensure elements hidden via JS (inline style) stay hidden in print */
    [style*="display: none"] {
        display: none !important;
    }

    [style*="display:none"] {
        display: none !important;
    }

    .force-hidden {
        display: none !important;
    }

    /* -------------------------------------------------------
       Side-by-side (Minimalis / Klasik v5) print layout:
       Use padding-left on the row to indent content, and
       position the label absolutely in that padded space.
       → Body is a plain block: splits naturally across pages
       → Indentation is consistent on page 2+ (padding stays)
       → No float/overflow tricks that break bullets or format
    ------------------------------------------------------- */
    .cv-section-row {
        display: block !important;
        position: relative !important;
        page-break-inside: auto;
        break-inside: auto;
        padding-bottom: 0.5rem;
    }

    .cv-section-row-label {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        display: block !important;
    }

    .cv-section-row-body {
        display: block !important;
        overflow: visible !important;
    }

    /* Template-specific: row padding-left = label width + gap */
    .template-minimalist .cv-section-row {
        padding-left: calc(180px + 1.5rem) !important;
    }

    .template-minimalist .cv-section-row-label {
        width: 180px !important;
    }

    .template-default-style .cv-section-row {
        padding-left: calc(130px + 1rem) !important;
    }

    .template-default-style .cv-section-row-label {
        width: 130px !important;
    }

    /* Sections: allow natural flow, no forced breaks */
    .cv-section {
        page-break-inside: auto;
        break-inside: auto;
        margin-bottom: 0;
    }

    .cv-item {
        page-break-inside: auto;
        break-inside: auto;
    }

    /* Keep title+date together — avoid orphan headers */
    .cv-item-header {
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-after: avoid;
        break-after: avoid;
    }

    .cv-item-subtitle {
        page-break-before: avoid;
        break-before: avoid;
    }

    /* Hide page break visual indicator in print */
    .page-break-indicator {
        display: none !important;
    }

    /* A4 page */
    @page {
        size: A4 portrait;
        margin: 0;
    }
}


/* Form Photo Preview */
.form-photo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-photo-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.form-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}


/* ============================================ */
/* PHASE 3: AI FEATURES STYLING */
/* ============================================ */

/* AI Buttons */
.btn-ai {
    background: var(--foreground);
    color: var(--background);
    border: 1px solid var(--foreground);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn-ai:hover {
    background: var(--background);
    color: var(--foreground);
    border-color: var(--foreground);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card);
    border-radius: var(--radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

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

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.25rem;
    color: var(--foreground);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .form-group {
    margin-bottom: 1rem;
}

.modal-body select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
}

/* AI Result Box */
.ai-result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--muted);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ATS Score Display */
.ats-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--foreground);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.score-circle {
    text-align: center;
    color: var(--background);
}

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

.score-label {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.score-grade {
    font-size: 2rem;
    font-weight: 700;
    color: var(--background);
}

.ats-status {
    text-align: center;
    margin-bottom: 1.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-pass {
    background: var(--foreground);
    color: var(--background);
    border: 1px solid var(--foreground);
}

.status-warning {
    background: var(--background);
    color: var(--foreground);
    border: 1px solid var(--foreground);
}

.ats-feedback {
    background: var(--muted);
    padding: 1rem;
    border-radius: var(--radius);
}

.ats-feedback h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: var(--foreground);
}

.ats-feedback ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ats-feedback li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.ats-feedback li:last-child {
    border-bottom: none;
}

/* Share Modal */
.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button input {
    flex: 1;
}

.qr-code-container {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--muted);
    border-radius: var(--radius);
}

.qr-code-container img {
    max-width: 250px;
    border-radius: var(--radius);
    background: white;
    padding: 1rem;
}

.share-note {
    padding: 0.75rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

[data-theme="dark"] .share-note {
    background: var(--muted);
    color: var(--foreground);
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--muted);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

#share-loading {
    text-align: center;
    padding: 2rem;
}

#share-loading p {
    margin-top: 1rem;
    color: var(--muted-foreground);
}

/* Info Box */
.info-box {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--foreground);
}

[data-theme="dark"] .info-box {
    background: var(--muted);
    color: var(--foreground);
}

.info-box i {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Keyword Tags */
.keyword-result {
    margin-top: 1.5rem;
}

.keyword-section {
    margin-bottom: 1.5rem;
}

.keyword-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: var(--foreground);
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.keyword-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.keyword-tag.current {
    background: var(--foreground);
    color: var(--background);
    border: 1px solid var(--foreground);
}

.keyword-tag.missing {
    background: var(--background);
    color: var(--foreground);
    border: 1px solid var(--foreground);
}

.text-muted {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-style: italic;
}

/* Toast Variants */
.toast-success {
    background: var(--foreground);
    color: var(--background);
}

.toast-error {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

.toast-warning {
    background: var(--muted);
    color: var(--foreground);
    border: 1px solid var(--border);
}

.toast-info {
    background: var(--foreground);
    color: var(--background);
}

/* Responsive AI Features */
@media (max-width: 768px) {
    .btn-ai .btn-text {
        display: none;
    }
    
    .btn-ai {
        padding: 0.5rem;
    }
    
    .btn-group {
        gap: 0.25rem;
    }
    
    .modal-content {
        max-width: 95%;
        margin: 0.5rem;
    }
    
    .ats-score-display {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .score-value {
        font-size: 2.5rem;
    }
    
    .score-grade {
        font-size: 1.5rem;
    }
}

/* Print: Hide AI Features */
@media print {
    .btn-ai,
    .btn-group,
    .modal {
        display: none !important;
    }
}
