:root {
    --green-950: #072a1b;
    --green-900: #0b4932;
    --green-800: #125d3f;
    --green-700: #176a47;
    --green-600: #1f7b52;
    --green-500: #3aa66f;
    --green-400: #62c48b;
    --green-200: #cce9d9;
    --green-100: #e9f5ef;
    --green-50: #f4faf7;
    --ink: #111815;
    --muted: #7b8781;
    --muted-dark: #59655f;
    --line: #e5eae7;
    --surface: #ffffff;
    --surface-soft: #f7f9f8;
    --canvas: #e9edee;
    --warning: #a66c0c;
    --warning-soft: #fff3d5;
    --danger: #b74343;
    --danger-soft: #fdeaea;
    --shadow: 0 26px 70px rgba(24, 44, 35, 0.11);
    --panel-shadow: 0 10px 30px rgba(24, 44, 35, 0.045);
    --sidebar-width: 222px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--canvas);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.92), transparent 34%),
        linear-gradient(135deg, #edf0f1 0%, #e4e8e9 100%);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.topbar-title {
    display: flex;
    flex-direction: column;
}

.topbar-title small {
    color: var(--muted);
    font-size: 0.62rem;
}

.topbar-title strong {
    font-size: 0.9rem;
}

.logout-trigger {
    color: var(--danger);
}

.phase-notice {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.phase-notice-icon,
.confirm-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--green-800);
    background: var(--green-100);
    font-weight: 800;
}

.phase-notice h2 {
    margin: 3px 0;
    font-size: 1rem;
}

.phase-notice p {
    margin: 0;
    color: var(--muted);
    font-size: 0.75rem;
}

.form-card {
    max-width: 840px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--panel-shadow);
}

.form-card-narrow {
    max-width: 620px;
}

.app-form,
.form-group {
    display: grid;
    gap: 8px;
}

.app-form {
    gap: 18px;
}

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

.form-grid-full {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--muted-dark);
    font-size: 0.72rem;
    font-weight: 750;
}

.form-group input {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #dfe5e1;
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
}

.form-group input:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(58, 166, 111, 0.12);
    outline: 0;
}

.form-group input[readonly] {
    color: #69746f;
    background: #f4f6f5;
}

.field-help,
.field-error {
    font-size: 0.66rem;
}

.field-help {
    color: var(--muted);
}

.field-error {
    color: var(--danger);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 64px;
}

.password-field button {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 0;
    color: var(--green-700);
    background: transparent;
    font-size: 0.67rem;
    font-weight: 750;
}

.form-actions,
.confirm-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-message {
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 0.73rem;
}

.alert-success {
    border-color: var(--green-200);
    color: var(--green-800);
    background: var(--green-50);
}

.alert-error {
    border-color: #f2caca;
    color: #913535;
    background: var(--danger-soft);
}

.button-block {
    width: 100%;
    justify-content: center;
}

.button-danger {
    color: #fff;
    background: var(--danger);
}

.confirm-overlay {
    position: fixed;
    z-index: 1400;
    inset: 0;
    padding: 20px;
    display: grid;
    place-items: center;
    background: rgba(7, 26, 17, 0.48);
    backdrop-filter: blur(4px);
}

.confirm-overlay[hidden] {
    display: none;
}

.confirm-dialog {
    width: min(430px, 100%);
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(7, 26, 17, 0.25);
}

.confirm-dialog h2 {
    margin: 17px 0 7px;
    font-size: 1.25rem;
}

.confirm-dialog p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.76rem;
}

.confirm-actions {
    justify-content: flex-end;
}

.confirm-actions form {
    margin: 0;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: min(980px, 100%);
}

