.sac-update-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 0%, rgba(84, 172, 255, 0.2), transparent 28rem),
        radial-gradient(circle at 85% 10%, rgba(74, 222, 128, 0.14), transparent 24rem),
        linear-gradient(135deg, #07121d 0%, #102537 55%, #07131d 100%);
    color: #f7fafc;
}

html {
    overflow-x: hidden;
}

.sac-update-page *,
.sac-update-page *::before,
.sac-update-page *::after {
    box-sizing: border-box;
}

.sac-update-shell {
    width: min(100% - 1.5rem, 1760px);
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.sac-glass-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    background: rgba(13, 27, 39, 0.78);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(20px);
}

.sac-update-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.sac-auth-card {
    width: min(100%, 520px);
    padding: 2rem;
    display: grid;
    gap: 1rem;
}

.sac-auth-card img {
    width: 96px;
}

.sac-auth-card h1,
.sac-topbar h1,
.sac-panel h2,
.sac-editor h2,
.sac-chart-grid h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.sac-auth-card p,
.sac-topbar span {
    color: rgba(247, 250, 252, 0.72);
}

.sac-kicker {
    margin: 0 0 .3rem;
    color: #8bd3ff;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sac-auth-card form,
.sac-editor form,
.sac-filters,
.sac-checklist {
    display: grid;
    gap: .8rem;
}

.sac-auth-card label,
.sac-editor label {
    display: grid;
    gap: .35rem;
    color: rgba(247, 250, 252, .78);
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sac-auth-card input,
.sac-editor input,
.sac-editor select,
.sac-editor textarea,
.sac-filters input,
.sac-filters select {
    width: 100%;
    min-height: 2.6rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    color: #f7fafc;
    padding: .65rem .8rem;
    font: inherit;
    box-sizing: border-box;
}

.sac-editor select,
.sac-filters select {
    background-color: #172838;
    color: #f7fafc;
    color-scheme: light;
}

.sac-editor select option,
.sac-filters select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.sac-auth-card button,
.sac-editor button,
.sac-panel button,
.sac-tabs button,
.sac-logout,
.sac-export-actions a {
    min-height: 2.5rem;
    border: 1px solid rgba(139, 211, 255, .24);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(64, 156, 255, .95), rgba(22, 91, 171, .96));
    color: #fff;
    padding: 0 .9rem;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sac-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
}

.sac-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.sac-tabs button {
    background: rgba(255, 255, 255, .08);
    color: rgba(247, 250, 252, .8);
}

.sac-tabs button.is-active {
    background: #f7fafc;
    color: #0b1824;
}

.sac-logout {
    background: rgba(255, 255, 255, .08);
}

.sac-alert {
    margin-bottom: 1rem;
    padding: .85rem 1rem;
    border-radius: 16px;
    background: rgba(74, 222, 128, .14);
    border: 1px solid rgba(74, 222, 128, .26);
}

.sac-alert.is-error {
    background: rgba(248, 113, 113, .14);
    border-color: rgba(248, 113, 113, .28);
}

.sac-view {
    display: none;
}

.sac-view.is-active {
    display: block;
}

.sac-layout {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 1rem;
}

.sac-layout > *,
.sac-topbar > *,
.sac-editor,
.sac-panel {
    min-width: 0;
}

.sac-panel,
.sac-editor,
.sac-chart-grid > .sac-glass-card {
    padding: 1rem;
}

.sac-panel-head,
.sac-editor-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.sac-list {
    display: grid;
    gap: .65rem;
    max-height: calc(100vh - 260px);
    overflow: auto;
}

.sac-list-item {
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: .8rem;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
}

.sac-list-item.is-active {
    border-color: rgba(139, 211, 255, .8);
    background: rgba(139, 211, 255, .12);
}

.sac-list-item strong {
    display: block;
}

.sac-list-item span {
    display: block;
    color: rgba(247, 250, 252, .68);
    font-size: .82rem;
}

.sac-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.sac-span-2 {
    grid-column: 1 / -1;
}

.sac-editor-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sac-editor button.sac-danger-button {
    border-color: rgba(248, 113, 113, .35);
    background: rgba(127, 29, 29, .82);
}

.sac-checklist {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: 1rem 0;
}

.sac-checklist label,
.sac-checkbox-line {
    display: flex;
    gap: .55rem;
    align-items: center;
    min-height: 2.6rem;
    align-content: center;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    padding: .5rem .7rem;
    background: rgba(255, 255, 255, .06);
    text-transform: none;
    letter-spacing: 0;
}

.sac-toggle {
    display: flex;
    gap: .55rem;
    align-items: center;
}

.sac-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sac-toggle span {
    position: relative;
    width: 2rem;
    height: 1.1rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(148, 163, 184, .28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.sac-toggle span::after {
    content: "";
    position: absolute;
    width: .78rem;
    height: .78rem;
    top: .16rem;
    left: .16rem;
    border-radius: 999px;
    background: rgba(247, 250, 252, .88);
    transition: transform .16s ease, background .16s ease;
}

.sac-toggle input:checked + span {
    background: rgba(34, 197, 94, .72);
}

.sac-toggle input:checked + span::after {
    transform: translateX(.9rem);
    background: #fff;
}

.sac-vistoria-card {
    display: grid;
    gap: .75rem;
    margin: .9rem 0 1rem;
    padding: .9rem;
    border: 1px solid rgba(139, 211, 255, .2);
    border-radius: 18px;
    background: rgba(10, 23, 34, .7);
}

.sac-vistoria-card[hidden] {
    display: none !important;
}

.sac-vistoria-card-head {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    color: rgba(247, 250, 252, .74);
    font-size: .78rem;
}

.sac-vistoria-card-head span {
    color: #8bd3ff;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sac-vistoria-item {
    display: grid;
    gap: .65rem;
    padding: .8rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    background: rgba(255, 255, 255, .055);
}

.sac-vistoria-empty {
    padding: .75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .055);
    color: rgba(247, 250, 252, .72);
    font-size: .82rem;
}

.sac-vistoria-item > button {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    display: grid;
    gap: .2rem;
}

.sac-vistoria-item > button strong {
    font-size: 1rem;
}

.sac-vistoria-item > button span,
.sac-vistoria-item small,
.sac-vistoria-item p {
    color: rgba(247, 250, 252, .7);
}

.sac-vistoria-tags {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
}

.sac-vistoria-tags span {
    padding: .32rem .5rem;
    border-radius: 999px;
    background: rgba(139, 211, 255, .12);
    color: rgba(247, 250, 252, .86);
    font-size: .72rem;
    font-weight: 800;
}

.sac-vistoria-item dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin: 0;
}

.sac-vistoria-item dt {
    color: rgba(247, 250, 252, .55);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.sac-vistoria-item dd {
    margin: .1rem 0 0;
    color: #f7fafc;
    font-size: .82rem;
}

.sac-vistoria-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    gap: .55rem;
}

.sac-vistoria-photos a {
    display: grid;
    gap: .35rem;
    color: #f7fafc;
    text-decoration: none;
    font-size: .72rem;
}

.sac-vistoria-photos img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
}

