/* =========================================================
   SMART RESUME BUILDER
   MOBILE + DESKTOP RESPONSIVE CSS
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --dark: #0f172a;
    --dark-2: #111827;
    --text: #1f2937;
    --muted: #64748b;
    --border: #e2e8f0;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --danger: #dc2626;
    --success: #16a34a;
    --shadow: 0 10px 35px rgba(15, 23, 42, .08);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .07), transparent 30%),
        #f1f5f9;
    overflow-x: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #1e293b;
    outline: none;
    transition: border .2s, box-shadow .2s;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

input,
select {
    min-height: 44px;
    padding: 10px 12px;
}

textarea {
    resize: vertical;
    min-height: 110px;
    padding: 11px 12px;
    line-height: 1.55;
}

.page {
    display: none;
    width: 100%;
    min-height: calc(100vh - 70px);
}

.page.active-page {
    display: block;
}


/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 10px 4%;

    background:
        linear-gradient(
            135deg,
            #0b1220 0%,
            #111827 55%,
            #1e3a8a 100%
        );

    color: #fff;

    border-bottom: 1px solid rgba(255,255,255,.08);

    box-shadow:
        0 5px 25px rgba(15,23,42,.22);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.own-logo {
    width: 46px;
    height: 46px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4px;

    background: rgba(255,255,255,.10);

    border: 1px solid rgba(255,255,255,.20);

    border-radius: 11px;

    overflow: hidden;

    text-decoration: none;

    transition:
        transform .2s ease,
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.own-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 7px;
}

.own-logo:hover {
    transform: translateY(-1px) scale(1.03);
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.35);
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.brand-text strong {
    display: block;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.brand-text small {
    display: block;
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.topbar .main-nav button {
    min-height: 40px;
    padding: 8px 12px;

    border-radius: 8px;

    border: 1px solid rgba(255,255,255,.12);

    background: rgba(255,255,255,.06);

    color: #e2e8f0;

    font-size: 12px;
    font-weight: 700;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .15s ease;
}

.topbar .main-nav button:hover {
    background: rgba(255,255,255,.13);
    color: #fff;
    border-color: rgba(255,255,255,.25);
    transform: translateY(-1px);
}

.topbar .main-nav button.primary {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 4px 12px rgba(37,99,235,.25);
}

.topbar .main-nav button.primary:hover {
    background: #1d4ed8 !important;
}

.topbar .main-nav button.danger {
    background: rgba(220,38,38,.12) !important;
    color: #fecaca !important;
    border-color: rgba(248,113,113,.25) !important;
}

.topbar .main-nav button.danger:hover {
    background: rgba(220,38,38,.22) !important;
    color: #fff !important;
}


/* =========================================================
   HOME
========================================================= */

.hero {
    max-width: 1200px;
    margin: auto;

    min-height: 560px;

    display: grid;
    grid-template-columns: 1.1fr .9fr;

    align-items: center;

    gap: 60px;

    padding: 70px 30px 50px;
}

.hero-badge,
.eyebrow {
    display: inline-block;

    color: var(--primary);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.6px;
}

.hero h1 {
    margin-top: 14px;

    font-size: clamp(42px, 5vw, 72px);

    line-height: 1.02;

    letter-spacing: -3px;

    color: #0f172a;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    max-width: 650px;

    margin-top: 25px;

    color: #64748b;

    font-size: 17px;

    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 30px;
}

.hero-primary,
.hero-secondary {
    min-height: 48px;

    padding: 12px 20px;

    border-radius: 10px;

    font-weight: 800;

    border: 1px solid transparent;

    transition: .2s;
}

.hero-primary {
    background: var(--primary);
    color: #fff;
}

.hero-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.hero-secondary {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
}

.hero-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-card {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mini-resume {
    width: 300px;
    min-height: 400px;

    padding: 27px;

    background: #fff;

    border-radius: 8px;

    box-shadow:
        0 30px 70px rgba(15,23,42,.18);

    transform: rotate(2deg);

    border-top: 7px solid var(--primary);
}

.mini-top {
    display: flex;
    gap: 13px;
    align-items: center;
}

.mini-photo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #dbeafe;
}