.login-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.login-brand-panel,
.login-form-panel {
    min-height: 560px;
    padding: clamp(32px, 6vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand-panel {
    color: #fff;
    background: radial-gradient(circle at 100% 100%, rgba(98, 196, 139, 0.42), transparent 38%), linear-gradient(145deg, var(--green-950), var(--green-700));
}

.login-brand-mark {
    width: 64px;
    height: 64px;
    margin-bottom: 28px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 20px;
    background: rgba(255,255,255,.1);
}

.login-brand-mark svg {
    width: 38px;
}

.login-kicker {
    color: var(--green-400);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-brand-panel h1 {
    max-width: 420px;
    margin: 9px 0;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.login-brand-panel > p {
    color: rgba(255,255,255,.7);
}

.login-panel-note {
    max-width: 360px;
    margin-top: 54px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.65);
    font-size: 0.72rem;
}

.login-form-panel h2 {
    margin: 7px 0;
    font-size: 1.8rem;
    letter-spacing: -0.04em;
}

.login-form-panel > p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.75rem;
}

svg {
    display: block;
}

.app-frame {
    width: min(1440px, calc(100% - 48px));
    min-height: calc(100vh - 48px);
    margin: 24px auto;
    padding: 14px;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.app-sidebar {
    min-height: calc(100vh - 76px);
    padding: 18px 14px 14px;
    display: flex;
    flex-direction: column;
    border: 1px solid #eff2f0;
    border-radius: 22px;
    background: var(--surface-soft);
}

.sidebar-brand {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--green-700);
    background: var(--green-100);
}

.brand-mark svg {
    width: 24px;
    height: 24px;
}

.brand-link > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.brand-link strong {
    font-size: 0.96rem;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.brand-link small {
    margin-top: 1px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.67rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-close,
.sidebar-toggle {
    border: 0;
    color: var(--ink);
    background: transparent;
}

.sidebar-close {
    display: none;
    font-size: 1.7rem;
    line-height: 1;
}

.sidebar-nav {
    margin-top: 34px;
}

.nav-label {
    margin: 0 10px 10px;
    color: #9aa39e;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.nav-label-spaced {
    margin-top: 29px;
}

.nav-entry {
    position: relative;
    min-height: 44px;
    margin: 3px 0;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-radius: 12px;
    color: #808b85;
    font-size: 0.88rem;
    font-weight: 530;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-entry::before {
    position: absolute;
    left: -15px;
    width: 5px;
    height: 0;
    border-radius: 0 6px 6px 0;
    background: var(--green-600);
    content: "";
    transition: height 160ms ease;
}

.nav-entry:hover:not(.disabled) {
    color: var(--green-800);
    background: #edf5f0;
    transform: translateX(2px);
}

.nav-entry.active {
    color: var(--ink);
    background: #edf5f0;
    font-weight: 700;
}

.nav-entry.active::before {
    height: 34px;
}

.nav-entry.disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

.nav-entry.active .nav-icon {
    color: var(--green-600);
}

.nav-badge {
    margin-left: auto;
    padding: 3px 6px;
    border-radius: 6px;
    color: var(--green-800);
    background: var(--green-100);
    font-size: 0.59rem;
    font-weight: 800;
}

.sidebar-backdrop {
    display: none;
}

.app-workspace {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: 72px;
    padding: 10px 14px 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #f0f2f1;
    border-radius: 20px;
    background: var(--surface-soft);
}

.topbar-start,
.topbar-actions {
    display: flex;
    align-items: center;
}

.topbar-start {
    min-width: 0;
    flex: 1;
    gap: 10px;
}

.sidebar-toggle {
    width: 42px;
    height: 42px;
    display: none;
    place-items: center;
    border-radius: 12px;
    background: var(--surface);
}

.sidebar-toggle svg {
    width: 22px;
    height: 22px;
}

.search-shell {
    width: min(430px, 100%);
    height: 44px;
    padding: 0 8px 0 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #eef1ef;
    border-radius: 14px;
    background: #fff;
}

.search-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--ink);
}

.search-icon svg {
    width: 100%;
    height: 100%;
}

.search-shell input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 0.8rem;
}

.search-shell input::placeholder {
    color: #abb2ae;
}

.search-shortcut {
    padding: 5px 8px;
    border-radius: 8px;
    color: var(--muted-dark);
    background: #f2f4f3;
    font-size: 0.65rem;
    font-weight: 700;
}

.topbar-actions {
    gap: 9px;
}

.icon-action {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid #eef1ef;
    border-radius: 50%;
    color: var(--ink);
    background: #fff;
    transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-action:hover:not(:disabled) {
    border-color: var(--green-200);
    color: var(--green-700);
    transform: translateY(-1px);
}

.icon-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.icon-action svg {
    width: 19px;
    height: 19px;
}

.system-identity {
    min-width: 195px;
    height: 50px;
    margin-left: 3px;
    padding: 5px 9px 5px 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 15px;
    background: #fff;
}

.identity-avatar {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    display: grid;
    place-items: center;
    border: 3px solid #f1ded9;
    border-radius: 50%;
    color: #23342c;
    background: #e6bdaf;
    font-size: 0.69rem;
    font-weight: 800;
}

.identity-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.identity-copy strong {
    overflow: hidden;
    font-size: 0.78rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.identity-copy small {
    overflow: hidden;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.66rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.page-content {
    min-height: 0;
    flex: 1;
    padding: 24px 15px 12px;
}

.page-heading {
    margin-bottom: 17px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.eyebrow,
.panel-kicker {
    display: block;
    color: var(--green-600);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.page-heading h1 {
    margin: 4px 0 3px;
    font-size: clamp(1.9rem, 3.2vw, 2.55rem);
    font-weight: 700;
    letter-spacing: -0.055em;
}

.page-heading p {
    max-width: 670px;
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button {
    min-height: 43px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button svg {
    width: 18px;
    height: 18px;
}

.button-primary {
    color: #fff;
    background: var(--green-700);
    box-shadow: 0 9px 20px rgba(23, 106, 71, 0.16);
}

.button-primary:hover {
    color: #fff;
    background: var(--green-800);
    transform: translateY(-1px);
}

.button-secondary {
    border-color: var(--green-800);
    color: var(--green-900);
    background: #fff;
}

.button-secondary:hover {
    color: var(--green-900);
    background: var(--green-50);
    transform: translateY(-1px);
}

.button-static {
    cursor: default;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.metric-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-card {
    min-height: 134px;
    padding: 17px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #edf0ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--panel-shadow);
}

.metric-card-link {
    color: var(--ink);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-card-link:hover {
    color: var(--ink);
    border-color: var(--green-200);
    box-shadow: 0 16px 34px rgba(18, 93, 63, 0.12);
    transform: translateY(-2px);
}

.metric-card-link.metric-card-featured,
.metric-card-link.metric-card-featured:hover {
    color: #fff;
}

.metric-card-featured {
    position: relative;
    overflow: hidden;
    border-color: transparent;
    color: #fff;
    background:
        radial-gradient(circle at 92% 118%, rgba(101, 204, 142, 0.52), transparent 38%),
        linear-gradient(145deg, #0d5c3d 0%, #1f7a4e 68%, #42ae73 100%);
    box-shadow: 0 14px 34px rgba(20, 108, 70, 0.18);
}

.metric-card-featured::after {
    position: absolute;
    right: -28px;
    bottom: -42px;
    width: 136px;
    height: 136px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.035), 0 0 0 29px rgba(255, 255, 255, 0.02);
    content: "";
}

.metric-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.77rem;
    font-weight: 650;
}

.metric-arrow {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #dae0dc;
    border-radius: 50%;
}

.metric-card-featured .metric-arrow {
    border-color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.95);
    color: var(--green-900);
}

.metric-arrow svg {
    width: 16px;
    height: 16px;
}

.metric-card > strong {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    font-size: clamp(1.55rem, 2.8vw, 2.25rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.055em;
}

.metric-card > small {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.64rem;
}

.metric-card-featured > small {
    color: #bfe8cd;
}

.report-filter-panel {
    margin-bottom: 14px;
}

.report-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.report-filter-grid label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 650;
}

.report-filter-grid input,
.report-filter-grid select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-weight: 500;
}

.report-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
}

.report-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.report-active-filters span,
.report-readonly-label {
    padding: 6px 9px;
    border: 1px solid var(--green-200);
    border-radius: 999px;
    color: var(--green-900);
    background: var(--green-50);
    font-size: 0.64rem;
    font-weight: 650;
}

.report-table-panel {
    margin-top: 14px;
}

.report-table {
    min-width: 1120px;
}

.status-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-right: 4px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 50%;
    background: #9cecba;
}

.text-success-soft {
    color: var(--green-600) !important;
}

.text-warning-soft {
    color: var(--warning) !important;
}

.dashboard-grid {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

.dashboard-grid-main {
    grid-template-columns: minmax(0, 1.72fr) minmax(270px, 0.72fr);
}

.dashboard-grid-bottom {
    grid-template-columns: minmax(0, 1.3fr) minmax(330px, 0.8fr);
}

.panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid #edf0ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--panel-shadow);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.panel-heading.compact {
    margin-bottom: 15px;
}

.panel-heading h2 {
    margin: 3px 0 0;
    font-size: 1rem;
    font-weight: 740;
    letter-spacing: -0.025em;
}

.panel-status {
    padding: 6px 9px;
    border-radius: 8px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 0.62rem;
    font-weight: 700;
}

.foundation-bars {
    height: 190px;
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    align-items: end;
    gap: 12px;
}

.foundation-column {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.foundation-value {
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 700;
}

.foundation-bar {
    width: min(48px, 78%);
    height: var(--bar-height);
    min-height: 50px;
    display: block;
    border-radius: 22px;
    background: var(--green-600);
}

.foundation-bar.mint {
    background: var(--green-400);
}

.foundation-bar.dark {
    background: var(--green-900);
}

.foundation-bar.striped {
    border: 1px solid #dce4df;
    background:
        repeating-linear-gradient(135deg, #899b91 0 2px, transparent 2px 7px),
        #f8faf9;
}

.foundation-column small {
    color: var(--muted);
    font-size: 0.65rem;
}

.step-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.step-list li {
    position: relative;
    padding: 0 0 17px 40px;
    min-height: 50px;
}

.step-list li:not(:last-child)::after {
    position: absolute;
    left: 14px;
    top: 30px;
    width: 1px;
    height: calc(100% - 19px);
    background: #dce3df;
    content: "";
}

.step-number {
    position: absolute;
    left: 0;
    top: 1px;
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border: 1px solid #dfe5e1;
    border-radius: 50%;
    color: var(--muted-dark);
    background: #fff;
    font-size: 0.66rem;
    font-weight: 800;
}

.step-list li.done .step-number {
    border-color: var(--green-600);
    color: #fff;
    background: var(--green-600);
}

.step-list strong,
.step-list small {
    display: block;
}

.step-list strong {
    font-size: 0.78rem;
}

.step-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.66rem;
}

.text-link {
    color: var(--green-700);
    font-size: 0.68rem;
    font-weight: 750;
}

.text-link:hover {
    color: var(--green-900);
}

.runtime-list {
    margin-top: 15px;
}

.runtime-row {
    padding: 11px 0;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    border-top: 1px solid #f0f2f1;
}

.runtime-icon {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--green-700);
    background: var(--green-100);
}

.runtime-icon svg {
    width: 20px;
    height: 20px;
}

.runtime-row div {
    min-width: 0;
}

.runtime-row small,
.runtime-row strong {
    display: block;
}

.runtime-row small {
    color: var(--muted);
    font-size: 0.61rem;
}

.runtime-row strong {
    overflow: hidden;
    margin-top: 2px;
    font-size: 0.75rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.runtime-state {
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 0.57rem;
    font-weight: 750;
}

.runtime-state.success {
    color: var(--green-700);
    background: var(--green-100);
}

.runtime-state.neutral {
    color: #65716b;
    background: #f1f3f2;
}

.readiness-content {
    min-height: 180px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.readiness-ring {
    width: 146px;
    height: 146px;
    flex: 0 0 146px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--green-700) 0 82%, var(--green-100) 82% 100%);
}

.readiness-ring::before {
    position: absolute;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.readiness-ring {
    position: relative;
}

.readiness-ring > div {
    position: relative;
    z-index: 1;
    text-align: center;
}

.readiness-ring strong,
.readiness-ring small {
    display: block;
}

.readiness-ring strong {
    font-size: 1.75rem;
    font-weight: 650;
    letter-spacing: -0.055em;
}

.readiness-ring small {
    color: var(--muted);
    font-size: 0.63rem;
}

.readiness-copy strong {
    display: block;
    font-size: 0.88rem;
}

.readiness-copy p {
    margin: 7px 0 12px;
    color: var(--muted);
    font-size: 0.69rem;
}

.readiness-copy span {
    color: var(--muted-dark);
    font-size: 0.62rem;
}

.readiness-copy i {
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--green-500);
}

.database-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 12px;
}

.database-status-card {
    min-height: 410px;
    padding: 35px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 94% 110%, rgba(98, 196, 139, 0.48), transparent 39%),
        linear-gradient(145deg, #082c1d 0%, #0f5a3c 62%, #27845a 100%);
    box-shadow: 0 18px 40px rgba(14, 87, 57, 0.2);
}

.database-status-card.is-disconnected {
    background:
        radial-gradient(circle at 94% 110%, rgba(255, 194, 117, 0.28), transparent 39%),
        linear-gradient(145deg, #392b13 0%, #72511c 62%, #a37523 100%);
}

.database-status-icon {
    width: 68px;
    height: 68px;
    margin-bottom: 24px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.11);
}

.database-status-icon svg {
    width: 38px;
    height: 38px;
}

.database-status-card .panel-kicker {
    color: rgba(255, 255, 255, 0.62);
}

.database-status-card h2 {
    margin: 6px 0 8px;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    letter-spacing: -0.045em;
}

.database-status-card p {
    max-width: 540px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
}

.connection-pill {
    margin-top: 24px;
    padding: 8px 11px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.65rem;
    font-weight: 700;
}

.connection-pill i {
    width: 7px;
    height: 7px;
    display: inline-block;
    margin-right: 6px;
    border-radius: 50%;
    background: #83e4aa;
}

.is-disconnected .connection-pill i {
    background: #ffd59a;
}

.database-side-stack {
    display: grid;
    gap: 12px;
}

.detail-list {
    margin: 0;
}

.detail-list > div {
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid #eef1ef;
}

.detail-list dt,
.detail-list dd {
    margin: 0;
    font-size: 0.72rem;
}

.detail-list dt {
    color: var(--muted);
    font-weight: 550;
}

.detail-list dd {
    text-align: right;
    font-weight: 700;
}

.compact-checklist {
    margin: 0;
    padding-left: 19px;
    color: var(--muted-dark);
    font-size: 0.7rem;
}

.compact-checklist li {
    padding: 4px 0 4px 4px;
}

.error-state {
    min-height: min(640px, calc(100vh - 190px));
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-code {
    position: absolute;
    color: #f0f3f1;
    font-size: clamp(7rem, 18vw, 13rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.08em;
    user-select: none;
}

.error-icon,
.error-state .eyebrow,
.error-state h1,
.error-state p,
.error-state .button,
.debug-details {
    position: relative;
    z-index: 1;
}

.error-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: var(--green-700);
    background: var(--green-100);
}

.error-icon-danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.error-icon svg {
    width: 36px;
    height: 36px;
}

.error-state h1 {
    margin: 7px 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: -0.05em;
}

.error-state > p {
    max-width: 540px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.8rem;
}

.debug-details {
    width: min(760px, 100%);
    margin-bottom: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    text-align: left;
}

.debug-details summary {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
}

.debug-details > div {
    padding: 0 15px 15px;
}

.debug-details p {
    margin: 5px 0;
    font-size: 0.68rem;
}

.debug-details pre {
    max-height: 260px;
    overflow: auto;
    margin: 10px 0 0;
    padding: 12px;
    border-radius: 10px;
    color: #dfe8e3;
    background: #12231b;
    font-size: 0.63rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.app-footer {
    min-height: 45px;
    padding: 8px 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #99a19d;
    font-size: 0.61rem;
}

:focus-visible {
    outline: 3px solid rgba(58, 166, 111, 0.28);
    outline-offset: 2px;
}

@media (max-width: 1160px) {
    .report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid-main,
    .dashboard-grid-bottom {
        grid-template-columns: 1fr;
    }

    .next-step-panel {
        min-height: auto;
    }

    .step-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .step-list li {
        padding: 42px 8px 0 0;
    }

    .step-list li:not(:last-child)::after {
        left: 30px;
        top: 15px;
        width: calc(100% - 18px);
        height: 1px;
    }
}

@media (max-width: 940px) {
    .app-frame {
        width: min(100% - 24px, 1180px);
        min-height: calc(100vh - 24px);
        margin: 12px auto;
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        z-index: 1200;
        top: 12px;
        bottom: 12px;
        left: 12px;
        width: min(292px, calc(100vw - 42px));
        min-height: 0;
        transform: translateX(calc(-100% - 30px));
        box-shadow: 20px 0 55px rgba(16, 34, 25, 0.18);
        transition: transform 220ms ease;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 1190;
        inset: 0;
        background: rgba(8, 25, 16, 0.3);
        backdrop-filter: blur(4px);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .sidebar-toggle {
        display: grid;
    }
}

@media (max-width: 720px) {
    .app-frame {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 8px;
        border: 0;
        border-radius: 0;
    }

    .topbar {
        min-height: 64px;
        padding: 8px;
    }

    .search-shell {
        width: 100%;
    }

    .search-shortcut,
    .identity-copy,
    .topbar-actions .icon-action:disabled {
        display: none;
    }

    .system-identity {
        min-width: auto;
        width: 46px;
        height: 46px;
        padding: 3px;
        justify-content: center;
    }

    .page-content {
        padding: 20px 6px 8px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .heading-actions {
        width: 100%;
    }

    .heading-actions .button {
        flex: 1;
    }

    .metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    .report-filter-grid {
        grid-template-columns: 1fr;
    }

    .report-filter-actions {
        flex-direction: column;
    }

    .report-filter-actions .button {
        width: 100%;
    }

    .metric-card {
        min-height: 126px;
        padding: 14px;
    }

    .foundation-bars {
        overflow-x: auto;
        grid-template-columns: repeat(7, 65px);
        justify-content: start;
        scrollbar-width: thin;
    }

    .step-list {
        display: block;
    }

    .step-list li {
        padding: 0 0 17px 40px;
    }

    .step-list li:not(:last-child)::after {
        left: 14px;
        top: 30px;
        width: 1px;
        height: calc(100% - 19px);
    }

    .readiness-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .database-layout {
        grid-template-columns: 1fr;
    }

    .database-status-card {
        min-height: 340px;
        padding: 26px;
    }

    .app-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .login-card {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 32px;
    }

    .login-form-panel {
        min-height: auto;
        padding: 32px;
    }

    .login-panel-note {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-full {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .search-shell {
        display: none;
    }

    .topbar-start {
        flex: 0;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 118px;
    }

    .panel {
        padding: 15px;
    }

    .page-heading h1 {
        font-size: 2rem;
    }

    .heading-actions {
        flex-direction: column;
    }

    .heading-actions .button {
        width: 100%;
    }

    .readiness-ring {
        width: 132px;
        height: 132px;
        flex-basis: 132px;
    }

    .readiness-ring::before {
        width: 94px;
        height: 94px;
    }

    .auth-page {
        padding: 0;
    }

    .login-card {
        min-height: 100vh;
        border-radius: 0;
    }

    .login-brand-panel,
    .login-form-panel {
        padding: 26px 22px;
    }

    .form-actions,
    .confirm-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions .button,
    .confirm-actions .button,
    .confirm-actions form {
        width: 100%;
    }
}

/* Detail tiket dan timeline Pegawai */
.ticket-detail-alert {
    margin-bottom: 16px;
}

.ticket-detail-hero {
    padding: 24px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-radius: 19px;
    color: #fff;
    background: linear-gradient(135deg, var(--green-900), var(--green-600));
    box-shadow: var(--shadow-soft);
}

.ticket-detail-overline {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ticket-detail-hero h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.08rem, 2vw, 1.48rem);
}

.ticket-detail-hero p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.7rem;
}

.ticket-detail-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.ticket-detail-hero .status-badge {
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    background: rgba(255, 255, 255, 0.13);
}

.ticket-detail-layout {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(250px, 0.72fr);
    align-items: start;
    gap: 18px;
}

.ticket-detail-main,
.ticket-detail-sidebar {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.ticket-detail-panel {
    padding: 22px;
}

.ticket-detail-panel .panel-heading {
    margin-bottom: 17px;
}

.ticket-detail-list,
.ticket-detail-list div,
.ticket-detail-list dt,
.ticket-detail-list dd {
    margin: 0;
}

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

.ticket-detail-list > div {
    padding: 13px 14px;
    border: 1px solid #edf1ef;
    border-radius: 12px;
    background: var(--surface-soft);
}

.ticket-detail-list .ticket-detail-wide {
    grid-column: 1 / -1;
}

.ticket-detail-list dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.59rem;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.ticket-detail-list dd {
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 650;
}

.ticket-detail-list .ticket-description {
    color: var(--muted-dark);
    font-weight: 500;
    line-height: 1.7;
}

.ticket-photo-heading {
    align-items: flex-end;
}

.attachment-count {
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 700;
}

.ticket-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 13px;
}

.ticket-photo-card {
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: inherit;
    background: #fff;
    text-align: left;
    cursor: zoom-in;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ticket-photo-card:hover,
.ticket-photo-card:focus-visible {
    border-color: var(--green-400);
    box-shadow: 0 8px 22px rgba(20, 77, 52, 0.1);
    transform: translateY(-2px);
}

.ticket-photo-card > img {
    width: 100%;
    height: 150px;
    display: block;
    object-fit: cover;
    background: #eef2f0;
}

.ticket-photo-copy {
    padding: 10px 11px;
    display: block;
}

.ticket-photo-copy strong,
.ticket-photo-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-photo-copy strong {
    color: var(--ink);
    font-size: 0.66rem;
}

.ticket-photo-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.58rem;
}

.ticket-inline-empty {
    padding: 24px;
    border: 1px dashed #ccd8d1;
    border-radius: 12px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 0.7rem;
    text-align: center;
}

.ticket-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ticket-timeline > li {
    position: relative;
    padding: 0 0 21px 30px;
}

.ticket-timeline > li:last-child {
    padding-bottom: 0;
}

.ticket-timeline > li::before {
    position: absolute;
    top: 13px;
    bottom: -3px;
    left: 8px;
    width: 2px;
    background: #dce8e1;
    content: "";
}

.ticket-timeline > li:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    top: 4px;
    left: 2px;
    width: 14px;
    height: 14px;
    border: 3px solid var(--green-100);
    border-radius: 50%;
    background: var(--green-600);
}

.ticket-timeline article {
    padding: 14px 15px;
    border: 1px solid #edf1ef;
    border-radius: 13px;
    background: var(--surface-soft);
}

.timeline-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.timeline-topline > strong {
    color: var(--ink);
    font-size: 0.72rem;
}

.ticket-timeline p,
.ticket-timeline time {
    color: var(--muted);
    font-size: 0.61rem;
}

.ticket-timeline p {
    margin: 6px 0 0;
}

.ticket-timeline time {
    margin-top: 8px;
    display: block;
}

.ticket-timeline blockquote {
    margin: 10px 0 0;
    padding: 9px 11px;
    border-left: 3px solid var(--green-400);
    color: var(--muted-dark);
    background: #fff;
    font-size: 0.66rem;
}

.ticket-status-panel,
.ticket-sla-panel,
.ticket-action-panel {
    padding: 19px;
}

.status-badge-large {
    margin-top: 12px;
    padding: 7px 10px;
    font-size: 0.64rem;
}

.ticket-status-panel p,
.ticket-sla-panel p,
.ticket-action-panel p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.65rem;
    line-height: 1.6;
}

.ticket-sla-panel > strong,
.ticket-action-panel > strong {
    margin-top: 10px;
    display: block;
    color: var(--ink);
    font-size: 0.79rem;
}

.ticket-action-panel {
    border-color: var(--green-200);
    background: var(--green-50);
}

.ticket-meta-panel {
    padding: 0 4px;
}

.ticket-meta-panel dl,
.ticket-meta-panel div,
.ticket-meta-panel dt,
.ticket-meta-panel dd {
    margin: 0;
}

.ticket-meta-panel div {
    padding: 9px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.ticket-meta-panel dt,
.ticket-meta-panel dd {
    color: var(--muted);
    font-size: 0.59rem;
}

.ticket-meta-panel dd {
    color: var(--muted-dark);
    text-align: right;
}

.ticket-detail-link {
    color: var(--green-700);
    font-size: 0.64rem;
    font-weight: 800;
    white-space: nowrap;
}

.ticket-detail-link:hover {
    color: var(--green-900);
    text-decoration: underline;
}

.ticket-filter-form.tu-queue-filter {
    grid-template-columns: minmax(220px, 1.45fr) repeat(3, minmax(135px, 0.62fr)) auto;
}

.ticket-filter-form.leader-queue-filter {
    grid-template-columns: minmax(220px, 1.45fr) repeat(3, minmax(135px, 0.62fr)) auto;
}

.tu-queue-table {
    min-width: 930px;
}

.leader-queue-table {
    min-width: 900px;
}

.leader-attention-row td:first-child {
    box-shadow: inset 3px 0 0 var(--warning);
}

.leader-attention-card {
    border-color: #e8cc8e;
    box-shadow: inset 3px 0 0 var(--warning);
}

.leader-submission-note-panel blockquote {
    margin: 12px 0 0;
    padding: 11px 12px;
    border-left: 3px solid var(--green-500);
    color: var(--muted-dark);
    background: var(--green-50);
    font-size: 0.68rem;
    line-height: 1.65;
}

.leader-submission-note-panel small,
.leader-submission-note-panel > p {
    margin-top: 10px;
    display: block;
    color: var(--muted);
    font-size: 0.61rem;
    line-height: 1.55;
}

.leader-decision-note {
    margin: 12px 0 0;
    padding: 10px 11px;
    border-left: 3px solid var(--green-500);
    color: var(--muted-dark);
    background: #fff;
    font-size: 0.66rem;
    line-height: 1.65;
}

.leader-decision-actions .button {
    width: 100%;
}

.inspection-result-panel {
    padding: 19px;
    border-color: var(--green-200);
    background: var(--green-50);
}

.inspection-result-panel > strong {
    margin-top: 10px;
    display: block;
    color: var(--ink);
    font-size: 0.79rem;
}

.inspection-result-panel > p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.65rem;
    line-height: 1.6;
}

.verification-summary-panel,
.leader-submission-form-panel {
    display: grid;
    gap: 14px;
}

.verification-summary-panel > p,
.leader-submission-form-panel > p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.leader-submission-form-panel h2 {
    margin: 0;
    font-size: 20px;
}

.submission-confirmation {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.55;
    cursor: pointer;
}

.submission-confirmation input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--green-700);
}

.submission-confirmation-error {
    display: block;
    margin-top: -4px;
}

.leader-submit-button {
    width: 100%;
}

.inspection-placeholder-actions {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.inspection-placeholder-actions .button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

body.inspection-modal-open {
    overflow: hidden;
}

.inspection-dialog {
    width: min(560px, 100%);
}

.inspection-dialog .panel-kicker {
    display: block;
}

.inspection-form {
    display: grid;
    gap: 18px;
}

.inspection-form .form-group textarea {
    width: 100%;
    min-height: 135px;
    padding: 11px 12px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted-dark);
    background: #fff;
    font: inherit;
    font-size: 0.75rem;
}

.inspection-form .form-group textarea:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(35, 135, 91, 0.12);
    outline: none;
}

.inspection-overlay .confirm-actions {
    margin-top: 0;
}

.ticket-revision-link {
    margin-top: 14px;
}

.revision-note-panel {
    margin-bottom: 18px;
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-color: #f0dbab;
    background: var(--warning-soft);
}

.revision-note-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: var(--warning);
    font-size: 0.88rem;
    font-weight: 850;
}

.revision-note-panel h2 {
    margin: 4px 0 8px;
    font-size: 0.92rem;
}

.revision-note-panel blockquote,
.revision-note-panel p {
    margin: 0;
    color: var(--muted-dark);
    font-size: 0.71rem;
    line-height: 1.65;
}

.revision-note-panel small {
    margin-top: 9px;
    display: block;
    color: var(--muted);
    font-size: 0.61rem;
}

.revision-existing-gallery {
    margin-bottom: 2px;
}

@media (max-width: 480px) {
    .revision-note-panel {
        padding: 17px;
        flex-direction: column;
    }
}

.mobile-detail-link {
    margin-top: 12px;
    display: inline-block;
}

body.photo-modal-open {
    overflow: hidden;
}

.ticket-photo-modal {
    position: fixed;
    z-index: 120;
    inset: 0;
    padding: 22px;
    display: grid;
    place-items: center;
    background: rgba(4, 24, 16, 0.76);
}

.ticket-photo-modal[hidden] {
    display: none;
}

.ticket-photo-modal > section {
    width: min(900px, 100%);
    max-height: calc(100vh - 44px);
    overflow: hidden;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.ticket-photo-modal header {
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}

.ticket-photo-modal h2 {
    margin: 0;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-photo-modal header button {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 0;
    border-radius: 10px;
    color: var(--muted-dark);
    background: var(--surface-soft);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.ticket-photo-modal section > div {
    max-height: calc(100vh - 105px);
    overflow: auto;
    background: #122019;
}

.ticket-photo-modal img {
    width: 100%;
    min-height: 220px;
    max-height: calc(100vh - 105px);
    display: block;
    object-fit: contain;
}

@media (max-width: 980px) {
    .ticket-detail-layout {
        grid-template-columns: 1fr;
    }

    .ticket-detail-sidebar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ticket-meta-panel {
        grid-column: 1 / -1;
    }

    .ticket-filter-form.tu-queue-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ticket-filter-form.leader-queue-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ticket-detail-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-detail-badges {
        justify-content: flex-start;
    }

    .ticket-detail-list,
    .ticket-detail-sidebar {
        grid-template-columns: 1fr;
    }

    .ticket-detail-list .ticket-detail-wide,
    .ticket-meta-panel {
        grid-column: auto;
    }

    .timeline-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-filter-form.tu-queue-filter {
        grid-template-columns: 1fr;
    }

    .ticket-filter-form.leader-queue-filter {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ticket-detail-hero,
    .ticket-detail-panel {
        padding: 17px;
    }

    .ticket-photo-gallery {
        grid-template-columns: 1fr;
    }

    .ticket-photo-card > img {
        height: 190px;
    }

    .ticket-photo-modal {
        padding: 10px;
    }

    .ticket-photo-modal > section {
        max-height: calc(100vh - 20px);
    }
}

/* Form pengajuan tiket Pegawai */
.ticket-form-alert {
    margin-bottom: 18px;
}

.ticket-create-form {
    display: grid;
    gap: 18px;
}

.ticket-form-section {
    padding: 22px;
}

.ticket-form-section .panel-heading {
    margin-bottom: 20px;
}

.ticket-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.ticket-form-full {
    grid-column: 1 / -1;
}

.ticket-create-form .form-group select,
.ticket-create-form .form-group textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted-dark);
    background: #fff;
    font: inherit;
    font-size: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ticket-create-form .form-group select {
    min-height: 43px;
    padding: 0 12px;
}

.ticket-create-form .form-group textarea {
    min-height: 125px;
    padding: 11px 12px;
    resize: vertical;
}

.ticket-create-form .form-group select:focus,
.ticket-create-form .form-group textarea:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(35, 135, 91, 0.12);
}

.required-mark {
    color: var(--danger);
}

.optional-label {
    margin-left: 5px;
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 600;
}

.field-help,
.field-error {
    display: block;
    margin-top: 6px;
    font-size: 0.64rem;
}

.field-help {
    color: var(--muted);
}

.field-error {
    color: var(--danger);
    font-weight: 700;
}

.photo-upload-zone {
    padding: 25px;
    border: 1.5px dashed #a8c8b7;
    border-radius: 15px;
    text-align: center;
    background: #f8fbf9;
}

.photo-upload-icon {
    width: 49px;
    height: 49px;
    margin: 0 auto 11px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--green-700);
    background: var(--green-100);
}

.photo-upload-icon svg {
    width: 27px;
    height: 27px;
}

.photo-upload-zone label {
    display: block;
    color: var(--muted-dark);
    font-size: 0.78rem;
    font-weight: 750;
}

.photo-upload-zone p {
    margin: 5px 0 13px;
    color: var(--muted);
    font-size: 0.66rem;
}

.photo-upload-zone input[type="file"] {
    width: min(100%, 450px);
    color: var(--muted);
    font-size: 0.68rem;
}

.photo-upload-zone input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--green-700);
    font-weight: 700;
    cursor: pointer;
}

.photo-preview-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
}

.photo-preview-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.photo-preview-card img {
    width: 100%;
    height: 112px;
    display: block;
    object-fit: cover;
    background: #eef2f0;
}

.photo-preview-card span {
    padding: 8px 9px;
    display: block;
    overflow: hidden;
    color: var(--muted-dark);
    font-size: 0.61rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-preview-message {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--danger);
    font-size: 0.68rem;
    font-weight: 700;
}

.photo-reselect-note {
    margin-top: 10px;
}

.ticket-submit-bar {
    padding: 17px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.ticket-submit-bar strong {
    display: block;
    color: var(--muted-dark);
    font-size: 0.75rem;
}

.ticket-submit-bar p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.64rem;
}

.ticket-submit-bar .button {
    flex: 0 0 auto;
}

@media (max-width: 720px) {
    .ticket-form-grid {
        grid-template-columns: 1fr;
    }

    .ticket-form-full {
        grid-column: auto;
    }

    .ticket-form-section {
        padding: 17px;
    }

    .ticket-submit-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .ticket-submit-bar .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.text-capitalize {
    text-transform: capitalize;
}

.error-state {
    position: relative;
}

.button-disabled {
    cursor: not-allowed;
    opacity: 0.68;
}

.button-disabled small {
    margin-left: 5px;
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.55rem;
    text-transform: uppercase;
}

.ticket-overview-panel,
.ticket-list-panel {
    margin-top: 12px;
}

.ticket-filter-panel {
    margin-bottom: 12px;
}

.ticket-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) auto;
    align-items: end;
    gap: 12px;
}

