@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap");

:root {
    --icon-blue: #5f8fb5;
    --nav-icon: #7b98ad;
    --bg: #f4f8fb;
    --bg-soft: #eef5fa;
    --surface: #ffffff;
    --surface-2: #f9fcfe;
    --ink: #172033;
    --ink-2: #243754;
    --muted: #64748b;
    --muted-2: #8a9aad;
    --line: #dce7f0;
    --line-2: #eaf1f6;
    --brand: #2f8ccf;
    --brand-dark: #1f6fa7;
    --brand-soft: #e5f3fb;
    --cyan: #61b6d7;
    --sage: #79ad97;
    --sage-soft: #eef8f3;
    --sand: #d9b56f;
    --sand-soft: #fff7e8;
    --rose: #c96f72;
    --rose-soft: #fff0f1;
    --violet: #7d86c9;
    --violet-soft: #f2f3ff;
    --shadow: 0 22px 55px rgba(41, 72, 104, 0.09);
    --shadow-soft: 0 10px 26px rgba(41, 72, 104, 0.07);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-heading: Manrope, Inter, "Segoe UI", sans-serif;
    --font-body: Inter, "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 8% 5%, rgba(97, 182, 215, 0.20), transparent 28%), radial-gradient(circle at 92% 8%, rgba(121, 173, 151, 0.16), transparent 25%), linear-gradient(135deg, #f7fbfd 0%, #f1f7fb 52%, #f7faf6 100%);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

svg {
    display: block;
    flex: 0 0 auto;
    stroke-linecap: round;
    stroke-linejoin: round;
}

svg path,
svg rect,
svg circle,
svg line,
svg polyline,
svg polygon {
    fill: none !important;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.icon {
    width: 22px;
    height: 22px;
    color: currentColor;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
}

.icon-sm {
    width: 17px;
    height: 17px;
    color: currentColor;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
}

.icon-lg {
    width: 30px;
    height: 30px;
    color: currentColor;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 282px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px 18px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px);
    border-right: 1px solid rgba(205, 222, 235, 0.75);
    box-shadow: 12px 0 40px rgba(50, 88, 117, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.brand,
.login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand {
    padding: 8px 10px 22px;
    margin-bottom: 10px;
}

.brand-mark {
    width: 45px;
    height: 45px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, var(--brand) 0%, #7ec5e5 100%);
    box-shadow: 0 14px 30px rgba(47, 140, 207, 0.22);
    position: relative;
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 13px;
}

.brand-title,
.brand strong,
.login-brand strong {
    display: block;
    font: 760 20px/1.05 var(--font-heading);
    color: var(--ink-2);
}

.brand-sub,
.brand small,
.login-brand small {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.nav-label {
    margin: 18px 10px 9px;
    font: 800 11px/1 var(--font-heading);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a7b8;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.main-nav a {
    min-height: 44px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    color: #4e647a;
    font: 700 14.5px/1.1 var(--font-body);
    transition: 180ms ease;
    position: relative;
}

.main-nav a:hover {
    background: rgba(47, 140, 207, 0.08);
    color: var(--brand-dark);
}

.nav-ico {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--nav-icon);
    background: rgba(235, 242, 247, 0.70);
}

.main-nav a.active {
    background: linear-gradient(135deg, #edf8ff 0%, #f7fbff 100%);
    color: #1f5e8e;
    box-shadow: inset 0 0 0 1px rgba(47, 140, 207, 0.17), 0 12px 28px rgba(47, 140, 207, 0.08);
}

.main-nav a.active::before {
    content: "";
    position: absolute;
    left: -18px;
    width: 4px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand), #8fd3ed);
}

.main-nav a.active .nav-ico {
    color: #ffffff;
    background: linear-gradient(145deg, var(--brand), #74bddc);
    box-shadow: 0 10px 20px rgba(47, 140, 207, 0.20);
}

.sidebar-note {
    margin: auto 8px 0;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(121, 173, 151, 0.10), rgba(47, 140, 207, 0.10));
    border: 1px solid rgba(181, 207, 221, 0.62);
}

.sidebar-note strong {
    display: block;
    font: 800 13px var(--font-heading);
    color: #2f5166;
    margin-bottom: 5px;
}

.sidebar-note span {
    font-size: 13px;
    line-height: 1.35;
    color: #687b8c;
}

.main-frame {
    min-width: 0;
    padding: 28px 34px 40px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-title-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.page-symbol {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 21px;
    color: var(--brand-dark);
    background: linear-gradient(145deg, #e5f4fb, #ffffff);
    border: 1px solid rgba(188, 216, 231, 0.8);
    box-shadow: var(--shadow-soft);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--sage);
    font: 800 12px/1 var(--font-heading);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: var(--sage);
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font: 800 31px/1.05 var(--font-heading);
    color: #16263d;
}

.subtitle {
    margin-top: 7px;
    color: #617389;
    font-size: 15.5px;
    line-height: 1.25;
    font-weight: 500;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 48px;
    padding: 7px 12px 7px 8px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(209, 224, 235, 0.86);
    box-shadow: 0 8px 22px rgba(41, 72, 104, 0.05);
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    border: 1px solid rgba(209, 224, 235, 0.86);
    cursor: pointer;
    color: inherit;
    font: inherit;
    text-align: left;
    transition: 180ms ease;
}

.user-menu-toggle:hover,
.user-menu-toggle.active,
.user-menu.is-open .user-menu-toggle {
    transform: translateY(-1px);
    border-color: #b9d7eb;
    background: #ffffff;
    box-shadow: 0 14px 28px rgba(41, 72, 104, 0.10);
}

.user-menu-arrow {
    color: #7d90a3;
    transition: transform 180ms ease;
}

.user-menu.is-open .user-menu-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 40;
    display: none;
    min-width: 210px;
    padding: 8px;
    border: 1px solid #dce8f1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(41, 72, 104, 0.14);
}

.user-menu.is-open .user-dropdown {
    display: grid;
    gap: 4px;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border-radius: 13px;
    color: #35566e;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.user-dropdown a:hover {
    color: var(--brand-dark);
    background: #f2f9fd;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font: 800 13px var(--font-heading);
    color: #ffffff;
    background: linear-gradient(145deg, #2f8ccf, #8ecce6);
}

.user-name {
    font: 800 13.5px/1.1 var(--font-heading);
    color: #253851;
    white-space: nowrap;
}

.user-role {
    font-size: 12.5px;
    color: #748599;
    font-weight: 600;
    margin-top: 2px;
}

.btn,
.logout-link,
.login-form button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    background: #ffffff;
    color: #31516b;
    font: 800 14px/1 var(--font-body);
    cursor: pointer;
    transition: 180ms ease;
    text-decoration: none;
    max-width: 100%;
    white-space: normal;
}

.btn:hover,
.logout-link:hover,
.login-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(41, 72, 104, 0.09);
}

.btn.primary,
.login-form button {
    background: linear-gradient(135deg, #2f8ccf, #68b7dc);
    color: #ffffff;
    box-shadow: 0 12px 25px rgba(47, 140, 207, 0.22);
}

.btn.secondary {
    border-color: #cfdeea;
    background: #ffffff;
    color: #35566e;
}

.btn.ghost,
.logout-link {
    border-color: #d9e7f0;
    background: rgba(255, 255, 255, 0.55);
    color: #4f657a;
}

.btn.soft {
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-color: #cfe6f4;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #d9e7f0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.65);
    color: #31516b;
    cursor: pointer;
    place-items: center;
}

.metrics,
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric-card {
    position: relative;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(210, 225, 236, 0.84);
    border-radius: 22px;
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--accent, var(--brand)), rgba(255, 255, 255, 0));
}

.metric-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.metric-ico {
    width: 43px;
    height: 43px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    color: var(--accent-text, var(--brand-dark));
    background: var(--accent-soft, var(--brand-soft));
}

.metric-kicker,
.metric-card span {
    display: block;
    font: 800 12px/1.1 var(--font-heading);
    letter-spacing: 0.035em;
    text-transform: uppercase;
    color: #7c8ea0;
    margin-bottom: 8px;
}

.metric-number,
.metric-card strong {
    display: block;
    margin: 0;
    font: 800 30px/0.95 var(--font-heading);
    color: #17243a;
}

.metric-desc,
.metric-card small {
    display: block;
    margin-top: 9px;
    color: #62758a;
    font-size: 13.5px;
    line-height: 1.25;
    font-weight: 600;
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    font-size: 12.5px;
    font-weight: 800;
    color: #497b65;
    background: var(--sage-soft);
    border-radius: 999px;
    padding: 4px 9px;
}

.dashboard-grid,
.grid {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 18px;
    align-items: start;
}

.panel,
.login-panel,
.lab-card {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(210, 225, 236, 0.86);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-pad {
    padding: 22px;
}

.dashboard-shortcuts {
    display: grid;
    gap: 10px;
}

.panel-form {
    display: grid;
    gap: 14px;
    padding: 20px 22px 22px;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 0;
}

.title-left {
    display: flex;
    align-items: center;
    gap: 11px;
}

.title-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.panel-title h2,
.panel h2,
.lab-card h3 {
    margin: 0;
    font: 800 20px/1.1 var(--font-heading);
    color: #1e3048;
}

.panel-title p,
.panel p {
    margin: 4px 0 0;
    color: #738399;
    font-size: 13.5px;
    font-weight: 600;
}

.check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 18px 22px 16px;
}

.check-card {
    border-radius: 22px;
    border: 1px solid rgba(216, 228, 237, 0.9);
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    padding: 17px;
    position: relative;
    overflow: hidden;
}

.check-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--accent, var(--brand));
}

.check-top {
    display: flex;
    gap: 12px;
    align-items: center;
}

.check-ico {
    width: 42px;
    height: 42px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    color: var(--accent, var(--brand));
    background: var(--accent-soft, var(--brand-soft));
}

.check-number {
    font: 800 25px/1 var(--font-heading);
    color: #16263d;
}

.check-label {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #2b425c;
}

.check-desc {
    font-size: 13px;
    color: #6f7f90;
    font-weight: 600;
    margin-top: 2px;
}

.panel-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line-2);
    padding: 13px 22px;
    color: var(--brand-dark);
    font-weight: 800;
}

.notice {
    margin: 18px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 17px;
    border-radius: 19px;
    background: linear-gradient(90deg, #fff8e9, #fffdf8);
    border: 1px solid #f0dfb7;
    color: #765122;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(217, 181, 111, 0.10);
    line-height: 1.45;
}

.notice.compact {
    margin: 4px 0;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 650;
}

.table-panel {
    padding: 0;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 21px 22px;
    border-bottom: 1px solid var(--line-2);
    gap: 14px;
}

.table-actions {
    display: flex;
    gap: 9px;
    align-items: center;
}

.compact-field {
    min-width: min(420px, 48vw);
}

.compact-field label {
    margin-bottom: 4px;
    font-size: 10.5px;
}

.compact-field select {
    height: 38px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
}

.search {
    height: 39px;
    min-width: 245px;
    border: 1px solid #dbe8f1;
    border-radius: 14px;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: #7c8ea0;
}

.search input {
    border: 0;
    outline: 0;
    width: 100%;
    font: 600 14px var(--font-body);
    color: #344b64;
    background: transparent;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

th {
    padding: 12px 22px;
    background: #f7fafc;
    color: #6f8094;
    text-align: left;
    font: 800 12px var(--font-heading);
    letter-spacing: 0.055em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line-2);
}

td {
    padding: 14px 22px;
    border-bottom: 1px solid var(--line-2);
    color: #334b64;
    font-weight: 600;
    vertical-align: middle;
}

td strong {
    font-weight: 700;
}

.muted-text {
    color: #748599;
    font-size: 13px;
    font-weight: 400;
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #fbfdff;
}

.code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: #31516b;
    background: #eff6fb;
    border: 1px solid #dbeaf4;
    padding: 3px 8px;
    border-radius: 9px;
    font-weight: 800;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 10px;
    font: 800 12.5px/1 var(--font-body);
    border: 1px solid var(--badge-line);
    color: var(--badge-color);
    background: var(--badge-bg);
}

.badge.ok {
    --badge-bg: #eff9f4;
    --badge-line: #cbe8d9;
    --badge-color: #3c8063;
}

.badge.warn {
    --badge-bg: #fff7e8;
    --badge-line: #f0d9a2;
    --badge-color: #a16817;
}

.badge.info {
    --badge-bg: #eef7fd;
    --badge-line: #cde8f7;
    --badge-color: #2576ad;
}

.badge.danger {
    --badge-bg: #fff0f1;
    --badge-line: #f2c5c7;
    --badge-color: #b84e54;
}