.sac-timeline {
    display: grid;
    gap: .6rem;
    margin-top: 1rem;
}

.sac-event {
    border-left: 3px solid #8bd3ff;
    padding: .65rem .8rem;
    border-radius: 0 14px 14px 0;
    background: rgba(255, 255, 255, .06);
}

.sac-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .5rem;
    margin-top: 1rem;
}

.sac-day {
    min-height: 8rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: .65rem;
    background: rgba(255, 255, 255, .05);
}

.sac-export-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.sac-dashboard {
    display: grid;
    gap: 1rem;
}

.sac-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .8rem;
}

.sac-kpi {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
}

.sac-kpi strong {
    display: block;
    font-size: 1.7rem;
}

.sac-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.sac-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .5rem;
    margin: .7rem 0;
}

.sac-bar span {
    grid-column: 1 / -1;
    height: .55rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #8bd3ff var(--w), rgba(255, 255, 255, .1) var(--w));
}

@media (max-width: 1180px) {
    .sac-topbar,
    .sac-layout,
    .sac-chart-grid {
        grid-template-columns: 1fr;
    }
    .sac-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .sac-update-shell {
        width: min(100% - .7rem, 1760px);
        padding-top: .35rem;
    }
    .sac-topbar,
    .sac-panel,
    .sac-editor,
    .sac-auth-card {
        border-radius: 18px;
        padding: .85rem;
    }
    .sac-form-grid,
    .sac-checklist,
    .sac-kpi-grid,
    .sac-calendar {
        grid-template-columns: 1fr;
    }
    .sac-tabs {
        display: grid;
    }
    .sac-list {
        max-height: 42vh;
    }
}