.ticket-filter-form > div {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.ticket-filter-form label {
    color: var(--muted-dark);
    font-size: 0.67rem;
    font-weight: 750;
}

.ticket-filter-form input,
.ticket-filter-form select {
    width: 100%;
    min-height: 43px;
    padding: 8px 11px;
    border: 1px solid #dfe5e1;
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
    font-size: 0.74rem;
}

.ticket-filter-form input:focus,
.ticket-filter-form select:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(58, 166, 111, 0.12);
    outline: 0;
}

.filter-actions {
    grid-auto-flow: column;
}

.ticket-list-heading {
    align-items: flex-end;
}

.list-range {
    color: var(--muted);
    font-size: 0.68rem;
}

.ticket-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ticket-table {
    width: 100%;
    min-width: 790px;
    border-collapse: collapse;
}

.ticket-table th {
    padding: 11px 12px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.ticket-table th:first-child {
    border-radius: 10px 0 0 10px;
}

.ticket-table th:last-child {
    border-radius: 0 10px 10px 0;
}

.ticket-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf1ee;
    color: var(--muted-dark);
    font-size: 0.69rem;
    vertical-align: middle;
}

.ticket-table tbody tr:last-child td {
    border-bottom: 0;
}

.ticket-table td strong,
.ticket-table td span:not(.status-badge),
.ticket-table td small {
    display: block;
}

