@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root,
:root[data-theme="light"] {
    color-scheme: light;
    --brand-primary: var(--brand-primary-inline, #004b87);
    --brand-primary-strong: var(--brand-primary-inline, #004b87);
    --brand-accent: var(--brand-accent-inline, #31a2c9);
    --brand-gradient: linear-gradient(135deg, #004b87 0%, #32476d 62%, #31a2c9 100%);
    --bg-page: #f0f2f7;
    --bg-surface: #ffffff;
    --bg-soft: #f7f9fc;
    --bg-input: #ffffff;
    --text-main: #1a2332;
    --text-soft: #4a5568;
    --text-muted: #8a96a8;
    --border-soft: #dde3ee;
    --border-strong: #c8d0e0;
    --success: #2d8a4e;
    --success-bg: #ecfdf5;
    --warning: #d97706;
    --warning-bg: #fff7e8;
    --danger: #c0392b;
    --danger-bg: #fef2f2;
    --shadow-card: 0 10px 30px rgba(1, 78, 138, 0.08);
    --shadow-focus: 0 0 0 3px rgba(49, 162, 201, 0.25);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --surface: var(--bg-surface);
    --surface-2: var(--bg-soft);
    --border: var(--border-soft);
    --text: var(--text-main);
    --radius: var(--radius-md);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --brand-primary: #31a2c9;
    --brand-primary-strong: #31a2c9;
    --brand-accent: #5bc4e8;
    --brand-gradient: linear-gradient(135deg, #0a2540 0%, #014e8a 60%, #31a2c9 100%);
    --bg-page: #0d1520;
    --bg-surface: #152032;
    --bg-soft: #1c2a40;
    --bg-input: #101a29;
    --text-main: #e8edf5;
    --text-soft: #b8c5d8;
    --text-muted: #7c8da8;
    --border-soft: #2a3a55;
    --border-strong: #3f5270;
    --success: #66d28b;
    --success-bg: #052e1a;
    --warning: #ffd36c;
    --warning-bg: #2b1d04;
    --danger: #ff8d8d;
    --danger-bg: #320b0b;
    --shadow-card: 0 14px 40px rgba(0, 0, 0, 0.32);
    --shadow-focus: 0 0 0 3px rgba(49, 162, 201, 0.35);
    --surface: var(--bg-surface);
    --surface-2: var(--bg-soft);
    --border: var(--border-soft);
    --text: var(--text-main);
    --radius: var(--radius-md);
}

* { box-sizing: border-box; }
html { background: var(--bg-page); }
body {
    margin: 0;
    font-family: "Quicksand", "Inter", "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(42, 172, 184, 0.08), transparent 28rem),
        var(--bg-page);
    min-height: 100vh;
    position: relative;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("../img/pattern-azul.png");
    background-repeat: repeat;
    background-size: 520px auto;
    opacity: 0.035;
}
:root[data-theme="dark"] body::before {
    background-image: url("../img/pattern-branco.png");
    opacity: 0.03;
}
body > * { position: relative; z-index: 1; }
a { color: var(--brand-primary); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; color: var(--text-main); }
p { color: var(--text-soft); }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shell {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
    position: relative;
}
.shell.sidebar-collapsed {
    grid-template-columns: 96px minmax(0, 1fr);
}
.sidebar {
    background: var(--brand-gradient);
    color: #fff;
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid rgba(255,255,255,.08);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 20;
}
.sidebar-overlay {
    display: none;
}
.sidebar-top { display: grid; gap: 14px; }
.brand-logo {
    max-width: 212px;
    width: 100%;
    height: auto;
}
.brand-fallback {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: rgba(255,255,255,.12);
    color: #fff;
}
.brand-text {
    display: grid;
    gap: 10px;
}
.brand { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.brand-subtitle {
    color: rgba(255,255,255,.76);
    line-height: 1.5;
    margin-top: 0;
    max-width: 232px;
    font-size: 14px;
}
.menu { display: grid; gap: 10px; }
.menu a {
    color: #fff;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.09);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.menu a:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.18);
    transform: translateY(-1px);
}
.menu a.active {
    background: linear-gradient(135deg, rgba(91,196,232,.34), rgba(255,255,255,.18));
    border-color: rgba(255,255,255,.22);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.menu-icon {
    width: 18px;
    display: inline-flex;
    justify-content: center;
    flex: 0 0 18px;
    font-size: 16px;
}
.menu-text {
    white-space: nowrap;
    overflow: hidden;
}
.shell.sidebar-collapsed .brand-text,
.shell.sidebar-collapsed .menu-text,
.shell.sidebar-collapsed .user-chip {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}
.shell.sidebar-collapsed .menu a {
    justify-content: center;
    padding-inline: 0;
}
.shell.sidebar-collapsed .sidebar-footer {
    justify-items: center;
}
.shell.sidebar-collapsed .btn-ghost {
    width: 52px;
    padding-inline: 0;
}
.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 12px;
}
.user-chip {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.1);
    color: #fff;
}
.btn-ghost {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    background: rgba(255,255,255,.08);
}

.content { padding: 28px; overflow-x: hidden; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    margin-bottom: 22px;
    border-radius: var(--radius-lg);
    background: var(--brand-gradient);
    box-shadow: var(--shadow-card);
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-toggle {
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: #fff;
}
.topbar h1 { color: #fff; font-size: 28px; }
.eyebrow {
    color: rgba(255,255,255,.72);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
    margin-bottom: 6px;
}
.theme-toggle {
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: inherit;
}
.theme-toggle strong { font-size: 14px; }
.theme-toggle,
.sidebar-toggle,
.btn-ghost,
.menu a,
.search-select-trigger {
    transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease, box-shadow .2s ease;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}
.page-header h1 { font-size: 30px; margin-bottom: 8px; }
.page-header p { margin: 0; }

.panel, .metric-card, .login-card {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.panel { padding: 22px; }
.panel.is-hidden { display: none; }
.checkbox-field {
    display: flex !important;
    align-items: center;
    gap: 10px;
}
.checkbox-field input {
    width: 18px;
    height: 18px;
}
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.section-heading p {
    margin: 8px 0 0;
}
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.metric-card {
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(49,162,201,.08), transparent 55%),
        var(--bg-surface);
}
.metric-label {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.metric-card strong {
    display: block;
    font-size: 42px;
    line-height: 1;
    color: var(--brand-primary);
}
.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.chart-wrap {
    position: relative;
    height: 280px;
    margin-top: 14px;
    padding: 10px;
    border-radius: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
}
.chart-wrap.tall { height: 340px; }
.chart-wrap.medium { height: 250px; }
.chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.form-grid.single-column { grid-template-columns: 1fr; max-width: 560px; }
.form-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid label {
    display: grid;
    gap: 8px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 600;
}
input, select, textarea {
    width: 100%;
    font: inherit;
    color: var(--text-main);
    background: var(--bg-input);
    border: 1.5px solid var(--border-soft);
    border-radius: 12px;
    padding: 12px 14px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-focus);
}
.search-select-field select {
    display: none;
}
.search-select {
    position: relative;
}
.search-select.disabled {
    opacity: .72;
}
.search-select-trigger {
    width: 100%;
    text-align: left;
    border: 1.5px solid var(--border-soft);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--bg-input);
    color: var(--text-main);
}
.search-select-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-card);
    z-index: 30;
    padding: 10px;
}
.search-select-input {
    margin-bottom: 8px;
}
.search-select-list {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow: auto;
}
.search-select-option,
.search-select-empty {
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    background: var(--bg-soft);
    color: var(--text-main);
    border: 1px solid transparent;
}
.search-select-option.active,
.search-select-option:hover {
    background: color-mix(in srgb, var(--brand-primary) 12%, var(--bg-soft));
    border-color: color-mix(in srgb, var(--brand-primary) 32%, transparent);
}
.search-select-empty {
    color: var(--text-muted);
}
.search-select-status,
.field-note {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.full-width { grid-column: 1 / -1; }
.form-actions, .inline-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary, .btn-secondary, button {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font: inherit;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    line-height: 1.2;
}
.btn-primary {
    background: var(--brand-primary-strong);
    color: #fff;
}
.btn-secondary {
    background: var(--bg-soft);
    color: var(--text-main);
    border: 1px solid var(--border-soft);
}
.btn-primary:hover, .btn-secondary:hover, button:hover { transform: translateY(-1px); }
.btn-sm {
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 13px;
}
.badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
}
.small-note {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.sample-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.sample-card {
    padding: 16px;
    border-radius: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
}
.sample-card h3 {
    margin-bottom: 10px;
}
.sample-row {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.5;
}
.sample-row strong {
    color: var(--text-main);
}

.mapping-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.mapping-column { border: 1px solid var(--border-soft); border-radius: 18px; background: var(--bg-soft); padding: 18px; }
.mapping-column-head h2 { margin-bottom: 6px; }
.mapping-column-head p { margin: 0; color: var(--text-soft); }
.mapping-source-list,
.mapping-target-list { display: grid; gap: 12px; margin-top: 16px; }
.mapping-source-card,
.mapping-target-card { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--bg-surface); border: 1px solid var(--border-soft); }
.mapping-source-sample { font-size: 13px; color: var(--text-soft); }
.mapping-target-label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.badge-required { font-size: 10px; background: var(--brand-accent); color: white; border-radius: 4px; padding: 1px 6px; }
.mapping-preview-panel { margin-top: 8px; }

.table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    position: relative;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
}
th, td {
    padding: 14px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: top;
}
thead th {
    background: var(--brand-primary);
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
tbody tr:nth-child(even) { background: var(--bg-soft); }
tbody tr:hover { background: rgba(49,162,201,.08); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.link-button { background: none; padding: 0; }
.danger { color: var(--danger); }
.row-error { background: var(--danger-bg) !important; }
td.actions { width: 72px; text-align: center; white-space: nowrap; overflow: visible; position: relative; }
.empty-state { text-align: center; color: var(--text-soft); padding: 24px !important; }

.btn-icon { background: none; border: 1px solid var(--border); border-radius: 10px; width: 38px; min-height: 38px; cursor: pointer; font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.btn-icon:hover { background: var(--surface-2); }
.btn-icon:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.action-menu { position: relative; display: inline-block; }
.action-dropdown { position: absolute; right: 0; top: calc(100% + 4px); z-index: 300; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 36px rgba(0,0,0,.18); min-width: 240px; overflow: hidden; max-width: min(280px, calc(100vw - 32px)); }
.action-dropdown.is-floating { position: fixed; right: auto; top: auto; z-index: 1200; }
.action-dropdown a, .action-dropdown .action-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 14px; color: var(--text); text-decoration: none; background: none; border: none; width: 100%; cursor: pointer; text-align: left; min-height: 0; }
.action-dropdown a:hover, .action-dropdown .action-item:hover { background: var(--surface-2); }
.action-dropdown a:focus-visible, .action-dropdown .action-item:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: -2px; background: var(--surface-2); }
.action-item-danger { color: var(--danger, #c0392b) !important; }
.action-dropdown i { width: 16px; text-align: center; }

.flash {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.flash-success { background: var(--success-bg); color: var(--success); border-color: rgba(45,138,78,.25); }
.flash-error { background: var(--danger-bg); color: var(--danger); border-color: rgba(192,57,43,.25); }
.flash-floating { max-width: 540px; margin: 20px auto 0; }
.alert-inline {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid color-mix(in srgb, var(--warning) 20%, transparent);
}
.alert-inline.danger {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 20%, transparent);
}

button.is-loading,
.btn-primary.is-loading,
.btn-secondary.is-loading {
    opacity: .7;
    pointer-events: none;
}

.guest-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
    width: min(540px, 100%);
    padding: 32px;
}
.login-logo {
    max-width: 200px;
    margin-bottom: 18px;
}
.login-card h1 {
    font-size: 36px;
    margin-bottom: 10px;
}
.hint { margin-top: 10px; color: var(--text-muted); }
.login-note {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    color: var(--text-soft);
}

.preview-grid {
    display: grid;
    grid-template-columns: 1.3fr .9fr;
    gap: 18px;
    margin-bottom: 18px;
}
.report-hero {
    background:
        linear-gradient(180deg, rgba(49,162,201,.08), transparent 65%),
        var(--bg-surface);
}
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.stats-row div {
    padding: 14px;
    border-radius: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
}
.stats-row span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.stats-row strong {
    font-size: 20px;
    color: var(--brand-primary);
}
.report-photo {
    width: 100%;
    border-radius: 18px;
    max-height: 420px;
    object-fit: contain;
    border: 1px solid var(--border-soft);
    background: linear-gradient(180deg, rgba(49,162,201,.04), transparent), var(--bg-surface);
}
.report-photo-frame {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 18px;
    border-radius: 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
}
.empty-box {
    padding: 24px;
    border-radius: 16px;
    background: var(--bg-soft);
    color: var(--text-soft);
    border: 1px dashed var(--border-strong);
}
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}
.status-badge.success {
    color: var(--success);
    background: var(--success-bg);
}
.status-badge.muted {
    color: var(--text-soft);
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
}
.media-modal[hidden] { display: none; }
.media-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
}
.media-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 12, 20, .72);
}
.media-modal-card {
    position: relative;
    z-index: 1;
    width: min(860px, calc(100vw - 32px));
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    padding: 18px;
}
.media-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}
.media-modal-controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.media-modal-body { overflow: auto; max-height: 75vh; display: flex; align-items: center; justify-content: center; cursor: grab; }
.media-modal-card img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 14px;
    background: var(--bg-soft);
}
.media-modal-card { max-width: 92vw; width: 860px; }

