/* ===========================================
   MAIN RESUME BUILDER STYLES
   RESPONSIVE REFACTOR — visual design unchanged
   All var() references preserved exactly.
   clamp(min, preferred, max) used throughout
   so layout scales fluidly between breakpoints.
   Mobile (max-width:768px) blocks untouched.
   =========================================== */

/* ─────────────────────────────────────────
   BASE
───────────────────────────────────────── */
body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    min-height: 100vh;
    overflow: hidden; /* page-level scroll always off */
}

/* ─────────────────────────────────────────
   MAIN HEADER
───────────────────────────────────────── */
.main-header {
    background: var(--white);
    /* clamp: never smaller than 52px, never larger than 64px */
    padding: clamp(10px, 1.5vh, 16px) clamp(14px, 1.5vw, 24px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1vw, 16px);
}

.header-left h1 {
    font-size: clamp(16px, 1.4vw, 22px);
    font-weight: 700;
    background: var(--gradient-green-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.ats-badge {
    background: var(--primary-green);
    color: var(--white);
    padding: clamp(2px, 0.4vh, 4px) clamp(6px, 0.6vw, 10px);
    border-radius: 12px;
    font-size: clamp(10px, 0.8vw, 12px);
    font-weight: 600;
    box-shadow: var(--shadow-green);
}

.header-right {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 12px);
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
    padding: clamp(6px, 0.8vh, 8px) clamp(10px, 1vw, 16px);
    border: none;
    border-radius: 6px;
    font-size: clamp(12px, 0.9vw, 14px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: var(--gradient-green);
    color: var(--white);
    box-shadow: var(--shadow-green);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
    background: linear-gradient(135deg, var(--green-hover) 0%, var(--green-light) 100%);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
}
.btn-secondary:hover {
    background: var(--primary-green);
    color: var(--white);
}

.btn-premium {
    background: var(--gradient-gold) !important;
    color: var(--navy-blue) !important;
    font-weight: 700 !important;
    box-shadow: var(--shadow-gold) !important;
    border: none !important;
}
.btn-premium:hover {
    background: linear-gradient(135deg, var(--gold-hover) 0%, var(--gold-light) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212,175,55,0.3) !important;
}

.icon-btn {
    padding: clamp(4px, 0.5vh, 6px) clamp(6px, 0.6vw, 10px);
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-size: clamp(12px, 0.9vw, 14px);
    color: var(--text-primary);
    transition: all 0.2s;
}
.icon-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-200);
}

/* ─────────────────────────────────────────
   PREVIEW HEADER
───────────────────────────────────────── */
.preview-header {
    background: var(--primary-green);
    background-size: 400% 400%;
    animation: gradientShift 25s ease-in-out infinite;
    padding: clamp(4px, 0.8vh, 6px) clamp(12px, 1.2vw, 20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    /* clamp height so it never overflows on short viewports */
    height: clamp(40px, 6vh, 55px);
    min-height: clamp(40px, 6vh, 55px);
}

.preview-header-left {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 12px);
    justify-self: start;
}

.preview-header-right {
    display: flex;
    align-items: center;
    gap: clamp(5px, 0.6vw, 8px);
    position: relative;
    z-index: 1;
    justify-self: center;
    grid-column: 2;
}

.preview-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.05),
        rgba(255,255,255,0.05) 2px,
        rgba(255,255,255,0.02) 2px,
        rgba(255,255,255,0.02) 4px
    );
    pointer-events: none;
    z-index: 0;
}

/* ─────────────────────────────────────────
   SECTION HEADER NAV (green bar above form)
───────────────────────────────────────── */
.section-header-nav {
    background: var(--primary-green);
    background-size: 400% 400%;
    animation: gradientShift 25s ease-in-out infinite;
    padding: clamp(8px, 1.2vh, 12px) clamp(12px, 1.2vw, 20px);
    margin: -20px -20px 20px -20px;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: clamp(44px, 6.5vh, 55px);
    min-height: clamp(44px, 6.5vh, 55px);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.section-header-nav::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.05),
        rgba(255,255,255,0.05) 2px,
        rgba(255,255,255,0.02) 2px,
        rgba(255,255,255,0.02) 4px
    );
    pointer-events: none;
    z-index: 0;
}
.section-header-nav > * { position: relative; z-index: 1; }

.section-header-left {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 12px);
}

.section-header-icon {
    background: var(--white);
    width: clamp(32px, 3vw, 40px);
    height: clamp(32px, 3vw, 40px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 1.4vw, 20px);
    color: var(--primary-green);
}