.ticket-table td strong {
    color: var(--ink);
    font-size: 0.72rem;
}

.ticket-table td small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.61rem;
}

.ticket-main-cell {
    min-width: 220px;
}

.ticket-main-cell > span {
    margin-top: 4px;
    color: var(--ink);
    font-size: 0.7rem;
}

.status-badge {
    width: fit-content;
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.59rem;
    font-weight: 760;
    white-space: nowrap;
}

.status-badge::before {
    width: 6px;
    height: 6px;
    margin-right: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.tone-neutral {
    border-color: #dfe5e1;
    color: #65716b;
    background: #f3f5f4;
}

.tone-success {
    border-color: var(--green-200);
    color: var(--green-700);
    background: var(--green-100);
}

.tone-warning {
    border-color: #f0dbab;
    color: var(--warning);
    background: var(--warning-soft);
}

.tone-danger {
    border-color: #f1cbcb;
    color: var(--danger);
    background: var(--danger-soft);
}

.tone-info {
    border-color: #cbded4;
    color: var(--green-800);
    background: #edf6f1;
}

.ticket-empty-state {
    min-height: 310px;
    padding: 35px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ticket-empty-state.compact-empty-state {
    min-height: 180px;
    flex-direction: row;
    gap: 14px;
    text-align: left;
}

.empty-state-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--green-700);
    background: var(--green-100);
}