.mini-name {
    width: 120px;
    height: 10px;
    background: #0f172a;
    border-radius: 5px;
}

.mini-title {
    width: 90px;
    height: 7px;
    background: #94a3b8;
    border-radius: 5px;
    margin-top: 7px;
}

.mini-line {
    height: 2px;
    background: #e2e8f0;
    margin: 22px 0;
}

.mini-section {
    width: 70px;
    height: 8px;
    background: var(--primary);
    border-radius: 4px;
    margin-top: 20px;
}

.mini-text {
    height: 6px;
    width: 100%;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: 9px;
}

.mini-text.short {
    width: 72%;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 7px;
    margin-top: 10px;
}

.mini-grid span {
    height: 18px;
    border-radius: 5px;
    background: #eff6ff;
}

.feature-grid {
    max-width: 1200px;

    margin: 0 auto;

    padding: 20px 30px 70px;

    display: grid;

    grid-template-columns: repeat(4,1fr);

    gap: 18px;
}

.feature-card {
    padding: 24px;

    background: rgba(255,255,255,.9);

    border: 1px solid #e2e8f0;

    border-radius: 15px;

    box-shadow: 0 8px 25px rgba(15,23,42,.04);
}

.feature-icon {
    font-size: 26px;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 15px;
    margin-bottom: 9px;
}

.feature-card p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   TEMPLATE PAGE
========================================================= */

#templates {
    max-width: 1300px;
    margin: auto;
    padding: 45px 30px 70px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 30px;
}

.page-heading h2,
.editor-header h2 {
    margin-top: 5px;

    font-size: clamp(26px, 3vw, 38px);

    letter-spacing: -1px;
}

.page-heading p {
    color: #64748b;
    margin-top: 7px;
}

.outline-btn,
.save-small,
.primary-btn,
.remove-btn {
    min-height: 42px;

    border-radius: 9px;

    padding: 9px 14px;

    font-weight: 700;

    border: 1px solid #cbd5e1;

    background: #fff;

    color: #334155;
}

.outline-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.template-grid {
    display: grid;

    grid-template-columns: repeat(4,1fr);

    gap: 22px;
}

.template-card {
    overflow: hidden;

    background: #fff;

    border: 1px solid #e2e8f0;

    border-radius: 15px;

    box-shadow: 0 8px 25px rgba(15,23,42,.06);

    transition: .2s;
}

.template-card:hover {
    transform: translateY(-5px);

    box-shadow: 0 18px 40px rgba(15,23,42,.12);

    border-color: #bfdbfe;
}

.template-preview {
    height: 230px;

    padding: 18px;

    background: #f8fafc;

    overflow: hidden;
}

.template-paper {
    width: 100%;
    height: 100%;

    background: white;

    box-shadow: 0 4px 12px rgba(0,0,0,.1);

    padding: 15px;

    position: relative;

    overflow: hidden;
}

.tp-header {
    height: 30px;
    background: #2563eb;
    margin: -15px -15px 12px;
}

.tp-title {
    width: 90px;
    height: 7px;
    background: #111827;
    margin-bottom: 5px;
}

.tp-subtitle {
    width: 65px;
    height: 4px;
    background: #94a3b8;
}

.tp-section {
    width: 45px;
    height: 5px;
    background: #2563eb;
    margin-top: 16px;
    margin-bottom: 7px;
}

.tp-line {
    width: 100%;
    height: 3px;
    background: #e2e8f0;
    margin: 5px 0;
}

.tp-line.short {
    width: 70%;
}

.template-info {
    padding: 18px;
}

.template-info h3 {
    font-size: 15px;
}

.template-info p {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 5px;
}

.use-template {
    width: 100%;
    min-height: 42px;

    margin-top: 13px;

    border: 0;

    border-radius: 8px;

    background: #eff6ff;

    color: #2563eb;

    font-weight: 800;
}

.use-template:hover {
    background: #2563eb;
    color: #fff;
}


/* =========================================================
   EDITOR
========================================================= */