.section-header-title {
    color: var(--white);
    margin: 0;
    font-size: clamp(14px, 1.2vw, 18px);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.section-header-right {
    display: flex;
    gap: clamp(5px, 0.5vw, 8px);
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    25%  { background-position: 50% 100%; }
    50%  { background-position: 100% 50%; }
    75%  { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

.preview-header-left h3 {
    font-size: clamp(13px, 1.1vw, 16px);
    font-weight: 600;
    color: var(--white);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pagination-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(10px, 0.85vw, 12px);
    color: rgba(255,255,255,0.9);
    padding: 2px;
    backdrop-filter: blur(10px);
}
.pagination-status.success {
    color: #d1fae5;
    background: rgba(16,185,129,0.2);
    border-color: rgba(16,185,129,0.3);
}
.pagination-status.warning {
    color: #fef3c7;
    background: rgba(245,158,11,0.2);
    border-color: rgba(245,158,11,0.3);
}

/* ─────────────────────────────────────────
   PREVIEW HEADER CONTROLS
───────────────────────────────────────── */
.page-nav,
.zoom-controls,
.preview-header-right select,
.preview-header-right .btn {
    height: clamp(28px, 4vh, 36px);
    display: flex;
    align-items: center;
}

.page-nav {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 0;
    min-width: clamp(90px, 8vw, 110px);
    backdrop-filter: blur(10px);
    border: none;
}

.page-nav .icon-btn {
    background: transparent !important;
    color: var(--white) !important;
    border: none !important;
    width: clamp(24px, 2.5vw, 32px);
    height: clamp(28px, 4vh, 36px);
    border-radius: 0;
    font-size: clamp(14px, 1.2vw, 18px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0 !important;
    margin: 0;
    line-height: 1;
    font-family: Arial, sans-serif;
}
.page-nav .icon-btn:first-child { border-radius: 6px 0 0 6px; }
.page-nav .icon-btn:last-child  { border-radius: 0 6px 6px 0; }
.page-nav .icon-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.25) !important;
    transform: translateY(-1px);
}
.page-nav .icon-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.page-counter {
    color: var(--white);
    font-size: clamp(10px, 0.85vw, 11px);
    font-weight: 600;
    text-align: center;
    flex: 1;
    padding: 0;
    background: transparent;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.page-separator {
    color: var(--white);
    font-size: clamp(10px, 0.85vw, 11px);
    font-weight: 600;
}

.zoom-controls {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.2);
    gap: 0;
    height: clamp(28px, 4vh, 36px);
    margin: 0;
}

.zoom-controls .icon-btn {
    background: rgba(255,255,255,0.2) !important;
    color: var(--white) !important;
    border: none !important;
    width: clamp(22px, 2vw, 28px);
    height: clamp(22px, 2vw, 28px);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(12px, 1vw, 14px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 4px;
    padding: 0 !important;
}
.zoom-controls .icon-btn:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: translateY(-1px);
}
.zoom-controls .icon-btn:active { transform: translateY(0); }

.zoom-level {
    font-size: clamp(10px, 0.85vw, 12px);
    font-weight: 600;
    color: var(--white);
    min-width: clamp(36px, 3vw, 45px);
    text-align: center;
    padding: 0 4px;
}

.preview-header-right .btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
    padding: clamp(4px, 0.6vh, 8px) clamp(8px, 0.8vw, 16px);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: clamp(11px, 0.85vw, 14px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    justify-content: center;
}
.preview-header-right .btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.preview-header-right select {
    padding: 0 clamp(20px, 2vw, 32px) 0 clamp(8px, 0.8vw, 12px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    font-size: clamp(11px, 0.85vw, 13px);
    background: rgba(255,255,255,0.15);
    color: var(--white);
    backdrop-filter: blur(10px);
    cursor: pointer;
    min-width: clamp(60px, 5vw, 80px);
    height: clamp(28px, 4vh, 36px);
}
.preview-header-right select option {
    background: var(--dark-blue);
    color: var(--white);
}

/* ─────────────────────────────────────────
   NAV TIPS
───────────────────────────────────────── */
.nav-tips {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    padding: clamp(6px, 0.8vh, 8px);
    border-radius: 6px;
}
.nav-tip {
    font-size: clamp(10px, 0.8vw, 11px);
    color: #92400e;
    line-height: 1.3;
}

/* ─────────────────────────────────────────
   ATS RESUME STYLES
───────────────────────────────────────── */
.resume-header { border-bottom: 2pt solid var(--primary-green); }
.resume-header h1 { color: var(--primary-green); }
.section-title {
    border-bottom: 1pt solid var(--primary-green);
    color: var(--primary-green);
}

/* ─────────────────────────────────────────
   AI POPUP
───────────────────────────────────────── */
.ai-popup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ai-popup[style*="display: block"] { opacity: 1; }

.skills-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2vh, 20px);
}

.skills-popup-card {
    background: var(--white);
    border-radius: 12px;
    max-width: clamp(480px, 50vw, 700px);
    width: 100%;
    max-height: min(80vh, 700px); /* never overflows viewport */
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(10px); }
}