.badge-button {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    margin: 0;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    font: 800 12.5px/1 var(--font-body);
    box-shadow: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.badge-button:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--badge-color) 38%, var(--badge-line));
}

.badge-button:focus-visible {
    outline: 3px solid rgba(90, 169, 214, .28);
    outline-offset: 2px;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid #dce8f1;
    background: #ffffff;
    color: #5d7287;
    display: inline-grid;
    place-items: center;
    margin-left: 5px;
    cursor: pointer;
}

.action-btn:hover {
    color: var(--brand-dark);
    background: #f2f9fd;
}

.inline-reset {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 210px;
}

.inline-reset input {
    width: 154px;
    height: 36px;
    border: 1px solid #dbe8f1;
    border-radius: 12px;
    padding: 0 10px;
    color: #344b64;
    font: 500 13px var(--font-body);
    outline: none;
}

.inline-reset input:focus {
    border-color: #8ac8e5;
    box-shadow: 0 0 0 3px rgba(47, 140, 207, 0.10);
}

.inline-reset .action-btn {
    flex: 0 0 auto;
}

.inline-reset .password-input-wrap {
    width: 154px;
    flex: 0 0 154px;
}

.inline-reset .password-input-wrap input {
    width: 100%;
    padding-right: 39px;
}

.inline-reset .password-toggle {
    right: 2px;
    width: 32px;
    height: 32px;
}

.collect-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
    margin-bottom: 18px;
    border: 1px solid #d9e8f3;
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f3faff 100%);
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.collect-hero h2 {
    margin: 8px 0 8px;
    color: var(--ink);
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: 0;
}

.collect-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.collect-status,
.collect-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.collect-grid {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(360px, 0.8fr);
    gap: 18px;
    margin-bottom: 18px;
    align-items: start;
}

.collect-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.summary-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(210, 225, 236, 0.86);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-soft);
}

.summary-card span {
    display: block;
    color: #7c8ea0;
    font: 800 11.5px/1.1 var(--font-heading);
    letter-spacing: 0.045em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.summary-card strong {
    display: block;
    color: #17243a;
    font: 800 28px/1 var(--font-heading);
}

.summary-card small {
    display: block;
    margin-top: 8px;
    color: #6d7f92;
    font-size: 12.5px;
    line-height: 1.35;
    font-weight: 500;
}

.collect-control,
.collect-log-panel {
    min-width: 0;
}

.collect-options {
    display: grid;
    gap: 12px;
    margin: 22px 8px;
}

.collect-option {
    display: flex;
    gap: 12px;
    padding: 16px;
    border: 1px solid #dce8f1;
    border-radius: 20px;
    background: #fbfdff;
    cursor: pointer;
    min-width: 0;
}

.collect-option:hover {
    border-color: #b9d7eb;
    background: #f5fbff;
}

.collect-option input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand);
}

.collect-option strong,
.collect-option small {
    display: block;
    overflow-wrap: anywhere;
}

.collect-option strong {
    margin-bottom: 5px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 760;
}

.collect-option small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 8px 18px;
}

.collect-help {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: -2px 8px 18px;
}

.collect-actions {
    padding-left: 8px;
    padding-right: 8px;
}

.collect-help div {
    padding: 13px 14px;
    border: 1px solid #dce8f1;
    border-radius: 17px;
    background: #f8fcff;
}

.collect-help strong,
.collect-help span {
    display: block;
}

.collect-help strong {
    margin-bottom: 4px;
    color: #243754;
    font-size: 13.5px;
    font-weight: 680;
}

.collect-help span {
    color: #6d7f92;
    font-size: 12.8px;
    line-height: 1.45;
    font-weight: 400;
}

.rule-list {
    display: grid;
    gap: 12px;
}

.rule-list div {
    padding: 14px 15px;
    border: 1px solid #dce8f1;
    border-radius: 18px;
    background: #f8fcff;
}

.rule-list strong,
.rule-list span {
    display: block;
}

.rule-list strong {
    margin-bottom: 4px;
    color: #243754;
    font-size: 14px;
    font-weight: 700;
}

.rule-list span {
    color: #6d7f92;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 400;
}

.password-rules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: -4px;
}

.password-rules div,
.password-match {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid #dce8f1;
    border-radius: 13px;
    background: #f8fcff;
    color: #6d7f92;
    font-size: 12.8px;
    line-height: 1.3;
    font-weight: 500;
}

.password-rules span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #bac9d7;
}

.password-rules div.is-valid,
.password-match.is-valid {
    color: #3c8063;
    border-color: #cbe8d9;
    background: #eff9f4;
}

.password-rules div.is-valid span {
    background: #3c8063;
}

.password-match.is-invalid {
    color: #b84e54;
    border-color: #f2c5c7;
    background: #fff0f1;
}

.collect-note {
    margin-top: 18px;
    margin-left: 8px;
    margin-right: 8px;
}

.progress-track {
    height: 10px;
    margin: 18px 0;
    overflow: hidden;
    border-radius: 999px;
    background: #eaf3f9;
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5aa9d6, #7cc4dd);
    transition: width 350ms ease;
}

.collect-log {
    min-height: 320px;
    max-height: 420px;
    overflow: auto;
    padding: 16px;
    border: 1px solid #dce8f1;
    border-radius: 22px;
    background: #0f2433;
    color: #dff2ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.65;
}

.collect-table {
    margin-left: 0;
    margin-right: 0;
}

.collect-history {
    margin-bottom: 18px;
}

.history-table td {
    vertical-align: top;
}

.history-table td > strong,
.history-table td > span {
    display: block;
}

.precheck-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
    max-width: 360px;
}

.precheck-mini span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid #d7e9f5;
    border-radius: 999px;
    background: #f2f9fd;
    color: #42657b;
    font-size: 12px;
    font-weight: 650;
}

.precheck-mini b {
    color: var(--brand-dark);
    font-weight: 800;
}

.report-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 18px;
    margin-bottom: 18px;
}

.report-side {
    align-self: start;
}

.mini-distribution {
    padding: 14px;
    border: 1px solid #dce8f1;
    border-radius: 18px;
    background: #f8fcff;
}

.mini-distribution + .mini-distribution {
    margin-top: 12px;
}

.mini-distribution h3 {
    margin: 0 0 10px;
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 800;
}

.mini-distribution div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #e5f0f7;
    color: #557089;
    font-size: 13px;
    font-weight: 650;
}

.mini-distribution strong {
    color: var(--brand-dark);
}

.last-log-cell {
    max-width: 360px;
}

.table-action-stack {
    display: grid;
    gap: 8px;
    justify-items: start;
    min-width: 150px;
}

.btn.compact {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 12.8px;
}

.mini-log {
    margin-top: 9px;
    color: #4c657b;
    font-size: 12.5px;
}

.mini-log summary {
    cursor: pointer;
    color: var(--brand-dark);
    font-weight: 800;
}

.mini-log-line {
    margin-top: 6px;
    padding: 8px 9px;
    border-radius: 12px;
    background: #f6fbfe;
    border: 1px solid #e2edf5;
    color: #526b80;
    line-height: 1.4;
    font-weight: 500;
}

.mini-log-line span {
    display: block;
    margin-bottom: 3px;
    color: #7b90a3;
    font-size: 11.5px;
    font-weight: 800;
}

.mini-log-line.ok {
    background: #f2fbf6;
    border-color: #d4eddf;
}

.mini-log-line.warn {
    background: #fff9ec;
    border-color: #f2dfb4;
}

.mini-log-line.danger {
    background: #fff3f4;
    border-color: #f4cdd0;
}

.empty-state {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px dashed #cfe0eb;
    border-radius: 16px;
    background: #f8fcff;
}

.empty-state strong {
    color: #263d56;
}

.empty-state span {
    color: #6d7f92;
    font-weight: 500;
}

.log-line {
    display: flex;
    gap: 12px;
    padding: 4px 0;
}

.log-line span {
    flex: 0 0 48px;
    color: #82c8e8;
}

.log-line.ok {
    color: #b8f0d4;
}

.log-line.info {
    color: #d7edf8;
}

.log-line.warn {
    color: #ffe2a8;
}

.log-line.danger {
    color: #ffc4cb;
}

.log-line.muted {
    color: #9bb5c6;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-wrapper {
    width: min(100%, 1040px);
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 24px;
    align-items: stretch;
}

.login-hero,
.login-panel {
    min-height: 560px;
}

.login-hero {
    border-radius: var(--radius-xl);
    padding: 38px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(210, 225, 236, 0.72);
    box-shadow: 0 24px 55px rgba(40, 74, 104, 0.10);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.login-hero h1 {
    max-width: 580px;
    margin-top: 14px;
    font-size: 38px;
    font-weight: 730;
    line-height: 1.08;
    letter-spacing: 0;
}

.login-hero p {
    max-width: 520px;
    color: #617389;
    font-size: 16px;
    line-height: 1.62;
    font-weight: 400;
}

.login-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.login-mini-card {
    border-radius: 20px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff, #fbfdfe);
    border: 1px solid rgba(216, 228, 237, 0.9);
    box-shadow: 0 14px 28px rgba(55, 88, 118, 0.05);
}

.login-mini-card .title-icon {
    margin-bottom: 14px;
}

.login-mini-card strong {
    display: block;
    color: #243754;
    font: 680 14.5px var(--font-heading);
}

.login-mini-card span {
    display: block;
    margin-top: 4px;
    color: #6f7f90;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
}

.login-panel {
    padding: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-panel h2 {
    margin: 30px 0 8px;
    font: 720 28px/1.08 var(--font-heading);
    color: #16263d;
    letter-spacing: 0;
}

.login-panel p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.48;
    font-weight: 400;
}

.login-form {
    display: grid;
    gap: 12px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field label,
.login-form > label {
    font: 650 12px var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7d90a3;
}

.field input,
.field select,
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    height: 46px;
    border: 1px solid #dbe8f1;
    border-radius: 16px;
    background: #ffffff;
    padding: 0 14px;
    font: 500 14.5px var(--font-body);
    color: #344b64;
    outline: none;
    min-width: 0;
}

.field input:focus,
.field select:focus,
.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    border-color: #8ac8e5;
    box-shadow: 0 0 0 4px rgba(47, 140, 207, 0.10);
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: inline-grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #668198;
    box-shadow: none;
    transform: translateY(-50%);
    cursor: pointer;
}

.login-form .password-toggle:hover,
.login-form .password-toggle:focus-visible {
    background: #eef7fc;
    color: var(--brand);
    box-shadow: none;
    transform: translateY(-50%);
}

.password-toggle .icon {
    width: 20px;
    height: 20px;
}

.password-toggle-hide,
.password-toggle[aria-pressed="true"] .password-toggle-show {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle-hide {
    display: block;
}

.form-options {
    display: grid;
    gap: 9px;
    margin: 2px 0 4px;
}

.check-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #4f657a;
    font-size: 14px;
    font-weight: 500;
}

.check-option input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--brand);
}

.check-option small {
    display: block;
    margin-top: 2px;
    color: #8a9aad;
    font-size: 12.5px;
    font-weight: 400;
}

.check-option.is-disabled {
    opacity: 0.68;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff0f1;
    color: #b84e54;
    border: 1px solid #f2c5c7;
    font-weight: 800;
}

.alert.success {
    background: #eff9f4;
    color: #3c8063;
    border-color: #cbe8d9;
}

@media (max-width: 1120px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .main-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sidebar-note {
        display: none;
    }

    .metrics,
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .collect-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .collect-grid,
    .grid,
    .login-wrapper {
        grid-template-columns: 1fr;
    }

    .login-hero,
    .login-panel {
        min-height: auto;
    }
}