#editor {
    max-width: 1600px;
    margin: auto;

    padding: 28px 3% 60px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 22px;
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.save-small {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #15803d;
}


/* =========================================================
   STEPS
========================================================= */

.steps {
    display: grid;

    grid-template-columns: repeat(7,1fr);

    gap: 5px;

    padding: 7px;

    background: #fff;

    border: 1px solid #e2e8f0;

    border-radius: 13px;

    box-shadow: var(--shadow);
}

.step-btn {
    min-height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border: 0;

    border-radius: 9px;

    background: transparent;

    color: #64748b;

    font-size: 12px;
    font-weight: 700;
}

.step-btn span {
    width: 25px;
    height: 25px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f1f5f9;

    font-size: 11px;
}

.step-btn.active {
    background: #eff6ff;
    color: #2563eb;
}

.step-btn.active span {
    background: #2563eb;
    color: #fff;
}


/* =========================================================
   PROGRESS
========================================================= */

.progress-wrapper {
    margin: 13px 0 18px;
}

.progress-info {
    display: flex;
    justify-content: space-between;

    margin-bottom: 6px;

    color: #64748b;

    font-size: 11px;
    font-weight: 700;
}

.progress-track {
    width: 100%;
    height: 5px;

    background: #e2e8f0;

    border-radius: 20px;

    overflow: hidden;
}

.progress-bar {
    height: 100%;

    width: 14.28%;

    background: linear-gradient(
        90deg,
        #2563eb,
        #7c3aed
    );

    border-radius: inherit;

    transition: width .25s ease;
}


/* =========================================================
   EDITOR LAYOUT
========================================================= */

.editor-layout {
    display: grid;

    grid-template-columns:
        minmax(360px, 520px)
        minmax(0,1fr);

    gap: 22px;

    align-items: start;
}

.form-panel {
    background: #fff;

    border: 1px solid #e2e8f0;

    border-radius: 15px;

    box-shadow: var(--shadow);

    overflow: hidden;
}

.step {
    display: none;

    padding: 25px;
}

.step.active {
    display: block;
}

.section-heading {
    margin-bottom: 22px;
}

.section-heading h3 {
    font-size: 21px;
}

.section-heading p {
    color: #64748b;

    margin-top: 5px;

    font-size: 13px;
}

.form-grid {
    display: grid;

    grid-template-columns: repeat(2,1fr);

    gap: 15px;
}

.field {
    display: flex;

    flex-direction: column;

    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label,
.design-control label {
    font-size: 12px;

    font-weight: 800;

    color: #334155;
}

.field-help {
    color: #94a3b8;
    font-size: 11px;
}


/* =========================================================
   PHOTO
========================================================= */

.photo-box {
    display: flex;

    align-items: center;

    gap: 15px;

    margin-bottom: 22px;

    padding: 15px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 12px;
}

.photo-preview-wrap {
    width: 76px;
    height: 76px;

    flex-shrink: 0;

    position: relative;

    overflow: hidden;

    border-radius: 50%;

    background: #e2e8f0;
}

#photoPreview {
    width: 100%;
    height: 100%;

    display: none;

    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 28px;
}

.photo-controls strong {
    font-size: 13px;
}

.photo-controls p {
    color: #94a3b8;

    font-size: 11px;

    margin: 4px 0 9px;
}

.inline-buttons {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;
}

.upload-btn {
    min-height: 38px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 8px 12px;

    border-radius: 8px;

    background: #2563eb;

    color: #fff;

    font-size: 11px;

    font-weight: 700;

    cursor: pointer;
}

.upload-btn input {
    display: none;
}

.remove-btn {
    min-height: 38px;

    font-size: 11px;

    color: #dc2626;

    border-color: #fecaca;
}


/* =========================================================
   DYNAMIC ITEMS
========================================================= */

.dynamic-item {
    position: relative;

    margin-bottom: 15px;

    padding: 18px;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 11px;
}

.dynamic-item-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 13px;
}

.dynamic-item-header strong {
    font-size: 12px;
}