.empty-state-icon svg {
    width: 31px;
    height: 31px;
}

.ticket-empty-state strong {
    margin-top: 14px;
    font-size: 0.92rem;
}

.compact-empty-state strong {
    margin-top: 0;
}

.ticket-empty-state p {
    max-width: 410px;
    margin: 6px 0 15px;
    color: var(--muted);
    font-size: 0.72rem;
}

.ticket-mobile-list {
    display: none;
}

.ticket-mobile-card {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.ticket-mobile-card + .ticket-mobile-card {
    margin-top: 10px;
}

.mobile-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mobile-card-top > strong {
    font-size: 0.73rem;
}

.ticket-mobile-card h3 {
    margin: 13px 0 4px;
    font-size: 0.86rem;
}

.ticket-mobile-card > p {
    margin: 0 0 13px;
    color: var(--muted);
    font-size: 0.68rem;
}

.ticket-mobile-card dl,
.ticket-mobile-card dl div,
.ticket-mobile-card dt,
.ticket-mobile-card dd {
    margin: 0;
}

.ticket-mobile-card dl div {
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid #eef1ef;
}

.ticket-mobile-card dt {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
}

.ticket-mobile-card dd {
    color: var(--muted-dark);
    font-size: 0.65rem;
    text-align: right;
}

.ticket-mobile-card dd small {
    display: block;
    color: var(--muted);
}

.ticket-pagination {
    margin-top: 18px;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #eef1ef;
}

.ticket-pagination a,
.ticket-pagination span,
.ticket-pagination strong {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.65rem;
}

.ticket-pagination a {
    color: var(--green-800);
    background: var(--green-100);
    font-weight: 750;
}

.ticket-pagination span {
    color: #a4aca8;
    background: #f3f5f4;
}

.ticket-pagination strong {
    color: var(--muted-dark);
}

@media (max-width: 980px) {
    .ticket-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .filter-search-group,
    .filter-actions {
        grid-column: 1 / -1;
    }

    .filter-actions {
        justify-content: start;
    }
}

@media (max-width: 720px) {
    .ticket-filter-form {
        grid-template-columns: 1fr;
    }

    .filter-search-group,
    .filter-actions {
        grid-column: auto;
    }

    .ticket-desktop-list {
        display: none;
    }

    .ticket-mobile-list {
        display: block;
    }

    .ticket-empty-state.compact-empty-state {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .filter-actions {
        grid-auto-flow: row;
    }

    .filter-actions .button {
        width: 100%;
    }

    .ticket-list-heading {
        align-items: flex-start;
    }

    .ticket-pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Pusat notifikasi */
.notification-dropdown-wrap,
.notification-bell {
    position: relative;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border: 2px solid var(--surface);
    border-radius: 999px;
    color: #fff;
    background: var(--danger);
    font-size: 0.58rem;
    font-weight: 800;
}

.notification-dropdown {
    width: min(390px, calc(100vw - 24px));
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(24, 44, 35, 0.16);
}

.notification-dropdown-heading,
.notification-dropdown-footer {
    padding: 14px 16px;
}

.notification-dropdown-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
}

.notification-dropdown-heading div,
.notification-dropdown-empty,
.notification-dropdown-item > span:last-child {
    display: grid;
    gap: 2px;
}

.notification-dropdown-heading small,
.notification-dropdown-item small,
.notification-dropdown-empty small {
    color: var(--muted);
    font-size: 0.66rem;
}

.notification-dropdown-heading button {
    padding: 0;
    border: 0;
    color: var(--green-700);
    background: transparent;
    font-size: 0.7rem;
    font-weight: 750;
}

.notification-dropdown-list {
    max-height: 360px;
    overflow-y: auto;
}

.notification-dropdown-list form + form {
    border-top: 1px solid var(--line);
}

.notification-dropdown-item {
    width: 100%;
    padding: 12px 15px;
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr);
    gap: 10px;
    border: 0;
    color: var(--ink);
    background: #fff;
    text-align: left;
}

.notification-dropdown-item:hover,
.notification-dropdown-item:focus-visible,
.notification-dropdown-item.is-unread {
    background: var(--green-50);
}

.notification-dropdown-item strong,
.notification-dropdown-item span span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-dropdown-item span span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--muted-dark);
    font-size: 0.72rem;
}