@media (max-width: 720px) {
    .main-frame {
        padding: 20px 14px 32px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .collect-hero {
        flex-direction: column;
        padding: 20px;
        border-radius: 22px;
    }

    .collect-hero h2 {
        font-size: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .collect-help {
        grid-template-columns: 1fr;
    }

    .menu-toggle {
        display: grid;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 30;
        width: min(282px, 88vw);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 180ms ease;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .main-nav {
        grid-template-columns: 1fr;
    }

    .metrics,
    .cards-grid,
    .collect-summary-grid,
    .check-grid,
    .login-mini-grid {
        grid-template-columns: 1fr;
    }

    .user-area {
        width: 100%;
        justify-content: space-between;
    }

    .user-chip {
        min-width: 0;
    }

    .user-name {
        white-space: normal;
    }

    .search {
        min-width: 0;
        width: 100%;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .compact-field {
        min-width: 0;
        width: 100%;
    }

    .table-scroll {
        overflow-x: auto;
    }

    .login-page {
        padding: 14px;
    }

    .login-hero {
        display: none;
    }

    .login-panel {
        padding: 22px;
    }
}

/* Relatorio da coleta - acabamento visual v01 */
.report-page {
    --report-soft-line: rgba(205, 224, 237, 0.82);
    display: grid;
    gap: 18px;
}

.report-page .report-hero {
    margin-bottom: 0;
}

.report-page .report-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 0;
}

.report-page .summary-card {
    min-height: 122px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 17px 18px;
    border-radius: 22px;
    box-shadow: 0 16px 34px rgba(42, 87, 119, 0.08);
}

.report-page .summary-card span {
    margin-bottom: 10px;
    color: #7a8ba0;
    font-size: 11px;
    font-weight: 680;
    letter-spacing: 0.04em;
}

.report-page .summary-card strong {
    color: #16314d;
    font-size: 30px;
    font-weight: 720;
    letter-spacing: 0;
}

.report-page .summary-card small {
    min-height: 34px;
    margin-top: 10px;
    color: #667b91;
    font-size: 12.5px;
    font-weight: 430;
    line-height: 1.38;
}

.report-page .report-grid {
    grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.72fr);
    align-items: start;
    gap: 20px;
    margin-bottom: 0;
}

.report-page .panel {
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(37, 77, 106, 0.08);
}

.report-page .table-header {
    min-height: 92px;
    padding: 22px 26px;
    align-items: flex-start;
}

.report-page .table-header h2,
.report-page .panel-title h2 {
    margin: 0;
    color: #112b46;
    font-size: 24px;
    line-height: 1.08;
    font-weight: 720;
    letter-spacing: 0;
}

.report-page .table-header p,
.report-page .panel-title p {
    margin: 7px 0 0;
    color: #667b91;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 430;
}

.report-page .badge {
    padding: 6px 11px;
    font-size: 12.5px;
    font-weight: 640;
    line-height: 1.1;
    white-space: nowrap;
}

.report-page .table-scroll {
    overflow-x: auto;
}

.report-page table {
    min-width: 760px;
    font-size: 14px;
}

.report-page th {
    padding: 14px 26px;
    color: #718297;
    font-size: 11.5px;
    font-weight: 680;
    letter-spacing: 0.055em;
    background: #f8fbfd;
}

.report-page td {
    padding: 17px 26px;
    color: #2f4862;
    font-weight: 430;
    line-height: 1.42;
    vertical-align: middle;
}

.report-page td strong {
    display: block;
    color: #193653;
    font-weight: 660;
    line-height: 1.28;
}

.report-page td .muted-text {
    display: block;
    margin-top: 5px;
    color: #6f8197;
    font-size: 13.5px;
    font-weight: 390;
    line-height: 1.45;
}

.report-page tbody tr:hover {
    background: #fafdff;
}

.report-page .mini-distribution {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fbfdff, #f7fbfe);
}

.report-page .mini-distribution h3 {
    margin-bottom: 14px;
    color: #146da8;
    font-size: 15px;
    font-weight: 680;
}

.report-page .mini-distribution div {
    padding: 10px 0;
    color: #60768d;
    font-size: 14px;
    font-weight: 430;
}

.report-page .mini-distribution strong {
    color: #156aa2;
    font-weight: 700;
}

.report-page .report-side .panel-title {
    padding: 22px 26px 6px;
}

.report-page .report-side {
    padding-bottom: 18px;
}

@media (max-width: 1280px) {
    .report-page .report-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-page .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .report-page .report-kpis {
        grid-template-columns: 1fr;
    }

    .report-page .table-header {
        min-height: auto;
        padding: 20px;
    }

    .report-page .table-header h2,
    .report-page .panel-title h2 {
        font-size: 21px;
    }
}

/* Relatorio da coleta - estrutura por topicos v02 */
.report-page-v2 {
    gap: 16px;
}

.report-page-v2 .report-hero-v2 {
    margin-bottom: 0;
}

.report-topic-nav {
    position: sticky;
    top: 8px;
    z-index: 20;
    align-self: start;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(205, 224, 237, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 34px rgba(37, 77, 106, 0.08);
    backdrop-filter: blur(12px);
}

.report-topic-nav a,
.report-head-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid #d5e7f2;
    border-radius: 999px;
    background: #f7fbfe;
    color: #286f9f;
    font-size: 13px;
    font-weight: 620;
    text-decoration: none;
}

.report-topic-nav a:hover,
.report-head-actions a:hover {
    border-color: #a8d5ec;
    background: #eef8fd;
}

.report-section {
    padding: 24px;
    border: 1px solid rgba(205, 224, 237, 0.88);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 42px rgba(37, 77, 106, 0.08);
    scroll-margin-top: 92px;
}

.report-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.report-section-head span {
    display: block;
    margin-bottom: 8px;
    color: #77a893;
    font: 680 11px/1 var(--font-heading);
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.report-section-head h2 {
    margin: 0;
    color: #112b46;
    font: 720 25px/1.08 var(--font-heading);
    letter-spacing: 0;
}

.report-section-head p {
    max-width: 720px;
    margin: 8px 0 0;
    color: #61768c;
    font-size: 14.5px;
    line-height: 1.48;
    font-weight: 420;
}

.report-head-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 190px;
}

.report-head-actions em {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d5e7f2;
    border-radius: 999px;
    background: #eef8fd;
    color: #286f9f;
    font-size: 12.5px;
    font-style: normal;
    font-weight: 620;
    white-space: nowrap;
}

.report-overview-list,
.admin-summary-list,
.distribution-stack,
.report-item-list {
    display: grid;
    gap: 12px;
}

.report-overview-list article,
.admin-summary-card,
.distribution-card,
.report-item-card {
    border: 1px solid #dce8f1;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.report-overview-list article {
    display: grid;
    grid-template-columns: minmax(180px, 0.42fr) minmax(180px, 0.42fr) minmax(240px, 1fr);
    gap: 12px;
    align-items: center;
    padding: 17px 18px;
}

.report-overview-list span,
.admin-stat-grid span,
.item-main span,
.item-reason span {
    color: #74869a;
    font-size: 12px;
    font-weight: 640;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.report-overview-list strong {
    color: #17324f;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.1;
}

.report-overview-list p {
    margin: 0;
    color: #61768c;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 420;
}

.admin-summary-card {
    padding: 18px;
}

.admin-summary-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5f0f7;
}

.admin-summary-card h3 {
    margin: 0;
    color: #17324f;
    font-size: 21px;
    line-height: 1.15;
    font-weight: 700;
}

.admin-summary-card header p {
    margin: 5px 0 0;
    color: #6f8197;
    font-size: 13.8px;
    font-weight: 420;
}

.admin-summary-card header > span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #cbe8d9;
    border-radius: 999px;
    background: #eff9f4;
    color: #3c8063;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    padding-top: 15px;
}

.admin-stat-grid div {
    min-height: 82px;
    padding: 13px;
    border: 1px solid #e0edf5;
    border-radius: 16px;
    background: #f8fcff;
}

.admin-stat-grid strong {
    display: block;
    margin-top: 8px;
    color: #193653;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
}

.distribution-card {
    padding: 18px;
}

.distribution-card h3 {
    margin: 0 0 12px;
    color: #146da8;
    font-size: 18px;
    font-weight: 700;
}

.distribution-card div {
    display: grid;
    gap: 8px;
}

.distribution-card p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #e0edf5;
    border-radius: 14px;
    background: #f8fcff;
}

.distribution-card p span {
    color: #60768d;
    font-size: 14px;
    font-weight: 420;
}

.distribution-card p strong {
    color: #156aa2;
    font-size: 16px;
    font-weight: 700;
}

.report-item-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.22fr) minmax(240px, 0.7fr);
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
}

.item-main strong {
    display: block;
    margin-top: 5px;
    color: #193653;
    font-size: 17px;
    font-weight: 680;
    line-height: 1.25;
}

.item-main p,
.item-reason p {
    margin: 5px 0 0;
    color: #667b91;
    font-size: 13.8px;
    line-height: 1.45;
    font-weight: 420;
}

