:root {
    --ink: #1b2430;
    --muted: #5c6570;
    --paper: #f4efe6;
    --card: #fffcf7;
    --line: #d9d0c3;
    --navy: #17324a;
    --navy-2: #234864;
    --bronze: #b0762b;
    --bronze-dark: #8c5a1d;
    --danger: #a33b2b;
    --ok: #2f6f4e;
}

* { box-sizing: border-box; }

html, body {
    background: var(--paper);
    color: var(--ink);
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

a { color: var(--navy); }

.brand-mark {
    font-family: "Libre Baskerville", Georgia, serif;
    letter-spacing: .04em;
    color: var(--navy);
    text-decoration: none;
}

.brand-mark span {
    color: var(--bronze);
}

.site-nav {
    background: var(--navy);
    color: #fff;
}

.site-nav a {
    color: #e8eef4;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
}

.hero-card,
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(23, 50, 74, .06);
}

.btn-bronze {
    background: var(--bronze);
    border-color: var(--bronze);
    color: #fff;
}

.btn-bronze:hover {
    background: var(--bronze-dark);
    border-color: var(--bronze-dark);
    color: #fff;
}

.btn-navy {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.btn-navy:hover {
    background: var(--navy-2);
    color: #fff;
}

.step-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-right: 8px;
}

.hidden-step { display: none; }

.status-pill {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .82rem;
    color: #fff;
}

.danger-box {
    border: 1px solid #e3b6ae;
    background: #fbf1ef;
    border-radius: 12px;
    padding: 1rem;
}

.table a { text-decoration: none; }

.sidebar-staff {
    min-height: 100vh;
    background: var(--navy);
}

.sidebar-staff a {
    color: #d5dee7;
    display: block;
    padding: .45rem .8rem;
    border-radius: 8px;
    text-decoration: none;
}

.sidebar-staff a:hover,
.sidebar-staff a.active {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.sidebar-staff .nav-label {
    color: #8aa0b5;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 1rem .8rem .35rem;
}

.offer-slot {
    border-left: 3px solid var(--bronze);
}

.small-hint { color: var(--muted); font-size: .9rem; }

.masked-field {
    letter-spacing: .04em;
}

.identity-fields .form-control:disabled {
    background: #ece8e0;
    color: var(--muted);
    cursor: not-allowed;
    opacity: 1;
}

.lead-wrap {
    max-width: 640px;
}

.file-chip-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.file-chip {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}

.file-thumb {
    width: 88px;
    height: 64px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-thumb-pdf {
    font-size: .75rem;
    font-weight: 600;
    color: var(--navy);
    background: #eef3f7;
}

.file-viewer-img {
    max-width: 100%;
    max-height: 80vh;
}

.file-viewer-pdf {
    width: 100%;
    min-height: 75vh;
    border: 0;
}

.simple-editor {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.simple-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .5rem;
    background: #f4efe6;
    border-bottom: 1px solid var(--line);
}

.simple-editor-toolbar button {
    min-width: 2.1rem;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 6px;
    padding: .2rem .45rem;
    font-size: .85rem;
    color: var(--ink);
}

.simple-editor-toolbar .is-bold { font-weight: 700; }
.simple-editor-toolbar .is-italic { font-style: italic; font-family: Georgia, serif; }

.simple-editor-sep {
    width: 1px;
    background: var(--line);
    margin: 0 .25rem;
}

.simple-editor-area {
    min-height: 280px;
    padding: 1rem 1.1rem;
    outline: none;
}

.gdpr-text h1 { font-size: 1.7rem; margin: 0 0 .7rem; }
.gdpr-text h2 { font-size: 1.45rem; margin: 0 0 .65rem; }
.gdpr-text h3 { font-size: 1.25rem; margin: 0 0 .6rem; }
.gdpr-text h4 { font-size: 1.1rem; margin: 0 0 .5rem; }
.gdpr-text h5 { font-size: 1.05rem; margin: 0 0 .45rem; }
.gdpr-text h6 { font-size: 1rem; margin: 0 0 .4rem; }
.gdpr-text p { margin: 0 0 .75rem; }

code.path {
    background: #efe8db;
    padding: .1rem .35rem;
    border-radius: 4px;
}

.ci-preview-wrap {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.ci-preview-wrap img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    background: #f4efe6;
}

.ci-preview-pdf {
    padding: 1.25rem;
    text-align: center;
    font-weight: 600;
    color: var(--navy);
}

.ci-upload-stage.is-waiting {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.ci-upload-wait {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(244, 239, 230, .4);
}

.ci-upload-count {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: clamp(3.2rem, 10vw, 5.5rem);
    line-height: 1;
    color: var(--navy);
    letter-spacing: .04em;
}

.ci-upload-index {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 2.4rem;
    color: var(--navy);
    letter-spacing: .06em;
}

.form-switch .form-check-input {
    width: 2.4em;
    height: 1.25em;
    cursor: pointer;
}

.form-switch .form-check-input:checked {
    background-color: var(--navy);
    border-color: var(--navy);
}

.docs-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.docs-toggle-plus {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--navy);
    border-radius: 50%;
    color: var(--navy);
    font-size: 1.25rem;
    line-height: 1;
}

.docs-toggle[aria-expanded="true"] .docs-toggle-plus {
    transform: rotate(45deg);
}

.portal-official-docs {
    border: 0;
    padding: 0;
    background: transparent;
}

.portal-official-doc {
    border: 1px solid var(--navy);
    border-radius: 12px;
    padding: .9rem 1rem;
    background: #f4f7fa;
}
