:root {
    --bg: #f2f6fc;
    --bg-soft: #f8fbff;
    --card: rgba(255,255,255,.92);
    --text: #18253d;
    --text-soft: #40506f;
    --muted: #6f7f97;
    --line: #dfe8f5;
    --line-2: #edf3fb;
    --primary: #2f70c9;
    --primary-2: #245bb2;
    --primary-3: #1f4e9d;
    --primary-soft: #eaf2ff;
    --sidebar: #2f70c9;
    --success: #166534;
    --success-bg: #dcfce7;
    --warning: #92400e;
    --warning-bg: #fef3c7;
    --danger: #991b1b;
    --danger-bg: #fee2e2;
    --info: #1d4ed8;
    --info-bg: #dbeafe;
    --shadow: 0 20px 50px rgba(31, 78, 157, .08);
    --shadow-soft: 0 12px 30px rgba(31, 78, 157, .06);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f6fd 100%);
    color: var(--text);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; }

/* LOGIN */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(47,112,201,.22), transparent 28%),
        radial-gradient(circle at 88% 20%, rgba(47,112,201,.12), transparent 25%),
        linear-gradient(135deg, #f8fbff 0%, #ecf4ff 48%, #ffffff 100%);
}
.auth-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 28px;
    position: relative;
}
.auth-alert {
    left: 50%;
    max-width: 500px;
    position: fixed;
    top: 24px;
    transform: translateX(-50%);
    width: calc(100% - 36px);
    z-index: 20;
}
.login-card {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(47,112,201,.14);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(37, 90, 170, .18);
    overflow: hidden;
    padding: 0;
    width: min(460px, 100%);
}
.login-logo-panel {
    background: linear-gradient(145deg, #4d8ee1 0%, #2f70c9 45%, #255aaa 100%);
    border-radius: 24px;
    margin: 18px 18px 0;
    min-height: 112px;
    padding: 22px;
    text-align: center;
}
.login-logo-panel img {
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: 76px;
    max-width: min(260px, 90%);
    object-fit: contain;
    width: auto;
}
.login-content { padding: 30px; }
.login-card h1 {
    font-size: 28px;
    line-height: 1.1;
    margin: 0 0 8px;
}
.login-card p { color: var(--muted); margin: 0 0 22px; }

.password-field {
    align-items: center;
    display: flex;
    gap: 10px;
}
.password-field input {
    flex: 1;
}
.password-toggle {
    background: #eff4fc;
    border: 1px solid #d8e4f6;
    border-radius: 14px;
    color: #2859ac;
    cursor: pointer;
    flex: 0 0 auto;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    min-height: 50px;
    padding: 0 16px;
    transition: .18s ease;
}
.password-toggle:hover {
    background: #e8f0fc;
    transform: translateY(-1px);
}

/* APP */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}
.sidebar {
    background: linear-gradient(180deg, #4b86d3 0%, #2f70c9 42%, #2859ac 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex: 0 0 280px;
    gap: 18px;
    height: 100vh;
    overflow-y: auto;
    padding: 22px 18px 18px;
    position: sticky;
    top: 0;
    width: 280px;
}
.sidebar-brand-card {
    align-items: center;
    background: rgba(255,255,255,.11);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 22px;
    display: flex;
    justify-content: center;
    min-height: 96px;
    padding: 16px;
}
.sidebar-logo {
    display: block;
    height: auto;
    max-height: 64px;
    max-width: 190px;
    object-fit: contain;
    width: auto;
}
.sidebar-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
}
.side-link,
.logout-button {
    align-items: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    color: #edf5ff;
    display: flex;
    font-weight: 600;
    gap: 11px;
    min-height: 50px;
    padding: 12px 14px;
    transition: .18s ease;
}
.side-link:hover,
.logout-button:hover {
    background: rgba(255,255,255,.11);
    color: #fff;
    transform: translateX(2px);
}
.side-link.active {
    background: #fff;
    color: #2859ac;
    box-shadow: 0 14px 26px rgba(19, 48, 105, .18);
}
.side-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 20px;
    justify-content: center;
}
.side-icon svg {
    fill: currentColor;
    height: 18px;
    width: 18px;
}
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.user-box {
    align-items: center;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    display: flex;
    gap: 12px;
    padding: 13px;
}
.avatar {
    align-items: center;
    background: rgba(255,255,255,.18);
    border-radius: 999px;
    display: flex;
    flex: 0 0 36px;
    font-weight: 700;
    height: 36px;
    justify-content: center;
    width: 36px;
}
.user-box small {
    color: rgba(255,255,255,.74);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.user-box strong,
.user-box span {
    display: block;
    line-height: 1.25;
}
.user-box strong { font-size: 14px; font-weight: 700; }
.user-box span { color: rgba(255,255,255,.86); font-size: 12px; }
.logout-button {
    background: #fff;
    color: #2859ac;
    justify-content: center;
}
.app-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100vh;
    min-width: 0;
    overflow-y: auto;
}
.mobile-brand { display: none; }
.container {
    flex: 1;
    margin: 0 auto;
    padding: 32px;
    width: min(1360px, 100%);
}
.footer {
    color: var(--muted);
    padding: 0 32px 22px;
    text-align: center;
}