.item-meta {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.item-meta small,
.date-meta span,
.date-meta small {
    color: #61768c;
    font-size: 13px;
    font-weight: 430;
}

.date-meta span,
.date-meta small {
    display: block;
}

.report-page-v2 .badge {
    font-weight: 620;
}

@media (max-width: 1180px) {
    .admin-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-overview-list article,
    .report-item-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .report-topic-nav {
        position: sticky;
        top: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .report-section {
        padding: 18px;
        border-radius: 22px;
    }

    .report-section-head,
    .admin-summary-card header {
        flex-direction: column;
    }

    .report-head-actions {
        justify-content: flex-start;
        min-width: 0;
    }

    .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.report-page-v2 .admin-stat-grid-wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
    .report-page-v2 .admin-stat-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .report-page-v2 .admin-stat-grid-wide {
        grid-template-columns: 1fr;
    }
}

/* Calendario da competencia */
.calendar-hero {
    margin-bottom: 18px;
}

.calendar-filter {
    display: grid;
    grid-template-columns: minmax(220px, 0.45fr) minmax(260px, 0.55fr) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 18px;
}

.calendar-filter .btn {
    min-height: 46px;
}

.calendar-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.calendar-summary-grid article {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid rgba(210, 225, 236, 0.86);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 30px rgba(42, 87, 119, 0.07);
}

.calendar-summary-grid span,
.timeline-date span,
.calendar-item-card span {
    color: #74869a;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calendar-summary-grid strong {
    color: #16314d;
    font-size: 27px;
    line-height: 1;
    font-weight: 720;
}

.calendar-summary-grid p {
    margin: 8px 0 0;
    color: #667b91;
    font-size: 12.8px;
    line-height: 1.38;
    font-weight: 420;
}

.calendar-section {
    padding: 0;
    margin-bottom: 18px;
    overflow: hidden;
}

.calendar-section-header {
    min-height: 88px;
}

.timeline-list,
.calendar-admin-list {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.timeline-card {
    display: grid;
    grid-template-columns: 165px minmax(260px, 1fr) minmax(260px, auto);
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #dce8f1;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.timeline-card.has-delay {
    border-color: #f2c5c7;
    background: linear-gradient(180deg, #ffffff, #fff9fa);
}

.timeline-date strong {
    display: block;
    margin: 6px 0 4px;
    color: #17324f;
    font-size: 20px;
    font-weight: 700;
}

.timeline-date small,
.calendar-item-status small {
    display: block;
    color: #6c7f94;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 420;
}

.timeline-body h3 {
    margin: 0;
    color: #17324f;
    font-size: 18px;
    font-weight: 700;
}

.timeline-body p {
    margin: 6px 0 11px;
    color: #64788f;
    font-size: 13.8px;
    font-weight: 420;
}

.calendar-progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #eaf3f9;
}

.calendar-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5aa9d6, #7cc4dd);
}

.timeline-status,
.admin-calendar-tags,
.calendar-item-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.calendar-admin-card {
    border: 1px solid #dce8f1;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    overflow: hidden;
}

.calendar-admin-card summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    cursor: pointer;
    list-style: none;
}

.calendar-admin-card summary::-webkit-details-marker {
    display: none;
}

.calendar-admin-card h3 {
    margin: 0;
    color: #17324f;
    font-size: 21px;
    font-weight: 700;
}

.calendar-admin-card summary p {
    margin: 5px 0 0;
    color: #6f8197;
    font-size: 13.8px;
    font-weight: 420;
}

.calendar-item-list {
    display: grid;
    gap: 9px;
    padding: 0 18px 18px;
}

.calendar-item-card {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(180px, auto);
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid #e1edf5;
    border-radius: 16px;
    background: #f8fcff;
}

.calendar-item-card strong {
    display: block;
    margin: 5px 0 3px;
    color: #193653;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 650;
}

.calendar-item-card p {
    margin: 0;
    color: #65798f;
    font-size: 13.3px;
    font-weight: 420;
}

@media (max-width: 1320px) {
    .calendar-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .timeline-card {
        grid-template-columns: 150px 1fr;
    }

    .timeline-status {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .calendar-filter {
        grid-template-columns: 1fr;
    }

    .calendar-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-admin-card summary,
    .calendar-item-card {
        grid-template-columns: 1fr;
        display: grid;
    }

    .admin-calendar-tags,
    .calendar-item-status {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .calendar-summary-grid,
    .timeline-card {
        grid-template-columns: 1fr;
    }
}

.calendar-rule-note {
    margin: 0 0 18px;
}

.calendar-adjust-note {
    display: block;
    margin-top: 8px;
    color: #9a6a1d;
    font-size: 12.6px;
    line-height: 1.4;
    font-weight: 520;
}

.calendar-admin-header {
    align-items: center;
}

.calendar-admin-filter {
    display: grid;
    gap: 5px;
    min-width: min(320px, 100%);
}

.calendar-admin-filter label {
    color: #74869a;
    font: 650 11px var(--font-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calendar-admin-filter select {
    height: 42px;
    border: 1px solid #dbe8f1;
    border-radius: 15px;
    background: #ffffff;
    padding: 0 12px;
    color: #344b64;
    font: 520 14px var(--font-body);
    outline: none;
}

.calendar-empty-detail {
    margin: 18px;
    padding: 22px;
    border: 1px dashed #bdd8e9;
    border-radius: 20px;
    background: #f8fcff;
    color: #61768c;
}

.calendar-empty-detail strong,
.calendar-empty-detail span {
    display: block;
}

.calendar-empty-detail strong {
    color: #17324f;
    font-size: 16px;
    font-weight: 680;
}

.calendar-empty-detail span {
    margin-top: 5px;
    font-size: 13.8px;
    line-height: 1.45;
    font-weight: 420;
}

.calendar-item-card.has-date-adjust {
    border-color: #f0d9a2;
    background: #fffdf8;
}

@media (max-width: 900px) {
    .calendar-admin-header {
        align-items: stretch;
    }

    .calendar-admin-filter {
        min-width: 0;
        width: 100%;
    }
}

/* Calendario da competencia - visao mensal v02 */
.calendar-month-section .table-header,
.calendar-close-section .table-header {
    border-bottom-color: rgba(213, 231, 242, 0.72);
}

.month-calendar {
    padding: 18px;
}

.month-calendar-head {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.month-calendar-head span {
    color: #6d8197;
    font: 680 11px/1 var(--font-heading);
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.month-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.month-day {
    min-height: 126px;
    padding: 10px;
    border: 1px solid #dce8f1;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 10px 24px rgba(37, 77, 106, 0.045);
}

.month-day.is-muted {
    opacity: 0.42;
    background: #f4f8fb;
}

.month-day.has-events {
    border-color: #cfe4f2;
}

.month-day-number {
    display: inline-grid;
    place-items: center;
    min-width: 27px;
    height: 27px;
    margin-bottom: 8px;
    border-radius: 10px;
    color: #294862;
    font: 700 13px/1 var(--font-heading);
}

.month-day.has-events .month-day-number {
    background: #eef8fd;
    color: #176da7;
}

.month-day-events {
    display: grid;
    gap: 6px;
}

.month-event {
    display: grid;
    gap: 2px;
    padding: 8px 9px;
    border: 1px solid #d5e7f2;
    border-radius: 14px;
    background: #f7fbfe;
    color: #31526f;
}

.month-event strong {
    color: #17324f;
    font-size: 12.2px;
    line-height: 1.15;
    font-weight: 680;
}

.month-event span,
.month-event em {
    color: #627a91;
    font-size: 11.7px;
    line-height: 1.25;
    font-style: normal;
    font-weight: 500;
}

.month-event.ok {
    border-color: #c8e7d8;
    background: #f0faf5;
}

.month-event.ok strong,
.month-event.ok span,
.month-event.ok em {
    color: #2f795d;
}

.month-event.danger {
    border-color: #f2c4ca;
    background: #fff5f6;
}

.month-event.danger strong,
.month-event.danger span,
.month-event.danger em {
    color: #ba4653;
}

.month-event.warn {
    border-color: #f2d8a2;
    background: #fffaf0;
}

.month-event.warn strong,
.month-event.warn span,
.month-event.warn em {
    color: #9a6717;
}

.month-event.future,
.month-event.info {
    border-color: #c9e4f6;
    background: #f1f9fe;
}

.month-event.future strong,
.month-event.future span,
.month-event.future em,
.month-event.info strong,
.month-event.info span,
.month-event.info em {
    color: #2773a7;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 18px 18px;
}

.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #61768c;
    font-size: 12.8px;
    font-weight: 500;
}

.calendar-legend i {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 99px;
}

.legend-ok { background: #4aa77c; }
.legend-danger { background: #d85d6a; }
.legend-warn { background: #dca53a; }
.legend-future { background: #5aa9d6; }

.calendar-close-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
}

.calendar-close-grid article {
    min-height: 122px;
    padding: 16px;
    border: 1px solid #dce8f1;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.calendar-close-grid span {
    color: #74869a;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calendar-close-grid strong {
    display: block;
    margin-top: 11px;
    color: #17324f;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
}

.calendar-close-grid p {
    margin: 9px 0 0;
    color: #64788f;
    font-size: 13.2px;
    line-height: 1.42;
    font-weight: 420;
}

.timeline-list-soft .timeline-card {
    grid-template-columns: 145px minmax(260px, 1fr) minmax(250px, auto);
    padding: 14px;
}

.timeline-list-soft .timeline-status {
    grid-column: auto;
    justify-content: flex-end;
}

.timeline-list-soft .timeline-body h3 {
    font-size: 17px;
    font-weight: 680;
}

.timeline-list-soft .timeline-date strong {
    font-size: 18px;
    font-weight: 680;
}

.calendar-admin-header {
    align-items: flex-start;
}

@media (max-width: 1280px) {
    .month-calendar-grid,
    .month-calendar-head {
        gap: 6px;
    }

    .month-day {
        min-height: 116px;
        padding: 8px;
    }

    .calendar-close-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .month-calendar {
        overflow-x: auto;
    }

    .month-calendar-head,
    .month-calendar-grid {
        min-width: 850px;
    }

    .timeline-list-soft .timeline-card {
        grid-template-columns: 1fr;
    }

    .timeline-list-soft .timeline-status {
        grid-column: auto;
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .calendar-close-grid {
        grid-template-columns: 1fr;
    }
}

/* Calendario por administracao - estado visual das vistorias */
.calendar-item-card {
    position: relative;
    overflow: hidden;
}

.calendar-item-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    border-radius: 16px 0 0 16px;
    background: #c7dbe8;
}

.calendar-item-card.status-ok {
    border-color: #c9e8d9;
    background: linear-gradient(90deg, #f0faf5 0%, #ffffff 36%, #fbfdff 100%);
}

.calendar-item-card.status-ok::before {
    background: #4aa77c;
}

.calendar-item-card.status-danger {
    border-color: #f2c4ca;
    background: linear-gradient(90deg, #fff4f6 0%, #ffffff 38%, #fbfdff 100%);
}

.calendar-item-card.status-danger::before {
    background: #d85d6a;
}

.calendar-item-card.status-warn {
    border-color: #f0d9a2;
    background: linear-gradient(90deg, #fffaf0 0%, #ffffff 38%, #fbfdff 100%);
}

.calendar-item-card.status-warn::before {
    background: #dca53a;
}

.calendar-item-card.status-future,
.calendar-item-card.status-info {
    border-color: #c9e4f6;
    background: linear-gradient(90deg, #f1f9fe 0%, #ffffff 38%, #fbfdff 100%);
}

.calendar-item-card.status-future::before,
.calendar-item-card.status-info::before {
    background: #5aa9d6;
}

.calendar-item-card.has-date-adjust {
    box-shadow: inset 0 -1px 0 rgba(240, 217, 162, 0.58);
}

.calendar-item-card.status-ok .calendar-adjust-note,
.calendar-item-card.status-danger .calendar-adjust-note,
.calendar-item-card.status-warn .calendar-adjust-note,
.calendar-item-card.status-future .calendar-adjust-note {
    max-width: fit-content;
    padding: 5px 8px;
    border: 1px solid #f0d9a2;
    border-radius: 999px;
    background: #fffaf0;
}

.month-event.milestone {
    border-style: dashed;
    position: relative;
}

.month-event.milestone::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: currentColor;
    opacity: 0.48;
    position: absolute;
    top: 8px;
    right: 8px;
}

.legend-milestone {
    background: #17324f;
    box-shadow: inset 0 0 0 2px #ffffff;
}

.closing-milestones {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

.closing-milestone {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px dashed #d5e7f2;
    border-radius: 18px;
    background: #f8fcff;
}

.closing-milestone-date {
    display: grid;
    gap: 4px;
}

.closing-milestone-date span {
    color: #6f8297;
    font: 650 11px/1 var(--font-heading);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.closing-milestone-date strong,
.closing-milestone h3 {
    color: #17324f;
    font-family: var(--font-heading);
    font-weight: 690;
}

.closing-milestone-date strong {
    font-size: 15px;
}

.closing-milestone h3 {
    margin: 0 0 3px;
    font-size: 15px;
}

.closing-milestone p {
    margin: 0;
    color: #627a91;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 420;
}

.closing-milestone.ok {
    border-color: #c8e7d8;
    background: #f3fbf7;
}

.closing-milestone.danger {
    border-color: #f2c4ca;
    background: #fff7f8;
}

.closing-milestone.warn {
    border-color: #f2d8a2;
    background: #fffaf0;
}

.closing-milestone.future,
.closing-milestone.info {
    border-color: #c9e4f6;
    background: #f5fbff;
}

@media (max-width: 760px) {
    .closing-milestone {
        grid-template-columns: 1fr;
        align-items: start;
    }
}
.month-event {
    width: 100%;
    appearance: none;
    border: 1px solid #d5e7f2;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.month-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(42, 87, 119, 0.08);
}

.has-modal-open {
    overflow: hidden;
}

.calendar-detail-modal[hidden] {
    display: none;
}

.calendar-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 22px;
}

.calendar-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 43, 70, 0.42);
    backdrop-filter: blur(10px);
}

.calendar-detail-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, 96vw);
    max-height: min(760px, 92vh);
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    overflow: hidden;
    border: 1px solid #d4e5f0;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff, #f8fcff);
    box-shadow: 0 28px 80px rgba(17, 43, 70, 0.24);
}

.calendar-detail-dialog header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid #e3eef5;
}

.calendar-detail-dialog header span {
    color: #77a893;
    font: 680 11px/1 var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.calendar-detail-dialog h2 {
    margin: 8px 0 0;
    color: #112b46;
    font: 720 25px/1.08 var(--font-heading);
}

.calendar-detail-dialog p {
    margin: 7px 0 0;
    color: #61768c;
    font-size: 14px;
    line-height: 1.42;
    font-weight: 420;
}

.calendar-detail-close {
    width: 38px;
    height: 38px;
    border: 1px solid #d5e7f2;
    border-radius: 14px;
    background: #f7fbfe;
    color: #31526f;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.calendar-detail-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 26px;
}

.calendar-detail-filters label {
    display: grid;
    gap: 6px;
    color: #74869a;
    font: 650 11px var(--font-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calendar-detail-filters select {
    height: 42px;
    border: 1px solid #dbe8f1;
    border-radius: 15px;
    background: #ffffff;
    padding: 0 12px;
    color: #344b64;
    font: 520 14px var(--font-body);
}

.calendar-detail-count {
    padding: 0 26px 14px;
    color: #61768c;
    font-size: 13px;
    font-weight: 520;
}

.calendar-detail-list {
    display: grid;
    gap: 10px;
    overflow: auto;
    padding: 0 26px 26px;
}

.calendar-detail-item {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #dce8f1;
    border-radius: 18px;
    background: #ffffff;
}

.calendar-detail-item span:first-child {
    color: #74869a;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.calendar-detail-item strong {
    display: block;
    margin-top: 5px;
    color: #17324f;
    font-size: 15.5px;
    line-height: 1.25;
    font-weight: 670;
}

.calendar-detail-item p {
    margin: 5px 0 0;
    color: #64788f;
    font-size: 13.2px;
    line-height: 1.38;
    font-weight: 420;
}

.calendar-detail-item-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.calendar-detail-item-status small {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #dce8f1;
    border-radius: 999px;
    background: #f8fcff;
    color: #61768c;
    font-size: 12px;
    font-weight: 520;
}

.calendar-detail-empty {
    padding: 22px;
    border: 1px dashed #cfe0eb;
    border-radius: 18px;
    background: #f8fcff;
    color: #61768c;
    font-weight: 520;
}

@media (max-width: 720px) {
    .calendar-detail-dialog {
        max-height: 94vh;
        border-radius: 22px;
    }

    .calendar-detail-dialog header,
    .calendar-detail-filters,
    .calendar-detail-list {
        padding-left: 18px;
        padding-right: 18px;
    }

    .calendar-detail-filters,
    .calendar-detail-item {
        grid-template-columns: 1fr;
    }

    .calendar-detail-item-status {
        justify-content: flex-start;
    }
}

/* Inspecoes */
.inspections-page {
    display: grid;
    gap: 18px;
}

.inspection-filter {
    display: grid;
    grid-template-columns: minmax(180px, 1.05fr) minmax(220px, 1.2fr) minmax(240px, 1.5fr) minmax(150px, .7fr) minmax(150px, .7fr) auto;
    gap: 12px;
    align-items: end;
    padding: 18px;
}

.inspection-filter-evolution {
    grid-template-columns: minmax(180px, 1.05fr) minmax(220px, 1.2fr) minmax(240px, 1.5fr) minmax(150px, .7fr) minmax(150px, .7fr) auto;
}

.closing-period-filter {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.closing-period-row {
    display: grid;
    grid-template-columns: minmax(230px, 1.2fr) repeat(2, minmax(180px, .75fr));
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid #d8e9f3;
    border-radius: 18px;
}

.closing-period-row.is-base {
    background: linear-gradient(90deg, #f3fbf7, #f8fcff);
}

.closing-period-row.is-collection {
    grid-template-columns: minmax(230px, 1.2fr) minmax(220px, .9fr) repeat(2, minmax(180px, .75fr));
    background: linear-gradient(90deg, #f2f8fd, #f8fcff);
}

.closing-period-title {
    align-self: center;
}

.closing-period-title strong,
.closing-period-title small {
    display: block;
}

.closing-period-title strong {
    color: #17324f;
    font-size: 16px;
}

.closing-period-title small {
    margin-top: 4px;
    color: #6f8498;
    font-size: 12.5px;
}

.inspection-filter input.date-soft {
    background: rgba(255, 255, 255, 0.72);
    color: #42627e;
}

.closing-scope-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.3fr) auto;
    gap: 12px;
    align-items: end;
}

.inspection-filter-current {
    grid-template-columns: minmax(180px, .75fr) minmax(240px, 1fr) minmax(280px, 1.25fr) auto;
}

.inspection-filter label {
    display: grid;
    gap: 7px;
    color: #73879b;
    font-size: 11.5px;
    font-weight: 680;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.inspection-filter select,
.inspection-filter input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #d4e6f1;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    color: #17324f;
    font: 520 14px/1 var(--font-body);
    outline: none;
}

.inspection-filter select:disabled {
    color: #91a4b7;
    background: #f4f9fc;
}

.inspection-kpi-grid,
.inspection-delta-grid,
.inspection-type-grid {
    display: grid;
    gap: 12px;
}

.inspection-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.inspection-delta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
}

.inspection-kpi-grid article,
.inspection-delta-grid article,
.inspection-type-grid article {
    border: 1px solid #dce8f1;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 14px 30px rgba(42, 87, 119, 0.06);
}

.inspection-kpi-grid article,
.inspection-delta-grid article {
    min-height: 126px;
    padding: 17px;
}

.inspection-kpi-grid span,
.inspection-delta-grid span {
    display: block;
    color: #74869a;
    font-size: 11.5px;
    font-weight: 680;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.inspection-kpi-grid strong,
.inspection-delta-grid strong {
    display: block;
    margin-top: 10px;
    color: #17324f;
    font-size: 31px;
    line-height: 1;
    font-weight: 720;
}

.inspection-kpi-grid p {
    margin: 12px 0 0;
    color: #667b91;
    font-size: 13px;
    line-height: 1.42;
    font-weight: 420;
}

.inspection-evolution-chart {
    display: flex;
    gap: 14px;
    align-items: stretch;
    overflow-x: auto;
    padding: 6px 2px 4px;
}

.inspection-evolution-chart article {
    min-width: 148px;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #dce8f1;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.inspection-bars {
    height: 132px;
    display: flex;
    align-items: flex-end;
    gap: 7px;
    padding: 12px;
    border-radius: 16px;
    background: #f3f9fd;
}

.inspection-bars span,
.inspection-chart-legend i {
    display: block;
    width: 100%;
    min-width: 12px;
    border-radius: 999px 999px 5px 5px;
}

.bar-ok {
    background: linear-gradient(180deg, #8ccdaf, #4f9d78);
}

.bar-info {
    background: linear-gradient(180deg, #8ed0ec, #489fd0);
}

.bar-danger {
    background: linear-gradient(180deg, #f5a4a8, #d66269);
}

.bar-warn {
    background: linear-gradient(180deg, #f1d084, #d6a641);
}

.inspection-evolution-chart strong {
    color: #17324f;
    font-size: 15px;
    font-weight: 700;
}

.inspection-evolution-chart small,
.inspection-evolution-chart em {
    color: #667b91;
    font-size: 12.5px;
    font-style: normal;
    font-weight: 430;
}

.inspection-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.inspection-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #60768d;
    font-size: 13px;
    font-weight: 520;
}

.inspection-chart-legend i {
    width: 22px;
    height: 9px;
    min-width: 22px;
    border-radius: 999px;
}

.inspection-type-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inspection-type-grid article {
    padding: 17px;
}

.inspection-type-grid header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.inspection-type-grid h3 {
    margin: 0;
    color: #17324f;
    font-size: 18px;
    font-weight: 690;
    line-height: 1.18;
}

.inspection-type-grid header span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 11px;
    border: 1px solid #cbe8d9;
    border-radius: 999px;
    background: #eff9f4;
    color: #3c8063;
    font-size: 12.5px;
    font-weight: 650;
}

.inspection-type-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.inspection-type-stats span {
    padding: 9px 10px;
    border: 1px solid #e0edf5;
    border-radius: 13px;
    background: #f8fcff;
    color: #60768d;
    font-size: 12.7px;
    font-weight: 520;
}

.inspection-type-bars {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.inspection-delta-grid p {
    margin: 10px 0 0;
    color: #667b91;
    font-size: 12.5px;
    line-height: 1.35;
}

.inspection-delta-grid article.is-positive {
    border-color: #bfe5d3;
    background: linear-gradient(180deg, #ffffff, #f2fbf6);
}

.inspection-delta-grid article.is-positive strong {
    color: #237a50;
}

.inspection-delta-grid article.is-negative {
    border-color: #f2c7c7;
    background: linear-gradient(180deg, #ffffff, #fff6f6);
}

.inspection-delta-grid article.is-negative strong {
    color: #b64646;
}

.inspection-delta-grid article.is-neutral strong {
    color: #5c7085;
}

.avaria-fixed-alerts {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    grid-column: 1 / -1;
}

.avaria-status-filter {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.avaria-status-filter label {
    display: grid;
    gap: 6px;
    min-width: 220px;
    color: #74869a;
    font: 680 11px var(--font-heading);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.avaria-status-filter select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d6e8f3;
    border-radius: 14px;
    background: #ffffff;
    color: #17324f;
    font: 620 13px var(--font-body);
}

.avaria-fixed-alerts button,
.avaria-query-panel {
    border: 1px solid #dce8f1;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 14px 30px rgba(42, 87, 119, 0.06);
}

.avaria-fixed-alerts button {
    min-height: 98px;
    padding: 15px;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

.avaria-fixed-alerts button:hover,
.avaria-fixed-alerts button.is-active {
    border-color: #9bd1eb;
    background: linear-gradient(180deg, #f7fcff, #eef8fd);
    transform: translateY(-1px);
}

.avaria-fixed-alerts span {
    display: block;
    color: #74869a;
    font-size: 11.2px;
    font-weight: 680;
    letter-spacing: 0.045em;
    line-height: 1.25;
    text-transform: uppercase;
}

.avaria-fixed-alerts strong {
    display: block;
    margin-top: 12px;
    color: #17324f;
    font-size: 29px;
    line-height: 1;
    font-weight: 720;
}

.avaria-query-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(230px, auto);
    gap: 18px;
    align-items: center;
    padding: 18px;
}

.avaria-query-panel h3 {
    margin: 0;
    color: #17324f;
    font-size: 19px;
    font-weight: 700;
}

.avaria-query-panel p {
    margin: 7px 0 0;
    color: #61768c;
    font-size: 13.5px;
    line-height: 1.4;
}

.avaria-query-result {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: center;
}

.avaria-query-result button {
    grid-column: 1 / -1;
}

.avaria-query-inline {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e3eef5;
}

.avaria-query-inline[hidden] {
    display: none;
}

.avaria-number-link {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: #176da5;
    font: inherit;
    font-weight: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    cursor: pointer;
}

.avaria-number-link:hover,
.avaria-number-link:focus-visible {
    color: #0d4f7d;
}

.avaria-detail-modal[hidden] {
    display: none;
}

.avaria-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.avaria-detail-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 38, 61, 0.58);
    backdrop-filter: blur(3px);
}

.avaria-detail-dialog {
    position: relative;
    width: min(820px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 26px;
    border: 1px solid #d5e5ef;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 38, 61, 0.28);
}

.avaria-detail-dialog header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.avaria-detail-dialog header span,
.avaria-detail-description > span,
.avaria-detail-grid span {
    color: #71869c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.avaria-detail-dialog h2 {
    margin: 5px 0 3px;
    color: #102f4f;
    font-size: 27px;
}

.avaria-detail-dialog header p {
    margin: 0;
    color: #58718a;
}

.avaria-detail-close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid #d5e5ef;
    border-radius: 50%;
    background: #f6fbfe;
    color: #173a5e;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.avaria-detail-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 16px;
}

.avaria-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.avaria-detail-grid > div,
.avaria-detail-description {
    padding: 14px 16px;
    border: 1px solid #dceaf3;
    border-radius: 14px;
    background: #f8fbfd;
}

.avaria-detail-grid strong {
    display: block;
    margin-top: 6px;
    color: #17324f;
    font-size: 14px;
    line-height: 1.4;
}

.avaria-detail-description {
    margin-top: 10px;
}

.avaria-detail-description p {
    margin: 7px 0 0;
    color: #334f69;
    line-height: 1.55;
}

@media (max-width: 680px) {
    .avaria-detail-modal {
        padding: 12px;
    }

    .avaria-detail-dialog {
        max-height: calc(100vh - 24px);
        padding: 20px;
    }

    .avaria-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Identidade visual GTMP-RAL | Manutenção Preventiva — v01 */
@media (min-width: 981px) {
    html {
        zoom: 0.9;
    }
}

:root {
    --icon-blue: #0b65c2;
    --nav-icon: #315c96;
    --bg: #f7fbff;
    --bg-soft: #eaf5ff;
    --surface: #ffffff;
    --surface-2: #f7fbff;
    --ink: #1f2933;
    --ink-2: #123162;
    --muted: #64748b;
    --muted-2: #8190a4;
    --line: #d5e4f2;
    --line-2: #e7f0f8;
    --brand: #073b8e;
    --brand-dark: #052d70;
    --brand-soft: #eaf5ff;
    --cyan: #0b65c2;
    --sage: #16824a;
    --sage-soft: #eaf7f0;
    --sand: #d94a1e;
    --sand-soft: #fff2eb;
    --rose: #c63f32;
    --rose-soft: #fff0ef;
    --shadow: 0 18px 48px rgba(7, 59, 142, 0.09);
    --shadow-soft: 0 8px 24px rgba(7, 59, 142, 0.07);
    --radius-xl: 24px;
    --radius-lg: 20px;
    --radius-md: 15px;
    --radius-sm: 11px;
    --font-heading: Montserrat, Inter, "Segoe UI", sans-serif;
    --font-body: Inter, "Segoe UI", Arial, sans-serif;
}

body {
    background:
        radial-gradient(circle at 9% 4%, rgba(11, 101, 194, 0.10), transparent 25%),
        linear-gradient(145deg, #f8fcff 0%, #f3f8fc 48%, #f7fbff 100%);
    color: var(--ink);
}

.app-shell {
    grid-template-columns: 274px minmax(0, 1fr);
}

.sidebar {
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.94);
    border-right: 1px solid #d8e6f2;
    box-shadow: 10px 0 34px rgba(7, 59, 142, 0.045);
}

.brand {
    position: relative;
    padding: 5px 8px 22px;
    margin-bottom: 8px;
}

.brand::after {
    content: "";
    position: absolute;
    left: 8px;
    bottom: 5px;
    width: 86px;
    height: 3px;
    border-radius: 99px;
    background: var(--brand);
}

.brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    color: var(--brand);
    background: linear-gradient(145deg, #ffffff, #eaf5ff);
    border: 1.5px solid #9fc9f4;
    box-shadow: none;
}

.brand-mark::after {
    display: none;
}

.brand-mark b {
    font: 800 15px/0.88 var(--font-heading);
    letter-spacing: 0.04em;
    text-align: center;
}

.brand strong {
    color: #082f79;
    font-size: 19px;
    letter-spacing: 0.015em;
}

.brand small {
    max-width: 150px;
    color: #4d627a;
    font-size: 11.5px;
    line-height: 1.2;
}

.nav-label {
    color: #7890aa;
    letter-spacing: 0.1em;
}

.main-nav {
    gap: 4px;
}

.main-nav a {
    min-height: 45px;
    border-radius: 13px;
    color: #405771;
    font-weight: 650;
}

.main-nav a:hover {
    color: var(--brand);
    background: #f0f7ff;
}

.nav-ico {
    border-radius: 10px;
    color: #3869a4;
    background: #eef6fd;
}

.main-nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, #073b8e, #0b65c2);
    box-shadow: 0 9px 22px rgba(7, 59, 142, 0.19);
}

/* Relatórios consolidados */
.nav-group { display: grid; gap: 4px; }
.nav-submenu { display: grid; gap: 3px; margin: 0 0 4px 42px; padding-left: 12px; border-left: 1px solid rgba(27, 95, 170, .18); }
.nav-submenu a { min-height: 32px; padding: 7px 10px; font-size: .79rem; border-radius: 9px; color: #52677e; }
.nav-submenu a.active { color: #0753a7; background: #e9f4ff; box-shadow: none; }
.nav-submenu a.active::before { display: none; }
.report-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.report-hub-grid > a { display: flex; gap: 16px; align-items: flex-start; min-height: 150px; padding: 22px; border: 1px solid #dbe8f3; border-radius: 20px; background: linear-gradient(145deg, #fff, #f5faff); color: inherit; text-decoration: none; transition: .2s ease; }
.report-hub-grid > a:hover { transform: translateY(-2px); border-color: #8cc2f2; box-shadow: 0 14px 30px rgba(31, 94, 150, .10); }
.report-hub-grid svg { color: #0865c7; flex: 0 0 auto; }
.report-hub-grid strong { display: block; color: #102b55; font-size: 1.14rem; }
.report-hub-grid span { display: block; margin-top: 5px; color: #0871ce; font-size: .82rem; font-weight: 600; }
.report-hub-grid p { margin: 12px 0 0; color: #63788c; line-height: 1.5; }
.report-selector-panel { margin-bottom: 18px; }
.report-selector-form { display: flex; gap: 14px; align-items: end; padding: 18px 20px; }
.report-selector-form label { display: grid; gap: 7px; min-width: min(440px, 55vw); }
.report-selector-form label span { color: #48627c; font-size: .77rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.report-selector-form select { min-height: 42px; padding: 0 40px 0 12px; border: 1px solid #cbddea; border-radius: 11px; background: #fff; color: #173a60; }
.indicator-selector label { min-width: min(330px, 36vw); }
.indicator-selector { display: grid; grid-template-columns: minmax(280px, 1.35fr) minmax(190px, .75fr) minmax(220px, .9fr); gap: 14px; align-items: end; }
.indicator-selector label { min-width: 0; width: 100%; }
.indicator-selector select { width: 100%; min-width: 0; }
.indicator-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 2px; }
.empty-report-state { text-align: center; }
.individual-report { margin-top: 18px; }
.consolidated-bars { display: grid; gap: 15px; margin-top: 22px; padding: 20px; border-radius: 17px; background: #f7fbff; }
.consolidated-bars > div { display: grid; grid-template-columns: 120px 1fr 150px; gap: 14px; align-items: center; }
.bar-track { height: 11px; overflow: hidden; border-radius: 999px; background: #e4edf5; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1689ef, #0562c5); }
.bar-track i.ok { background: linear-gradient(90deg, #30bb78, #16864f); }
.bar-track i.warn { background: linear-gradient(90deg, #f5b44b, #e9801f); }
.bar-track i.danger { background: linear-gradient(90deg, #ff795e, #db3f28); }
.communication-sheet { max-width: 1120px; margin: 0 auto; padding: 26px; border: 1px solid #d7e4ef; border-radius: 28px; background: #fff; box-shadow: 0 20px 50px rgba(34, 80, 120, .10); }
.communication-header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 18px; border-bottom: 3px solid #0964ca; }
.communication-header div { display: flex; gap: 14px; align-items: center; }
.communication-header strong { color: #083f92; font-size: 1.55rem; }
.communication-header span { padding-left: 14px; border-left: 2px solid #0a57ad; font-size: 1.25rem; font-weight: 600; }
.communication-header em { padding: 13px 20px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #075ac0, #053a91); font-style: normal; font-weight: 700; }
.communication-title { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 24px 8px; }
.communication-title h2 { margin: 0; color: #111f36; font-size: 1.35rem; }
.communication-title p { margin: 5px 0 0; color: #174f96; }
.communication-kind { display: flex; gap: 12px; align-items: center; padding-left: 20px; border-left: 1px solid #cbdce9; color: #173a66; }
.communication-block { margin-top: 14px; padding: 20px; border: 1px solid #dce8f1; border-radius: 22px; background: linear-gradient(150deg, #fff, #fbfdff); }
.communication-block-title { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; color: #075bb8; }
.communication-block-title h3 { margin: 0; color: #12335f; font-size: 1.14rem; }
.communication-block-title p { margin: 4px 0 0; color: #59718a; font-size: .85rem; }
.indicator-cards { display: grid; gap: 14px; }
.indicator-cards.three { grid-template-columns: repeat(3, 1fr); }
.indicator-cards.four { grid-template-columns: repeat(4, 1fr); }
.indicator-cards article { min-height: 136px; padding: 18px; border: 1px solid #b9d7f4; border-radius: 19px; background: #f5faff; }
.indicator-cards span, .indicator-cards small { display: block; }
.indicator-cards span { font-weight: 600; }
.indicator-cards strong { display: block; margin: 7px 0; color: #0a50aa; font-size: 2.35rem; line-height: 1; }
.indicator-cards small { color: #3f5877; }
.indicator-cards.green { background: #f1fbf6; }
.indicator-cards article.green { border-color: #b9e4cc; background: #f2fbf6; }
.indicator-cards article.green strong { color: #16814e; }
.indicator-cards article.orange { border-color: #f3c99e; background: #fff8f0; }
.indicator-cards article.orange strong { color: #dc591e; }
.indicator-cards article.red { border-color: #f0b5ae; background: #fff4f2; }
.indicator-cards article.red strong { color: #c93428; }
.indicator-cards article.purple { border-color: #d8c5ee; background: #faf6ff; }
.indicator-cards article.purple strong { color: #7443a4; }
.quarterly-minutes { margin-top: 14px; padding: 15px; border: 1px solid #c9ddf0; border-radius: 18px; background: #f8fbff; }
.quarterly-minutes-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 11px; color: #12335f; }
.quarterly-minutes-title span { color: #607891; font-size: .78rem; }
.quarterly-minutes-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quarterly-minutes-grid article { min-height: 92px; padding: 12px 14px; border: 1px solid #c6dff3; border-radius: 14px; background: #fff; }
.quarterly-minutes-grid article > span, .quarterly-minutes-grid article > small { display: block; }
.quarterly-minutes-grid article > span { color: #345572; font-size: .78rem; font-weight: 700; }
.quarterly-minutes-grid article > strong { display: block; margin: 4px 0; color: #0a50aa; font-size: 1.45rem; }
.quarterly-minutes-grid article > small { color: #5b7188; font-size: .72rem; }
.quarterly-minutes-grid article.concluida { border-color: #b9e4cc; background: #f2fbf6; }
.quarterly-minutes-grid article.concluida > strong { color: #16814e; }
.quarterly-minutes-grid article.em_prazo { border-color: #b9d7f4; background: #f3f8ff; }
.quarterly-minutes-grid article.atrasada { border-color: #f0b5ae; background: #fff4f2; }
.quarterly-minutes-grid article.atrasada > strong { color: #c93428; }
@media (max-width: 980px) { .quarterly-minutes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .quarterly-minutes-title { align-items: flex-start; flex-direction: column; } .quarterly-minutes-grid { grid-template-columns: 1fr; } }
.week-summary { display: grid; gap: 12px; }
.week-summary > div { display: grid; grid-template-columns: 32px 55px 1fr minmax(270px, auto); gap: 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #e0e9f1; }
.communication-footer { margin-top: 18px; padding: 11px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, #064da8, #0871dc); text-align: center; font-weight: 600; }
.positive-text { color: #16814e; font-weight: 600; }
.danger-text { color: #d94332; font-weight: 600; }
.share-gallery { margin-bottom: 20px; }
.share-package-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.share-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 20px; }
.share-gallery-grid article { display: grid; gap: 12px; align-content: start; padding: 12px; border: 1px solid #d7e4ef; border-radius: 16px; background: #f8fbff; }
.share-gallery-grid img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 8px 24px rgba(28, 72, 112, .12); }

@media (max-width: 980px) {
    .report-hub-grid, .indicator-cards.four { grid-template-columns: 1fr 1fr; }
    .report-selector-form { align-items: stretch; flex-direction: column; }
    .report-selector-form label, .indicator-selector label { min-width: 0; width: 100%; }
    .indicator-selector { display: grid; grid-template-columns: 1fr 1fr; }
    .indicator-selector label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
    .report-hub-grid, .indicator-cards.three, .indicator-cards.four { grid-template-columns: 1fr; }
    .communication-title { grid-template-columns: auto 1fr; }
    .share-gallery-grid { grid-template-columns: 1fr; }
    .communication-kind { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
    .consolidated-bars > div, .week-summary > div { grid-template-columns: 1fr; }
    .indicator-selector { grid-template-columns: 1fr; }
    .indicator-selector label:first-child { grid-column: auto; }
    .indicator-actions { display: grid; grid-template-columns: 1fr; }
}
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-frame { margin: 0 !important; padding: 0 !important; }
    .communication-sheet { max-width: none; margin: 0; padding: 12mm; border: 0; border-radius: 0; box-shadow: none; }
    .communication-block { break-inside: avoid; }
    body.share-gallery-printing .communication-sheet { display: none !important; }
    body.share-gallery-printing .share-gallery { display: block !important; border: 0; box-shadow: none; }
    body.share-gallery-printing .share-gallery > .panel-title { display: none !important; }
    body.share-gallery-printing .share-gallery-grid { display: block; padding: 0; }
    body.share-gallery-printing .share-gallery-grid article { display: block; padding: 0; border: 0; break-after: page; page-break-after: always; }
    body.share-gallery-printing .share-gallery-grid article:last-child { break-after: auto; page-break-after: auto; }
    body.share-gallery-printing .share-gallery-grid img { width: 100%; max-height: 100vh; object-fit: contain; box-shadow: none; }
    body.share-gallery-printing .share-gallery-grid a { display: none !important; }
}

.main-nav a.active::before {
    display: none;
}

.main-nav a.active .nav-ico {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.sidebar-note {
    border-radius: 16px;
    border: 1px solid #cfe2f4;
    background: #f1f8ff;
}

.sidebar-note strong {
    color: var(--brand);
}

.sidebar-note span {
    color: #5f7186;
}

.main-frame {
    padding: 25px 30px 42px;
}

.topbar {
    min-height: 82px;
    margin-bottom: 22px;
    padding: 12px 16px;
    border: 1px solid rgba(208, 225, 239, 0.92);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
}

.page-symbol {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    color: var(--brand);
    background: #eaf5ff;
    border: 1px solid #bedcf6;
    box-shadow: none;
}

.eyebrow,
.report-section-head span {
    color: var(--brand);
}

.eyebrow-dot {
    background: var(--brand);
}

h1 {
    color: #0b2f64;
    font-size: 29px;
    letter-spacing: -0.025em;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
}

.user-chip {
    border-radius: 15px;
    border-color: #d4e3ef;
    background: #ffffff;
    box-shadow: none;
}

.avatar {
    border-radius: 11px;
    background: linear-gradient(145deg, #073b8e, #0b65c2);
}

.btn,
.logout-link,
.login-form button {
    min-height: 43px;
    border-radius: 12px;
}

.btn.primary,
.login-form button {
    background: linear-gradient(135deg, #073b8e, #0b65c2);
    box-shadow: 0 9px 22px rgba(7, 59, 142, 0.18);
}

.btn.secondary {
    border-color: #bcd5eb;
    color: var(--brand);
}

.btn.soft {
    color: var(--brand);
    border-color: #c7dff3;
    background: #eaf5ff;
}

.panel,
.login-panel,
.lab-card,
.metric-card,
.report-section,
.collect-hero,
.table-panel {
    border-color: #d5e4f2;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
}

.metric-card {
    border-radius: 18px;
    padding: 18px;
}

.metric-card::before {
    height: 3px;
    background: var(--accent, var(--brand));
}

.metric-ico {
    border-radius: 14px;
}

.metric-number,
.metric-card strong {
    color: #0b2f64;
    font-size: 32px;
}

.metric-kicker,
.metric-card span {
    color: #64748b;
}

.collect-hero {
    position: relative;
    overflow: hidden;
    border-radius: 23px;
    background: linear-gradient(112deg, #ffffff 0%, #f2f8ff 100%);
}

.collect-hero::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 4px;
    border-radius: 0 6px 6px 0;
    background: var(--brand);
}

.collect-hero h2,
.report-section-head h2,
.panel-title h2,
.table-header h2 {
    color: #0b2f64;
    font-family: var(--font-heading);
}

.report-topic-nav {
    top: 10px;
    padding: 9px;
    border-radius: 17px;
    border-color: #d1e2f0;
    box-shadow: 0 8px 24px rgba(7, 59, 142, 0.07);
}

.report-topic-nav a,
.report-head-actions a {
    color: var(--brand);
    border-color: #c9dded;
    background: #f7fbff;
    font-weight: 700;
}

.report-topic-nav a:hover,
.report-head-actions a:hover {
    color: #ffffff;
    border-color: var(--brand);
    background: var(--brand);
}

.report-section {
    padding: 23px;
    border-radius: 22px;
}

.report-section-head span {
    font-weight: 750;
}

.report-section-head h2 {
    font-size: 24px;
}

.report-overview-list article,
.admin-summary-card,
.distribution-card,
.report-item-card,
.avaria-detail-grid > div,
.avaria-detail-description {
    border-color: #d9e6f1;
    background: #ffffff;
}

.report-item-card {
    box-shadow: 0 5px 15px rgba(7, 59, 142, 0.035);
}

.badge {
    font-weight: 750;
}

.badge.info {
    color: #075cae;
    border-color: #b8d9f3;
    background: #eaf5ff;
}

.badge.ok {
    color: #116c3e;
    border-color: #bde2ce;
    background: #eaf7f0;
}

.badge.warn,
.badge.danger {
    color: #b83b18;
    border-color: #f0c4b5;
    background: #fff2eb;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    border-color: #cbddeb !important;
    border-radius: 12px !important;
    background-color: #ffffff !important;
    color: #233f61 !important;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    border-color: #0b65c2 !important;
    box-shadow: 0 0 0 3px rgba(11, 101, 194, 0.12) !important;
    outline: 0;
}

table {
    border-color: #d5e4f2;
}

thead th {
    color: #073b8e !important;
    background: #eaf5ff !important;
    border-color: #c9dded !important;
}

tbody tr:nth-child(even) {
    background: #f9fcff;
}

tbody tr:hover {
    background: #f0f7ff;
}

.notice {
    border-color: #c8dded;
    background: #edf7ff;
    color: #284d74;
}

.avaria-fixed-alerts button.is-active {
    border-color: #0b65c2;
    background: #eaf5ff;
    box-shadow: inset 0 0 0 1px rgba(11, 101, 194, 0.12);
}

.avaria-number-link {
    color: #075cad;
}

.avaria-detail-dialog {
    border-color: #c9ddeb;
    box-shadow: 0 24px 70px rgba(7, 45, 100, 0.25);
}

.avaria-detail-dialog h2 {
    color: #073b8e;
}

.avaria-detail-close {
    color: #073b8e;
    background: #eaf5ff;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .main-frame {
        padding: 20px;
    }

    .topbar {
        padding: 10px 12px;
    }
}

@media (max-width: 680px) {
    .main-frame {
        padding: 12px 10px 28px;
    }

    .topbar {
        align-items: flex-start;
        border-radius: 17px;
    }

    .page-symbol {
        display: none;
    }

    h1 {
        font-size: 24px;
    }

    .subtitle {
        display: none;
    }

    .report-section,
    .collect-hero {
        border-radius: 18px;
    }
}

.avaria-inline-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.avaria-inline-head span {
    display: block;
    color: #77a893;
    font: 680 11px/1 var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.avaria-inline-head h3 {
    margin: 8px 0 0;
    color: #17324f;
    font-size: 20px;
    font-weight: 710;
}

.avaria-inline-head p {
    margin: 6px 0 0;
}

.avaria-inline-head > strong {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #cbe8d9;
    border-radius: 999px;
    background: #eff9f4;
    color: #3c8063;
    font-size: 13px;
    font-weight: 680;
    white-space: nowrap;
}

.avaria-inline-item .item-reason p {
    max-width: 680px;
}

@media (max-width: 1180px) {
    .avaria-fixed-alerts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .avaria-query-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .avaria-fixed-alerts {
        grid-template-columns: 1fr;
    }

    .avaria-inline-head {
        display: grid;
        gap: 10px;
    }

    .avaria-status-filter {
        justify-content: stretch;
    }

    .avaria-status-filter label {
        min-width: 0;
    }
}

@media print {
    body.avaria-query-printing .sidebar,
    body.avaria-query-printing .topbar,
    body.avaria-query-printing .report-page-v2 > *:not(#distribuicao-avarias),
    body.avaria-query-printing #distribuicao-avarias > *:not(.avaria-query-panel),
    body.avaria-query-printing .avaria-query-panel > *:not(.avaria-query-inline) {
        display: none !important;
    }

    body.avaria-query-printing .report-section,
    body.avaria-query-printing .avaria-query-panel {
        border: 0 !important;
        box-shadow: none !important;
        background: #ffffff !important;
    }

    body.avaria-query-printing .avaria-query-inline {
        display: grid !important;
        border-top: 0 !important;
    }
}

.inspection-type-bars div {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 38px;
    gap: 9px;
    align-items: center;
}

.inspection-type-bars span {
    color: #60768d;
    font-size: 12px;
    font-weight: 560;
}

.inspection-type-bars b {
    display: block;
    height: 10px;
    min-width: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #8ccdaf, #4f9d78);
}

.inspection-type-bars b.info {
    background: linear-gradient(90deg, #8ed0ec, #489fd0);
}

.inspection-type-bars b.danger {
    background: linear-gradient(90deg, #f5a4a8, #d66269);
}

.inspection-type-bars b.warn {
    background: linear-gradient(90deg, #f1d084, #d6a641);
}

.inspection-type-bars strong {
    color: #17324f;
    font-size: 12.5px;
    font-weight: 670;
    text-align: right;
}

.soft-notice {
    border-color: #d7e9f3;
    background: #f6fbfe;
    color: #426176;
}

.inspection-delay-card {
    border-color: #f2c5c7;
    background: linear-gradient(180deg, #ffffff, #fff9fa);
}

@media (max-width: 1280px) {
    .inspection-filter,
    .inspection-filter-evolution,
    .inspection-filter-current {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .inspection-kpi-grid,
    .inspection-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inspection-filter.closing-period-filter {
        grid-template-columns: 1fr;
    }

    .closing-period-row {
        grid-template-columns: minmax(210px, 1.1fr) repeat(2, minmax(160px, .8fr));
    }

    .closing-period-row.is-collection {
        grid-template-columns: minmax(190px, 1fr) minmax(180px, .9fr) repeat(2, minmax(150px, .75fr));
    }

    .closing-scope-row {
        grid-template-columns: minmax(190px, 1fr) minmax(230px, 1.2fr) auto;
    }
}

@media (max-width: 760px) {
    .inspection-filter,
    .inspection-kpi-grid,
    .inspection-delta-grid,
    .inspection-type-grid {
        grid-template-columns: 1fr;
    }

    .inspection-filter.closing-period-filter,
    .closing-period-row,
    .closing-period-row.is-collection,
    .closing-scope-row {
        grid-template-columns: 1fr;
    }
}

.inspection-line-panel {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.inspection-chart-toolbar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.inspection-chart-toolbar > label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #cbddeb;
    border-radius: 12px;
    background: #ffffff;
    color: #284d74;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.inspection-chart-toolbar input {
    width: 15px;
    height: 15px;
    accent-color: #0b65c2;
}

.chart-mode-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid #cbddeb;
    border-radius: 14px;
    background: #edf6fc;
}

.chart-mode-switch .btn {
    min-height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
}

.chart-mode-switch .btn.is-active {
    background: #0b65c2;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(11, 101, 194, .22);
}

.inspection-chart-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1290;
    border: 0;
    background: rgba(7, 34, 70, 0.62);
    backdrop-filter: blur(4px);
}

body.has-chart-expanded {
    overflow: hidden;
}

.inspection-line-panel.is-expanded {
    position: fixed;
    inset: 18px;
    z-index: 1300;
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 18px;
    border: 1px solid #bfd7e9;
    border-radius: 24px;
    background: #f7fbff;
    box-shadow: 0 28px 80px rgba(5, 37, 82, 0.34);
}

.inspection-line-panel.is-expanded .inspection-line-chart {
    min-height: 0;
}

.inspection-line-panel.is-expanded .inspection-line-chart svg {
    height: 100%;
    min-height: 520px;
}

.inspection-line-panel.is-expanded .inspection-chart-note {
    grid-column: 2;
}

@media (max-width: 760px) {
    .inspection-line-panel.is-expanded {
        inset: 8px;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        padding: 10px;
        overflow: auto;
    }

    .inspection-line-panel.is-expanded .inspection-chart-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inspection-line-panel.is-expanded .inspection-chart-note {
        grid-column: 1;
    }
}

.coleta-action-feedback {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 120;
    width: min(390px, calc(100vw - 32px));
    pointer-events: none;
}

.coleta-action-feedback[hidden] {
    display: none !important;
}

.coleta-action-feedback-card {
    padding: 16px;
    border: 1px solid #cfe4f3;
    border-radius: 22px;
    background:
        radial-gradient(circle at 8% 0%, rgba(90, 169, 214, .18), transparent 35%),
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 252, 255, .98));
    box-shadow: 0 18px 40px rgba(23, 50, 79, .18);
}

.coleta-action-feedback-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
}

.coleta-action-feedback strong {
    display: block;
    margin-bottom: 4px;
    color: #062b4b;
    font-size: 15px;
}

.coleta-action-feedback p {
    margin: 0;
    color: #48647d;
    font-size: 13px;
    line-height: 1.4;
}

.coleta-action-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #d9ecf8;
    border-top-color: #3b9edb;
    border-radius: 999px;
    animation: coleta-spin .8s linear infinite;
}

.coleta-action-feedback.is-ok .coleta-action-spinner {
    border-color: #bfead3;
    background: #36b36f;
    animation: none;
}

.coleta-action-feedback.is-danger .coleta-action-spinner {
    border-color: #ffd3d3;
    background: #e95050;
    animation: none;
}

.coleta-action-progress {
    overflow: hidden;
    height: 8px;
    margin: 14px 0 12px;
    border-radius: 999px;
    background: #e8f2f9;
}

.coleta-action-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #55a9d9, #36b36f);
    transition: width .35s ease;
}

.coleta-action-feedback.is-running .coleta-action-progress span {
    animation: coleta-progress 1.2s ease-in-out infinite alternate;
}

.coleta-action-feedback ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
    color: #526e85;
    font-size: 12.5px;
}

@keyframes coleta-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes coleta-progress {
    from {
        width: 42%;
    }

    to {
        width: 86%;
    }
}

.inspection-chart-options {
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 14px;
    border: 1px solid #dce8f1;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #f8fcff);
}

.inspection-chart-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #d5e7f2;
    border-radius: 999px;
    background: #f8fcff;
    color: #395871;
    font-size: 13px;
    font-weight: 560;
    cursor: pointer;
}

.inspection-chart-options label::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: var(--series-color, #5aa9d6);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--series-color, #5aa9d6) 18%, transparent);
}

.inspection-chart-options input {
    width: 15px;
    height: 15px;
    accent-color: var(--series-color, #5aa9d6);
}

.inspection-line-chart {
    overflow-x: auto;
    padding: 14px;
    border: 1px solid #dce8f1;
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0%, rgba(90, 169, 214, .12), transparent 32%),
        linear-gradient(180deg, #ffffff, #f8fcff);
}

.inspection-line-chart .chart-series-label {
    font: 650 12px var(--font-body);
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .92);
    stroke-width: 4px;
    stroke-linejoin: round;
}

.inspection-line-chart svg {
    width: 100%;
    min-width: 820px;
    min-height: 330px;
    display: block;
}

.inspection-line-chart .chart-grid line {
    stroke: #e1edf5 !important;
    stroke-width: 1;
}

.inspection-line-chart .chart-grid text,
.inspection-line-chart .chart-labels text,
.inspection-line-chart .chart-value {
    fill: #71869a;
    font: 520 12px var(--font-body);
}

.inspection-line-chart .chart-value {
    fill: #17324f;
    font-weight: 680;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .95) !important;
    stroke-width: 4px;
    stroke-linejoin: round;
}

.inspection-line-chart .chart-line {
    fill: none;
    stroke: var(--series-color, #5aa9d6) !important;
    stroke-width: 4.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 8px rgba(37, 77, 106, .12));
}

.inspection-line-chart .chart-dot-halo {
    fill: var(--series-color, #5aa9d6) !important;
    stroke: none !important;
    opacity: .18;
}

.inspection-line-chart .chart-dot {
    fill: var(--series-color, #5aa9d6) !important;
    stroke: #ffffff !important;
    stroke-width: 3.5;
    filter: drop-shadow(0 3px 7px rgba(23, 50, 79, .22));
}

.inspection-line-chart .chart-series-label {
    fill: var(--series-color, #5aa9d6) !important;
}

.inspection-line-chart .chart-label-guide {
    fill: none !important;
    stroke: var(--series-color, #5aa9d6) !important;
    stroke-width: 1.2;
    opacity: 0.58;
}

.inspection-line-chart .point-guide {
    stroke-dasharray: 2 3;
}

.inspection-line-chart .chart-empty {
    fill: #61768c;
    font: 600 16px var(--font-body);
}

.inspection-line-chart .inspection-bars-svg {
    min-height: 410px;
}

.inspection-bars-svg .bar-collection-legend circle,
.inspection-bars-svg .chart-bar {
    fill: var(--collection-color) !important;
}

.inspection-bars-svg .bar-collection-legend text {
    fill: #516b86;
    font: 700 11px var(--font-body);
}

.inspection-bars-svg .chart-bar {
    stroke: color-mix(in srgb, var(--collection-color) 78%, #063e79);
    stroke-width: 1;
    filter: drop-shadow(0 4px 7px rgba(23, 50, 79, .16));
}

.inspection-bars-svg .chart-bar-value {
    font: 760 11px var(--font-body);
}

.inspection-bars-svg .chart-bar-value.inside {
    fill: #ffffff !important;
}

.inspection-bars-svg .chart-bar-value.outside {
    fill: #17324f !important;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .96);
    stroke-width: 4px;
}

.inspection-bars-svg .chart-bar-percent {
    fill: #61768c;
    font: 650 9px var(--font-body);
}

.inspection-bars-svg .chart-bar-category {
    fill: #17324f;
    font: 720 11px var(--font-body);
}

.inspection-line-chart .inspection-showcase-svg {
    min-height: 500px;
}

.inspection-showcase-svg .showcase-panel {
    stroke: #d5e5f2;
    stroke-width: 1;
    filter: url(#showcase-shadow);
}

.inspection-showcase-svg .volume-panel {
    fill: url(#showcase-volume-bg) !important;
}

.inspection-showcase-svg .attention-panel {
    fill: url(#showcase-attention-bg) !important;
}

.inspection-showcase-svg .showcase-bar {
    fill: var(--bar-color) !important;
    stroke: color-mix(in srgb, var(--bar-color) 82%, #052d70);
    stroke-width: 1;
    filter: url(#showcase-shadow);
}

.inspection-showcase-svg .showcase-kicker {
    fill: #0b65c2 !important;
    font: 800 11px var(--font-heading);
    letter-spacing: 1.4px;
}

.inspection-showcase-svg .showcase-kicker.attention {
    fill: #c36814 !important;
}

.inspection-showcase-svg .showcase-title {
    fill: #0b2f64 !important;
    font: 800 20px var(--font-heading);
}

.inspection-showcase-svg .showcase-value {
    fill: #17324f !important;
    font: 800 13px var(--font-heading);
    paint-order: stroke;
    stroke: #ffffff;
    stroke-width: 4px;
}

.inspection-showcase-svg .showcase-value.compact {
    font-size: 11px;
}

.inspection-showcase-svg .showcase-percent {
    fill: #64748b !important;
    font-size: 0.82em;
    font-weight: 700;
}

.inspection-showcase-svg .showcase-series-name {
    fill: var(--bar-color) !important;
    font: 750 10px var(--font-body);
}

.inspection-showcase-svg .showcase-series-name.compact {
    font-size: 9px;
}

.inspection-showcase-svg .showcase-legend-dot {
    fill: var(--bar-color) !important;
    stroke: none !important;
}

.inspection-showcase-svg .showcase-divider {
    stroke: #dce8f1 !important;
    stroke-width: 1;
}

.inspection-showcase-svg .showcase-collection {
    fill: #516b86 !important;
    font: 700 12px var(--font-body);
}

.inspection-chart-note {
    grid-column: 2;
    color: #61768c;
    font-size: 13.2px;
    line-height: 1.45;
    font-weight: 430;
}

@media (max-width: 980px) {
    .inspection-line-panel {
        grid-template-columns: 1fr;
    }

    .inspection-chart-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inspection-chart-note {
        grid-column: auto;
    }
}

/* Refinamento tipográfico global: hierarquia mais leve e acabamento mais preciso. */
:root {
    --font-heading: Manrope, Inter, "Segoe UI", sans-serif;
}

body {
    font-weight: 400;
    letter-spacing: -0.006em;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
.brand-title,
.brand strong,
.login-brand strong,
.collect-hero h2,
.report-section-head h2,
.panel-title h2,
.table-header h2 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.brand strong {
    font-weight: 700;
}

.main-nav a {
    font-weight: 500;
    letter-spacing: -0.01em;
}

.main-nav a.active {
    font-weight: 600;
}

.nav-label,
.eyebrow,
.report-section-head > div > span,
.metric-kicker,
.metric-card > span {
    font-weight: 600;
    letter-spacing: 0.075em;
}

.btn,
.logout-link,
.login-form button,
.report-topic-nav a,
.report-head-actions a,
.inspection-chart-toolbar > label,
.chart-mode-switch .btn,
.inspection-chart-options label {
    font-weight: 600;
    letter-spacing: -0.008em;
}

.badge,
.user-chip strong,
thead th {
    font-weight: 600;
}

.metric-number,
.metric-card strong,
.report-overview-list strong {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.035em;
}

.inspection-line-chart .chart-grid text,
.inspection-line-chart .chart-labels text,
.inspection-line-chart .chart-value,
.inspection-bars-svg .bar-collection-legend text,
.inspection-bars-svg .chart-bar-percent {
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.inspection-line-chart .chart-value,
.inspection-line-chart .chart-series-label,
.inspection-bars-svg .chart-bar-value,
.inspection-bars-svg .chart-bar-category {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: -0.018em;
}

.inspection-bars-svg .chart-bar-value.inside {
    font-weight: 600;
}

.inspection-bars-svg .chart-bar-category {
    font-size: 10.5px;
}

.inspection-bars-svg .chart-bar-percent {
    font-size: 9.5px;
}
.user-edit-dialog {
    width: min(540px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(15, 42, 76, .28);
}

.user-edit-dialog::backdrop {
    background: rgba(10, 27, 51, .55);
    backdrop-filter: blur(2px);
}

.user-edit-form {
    padding: 26px;
}

.user-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.environment-banner {
    margin: -4px 0 18px;
    padding: 9px 12px;
    border: 1px solid #efcc86;
    border-radius: 11px;
    background: #fff7e6;
    color: #9a6210;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .07em;
    text-align: center;
    text-transform: uppercase;
}

.environment-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid #efcc86;
    border-radius: 999px;
    background: #fff7e6;
    color: #95600f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
}

/* Indicadores comparativos */
.comparative-selector-panel { padding: 18px; }
.comparative-selector { display:grid; grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr); gap:14px; align-items:center; }
.comparison-base { min-width:0; margin:0; padding:15px; border:1px solid #cfe0ee; border-radius:18px; display:grid; grid-template-columns:minmax(0,1.35fr) minmax(150px,.8fr); gap:12px; background:#f9fcff; }
.comparison-base.base-a { border-color:#acd0f1; background:linear-gradient(180deg,#fbfdff,#f1f7ff); }
.comparison-base.base-b { border-color:#a9ddc2; background:linear-gradient(180deg,#fcfffd,#f1fbf6); }
.comparison-base legend { padding:0 8px; color:#0a4da2; font-weight:700; }
.comparison-base.base-b legend { color:#16814e; }
.comparison-base label,.comparison-scope label { display:grid; gap:6px; }
.comparison-base label span,.comparison-scope label span { color:#49637d; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.comparison-base select,.comparison-scope select { width:100%; min-height:44px; padding:0 42px 0 14px; border:1px solid #bfd5e7; border-radius:12px; background-color:#fff; color:#173a60; box-shadow:0 3px 10px rgba(25,72,111,.05); }
.comparison-base.base-a select:focus { border-color:#4b9be0; box-shadow:0 0 0 3px rgba(60,143,216,.14); }
.comparison-base.base-b select { border-color:#b8ddca; }
.comparison-base.base-b select:focus { border-color:#4fb57e; box-shadow:0 0 0 3px rgba(53,161,102,.13); }
.comparison-versus { width:40px; height:40px; display:grid; place-items:center; border-radius:50%; background:#0a55ae; color:white; font-size:22px; font-weight:700; }
.comparison-scope { grid-column:1/-1; display:flex; align-items:end; justify-content:center; gap:12px; padding-top:4px; }
.comparison-scope label { width:min(430px,100%); }
.comparison-identification { display:grid; grid-template-columns:1fr 130px 1fr; gap:18px; align-items:center; margin:0 0 18px; }
.comparison-identification article { min-width:0; min-height:124px; box-sizing:border-box; padding:20px 24px; border-radius:18px; border:1px solid #bad8f1; background:#f3f8ff; display:grid; align-content:center; gap:5px; }
.comparison-identification article.b { border-color:#a9ddc2; background:#f2fbf6; }
.comparison-identification article span { color:#58728b; font-size:12px; font-weight:700; letter-spacing:.08em; }
.comparison-identification article strong { color:#0756b3; font-size:22px; }
.comparison-identification article.b strong { color:#16814e; }
.comparison-identification article small { color:#657b90; }
.comparison-identification>div { display:grid; justify-items:center; gap:3px; color:#52708c; }
.comparison-identification>div svg { color:#0b65c2; }
.comparison-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.comparison-metrics article { min-width:0; padding:16px; border:1px solid #d9e5ef; border-radius:17px; background:#f8fbff; }
.comparison-metrics article>span { display:block; min-height:36px; color:#38536d; font-size:13px; font-weight:700; }
.comparison-values { display:flex; align-items:center; justify-content:space-between; margin:8px 0; }
.comparison-values b { color:#0756b3; font-size:25px; }
.comparison-values b:last-child { color:#16814e; }
.comparison-values b small { display:block; color:#75899c; font-size:10px; text-align:center; }
.comparison-values i { color:#7d91a5; font-style:normal; }
.comparison-metrics article>strong { display:block; padding-top:9px; border-top:1px solid #dce6ee; font-size:19px; }
.comparison-metrics article>strong small { font-size:12px; }
.comparison-metrics article.improved { background:#f2fbf6; border-color:#a9ddc2; }
.comparison-metrics article.improved>strong { color:#16814e; }
.comparison-metrics article.worsened { background:#fff4f2; border-color:#efb2aa; }
.comparison-metrics article.worsened>strong { color:#c93428; }
.comparison-metrics article.stable>strong { color:#657b90; }
.comparison-metrics article.unavailable { background:#f5f7f9; border-color:#d9e0e6; }
.comparison-metrics article.unavailable>strong { color:#687b8e; font-size:13px; }
.comparison-table thead tr:first-child th { text-align:center; }
.comparison-table thead tr:first-child th:first-child { text-align:left; }
.comparison-table thead tr:first-child th:nth-child(2),.comparison-table thead tr:nth-child(2) th:nth-child(-n+3){color:#0756b3;background:#edf6ff;}
.comparison-table thead tr:first-child th:nth-child(3),.comparison-table thead tr:nth-child(2) th:nth-child(n+4){color:#16814e;background:#effaf4;}
.comparison-table tbody td:nth-child(2),.comparison-table tbody td:nth-child(3),.comparison-table tbody td:nth-child(4){color:#0756b3;}
.comparison-table tbody td:nth-child(5),.comparison-table tbody td:nth-child(6),.comparison-table tbody td:nth-child(7){color:#16814e;}
.comparison-delta { display:inline-flex; min-width:70px; justify-content:center; padding:5px 9px; border-radius:999px; font-weight:700; }
.comparison-delta.up { color:#137a49; background:#e9f8f0; }
.comparison-delta.down { color:#c93428; background:#fff0ee; }
.comparison-delta.same { color:#61768c; background:#eef3f7; }
@media (max-width:1100px){.comparison-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}.comparative-selector{grid-template-columns:1fr}.comparison-versus{display:none}.comparison-scope{grid-column:auto}.comparison-base{grid-template-columns:1fr 1fr}}
@media (max-width:680px){.comparison-base{grid-template-columns:1fr}.comparison-scope{align-items:stretch;flex-direction:column}.comparison-scope label{width:100%}.comparison-identification{grid-template-columns:1fr}.comparison-identification>div{transform:rotate(90deg)}.comparison-metrics{grid-template-columns:1fr}}