.delete-item {
    min-width: 34px;
    min-height: 34px;

    border: 1px solid #fecaca;

    border-radius: 7px;

    background: #fff1f2;

    color: #dc2626;

    font-weight: 800;
}

.dynamic-grid {
    display: grid;

    grid-template-columns: repeat(2,1fr);

    gap: 12px;
}

.add-btn {
    width: 100%;

    min-height: 44px;

    border: 1px dashed #93c5fd;

    border-radius: 9px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 12px;

    font-weight: 800;
}

.add-btn:hover {
    background: #dbeafe;
}


/* =========================================================
   FORM NAV
========================================================= */

.form-navigation {
    display: flex;

    justify-content: space-between;

    gap: 10px;

    padding: 17px 25px;

    border-top: 1px solid #e2e8f0;

    background: #f8fafc;
}

.nav-btn {
    min-height: 44px;

    padding: 10px 17px;

    border-radius: 9px;

    font-weight: 800;

    border: 1px solid #cbd5e1;

    background: #fff;

    color: #334155;
}

.nav-btn.primary {
    background: #2563eb;

    color: #fff;

    border-color: #2563eb;
}

.nav-btn.primary:hover {
    background: #1d4ed8;
}

.nav-btn.secondary:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.nav-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}


/* =========================================================
   PREVIEW PANEL
========================================================= */

.preview-panel {
    min-width: 0;

    position: sticky;

    top: 90px;
}

.preview-toolbar {
    min-height: 54px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 9px 13px;

    margin-bottom: 10px;

    background: #fff;

    border: 1px solid #e2e8f0;

    border-radius: 11px;

    box-shadow: var(--shadow);
}

.preview-toolbar div {
    display: flex;

    flex-direction: column;

    gap: 2px;
}

.preview-toolbar strong {
    font-size: 12px;
}

.preview-toolbar span {
    color: #94a3b8;

    font-size: 10px;
}

.preview-print {
    min-height: 37px;

    padding: 7px 12px;

    border: 0;

    border-radius: 7px;

    background: #2563eb;

    color: #fff;

    font-size: 11px;

    font-weight: 800;
}

.resume-viewport {
    width: 100%;

    min-height: 650px;

    overflow: auto;

    padding: 25px;

    background:
        linear-gradient(
            45deg,
            #e2e8f0 25%,
            transparent 25%
        ) 0 0 / 20px 20px,
        linear-gradient(
            -45deg,
            #e2e8f0 25%,
            transparent 25%
        ) 0 0 / 20px 20px,
        #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 13px;
}


/* =========================================================
   A4 RESUME
========================================================= */

.resume {
    --resume-accent: #2563eb;
    --resume-text: #1f2937;
    --resume-bg: #ffffff;

    width: 794px;
    min-height: 1123px;

    margin: 0 auto;

    background: var(--resume-bg);

    color: var(--resume-text);

    font-family: Arial, sans-serif;

    font-size: 14px;

    line-height: 1.45;

    box-shadow: 0 8px 30px rgba(15,23,42,.18);

    position: relative;

    overflow: hidden;
}

.resume-header {
    min-height: 165px;

    padding: 32px 38px;

    display: flex;

    align-items: center;

    gap: 25px;

    background: #fff;
}

.resume-photo {
    width: 105px;
    height: 105px;

    flex-shrink: 0;

    object-fit: cover;

    display: none;

    border-radius: 50%;
}

.resume-header-info {
    min-width: 0;

    flex: 1;
}

.resume-header-info h1 {
    margin: 0;

    color: var(--resume-text);

    font-size: 34px;

    line-height: 1.05;

    letter-spacing: -.8px;
}

.resume-header-info h2 {
    margin-top: 8px;

    color: var(--resume-accent);

    font-size: 17px;

    font-weight: 700;
}

.resume-contact,
.resume-links {
    display: flex;

    flex-wrap: wrap;

    gap: 5px 14px;

    margin-top: 12px;

    color: #64748b;

    font-size: 10.5px;
}

.resume-links a {
    color: var(--resume-accent);
    text-decoration: none;
}

.resume-content {
    display: grid;

    grid-template-columns: 1fr 220px;

    min-height: 958px;
}