.drop-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 40px 24px; text-align: center; transition: border-color .2s, background .2s; cursor: pointer; background: var(--surface); }
.drop-zone.is-over { border-color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 8%, transparent); }
.drop-zone-icon { font-size: 40px; color: var(--brand-primary); display: inline-flex; }
.drop-zone-or { color: var(--text-muted); font-size: 13px; }
.drop-zone-meta { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border-soft); text-align: left; }

.inline-filter { display: flex; gap: 8px; align-items: center; }
.inline-filter select { min-width: 200px; }
.structure-card form,
.structure-unit form,
.action-dropdown form { margin: 0; }
.photo-reconcile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.photo-row-card {
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: var(--bg-soft);
    padding: 18px;
    display: grid;
    gap: 14px;
}
.photo-row-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.photo-row-head h3 {
    font-size: 20px;
    margin-bottom: 4px;
}
.photo-row-head p {
    margin: 0;
}
.photo-row-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.photo-row-meta div {
    padding: 12px;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
}
.photo-row-meta span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.photo-field {
    display: grid;
    gap: 8px;
}
.user-form {
    gap: 18px;
}
.checkbox-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
}
.checkbox-group { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.checkbox-group label { margin: 0; cursor: pointer; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; }
.alert-list {
    margin: 0;
    padding-left: 18px;
    color: var(--text-soft);
}

@media print {
    body {
        background: #fff;
    }
    body::before,
    .sidebar,
    .sidebar-overlay,
    .topbar,
    .flash,
    .page-header .inline-actions,
    [data-editor-panel],
    [data-theme-toggle],
    [data-sidebar-toggle],
    .topbar-actions {
        display: none !important;
    }
    .shell,
    .content,
    .preview-grid,
    .cards-grid,
    .stats-row {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .panel,
    .metric-card {
        box-shadow: none;
        border: 1px solid #d8deea;
        break-inside: avoid;
        margin-bottom: 14px;
    }
}

@media (max-width: 1100px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        width: min(320px, 86vw);
        border-right: 1px solid rgba(255,255,255,.08);
        border-bottom: 0;
    }
    .shell.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(10, 16, 26, .42);
        z-index: 15;
    }
    .shell.sidebar-mobile-open .sidebar-overlay {
        display: block;
    }
    .cards-grid, .panel-grid, .preview-grid, .stats-row, .form-grid, .form-grid.compact, .sample-grid, .photo-reconcile-grid, .photo-row-meta, .mapping-layout {
        grid-template-columns: 1fr;
    }
    .photo-row-head {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 760px) {
    .content { padding: 18px; }
    .topbar, .page-header { flex-direction: column; align-items: stretch; }
    .page-header h1 { font-size: 26px; }
    .metric-card strong { font-size: 34px; }
}
.check-brand-mark{width:54px;height:54px;border-radius:18px;background:rgba(255,255,255,.16);display:grid;place-items:center;font-size:28px;color:white;margin-bottom:8px}.check-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.full{grid-column:1/-1}.table-wrap{overflow:auto}.signature-pad{width:100%;height:180px;border:2px dashed var(--border-strong);border-radius:16px;background:#fff;touch-action:none}.item-card{border:1px solid var(--border-soft);border-radius:18px;background:var(--bg-surface);padding:18px;margin-bottom:14px}.badge-status{display:inline-flex;padding:7px 10px;border-radius:999px;font-weight:700;font-size:12px}.st-aguardando_devolucao{background:var(--warning-bg);color:var(--warning)}.st-finalizado{background:var(--success-bg);color:var(--success)}.st-em_andamento{background:#eef5ff;color:#004b87}.st-cancelado{background:var(--danger-bg);color:var(--danger)}.photo-thumb{width:82px;height:82px;object-fit:cover;border-radius:12px;border:1px solid var(--border-soft)}@media(max-width:800px){.check-form-grid{grid-template-columns:1fr}.shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.content{padding:20px}.topbar{display:block}}