.notification-dropdown-empty {
    padding: 24px 16px;
    text-align: center;
}

.notification-dropdown-footer {
    display: block;
    border-top: 1px solid var(--line);
    color: var(--green-700);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 750;
}

.notification-state-marker {
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--muted);
}

.notification-state-marker.tone-info { background: var(--green-600); }
.notification-state-marker.tone-success { background: var(--green-500); }
.notification-state-marker.tone-warning { background: var(--warning); }
.notification-state-marker.tone-danger { background: var(--danger); }

.notification-list {
    display: grid;
}

.notification-list-item {
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--line);
}

.notification-list-item:first-child { border-top: 0; }
.notification-list-item.is-unread { background: var(--green-50); }

.notification-list-copy,
.notification-list-topline {
    display: flex;
}

.notification-list-copy {
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.notification-list-topline {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notification-list-copy p,
.notification-list-copy small { margin: 0; }
.notification-list-copy p { color: var(--muted-dark); font-size: 0.78rem; }
.notification-list-copy small { color: var(--muted); font-size: 0.68rem; }

@media (max-width: 640px) {
    .notification-list-item {
        grid-template-columns: 9px minmax(0, 1fr);
    }

    .notification-list-item form {
        grid-column: 2;
    }

    .notification-list-item form .button {
        width: 100%;
    }

    .notification-dropdown {
        position: fixed !important;
        top: 64px !important;
        right: 12px !important;
        left: 12px !important;
        width: auto;
        transform: none !important;
    }
}

/* Riwayat aset dan audit trail */
.asset-filter-grid,
.audit-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.audit-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.asset-filter-grid label,
.audit-filter-grid label { display: grid; gap: 7px; }
.asset-filter-grid label > span,
.audit-filter-grid label > span { color: var(--muted-dark); font-size: 0.74rem; font-weight: 750; }
.asset-filter-grid input,
.asset-filter-grid select,
.audit-filter-grid input,
.audit-filter-grid select {
    min-width: 0;
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
}

.asset-filter-grid .report-filter-actions,
.audit-filter-grid .report-filter-actions { grid-column: 1 / -1; }
.asset-history-hero,
.audit-ticket-hero { margin-bottom: 18px; }
.asset-condition { display: grid; gap: 3px; text-align: right; }
.asset-condition small { color: var(--muted); font-size: 0.7rem; }
.asset-condition strong { font-size: 0.85rem; }
.issue-summary-panel { margin-bottom: 18px; }
.panel-empty-copy { margin: 0; padding: 0 18px 18px; color: var(--muted-dark); }
.issue-summary-list { display: flex; flex-wrap: wrap; gap: 9px; padding: 0 18px 18px; }
.issue-summary-list span { padding: 8px 11px; border: 1px solid var(--green-100); border-radius: 999px; background: var(--green-50); color: var(--green-800); font-size: 0.74rem; }
.issue-summary-list strong { margin-right: 4px; }
.table-action-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.report-asset-link { display: inline-block; margin-bottom: 3px; }

.audit-timeline { margin: 0; padding: 0 18px 20px 42px; list-style: none; }
.audit-event { position: relative; padding: 0 0 22px 25px; border-left: 2px solid var(--green-100); }
.audit-event:last-child { padding-bottom: 0; border-left-color: transparent; }
.audit-marker { position: absolute; top: 3px; left: -8px; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 1px var(--line); }
.audit-marker.tone-success { background: var(--green-500); }
.audit-marker.tone-info { background: var(--green-600); }
.audit-marker.tone-warning { background: var(--warning); }
.audit-marker.tone-danger { background: var(--danger); }
.audit-event article { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.audit-event-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.audit-event-heading > div { display: grid; gap: 2px; }
.audit-event-heading small,
.audit-event-heading time { color: var(--muted); font-size: 0.69rem; }
.audit-event-heading time { white-space: nowrap; }
.audit-transition { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 12px 0 9px; font-size: 0.75rem; }
.audit-transition > span:first-child { color: var(--muted-dark); }
.audit-event p { margin: 0; color: var(--muted-dark); font-size: 0.78rem; line-height: 1.65; }

@media (max-width: 900px) {
    .audit-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .asset-filter-grid,
    .audit-filter-grid { grid-template-columns: 1fr; }
    .asset-condition { text-align: left; }
    .audit-timeline { padding-left: 27px; }
    .audit-event { padding-left: 18px; }
    .audit-event-heading { display: grid; }
    .audit-event-heading time { white-space: normal; }
}