.resume-main {
    min-width: 0;

    padding: 28px 38px 45px;
}

.resume-sidebar {
    padding: 30px 23px;

    background: #f8fafc;

    border-left: 1px solid #e2e8f0;
}

.resume-section {
    margin-bottom: 25px;
}

.resume-section h3,
.sidebar-section h3 {
    margin-bottom: 10px;

    padding-bottom: 6px;

    color: var(--resume-accent);

    font-size: 12px;

    letter-spacing: 1.2px;

    border-bottom: 2px solid var(--resume-accent);
}

.resume-section p {
    color: #475569;

    white-space: pre-line;

    font-size: 11px;

    line-height: 1.65;
}

.resume-entry {
    margin-bottom: 16px;
}

.resume-entry:last-child {
    margin-bottom: 0;
}

.resume-entry-title {
    color: var(--resume-text);

    font-size: 12.5px;

    font-weight: 800;
}

.resume-entry-subtitle {
    margin-top: 2px;

    color: var(--resume-accent);

    font-size: 10.5px;

    font-weight: 700;
}

.resume-entry-date {
    color: #64748b;

    font-size: 9.5px;

    margin-top: 2px;
}

.resume-entry-description {
    color: #475569;

    font-size: 10.5px;

    line-height: 1.55;

    white-space: pre-line;

    margin-top: 5px;
}

.skills-list {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}