.page-title {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 22px;
}
.page-title h1 {
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 8px;
}
.page-title p {
    color: var(--muted);
    margin: 0;
    max-width: 900px;
}
.page-kicker {
    color: var(--primary);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.page-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hero-card {
    background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 45%, #ffffff 100%);
    border: 1px solid var(--line);
    border-radius: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    padding: 28px;
    position: relative;
}
.hero-card::after {
    background: radial-gradient(circle at top right, rgba(47,112,201,.18), transparent 34%), radial-gradient(circle at bottom left, rgba(47,112,201,.08), transparent 26%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}
.hero-card > * { position: relative; z-index: 1; }
.hero-grid {
    align-items: end;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
}
.summary-list {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.summary-card {
    background: rgba(255,255,255,.8);
    border: 1px solid var(--line-2);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 16px 18px;
}
.summary-card span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}
.summary-card strong {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}
.hero-banner h2 {
    font-size: clamp(26px, 3vw, 40px);
    letter-spacing: -0.04em;
    line-height: 1.02;
    margin: 0 0 12px;
}
.hero-banner p {
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 18px;
    max-width: 760px;
}
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hero-tags span {
    align-items: center;
    background: rgba(255,255,255,.82);
    border: 1px solid #dce8fb;
    border-radius: 999px;
    color: #2859ac;
    display: inline-flex;
    font-size: 13px;
    font-weight: 650;
    padding: 8px 12px;
}
.hero-note {
    align-self: stretch;
    background: linear-gradient(180deg, rgba(47,112,201,.08), rgba(47,112,201,.04));
    border: 1px solid rgba(47,112,201,.12);
    border-radius: 22px;
    color: var(--text-soft);
    padding: 20px;
}
.hero-note h3 {
    font-size: 16px;
    margin: 0 0 10px;
}
.hero-note ul { margin: 0; padding-left: 18px; }
.hero-note li + li { margin-top: 8px; }

.card {
    background: var(--card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(223, 232, 245, .9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    padding: 24px;
}
.card h2 {
    font-size: 24px;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
}
.card-subtitle {
    color: var(--muted);
    margin: -4px 0 0;
}
.card-head {
    align-items: end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 18px;
}
.form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
label {
    color: #31415e;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
}
.label-hint {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}
input,
select,
textarea {
    appearance: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 15px;
    color: var(--text);
    font: inherit;
    min-height: 50px;
    outline: none;
    padding: 13px 14px;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
    width: 100%;
}
input::placeholder,
textarea::placeholder { color: #95a2b8; }
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(47,112,201,.7);
    box-shadow: 0 0 0 4px rgba(47,112,201,.12);
}
textarea {
    min-height: 94px;
    resize: vertical;
}
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    margin: 18px 0;
}
.btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 650;
    gap: 8px;
    justify-content: center;
    min-height: 46px;
    padding: 11px 16px;
    text-decoration: none;
    transition: .18s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 14px 24px rgba(47,112,201,.18);
    color: #fff;
}
.btn.primary:hover { background: linear-gradient(135deg, #3f7fd1, var(--primary-3)); }
.btn.secondary {
    background: #eff4fc;
    border-color: #e2ebf8;
    color: #2859ac;
}
.btn.ghost {
    background: #fff;
    border-color: #d8e4f6;
    color: #2859ac;
}
.btn.small {
    border-radius: 12px;
    font-size: 13px;
    min-height: 40px;
    padding: 9px 12px;
}

.muted,
.hint,
.empty { color: var(--muted); }
.hint { font-size: 13px; margin-bottom: 0; }
.alert {
    border-radius: 16px;
    font-weight: 600;
    margin-bottom: 18px;
    padding: 14px 16px;
}
.alert.success { background: var(--success-bg); color: var(--success); }
.alert.danger { background: var(--danger-bg); color: var(--danger); }
.stats {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 20px;
}
.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
}
.stat strong {
    color: #2859ac;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}
.stat span { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table {
    border-collapse: collapse;
    width: 100%;
}
th, td {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
}
th {
    background: #f8fbff;
    color: #51627e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
tr:hover td { background: #fbfdff; }
.responses-table { min-width: 1100px; }
.badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    padding: 6px 10px;
}
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.muted { background: #e8eef7; color: #55657d; }

.checklist-list { display: flex; flex-direction: column; gap: 18px; }
.item-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    padding: 20px;
}
.item-head {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
}
.item-number {
    align-items: center;
    background: linear-gradient(135deg, #edf5ff, #ffffff);
    border: 1px solid #d7e7ff;
    border-radius: 14px;
    color: #2859ac;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 10px;
}
.item-head h3 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}
.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.item-meta span {
    background: #edf5ff;
    border: 1px solid #dce9fe;
    border-radius: 999px;
    color: #2859ac;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
}
.item-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 14px;
}
.item-grid .span-2 { grid-column: span 2; }
.item-grid .span-4 { grid-column: span 4; }
.item-grid .span-5 { grid-column: span 5; }

.uploader {
    background: linear-gradient(180deg, #f9fbff 0%, #f5f9ff 100%);
    border: 1px dashed #c9dcf8;
    border-radius: 18px;
    padding: 16px;
}
.uploader-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 8px;
}
.uploader-title {
    color: var(--text);
    display: block;
    font-size: 14px;
    font-weight: 650;
}
.uploader-subtitle {
    color: var(--muted);
    font-size: 12px;
}
.uploader-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.file-trigger {
    cursor: pointer;
    position: relative;
}
.file-trigger input {
    height: 1px;
    left: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 1px;
}
.upload-count {
    align-items: center;
    background: #fff;
    border: 1px solid #d8e4f6;
    border-radius: 999px;
    color: #325189;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
    padding: 6px 10px;
}
.upload-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    margin-top: 14px;
}
.upload-empty {
    align-items: center;
    background: rgba(255,255,255,.75);
    border: 1px dashed #d7e3f5;
    border-radius: 16px;
    color: var(--muted);
    display: flex;
    font-size: 13px;
    justify-content: center;
    min-height: 92px;
    padding: 16px;
    text-align: center;
}
.upload-thumb {
    align-items: center;
    background: #fff;
    border: 1px solid #d8e4f6;
    border-radius: 16px;
    display: flex;
    gap: 10px;
    min-height: 92px;
    overflow: hidden;
    padding: 10px;
}
.upload-thumb-image {
    border-radius: 12px;
    flex: 0 0 70px;
    height: 70px;
    object-fit: cover;
    width: 70px;
}
.upload-thumb-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.upload-thumb-meta strong {
    font-size: 13px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.upload-thumb-meta span { color: var(--muted); font-size: 12px; }

.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-grid img {
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    height: 92px;
    object-fit: cover;
    width: 92px;
}

.admin-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.admin-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
}
.admin-card:hover { transform: translateY(-2px); transition: .18s ease; }
.admin-card strong { color: #2859ac; font-size: 18px; font-weight: 700; }
.admin-card span { color: var(--muted); }

.inline-form { align-items: center; display: inline-flex; flex-wrap: wrap; gap: 8px; }
.inline-form select { min-width: 130px; }
.check { align-items: center; flex-direction: row; font-weight: 600; }
.check input { min-height: auto; width: auto; }
.inline-check { justify-content: flex-start; padding-top: 28px; }
.nowrap { white-space: nowrap; }
code { background: #f1f5f9; border-radius: 8px; padding: 4px 7px; }

/* view / pdf */
.view-meta {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.view-meta .summary-card strong { font-size: 18px; }
.pdf-shell {
    background: #fff;
    margin: 0 auto;
    max-width: 1100px;
    padding: 28px;
}
.pdf-header {
    align-items: center;
    background: linear-gradient(135deg, #3f7fd1, #245bb2);
    border-radius: 26px;
    color: #fff;
    display: flex;
    gap: 22px;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 24px 28px;
}
.pdf-header-brand {
    align-items: center;
    display: flex;
    gap: 18px;
}
.pdf-header-logo {
    align-items: center;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    display: flex;
    justify-content: center;
    min-height: 84px;
    min-width: 170px;
    padding: 16px;
}
.pdf-header-logo img {
    max-height: 50px;
    object-fit: contain;
}
.pdf-header h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 0 0 8px;
}
.pdf-header p { color: rgba(255,255,255,.88); margin: 0; }
.pdf-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 18px 0 24px;
}
.pdf-meta-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
}
.pdf-meta-card span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.pdf-meta-card strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
}
.pdf-section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    margin-bottom: 16px;
    overflow: hidden;
    page-break-inside: avoid;
}
.pdf-section-head {
    align-items: center;
    background: #f8fbff;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 16px 18px;
}
.pdf-section-content {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 18px;
}
.pdf-field {
    background: #fbfdff;
    border: 1px solid #e9f0fa;
    border-radius: 16px;
    padding: 12px 14px;
}
.pdf-field.span-2 { grid-column: span 2; }
.pdf-field.span-4 { grid-column: span 4; }
.pdf-field span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.pdf-field strong,
.pdf-field div { font-size: 14px; line-height: 1.45; }
.pdf-photo-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.pdf-photo-grid img {
    border: 1px solid var(--line);
    border-radius: 16px;
    height: 120px;
    object-fit: cover;
    width: 100%;
}
.pdf-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin: 0 auto 20px;
    max-width: 1100px;
    padding: 24px 28px 0;
}



.pdf-header-premium {
    background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
    border: 1px solid #d6e2f4;
    border-radius: 20px;
    color: #182641;
    display: block;
    margin-bottom: 12px;
    padding: 0;
    overflow: hidden;
}
.pdf-header-topline {
    align-items: center;
    background: linear-gradient(90deg, #245bb2 0%, #5c89d7 100%);
    color: #fff;
    display: flex;
    font-size: 11px;
    font-weight: 700;
    justify-content: space-between;
    letter-spacing: .08em;
    padding: 9px 18px;
    text-transform: uppercase;
}
.pdf-header-main {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 18px 20px;
}
.pdf-header-brand-dark {
    align-items: center;
    display: flex;
    gap: 18px;
}
.pdf-header-logo-light {
    background: #fff;
    border: 1px solid #dbe6f7;
    box-shadow: 0 10px 22px rgba(33, 72, 141, .08);
}
.pdf-header-logo-light img {
    max-height: 48px;
}
.pdf-header-premium h1 {
    color: #203352;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 0 6px;
}
.pdf-header-premium p {
    color: #5d7192;
    margin: 0;
}
.pdf-header-badge-block {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pdf-header-badge {
    background: #eaf2ff;
    border: 1px solid #d4e1fb;
    border-radius: 999px;
    color: #245bb2;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    padding: 6px 12px;
    text-transform: uppercase;
}
.pdf-header-badge-block strong {
    color: #203352;
    font-size: 15px;
}
.pdf-summary-strip-modern {
    background: #fff;
    border-color: #d6e2f4;
    box-shadow: 0 10px 24px rgba(33, 72, 141, .05);
}
.pdf-summary-strip-modern > div {
    min-height: 62px;
}
.pdf-annex-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pdf-annex-item.compact {
    border-radius: 14px;
    margin-bottom: 0;
}
.pdf-annex-item.compact .pdf-annex-title {
    align-items: flex-start;
}
.pdf-annex-item.compact .pdf-annex-title > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pdf-annex-item.compact .pdf-annex-title small {
    color: #5d7192;
    font-size: 11px;
    font-weight: 600;
}
.pdf-photo-grid.side-by-side {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px 12px;
}
.pdf-photo-card {
    background: #fff;
    border: 1px solid #dbe6f7;
    border-radius: 10px;
    display: block;
    margin: 0;
    overflow: hidden;
    width: 128px;
}
.pdf-photo-card img {
    display: block;
    height: 96px;
    object-fit: cover;
    width: 100%;
}

.pdf-shell-slim {
    max-width: 1400px;
    padding: 18px 20px 24px;
}
.pdf-header-slim {
    border-radius: 18px;
    margin-bottom: 10px;
    padding: 18px 20px;
}
.pdf-header-slim .pdf-header-logo {
    border-radius: 14px;
    min-height: 68px;
    min-width: 150px;
    padding: 12px 14px;
}
.pdf-header-slim .pdf-header-logo img {
    max-height: 40px;
}
.pdf-header-slim h1 {
    font-size: 24px;
    margin-bottom: 4px;
}
.pdf-header-slim p {
    font-size: 13px;
}
.pdf-summary-strip {
    align-items: stretch;
    border: 1px solid #d8e5f7;
    border-radius: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 12px;
    overflow: hidden;
}
.pdf-summary-strip > div {
    background: #fff;
    border-right: 1px solid #e4edf9;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 58px;
    padding: 10px 12px;
}
.pdf-summary-strip > div:last-child {
    border-right: 0;
}
.pdf-summary-strip span {
    color: #5d7192;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pdf-summary-strip strong {
    color: #1d2b4c;
    font-size: 14px;
    font-weight: 700;
}
.pdf-table-card {
    background: #fff;
    border: 1px solid #d8e5f7;
    border-radius: 14px;
    overflow: hidden;
}
.pdf-report-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}
.pdf-report-table th,
.pdf-report-table td {
    border: 1px solid #d9e3f1;
    color: #15233f;
    font-size: 11px;
    line-height: 1.25;
    padding: 4px 6px;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: break-word;
}
.pdf-report-table th {
    background: #eef4fc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .015em;
    text-align: center;
    white-space: nowrap;
    overflow-wrap: normal;
}
.pdf-report-table td.center {
    text-align: center;
    vertical-align: middle;
}
.pdf-report-table .w-cod { width: 42px; }
.pdf-report-table .w-item { width: 270px; }
.pdf-report-table .w-cat { width: 145px; }
.pdf-report-table .w-resp { width: 145px; }
.pdf-report-table .w-mat { width: 112px; }
.pdf-report-table .w-qty { width: 82px; }
.pdf-report-table .w-state { width: 100px; }
.pdf-report-table .w-obs { width: auto; }
.pdf-annex-section {
    margin-top: 14px;
}
.pdf-annex-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.pdf-annex-head h2 {
    color: #1d2b4c;
    font-size: 18px;
    margin: 0;
}
.pdf-annex-head span {
    color: #5d7192;
    font-size: 13px;
    font-weight: 600;
}
.pdf-annex-item {
    background: #fff;
    border: 1px solid #d8e5f7;
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    page-break-inside: avoid;
}
.pdf-annex-title {
    align-items: center;
    background: #f7faff;
    border-bottom: 1px solid #e4edf9;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 12px;
}
.pdf-annex-title strong {
    color: #1d2b4c;
    font-size: 13px;
}
.pdf-annex-title span {
    color: #5d7192;
    font-size: 12px;
}
.pdf-photo-grid.slim {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    padding: 12px;
}
.pdf-photo-grid.slim img {
    border-radius: 10px;
    height: 105px;
}

@media (max-width: 1120px) {
    .hero-grid { grid-template-columns: 1fr; }
    .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-grid .span-2,
    .item-grid .span-4,
    .item-grid .span-5 { grid-column: auto; }
    .pdf-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pdf-section-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .pdf-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pdf-annex-grid { grid-template-columns: 1fr; }
    .pdf-field.span-2,
    .pdf-field.span-4 { grid-column: auto; }
}
@media (max-width: 1020px) {
    .app-shell { flex-direction: column; height: auto; overflow: visible; }
    .sidebar {
        flex: none;
        height: auto;
        min-height: auto;
        overflow: visible;
        position: static;
        width: 100%;
    }
    .sidebar-brand-card { min-height: 78px; }
    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    }
    .sidebar-bottom { display: none; }
    .app-content { height: auto; overflow: visible; }
    .mobile-brand { display: none; }
    .container { padding: 22px 16px; }
    .footer { padding: 0 16px 20px; }
}
@media (max-width: 860px) {
    .page-title,
    .card-head,
    .item-head,
    .uploader-header { align-items: stretch; flex-direction: column; }
    .grid.two,
    .grid.four,
    .grid.five,
    .item-grid,
    .pdf-meta,
    .pdf-section-content { grid-template-columns: 1fr; }
    .actions,
    .page-actions,
    .uploader-actions,
    .pdf-actions { flex-direction: column; }
    .btn { width: 100%; }
    .login-content { padding: 22px; }
    .container { width: 100%; }
    .pdf-shell { padding: 16px; }
    .pdf-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }
    .pdf-header-main,
    .pdf-header-brand,
    .pdf-header-brand-dark { align-items: flex-start; flex-direction: column; }
    .pdf-header-topline { flex-direction: column; gap: 6px; align-items: flex-start; }
    .pdf-header-logo { min-width: 0; width: 100%; }
    .pdf-header-badge-block { align-items: flex-start; }
}
@media print {
    @page { size: A4 landscape; margin: 10mm; }
    body { background: #fff !important; }
    .sidebar,
    .footer,
    .btn,
    .actions,
    .page-actions,
    .mobile-brand,
    .pdf-actions { display: none !important; }
    .app-shell,
    .app-content,
    .container { display: block; padding: 0; margin: 0; width: 100%; }
    .hero-card,
    .card,
    .item-card,
    .pdf-section,
    .pdf-meta-card { box-shadow: none !important; }

    .pdf-shell-slim { max-width: none; padding: 0; }
    .pdf-annex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pdf-photo-card { width: 104px; }
    .pdf-photo-card img { height: 82px; }
    .pdf-header-slim { margin-bottom: 8px; padding: 12px 14px; }
    .pdf-summary-strip { margin-bottom: 8px; }
    .pdf-report-table th,
    .pdf-report-table td { font-size: 9.2px; padding: 3px 4px; }
    .pdf-report-table th { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
    .pdf-annex-item,
    .pdf-table-card,
    .pdf-summary-strip,
    .pdf-header { box-shadow: none !important; }
}

.sidebar::-webkit-scrollbar,
.app-content::-webkit-scrollbar { width: 10px; }
.sidebar::-webkit-scrollbar-thumb,
.app-content::-webkit-scrollbar-thumb {
    background: rgba(47,112,201,.25);
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}
.sidebar::-webkit-scrollbar-track,
.app-content::-webkit-scrollbar-track { background: transparent; }

/* CHECKLIST SLIM - V4 */
.checklist-list {
    gap: 9px;
}

.item-card {
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(31, 78, 157, .035);
    padding: 12px 14px;
}

.item-head {
    margin-bottom: 9px;
}

.item-number {
    border-radius: 999px;
    font-size: 11px;
    margin-bottom: 6px;
    padding: 5px 8px;
}

.item-head h3 {
    font-size: 16px;
    line-height: 1.18;
}

.item-meta {
    gap: 5px;
    margin-top: 6px;
}

.item-meta span {
    font-size: 11px;
    padding: 4px 7px;
}

.item-grid {
    align-items: end;
    gap: 8px 10px;
}

.item-grid .span-3 {
    grid-column: span 3;
}

.item-grid label {
    font-size: 12px;
    gap: 5px;
}

.item-grid input,
.item-grid select {
    border-radius: 11px;
    font-size: 13px;
    min-height: 40px;
    padding: 9px 11px;
}

.item-grid textarea {
    border-radius: 11px;
    font-size: 13px;
    min-height: 40px;
    padding: 9px 11px;
}

.slim-observation textarea {
    max-height: 72px;
}

.uploader {
    background: #f8fbff;
    border-style: solid;
    border-radius: 12px;
    padding: 8px 10px;
}

.uploader-header {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 0;
}

.uploader-title {
    font-size: 12px;
}

.uploader-subtitle {
    display: none;
}

.uploader-actions {
    gap: 6px;
}

.uploader .btn.small {
    border-radius: 10px;
    font-size: 12px;
    min-height: 34px;
    padding: 7px 10px;
}

.upload-count {
    font-size: 11px;
    margin-top: 6px;
    padding: 4px 8px;
}

.upload-list {
    gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    margin-top: 7px;
}

.upload-empty {
    display: none;
    min-height: 0;
    padding: 0;
}

.upload-thumb {
    border-radius: 10px;
    gap: 6px;
    min-height: 54px;
    padding: 6px;
}

.upload-thumb-image {
    border-radius: 8px;
    flex: 0 0 42px;
    height: 42px;
    width: 42px;
}

.upload-thumb-meta strong {
    font-size: 11px;
}

.upload-thumb-meta span {
    font-size: 10px;
}

@media (max-width: 1120px) {
    .item-grid .span-2,
    .item-grid .span-3,
    .item-grid .span-4,
    .item-grid .span-5 {
        grid-column: auto;
    }
}

@media (max-width: 860px) {
    .item-card {
        padding: 11px;
    }

    .uploader-header {
        align-items: stretch;
        flex-direction: column;
    }

    .uploader-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .uploader .btn.small {
        width: 100%;
    }
}

/* FOTO MODAL / LIGHTBOX - V9 */
.photo-lightbox-trigger {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    padding: 0;
}
.photo-lightbox-trigger img {
    transition: transform .18s ease, box-shadow .18s ease;
}
.photo-lightbox-trigger:hover img {
    box-shadow: 0 14px 30px rgba(18, 44, 95, .18);
    transform: scale(1.04);
}
.photo-modal-open {
    overflow: hidden;
}
.photo-modal {
    align-items: center;
    display: none;
    inset: 0;
    justify-content: center;
    padding: 24px;
    position: fixed;
    z-index: 9999;
}
.photo-modal.is-open {
    display: flex;
}
.photo-modal-backdrop {
    background: rgba(8, 19, 41, .82);
    inset: 0;
    position: absolute;
}
.photo-modal-dialog {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: 58px minmax(0, 1fr) 58px;
    max-height: calc(100vh - 48px);
    max-width: min(1180px, 100%);
    position: relative;
    width: 100%;
    z-index: 1;
}
.photo-modal-figure {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0,0,0,.32);
    display: flex;
    flex-direction: column;
    margin: 0;
    max-height: calc(100vh - 48px);
    min-height: 220px;
    overflow: hidden;
}
.photo-modal-figure img {
    background: #0d1730;
    display: block;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    width: 100%;
}
.photo-modal-figure figcaption {
    align-items: center;
    background: #fff;
    border-top: 1px solid #e2ebf8;
    display: grid;
    gap: 4px;
    grid-template-columns: 1fr auto;
    padding: 14px 18px;
    width: 100%;
}
.photo-modal-figure figcaption strong {
    color: #14223e;
    font-size: 15px;
    font-weight: 800;
    grid-column: 1 / 2;
}
.photo-modal-figure figcaption span {
    color: #637493;
    font-size: 13px;
    grid-column: 1 / 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.photo-modal-figure figcaption small {
    background: #edf5ff;
    border: 1px solid #d8e7ff;
    border-radius: 999px;
    color: #2859ac;
    font-size: 12px;
    font-weight: 800;
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    padding: 7px 10px;
}
.photo-modal-close,
.photo-modal-arrow {
    align-items: center;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 999px;
    color: #1b2b4a;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    transition: .18s ease;
}
.photo-modal-close:hover,
.photo-modal-arrow:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
}
.photo-modal-close {
    font-size: 30px;
    height: 46px;
    line-height: 1;
    position: absolute;
    right: -8px;
    top: -54px;
    width: 46px;
    z-index: 3;
}
.photo-modal-arrow {
    font-size: 46px;
    height: 58px;
    line-height: 1;
    width: 58px;
}
.photo-modal-arrow:disabled {
    cursor: not-allowed;
    opacity: .35;
}
.photo-modal-prev { justify-self: end; }
.photo-modal-next { justify-self: start; }

@media (max-width: 760px) {
    .photo-modal {
        padding: 14px;
    }
    .photo-modal-dialog {
        gap: 8px;
        grid-template-columns: 46px minmax(0, 1fr) 46px;
    }
    .photo-modal-arrow {
        font-size: 34px;
        height: 46px;
        width: 46px;
    }
    .photo-modal-close {
        right: 0;
        top: -52px;
    }
    .photo-modal-figure {
        border-radius: 18px;
    }
    .photo-modal-figure figcaption {
        grid-template-columns: 1fr;
    }
    .photo-modal-figure figcaption small {
        grid-column: auto;
        grid-row: auto;
        justify-self: start;
    }
}