/* ─────────────────────────────────────────
   PREVIEW CONTAINER
───────────────────────────────────────── */
#previewContainer {
   
    display: block;
    transform-origin: top center;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 3vh, 40px);
    transition: transform 0.3s ease;
    transform-origin: center top;
    margin: auto;
}

.preview-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ─────────────────────────────────────────
   MOBILE AUTH LINKS
───────────────────────────────────────── */
.mobile-auth-links {
    display: flex;
    flex-direction: column;
    padding: 8px 8px 12px 8px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
}
.mobile-auth-links .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 6px;
    background: var(--gray-50);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
}
.mobile-auth-links .nav-link:hover {
    background: var(--gray-100);
    border-color: var(--gray-200);
}

body.logged-in .mobile-auth-links { display: none; }
body.logged-in #mobileLogoutLink {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-top: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
}
body.logged-in #mobileLogoutLink:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
body.guest .logged-in-only-link { display: none !important; }

/* ─────────────────────────────────────────
   HEADER NAV
───────────────────────────────────────── */
.header-nav {
    display: flex;
    gap: clamp(1rem, 1.5vw, 1.5rem);
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#userDropdownMenu { margin-left: clamp(0.8rem, 1.2vw, 1.5rem); }

/* ─────────────────────────────────────────
   AUTO SAVE
───────────────────────────────────────── */
.auto-save-notification { animation: fadeInOut 3s ease; }
@keyframes fadeInOut {
    0%   { opacity: 0; transform: translateY(10px); }
    10%  { opacity: 1; transform: translateY(0); }
    90%  { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}
.auto-save-saving { color: #f59e0b; }
.auto-save-saved  { color: #10b981; }
.auto-save-error  { color: #ef4444; }

/* ─────────────────────────────────────────
   ENTRY ANIMATIONS
───────────────────────────────────────── */
.experience-entry,
.education-entry,
.cert-entry {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 1;
    transform: translateX(0);
}
.experience-entry[style*="display: block"],
.education-entry[style*="display: block"],
.cert-entry[style*="display: block"] {
    animation: fadeSlideIn 0.4s ease-out;
}
@keyframes fadeSlideIn {
    0%   { opacity: 0; transform: translateX(20px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* ─────────────────────────────────────────
   SECTION ENTRY TITLE
───────────────────────────────────────── */
.section-entry-title {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 12px);
    margin: 0 0 clamp(14px, 1.8vh, 20px) 0;
    padding: clamp(8px, 1.2vh, 12px) clamp(12px, 1.2vw, 18px);
    border-radius: 10px;
    background: var(--white);
    border: 1px solid rgba(16,185,129,0.2);
    border-left: 4px solid var(--primary-green);
    box-shadow: 0 2px 12px rgba(16,185,129,0.1);
    overflow: hidden;
}

.section-title-number {
    font-size: clamp(12px, 1vw, 15px);
    font-weight: 700;
    color: var(--white);
    background: var(--gradient-green);
    min-width: clamp(26px, 2.5vw, 32px);
    height: clamp(26px, 2.5vw, 32px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-green);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    flex-shrink: 0;
}

.section-title-label {
    font-size: clamp(13px, 1.1vw, 15px);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    line-height: 1;
    letter-spacing: 0.01em;
}

/* ─────────────────────────────────────────
   MOBILE HAMBURGER
───────────────────────────────────────── */
.resume-hamburger-container { display: none; }

.resume-hamburger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 7px;
    padding: 4px;
    flex-shrink: 0;
    transition: background 0.15s;
}
.resume-hamburger-btn:hover { background: rgba(16,185,129,0.08); }
.resume-hamburger-btn #sectionToggle { display: none; }
.resume-hamburger-btn .toggle {
    position: relative;
    width: 20px;
    height: 16px;
    display: block;
    cursor: pointer;
}
.resume-hamburger-btn .bar {
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: #10B981;
    border-radius: 2px;
    transform-origin: center center;
    transition: transform 0.25s ease 0.05s, opacity 0.05s ease 0s;
}
.resume-hamburger-btn .bar--top    { top: 0px; }
.resume-hamburger-btn .bar--middle { top: 7px; }
.resume-hamburger-btn .bar--bottom { top: 14px; }
.resume-hamburger-btn.active .bar--top    { top: 7px; transform: rotate(45deg); }
.resume-hamburger-btn.active .bar--middle { opacity: 0; transition: opacity 0.05s ease 0s; }
.resume-hamburger-btn.active .bar--bottom { top: 7px; transform: rotate(-45deg); }
.resume-hamburger-btn .bar--top,
.resume-hamburger-btn .bar--bottom { transition: top 0.25s ease 0.05s, transform 0.25s ease 0.05s; }
.resume-hamburger-btn .bar--middle { transition: opacity 0.05s ease 0s; }

/* ─────────────────────────────────────────
   RESUME SECTIONS PANEL
───────────────────────────────────────── */
.resume-sections-overlay { display: none; }
#resumeSectionsPanel { display: flex; }

.resume-sections-close-btn {
    position: absolute;
    top: 16px; right: 16px;
    background: transparent;
    border: none;
    width: 32px; height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 1001;
}
.resume-sections-close-btn:hover { background: rgba(16,185,129,0.1); }

.resume-sections-header {
    padding: clamp(16px, 2.5vh, 24px) clamp(14px, 1.5vw, 20px) clamp(10px, 1.5vh, 15px);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-bottom: 1px solid var(--border-light);
    position: relative;
    padding-right: 60px;
}
.resume-sections-header h3 {
    margin: 0 0 12px 0;
    font-size: clamp(15px, 1.3vw, 18px);
    font-weight: 700;
    color: var(--text-primary);
}

.resume-sections-status {
    font-size: clamp(11px, 0.9vw, 13px);
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.resume-sections-progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}
.resume-sections-progress-fill {
    height: 100%;
    background: var(--gradient-green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.resume-sections-menu {
    flex: 1;
    overflow-y: auto;
    padding: clamp(10px, 1.5vh, 15px) 0;
}

.resume-section-item {
    display: flex;
    align-items: center;
    padding: clamp(10px, 1.5vh, 14px) clamp(14px, 1.5vw, 20px);
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
}
.resume-section-item:hover { background: var(--gray-50); }
.resume-section-item.active {
    background: var(--gray-50);
    border-left-color: var(--primary-green);
}

.resume-section-icon {
    font-size: clamp(15px, 1.3vw, 18px);
    width: clamp(30px, 3vw, 36px);
    height: clamp(30px, 3vw, 36px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 8px;
    margin-right: clamp(8px, 0.8vw, 12px);
    flex-shrink: 0;
}
.resume-section-item.active .resume-section-icon {
    background: rgba(16,185,129,0.1);
    color: var(--primary-green);
}

.resume-section-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.resume-section-title {
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.resume-section-desc {
    font-size: clamp(10px, 0.8vw, 11px);
    color: var(--text-secondary);
    line-height: 1.3;
}

.resume-section-check {
    font-size: clamp(13px, 1.1vw, 16px);
    color: var(--primary-green);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-weight: 700;
}
.resume-section-item.completed .resume-section-check { opacity: 1; }

.resume-sections-footer {
    padding: clamp(10px, 1.5vh, 15px) clamp(14px, 1.5vw, 20px);
    border-top: 1px solid var(--border-light);
    background: var(--gray-50);
}

.resume-sections-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #fef3c7;
    border-radius: 8px;
    margin-bottom: 15px;
}
.resume-sections-tip .tip-icon { font-size: 14px; flex-shrink: 0; }
.resume-sections-tip .tip-text {
    font-size: clamp(10px, 0.85vw, 12px);
    color: #92400e;
    line-height: 1.3;
}

.resume-sections-actions { display: flex; gap: 10px; }

.resume-section-nav-btn {
    flex: 1;
    padding: clamp(8px, 1vh, 10px) clamp(8px, 0.8vw, 12px);
    border: none;
    border-radius: 6px;
    font-size: clamp(11px, 0.9vw, 13px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.resume-section-nav-btn.prev {
    background: var(--gray-100);
    color: var(--text-secondary);
}
.resume-section-nav-btn.prev:not(:disabled):hover { background: var(--gray-200); }
.resume-section-nav-btn.next {
    background: var(--gradient-green);
    color: var(--white);
}
.resume-section-nav-btn.next:not(:disabled):hover {
    background: linear-gradient(135deg, var(--green-hover) 0%, var(--green-light) 100%);
}
.resume-section-nav-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.resume-sections-menu::-webkit-scrollbar { width: 6px; }
.resume-sections-menu::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 3px; }
.resume-sections-menu::-webkit-scrollbar-thumb { background: var(--primary-green); border-radius: 3px; }

/* ─────────────────────────────────────────
   PERSONAL INFO SECTION
───────────────────────────────────────── */
.personal-info-section {
    background: #ffffff;
    border-radius: 12px;
    padding: clamp(1rem, 2vh, 1.5rem);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 100%;
    box-sizing: border-box;
}

.personal-info-header {
    display: flex;
    align-items: center;
    margin-bottom: clamp(1rem, 2vh, 1.5rem);
    padding-bottom: clamp(0.6rem, 1.2vh, 1rem);
    border-bottom: 2px solid rgba(226,232,240,0.4);
}

.personal-info-title { flex: 1; }
.personal-info-title p {
    color: #64748b;
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    margin: 0;
    font-weight: 500;
}

.personal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(0.6rem, 1vh, 1rem);
    margin-bottom: clamp(0.6rem, 1vh, 1rem);
}

.personal-info-group {
    position: relative;
    margin-bottom: clamp(0.5rem, 0.8vh, 0.75rem);
}

.personal-info-label {
    display: flex;
    align-items: center;
    margin-bottom: clamp(0.3rem, 0.5vh, 0.5rem);
    font-weight: 600;
    font-size: clamp(0.75rem, 0.8vw, 0.85rem);
    color: #374151;
}

.personal-info-input-wrapper { position: relative; }

.personal-info-group .personal-info-input-wrapper::before,
.personal-info-group > div::before { content: none !important; display: none !important; }

.personal-info-input {
    width: 100%;
    padding: clamp(0.5rem, 0.9vh, 0.7rem) 0.9rem clamp(0.5rem, 0.9vh, 0.7rem) 42px !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: clamp(0.8rem, 0.9vw, 0.9rem) !important;
    font-weight: 500 !important;
    background: rgba(255,255,255,0.9) !important;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1) !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    box-sizing: border-box;
}
.personal-info-input:focus {
    border-color: #10b981 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.1) !important;
}
.personal-info-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}
.personal-info-input.invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.12) !important;
    animation: shake 0.35s ease;
}

.personal-info-input-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    left: 13px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 15px !important;
    line-height: 1 !important;
    pointer-events: none !important;
    z-index: 2 !important;
    opacity: 0.65 !important;
    transition: opacity 0.2s ease !important;
}
.personal-info-input:focus + .personal-info-input-icon,
.personal-info-input-wrapper:focus-within .personal-info-input-icon { opacity: 1 !important; }

.personal-info-validation {
    color: #dc2626;
    font-size: clamp(10px, 0.85vw, 12px);
    font-weight: 500;
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 5px;
    padding-left: 2px;
}
.personal-info-validation.show { display: flex !important; }
.personal-info-validation.show::before {
    content: '';
    display: inline-block;
    width: 14px; height: 14px; min-width: 14px;
    background: #ef4444;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
    background-size: 9px;
    background-repeat: no-repeat;
    background-position: center;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.personal-info-status {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-top: clamp(12px, 1.8vh, 20px) !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.status-indicator {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
}

.status-dot {
    width: 8px !important; height: 8px !important;
    min-width: 8px !important;
    border-radius: 50% !important;
    background: #f59e0b !important;
    flex-shrink: 0 !important;
    transition: background 0.35s ease, box-shadow 0.35s ease !important;
}

.status-text {
    font-size: clamp(11px, 0.9vw, 13px) !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    transition: color 0.5s ease !important;
}

.completion-hint small {
    font-size: clamp(10px, 0.85vw, 12px) !important;
    color: #cbd5e1 !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
}

.personal-info-status.complete .status-dot {
    background: #10b981 !important;
    animation: pulse-ink 2s ease-out infinite !important;
}
.personal-info-status.complete .status-text {
    color: #10b981 !important;
    font-weight: 600 !important;
}
.personal-info-status.complete .completion-hint {
    opacity: 0 !important;
    pointer-events: none !important;
}

@keyframes pulse-ink {
    0%   { box-shadow: 0 0 0 0   rgba(16,185,129,0.45); }
    60%  { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0   rgba(16,185,129,0); }
}

.section-error {
    color: #ef4444;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: clamp(12px, 0.9vw, 14px);
    display: none;
}
.section-error.show { display: block; }

/* ─────────────────────────────────────────
   LOGOUT BUTTON
───────────────────────────────────────── */
#mobileLogoutLink {
    background: transparent !important;
    color: #ef4444 !important;
}
#mobileLogoutLink:hover { background: #fff1f1 !important; }

/* ─────────────────────────────────────────
   MOBILE STYLES — unchanged from original
───────────────────────────────────────── */
@media screen and (max-width: 768px) {
    .resume-hamburger-container {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 1003;
    }
    .nav-panel { display: none !important; }
    .header-auth-buttons { display: none !important; }
    .header-content {
        position: relative;
        min-height: 65px;
        justify-content: flex-start !important;
    }
    .logo-section {
        position: absolute;
        left: 50%; top: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        margin: 0 !important;
    }
    .logo { align-items: center; }
    .brand-text { display: none; }
    .header-nav { display: none !important; }
    .mobile-menu-btn { display: none !important; }

    .resume-sections-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
    }
    .resume-sections-overlay.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }
    .resume-sections-panel {
        position: fixed;
        top: 65px; left: -100%;
        width: 85%; max-width: 320px;
        height: calc(100vh - 65px);
        background: var(--white);
        z-index: 1000;
        box-shadow: 5px 0 25px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .resume-sections-panel.open { left: 0; }
    body.resume-menu-open { overflow: hidden; position: fixed; width: 100%; height: 100%; }

    .personal-info-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .personal-info-status { margin-top: 14px !important; }
    .status-text { font-size: 11.5px !important; }
    .completion-hint small { font-size: 11px !important; }
    .status-dot { width: 6px !important; height: 6px !important; min-width: 6px !important; }

    /* mobile slide-out nav icons — unchanged */
    .resume-section-icon { font-size: 0 !important; background: #f1f5f9 !important; position: relative !important; }
    .resume-section-icon::before {
        content: '' !important; display: block !important;
        width: 20px !important; height: 20px !important;
        background-color: #64748b !important;
        transition: background-color 0.2s ease !important;
        -webkit-mask-size: contain !important; -webkit-mask-repeat: no-repeat !important; -webkit-mask-position: center !important;
        mask-size: contain !important; mask-repeat: no-repeat !important; mask-position: center !important;
    }
    .resume-section-item.active .resume-section-icon { background: rgba(16,185,129,0.1) !important; }
    .resume-section-item.active .resume-section-icon::before { background-color: #10b981 !important; }
    .resume-section-item:hover .resume-section-icon::before { background-color: #475569 !important; }

    .resume-section-item:nth-child(1) .resume-section-icon::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") !important;
    }
    .resume-section-item:nth-child(2) .resume-section-icon::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E") !important;
    }
    .resume-section-item:nth-child(3) .resume-section-icon::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2' ry='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2' ry='2'/%3E%3Cpath d='M16 7V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2'/%3E%3C/svg%3E") !important;
    }
    .resume-section-item:nth-child(4) .resume-section-icon::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 22 8.5 12 15 2 8.5 12 2'/%3E%3Cpath d='M6 11.5v5.5a6 6 0 0 0 12 0v-5.5'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 22 8.5 12 15 2 8.5 12 2'/%3E%3Cpath d='M6 11.5v5.5a6 6 0 0 0 12 0v-5.5'/%3E%3C/svg%3E") !important;
    }
    .resume-section-item:nth-child(5) .resume-section-icon::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") !important;
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") !important;
    }
}

/* Desktop nav */
@media screen and (min-width: 769px) {
    .resume-hamburger-container { display: none !important; }
    .resume-sections-panel,
    .resume-sections-overlay { display: none !important; }
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 2rem;
        max-width: -webkit-fill-available;
        margin: 0 auto;
        width: 100%;
        position: relative;
    }
    .logo-section {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-decoration: none;
        position: static;
        transform: none;
        margin: 0;
    }
    .header-nav {
        display: flex;
        gap: 1.5rem;
        align-items: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .header-auth-buttons {
        display: flex;
        gap: 0.75rem;
        align-items: center;
    }
    .nav-panel { display: flex; flex-direction: column; }
}

/* ─────────────────────────────────────────
   MOBILE PREMIUM OVERRIDES — unchanged
───────────────────────────────────────── */
@media screen and (max-width: 768px) {
    .form-panel { background: #f1f5f9 !important; }
    .form-section { background: #f1f5f9 !important; padding: 12px !important; }
    .section-header-nav {
        background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
        box-shadow: 0 3px 12px rgba(16,185,129,0.35) !important;
        padding: 0 16px !important;
        height: 48px !important; min-height: 48px !important;
    }
    .section-header-title { font-size: 15px !important; font-weight: 700 !important; color: #ffffff !important; }
    .section-header-icon {
        background: rgba(255,255,255,0.2) !important;
        border-radius: 8px !important;
        width: 32px !important; height: 32px !important;
        font-size: 15px !important; flex-shrink: 0 !important;
    }
    .personal-info-section {
        background: transparent !important; border-radius: 0 !important;
        padding: 0 !important; border: none !important; box-shadow: none !important; margin: 0 !important;
    }
    .personal-info-label { font-size: 11px !important; font-weight: 700 !important; color: #374151 !important; letter-spacing: 0.04em !important; text-transform: uppercase !important; margin-bottom: 5px !important; }
    .personal-info-input {
        height: 40px !important; min-height: 40px !important; max-height: 40px !important;
        padding: 0 10px 0 36px !important; border: 1.5px solid #e2e8f0 !important;
        border-radius: 9px !important; font-size: 13px !important; background: #f8fafc !important;
    }
    .personal-info-input:focus { border-color: #10b981 !important; background: #ffffff !important; box-shadow: 0 0 0 3px rgba(16,185,129,0.12), 0 1px 3px rgba(0,0,0,0.05) inset !important; }
    .personal-info-validation { font-size: 10px !important; margin-top: 3px !important; min-height: 14px !important; }
    .personal-info-status { display: flex !important; align-items: center !important; justify-content: space-between !important; margin-top: 12px !important; padding: 10px 12px !important; background: #f8fafc !important; border-radius: 8px !important; border: 1px solid #e9edf2 !important; }
    .status-dot { width: 8px !important; height: 8px !important; border-radius: 50% !important; background: #f59e0b !important; }
    .status-text { font-size: 11px !important; font-weight: 600 !important; color: #64748b !important; }
    .completion-hint small { font-size: 10px !important; color: #94a3b8 !important; }

    .mobile-bottom-nav {
        background: rgba(255,255,255,0.97) !important;
        border-top: 1px solid #e9edf2 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.07) !important;
        height: 62px !important;
        display: flex !important; align-items: center !important; justify-content: space-around !important; padding: 0 4px !important;
    }
    .mobile-bottom-nav .mobile-bottom-btn {
        flex: 1 1 0 !important; display: flex !important; flex-direction: column !important;
        align-items: center !important; justify-content: center !important; gap: 4px !important;
        padding: 6px 2px !important; background: transparent !important; border: none !important;
        cursor: pointer !important; border-radius: 10px !important;
    }
    .mobile-bottom-nav .btn-icon { width: 26px !important; height: 26px !important; display: flex !important; align-items: center !important; justify-content: center !important; }
    .mobile-bottom-nav .btn-icon svg { width: 21px !important; height: 21px !important; stroke: #94a3b8 !important; stroke-width: 2 !important; }
    .mobile-bottom-nav .btn-label { font-size: 10px !important; font-weight: 500 !important; color: #94a3b8 !important; white-space: nowrap !important; }
    .mobile-bottom-btn.preview-btn .btn-icon svg { stroke: #10b981 !important; }
    .mobile-bottom-btn.preview-btn .btn-label { color: #10b981 !important; font-weight: 700 !important; }
    .mobile-bottom-btn.prev-btn .btn-icon svg,
    .mobile-bottom-btn.next-btn .btn-icon svg { stroke: #64748b !important; }
    .mobile-bottom-btn.prev-btn .btn-label,
    .mobile-bottom-btn.next-btn .btn-label { color: #64748b !important; font-weight: 600 !important; }
}




.pac-container {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    font-family: 'Inter', sans-serif;
    z-index: 99999;
  }
  .pac-item {
    padding: 10px 14px;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
  }
  .pac-item:hover { background: #f0fdf4; }
  .pac-item-query { font-size: 13px; font-weight: 600; color: #059669; }
  .pac-icon { display: none; }







  /* Inline hover edit button on textarea fields */
.field-with-edit { position: relative; }
.field-with-edit .field-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6366f1;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity .15s ease, transform .15s ease, background .15s, border-color .15s, box-shadow .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.field-with-edit:hover .field-edit-btn,
.field-with-edit:focus-within .field-edit-btn,
.field-with-edit .field-edit-btn:focus-visible {
    opacity: 1;
    transform: translateY(0);
}
.field-with-edit .field-edit-btn:hover {
    background: #eef2ff;
    border-color: #6366f1;
    box-shadow: 0 2px 6px rgba(99,102,241,.18);
}
.field-with-edit .field-edit-btn svg { flex-shrink: 0; }

/* Inline edit popup */
.inline-edit-popup-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    animation: iep-fade .15s ease;
    padding: 20px;
}
.inline-edit-popup-card {
    background: #fff;
    border-radius: 14px;
    width: 100%; max-width: 640px;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    display: flex; flex-direction: column;
    animation: iep-pop .18s ease;
    overflow: hidden;
}
.inline-edit-popup-header {
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
    display: flex; align-items: center; justify-content: space-between;
}
.inline-edit-popup-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: #0f172a; }
.inline-edit-popup-close {
    background: transparent; border: none; cursor: pointer;
    color: #94a3b8; padding: 4px; border-radius: 6px;
    transition: background .15s, color .15s;
}
.inline-edit-popup-close:hover { background: #f1f5f9; color: #475569; }
.inline-edit-popup-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.inline-edit-popup-footer {
    padding: 14px 22px;
    border-top: 1px solid #f1f5f9;
    display: flex; gap: 10px; justify-content: space-between; align-items: center;
    background: #fafbfc;
}
.iep-textarea {
    width: 100%; min-height: 200px; padding: 14px;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-size: 14px; line-height: 1.55;
    font-family: inherit; color: #0f172a;
    resize: vertical; transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.iep-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.iep-char-count { text-align: right; font-size: 12px; color: #64748b; margin-top: 6px; }
.iep-char-count.warn { color: #dc2626; font-weight: 600; }

.iep-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.iep-skill-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
    font-size: 13px;
    user-select: none;
}
.iep-skill-chip:hover { border-color: #c7d2fe; background: #fafbff; }
.iep-skill-chip.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    color: #4338ca; font-weight: 600;
}
.iep-skill-chip .iep-check {
    width: 18px; height: 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 11px; font-weight: 800; color: #fff;
    transition: all .15s;
}
.iep-skill-chip.selected .iep-check {
    background: #6366f1; border-color: #6366f1;
}
.iep-add-skill-row {
    display: flex; gap: 8px; margin-bottom: 12px;
}
.iep-add-skill-row input {
    flex: 1; padding: 9px 12px;
    border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-size: 13px;
}
.iep-add-skill-row input:focus { outline: none; border-color: #6366f1; }
.iep-add-skill-btn {
    padding: 9px 16px;
    background: #fff; border: 1.5px solid #e5e7eb; border-radius: 8px;
    color: #475569; font-weight: 600; font-size: 13px;
    cursor: pointer; transition: all .15s;
}
.iep-add-skill-btn:hover { border-color: #6366f1; color: #6366f1; }

.iep-btn-secondary {
    padding: 9px 16px;
    background: #fff; border: 1.5px solid #e5e7eb; border-radius: 8px;
    color: #475569; font-weight: 600; font-size: 13px;
    cursor: pointer; transition: all .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.iep-btn-secondary:hover:not(:disabled) { border-color: #6366f1; color: #6366f1; background: #fafbff; }
.iep-btn-secondary:disabled { opacity: .5; cursor: not-allowed; }
.iep-btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; border: none; border-radius: 8px;
    font-weight: 700; font-size: 13.5px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(99,102,241,.25);
    transition: all .15s;
}
.iep-btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,102,241,.4); }
.iep-btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.iep-regen-spinner {
    width: 12px; height: 12px;
    border: 2px solid #c7d2fe; border-top-color: #6366f1;
    border-radius: 50%;
    animation: iep-spin .7s linear infinite;
}
.iep-empty {
    text-align: center; padding: 40px 20px; color: #64748b; font-size: 13px;
    background: #f8fafc; border-radius: 8px; border: 1px dashed #e5e7eb;
}

@keyframes iep-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes iep-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes iep-spin { to { transform: rotate(360deg); } }



/* Job title context block */
.iep-context-block {
    background: linear-gradient(135deg, #f5f3ff, #eef2ff);
    border: 1px solid #e0e7ff;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.iep-context-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #4338ca;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.iep-context-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #c7d2fe;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.iep-context-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.iep-section-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

/* Progress bar */
.iep-progress-wrap {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.iep-progress-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}
.iep-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 999px;
    transition: width .25s ease;
    box-shadow: 0 0 8px rgba(99,102,241,.35);
}
.iep-progress-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

/* The preview's zoom margin (set in app.js) is for the screen only */
@media print { #previewContainer { margin-bottom: 0 !important; } }

/* "Open editor": one small, always-visible button on the label line of every long text box
   (summary, skills, bullet points). Same on computer and phone: there is no hover on a phone. */
.open-editor-btn {
    display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
    margin-left: auto; padding: 4px 9px;
    background: #f5f7ff; border: 1px solid #e0e7ff; border-radius: 6px;
    color: #4f46e5; font-size: 12px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0;
    cursor: pointer; transition: background .15s, border-color .15s;
}
.open-editor-btn:hover { background: #eef2ff; border-color: #c7d2fe; }
.open-editor-btn:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.open-editor-btn svg { flex-shrink: 0; }
/* more room around the summary and skills text */
.rd-field-group[data-field="summary"] .rd-textarea,
.rd-field-group[data-field="skills"] .rd-textarea { padding: 14px 16px !important; line-height: 1.6 !important; }
/* on a narrow card the button moves under the title instead of running off the edge */
.rd-card-header { flex-wrap: wrap !important; row-gap: 8px !important; }
/* the bullet points label line: its title on the left, the button on the right */
.bp-label-row { display: flex !important; align-items: center !important; justify-content: space-between !important; flex-wrap: wrap; row-gap: 8px; }