.skill-pill {
    display: inline-block;

    padding: 5px 8px;

    border-radius: 5px;

    background: #eff6ff;

    color: var(--resume-accent);

    font-size: 9.5px;

    font-weight: 700;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section h3 {
    border-bottom-width: 1px;
}

.sidebar-skill {
    padding: 5px 0;

    color: #475569;

    font-size: 10px;

    border-bottom: 1px solid #e2e8f0;
}

.sidebar-education {
    margin-bottom: 13px;
}

.sidebar-education strong {
    display: block;

    color: var(--resume-text);

    font-size: 10px;
}

.sidebar-education span {
    display: block;

    color: #64748b;

    font-size: 9px;

    margin-top: 2px;
}


/* =========================================================
   TEMPLATE: MODERN
========================================================= */

.resume.template-modern .resume-header {
    border-top: 8px solid var(--resume-accent);
}

.resume.template-modern .resume-sidebar {
    display: none;
}

.resume.template-modern .resume-content {
    display: block;
}

.resume.template-modern .resume-main {
    padding-top: 10px;
}


/* =========================================================
   TEMPLATE: PROFESSIONAL
========================================================= */

.resume.template-professional .resume-header {
    background: #f8fafc;
    border-bottom: 5px solid var(--resume-accent);
}

.resume.template-professional .resume-sidebar {
    display: block;
    background: #f1f5f9;
}

.resume.template-professional .resume-main {
    padding-right: 30px;
}


/* =========================================================
   TEMPLATE: EXECUTIVE
========================================================= */

.resume.template-executive {
    background: #fff;
}

.resume.template-executive .resume-header {
    background: #111827;
    color: #fff;
}

.resume.template-executive .resume-header-info h1 {
    color: #fff;
}

.resume.template-executive .resume-header-info h2 {
    color: var(--resume-accent);
}

.resume.template-executive .resume-contact,
.resume.template-executive .resume-links {
    color: #cbd5e1;
}

.resume.template-executive .resume-content {
    grid-template-columns: 205px 1fr;
}

.resume.template-executive .resume-sidebar {
    order: -1;

    background: #111827;

    border-left: 0;

    border-right: 1px solid #334155;
}

.resume.template-executive .sidebar-section h3 {
    color: #fff;

    border-color: var(--resume-accent);
}

.resume.template-executive .sidebar-skill,
.resume.template-executive .sidebar-education strong {
    color: #e2e8f0;

    border-color: #334155;
}

.resume.template-executive .sidebar-education span {
    color: #94a3b8;
}


/* =========================================================
   TEMPLATE: ATS
========================================================= */

.resume.template-ats {
    box-shadow: none;
}

.resume.template-ats .resume-header {
    display: block;

    padding-bottom: 22px;

    border-bottom: 1px solid #334155;
}

.resume.template-ats .resume-photo {
    display: none !important;
}

.resume.template-ats .resume-header-info h1 {
    font-size: 30px;
}

.resume.template-ats .resume-content {
    display: block;
}

.resume.template-ats .resume-sidebar {
    display: none;
}

.resume.template-ats .resume-main {
    padding-top: 25px;
}

.resume.template-ats .resume-section h3 {
    color: #111827;

    border-bottom: 1px solid #111827;

    font-size: 11px;
}


/* =========================================================
   TEMPLATE: CREATIVE
========================================================= */

.resume.template-creative .resume-header {
    min-height: 190px;

    background:
        linear-gradient(
            135deg,
            var(--resume-accent),
            #111827
        );

    color: #fff;

    padding: 38px;
}

.resume.template-creative .resume-header-info h1 {
    color: #fff;

    font-size: 37px;
}

.resume.template-creative .resume-header-info h2 {
    color: #bfdbfe;
}

.resume.template-creative .resume-contact,
.resume.template-creative .resume-links {
    color: #e2e8f0;
}

.resume.template-creative .resume-content {
    display: block;
}

.resume.template-creative .resume-sidebar {
    display: none;
}

.resume.template-creative .resume-section h3 {
    border: 0;

    padding: 0;

    display: inline-block;

    padding: 6px 12px;

    border-radius: 20px;

    background: #eff6ff;
}

.resume.template-creative .skill-pill {
    border-radius: 20px;
}


/* =========================================================
   TEMPLATE: CLASSIC
========================================================= */

.resume.template-classic {
    font-family: Georgia, serif;
}

.resume.template-classic .resume-header {
    display: block;

    text-align: center;

    border-bottom: 3px double #334155;
}

.resume.template-classic .resume-header-info h1 {
    font-family: Georgia, serif;

    font-size: 34px;
}

.resume.template-classic .resume-header-info h2 {
    color: #334155;

    font-style: italic;
}

.resume.template-classic .resume-contact,
.resume.template-classic .resume-links {
    justify-content: center;
}

.resume.template-classic .resume-content {
    display: block;
}

.resume.template-classic .resume-sidebar {
    display: none;
}

.resume.template-classic .resume-section h3 {
    color: #111827;

    border-bottom: 1px solid #334155;

    font-family: Arial, sans-serif;
}


/* =========================================================
   TEMPLATE: OWN STYLE
========================================================= */

.resume.template-own .resume-header {
    border-left: 12px solid var(--resume-accent);

    background:
        linear-gradient(
            90deg,
            rgba(37,99,235,.08),
            transparent
        );
}

.resume.template-own .resume-sidebar {
    display: none;
}

.resume.template-own .resume-content {
    display: block;
}

.resume.template-own .resume-section h3 {
    font-size: 13px;
}


/* =========================================================
   DESIGN CONTROLS
========================================================= */

.design-template-list {
    display: grid;

    grid-template-columns: repeat(2,1fr);

    gap: 8px;

    margin-bottom: 20px;
}

.design-template {
    min-height: 45px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 8px 10px;

    border: 1px solid #e2e8f0;

    border-radius: 9px;

    background: #fff;

    color: #475569;

    font-size: 11px;

    font-weight: 800;

    text-align: left;
}

.design-template.active {
    border-color: #2563eb;

    background: #eff6ff;

    color: #2563eb;
}

.template-dot {
    width: 19px;
    height: 19px;

    flex-shrink: 0;

    border-radius: 50%;
}

.modern-dot {
    background: #2563eb;
}

.professional-dot {
    background: #64748b;
}

.executive-dot {
    background: #111827;
}

.ats-dot {
    background: #334155;
}

.creative-dot {
    background: linear-gradient(135deg,#7c3aed,#2563eb);
}

.classic-dot {
    background: #78350f;
}

.own-dot {
    background: linear-gradient(135deg,#2563eb,#ec4899);
}

.design-controls {
    display: grid;

    grid-template-columns: repeat(2,1fr);

    gap: 14px;
}

.design-control {
    display: flex;

    flex-direction: column;

    gap: 6px;
}

.color-input {
    display: flex;

    align-items: center;

    gap: 8px;
}

.color-input input {
    width: 44px;
    min-height: 40px;

    padding: 3px;

    cursor: pointer;
}

.color-input span {
    color: #64748b;

    font-size: 11px;

    font-weight: 700;
}


/* =========================================================
   PDF MODAL
========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 3000;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 15px;
}

.modal.open {
    display: flex;
}

.modal-backdrop {
    position: absolute;

    inset: 0;

    background: rgba(15,23,42,.7);

    backdrop-filter: blur(5px);
}

.modal-box {
    position: relative;

    width: min(650px,100%);

    max-height: 90vh;

    overflow-y: auto;

    padding: 25px;

    background: #fff;

    border-radius: 17px;

    box-shadow: 0 30px 80px rgba(0,0,0,.3);
}

.modal-header {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin-bottom: 20px;
}

.modal-header h3 {
    margin-top: 4px;

    font-size: 22px;
}

.modal-close {
    width: 38px;
    height: 38px;

    border: 0;

    border-radius: 8px;

    background: #f1f5f9;

    color: #334155;

    font-size: 24px;
}

.pdf-drop-zone {
    padding: 30px 20px;

    text-align: center;

    border: 2px dashed #93c5fd;

    border-radius: 13px;

    background: #eff6ff;

    transition: .2s;
}

.pdf-drop-zone.dragover {
    background: #dbeafe;

    border-color: #2563eb;
}

.pdf-icon {
    font-size: 40px;

    margin-bottom: 10px;
}

.pdf-drop-zone h4 {
    font-size: 15px;
}

.pdf-drop-zone p {
    color: #64748b;

    font-size: 12px;

    margin: 7px 0 15px;
}

.pdf-select-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 9px 15px;

    border-radius: 8px;

    background: #2563eb;

    color: #fff;

    font-size: 12px;

    font-weight: 800;

    cursor: pointer;
}

.pdf-select-btn input {
    display: none;
}

.pdf-file-info {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 13px;

    margin-top: 15px;

    border: 1px solid #e2e8f0;

    border-radius: 10px;
}

.file-icon {
    font-size: 25px;
}

.pdf-file-info strong,
.pdf-file-info span {
    display: block;
}

.pdf-file-info strong {
    font-size: 12px;

    word-break: break-all;
}

.pdf-file-info span {
    margin-top: 3px;

    color: #94a3b8;

    font-size: 10px;
}

.pdf-progress {
    margin-top: 15px;
}

.pdf-status {
    margin-top: 13px;

    color: #475569;

    font-size: 12px;

    line-height: 1.5;
}

.pdf-result {
    margin-top: 15px;
}

.pdf-result h4 {
    font-size: 12px;

    margin-bottom: 8px;
}

.pdf-extracted-preview {
    max-height: 180px;

    overflow: auto;

    padding: 12px;

    white-space: pre-wrap;

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 8px;

    color: #475569;

    font-size: 10px;

    line-height: 1.5;
}

.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 8px;

    margin-top: 20px;
}

.primary-btn {
    background: #2563eb;

    color: #fff;

    border-color: #2563eb;
}

.primary-btn:hover {
    background: #1d4ed8;
}

.primary-btn:disabled {
    opacity: .45;

    cursor: not-allowed;
}


/* =========================================================
   TOAST
========================================================= */

.toast {
    position: fixed;

    left: 50%;
    bottom: 25px;

    z-index: 5000;

    transform:
        translate(-50%, 100px);

    opacity: 0;

    max-width: calc(100% - 30px);

    padding: 11px 17px;

    background: #0f172a;

    color: #fff;

    border-radius: 9px;

    font-size: 12px;

    font-weight: 700;

    box-shadow: 0 10px 30px rgba(0,0,0,.2);

    transition: .3s;
}

.toast.show {
    transform: translate(-50%,0);

    opacity: 1;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    padding: 25px;

    text-align: center;

    color: #94a3b8;

    font-size: 11px;
}


/* =========================================================
   UTILITY
========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .hero {
        gap: 35px;
    }

    .feature-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .template-grid {
        grid-template-columns: repeat(3,1fr);
    }

    .editor-layout {
        grid-template-columns: minmax(330px,430px) minmax(0,1fr);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 800px) {

    .topbar {
        position: static;

        flex-direction: column;

        align-items: stretch;

        gap: 12px;

        padding: 10px 14px;
    }

    .brand {
        justify-content: center;
    }

    .main-nav {
        width: 100%;

        display: grid;

        grid-template-columns: repeat(3,1fr);

        gap: 5px;
    }

    .topbar .main-nav button {
        width: 100%;

        min-height: 42px;

        padding: 7px 5px;

        font-size: 10px;
    }

    .hero {
        grid-template-columns: 1fr;

        text-align: center;

        padding: 50px 18px 35px;

        min-height: auto;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;

        font-size: 15px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-card {
        display: none;
    }

    .feature-grid {
        grid-template-columns: 1fr;

        padding-left: 18px;
        padding-right: 18px;
    }

    #templates {
        padding: 30px 15px 50px;
    }

    .page-heading {
        align-items: flex-start;

        flex-direction: column;
    }

    .template-grid {
        grid-template-columns: repeat(2,1fr);

        gap: 12px;
    }

    .template-preview {
        height: 190px;
    }

    #editor {
        padding: 20px 10px 45px;
    }

    .editor-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .editor-actions {
        width: 100%;
    }

    .editor-actions button {
        flex: 1;
    }

    .steps {
        grid-template-columns: repeat(4,1fr);

        gap: 4px;
    }

    .step-btn {
        min-height: 48px;

        flex-direction: column;

        gap: 3px;

        font-size: 9px;
    }

    .step-btn span {
        width: 23px;
        height: 23px;
    }

    .editor-layout {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .preview-panel {
        position: static;
    }

    .resume-viewport {
        padding: 12px;

        min-height: 500px;

        overflow-x: auto;
    }

    .resume {
        margin-left: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    .dynamic-grid {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .topbar {
        padding: 9px 10px;
    }

    .own-logo {
        width: 40px;
        height: 40px;
        padding: 3px;
    }

    .brand {
        gap: 8px;
    }

    .brand-text strong {
        font-size: 13px;
    }

    .brand-text small {
        font-size: 8px;
    }

    .main-nav {
        grid-template-columns: repeat(2,1fr);
    }

    .topbar .main-nav button {
        font-size: 10px;
    }

    .hero {
        padding: 40px 15px 25px;
    }

    .hero h1 {
        font-size: 39px;

        letter-spacing: -2px;
    }

    .hero p {
        font-size: 14px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-primary,
    .hero-secondary {
        width: 100%;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .template-preview {
        height: 220px;
    }

    .steps {
        grid-template-columns: repeat(4,1fr);
    }

    .step-btn {
        padding: 4px 2px;
    }

    .step-btn label {
        font-size: 8px;
    }

    .step {
        padding: 18px 14px;
    }

    .photo-box {
        align-items: flex-start;

        flex-direction: column;
    }

    .design-template-list,
    .design-controls {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        padding: 13px 14px;
    }

    .nav-btn {
        flex: 1;
    }

    .modal-box {
        padding: 18px;
    }

}


/* =========================================================
   PRINT / PDF
========================================================= */

@page {
    size: A4;
    margin: 0;
}

@media print {

    html,
    body {
        width: 210mm;
        min-height: 297mm;

        margin: 0;
        padding: 0;

        background: #fff !important;
    }

    body * {
        visibility: hidden !important;
    }

    #resume,
    #resume * {
        visibility: visible !important;
    }

    #resume {
        position: absolute;

        left: 0;
        top: 0;

        width: 210mm;
        min-height: 297mm;

        margin: 0;

        box-shadow: none !important;

        transform: none !important;

        overflow: hidden;

        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .resume {
        page-break-after: auto;
    }

    .resume-header,
    .resume-section,
    .resume-entry {
        page-break-inside: avoid;
    }

}