:root {
    --paper: #f5efe8;
    --paper-strong: #fffaf4;
    --ink: #18212b;
    --ink-soft: #536172;
    --line: rgba(24, 33, 43, 0.12);
    --line-strong: rgba(24, 33, 43, 0.24);
    --accent: #9f342a;
    --accent-deep: #6d1d19;
    --accent-soft: rgba(159, 52, 42, 0.12);
    --gold: #bf8d4a;
    --shadow: 0 20px 60px rgba(62, 31, 17, 0.16);
    --success-soft: rgba(28, 101, 70, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --font-sans: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(191, 141, 74, 0.18), transparent 34%),
        radial-gradient(circle at 82% 12%, rgba(159, 52, 42, 0.16), transparent 28%),
        linear-gradient(135deg, #e9e0d4 0%, #f3ece4 44%, #e6ddcf 100%);
}

code {
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(24, 33, 43, 0.08);
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 0.92em;
}

.login-shell,
.admin-shell {
    position: relative;
    overflow-x: hidden;
}

.login-shell__ambient,
.admin-shell__backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(159, 52, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(159, 52, 42, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
}

.login-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    max-width: 1320px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px 32px;
    align-items: center;
}

.hero-panel {
    padding: 8px 8px 8px 0;
    animation: rise-in 0.55s ease-out both;
}

.hero-panel__surface {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 38px;
    background:
        radial-gradient(circle at top right, rgba(191, 141, 74, 0.18), transparent 28%),
        linear-gradient(145deg, #112535 0%, #183246 54%, #122635 100%);
    box-shadow: 0 32px 72px rgba(18, 38, 53, 0.24);
    color: #f8f4ee;
}

.hero-panel__surface::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.42;
    pointer-events: none;
}

.hero-panel__masthead,
.hero-panel__features,
.hero-panel__notice {
    position: relative;
    z-index: 1;
}

.hero-panel__masthead {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.hero-panel__tag {
    color: rgba(248, 244, 238, 0.82);
    font-size: 0.86rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-panel__separator {
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, rgba(191, 141, 74, 0.1), rgba(191, 141, 74, 0.88), rgba(191, 141, 74, 0.1));
}

.hero-panel__eyebrow,
.panel-card__eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    letter-spacing: 0.22em;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-panel__title,
.dashboard-hero__title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    line-height: 1.1;
}

.hero-panel__summary,
.dashboard-hero__summary,
.panel-card__desc {
    margin: 20px 0 0;
    max-width: 44rem;
    color: var(--ink-soft);
    font-size: 1.02rem;
    line-height: 1.8;
}

.hero-panel__eyebrow {
    color: #d9b483;
}

.hero-panel__title {
    position: relative;
    z-index: 1;
    max-width: 12ch;
    color: #fff9f2;
}

.hero-panel__summary {
    position: relative;
    z-index: 1;
    max-width: 48rem;
    color: rgba(248, 244, 238, 0.78);
}

.hero-panel__features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.hero-feature,
.panel-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-xl);
    background: rgba(255, 250, 244, 0.84);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-feature {
    padding: 18px 18px 20px;
    border-color: rgba(217, 180, 131, 0.2);
    background: rgba(255, 250, 244, 0.06);
    box-shadow: none;
}

.hero-feature__label {
    display: block;
    color: rgba(248, 244, 238, 0.7);
    font-size: 0.82rem;
}

.hero-feature__value {
    display: block;
    margin-top: 10px;
    color: #fff9f2;
    font-size: 1.12rem;
    line-height: 1.45;
}

.hero-panel__notice {
    margin-top: 30px;
    padding: 22px 24px;
    border: 1px solid rgba(217, 180, 131, 0.2);
    border-radius: 24px;
    background: rgba(255, 250, 244, 0.08);
}

.hero-panel__notice-title {
    margin: 0 0 12px;
    font-size: 1.08rem;
    color: #fff8f0;
}

.hero-panel__notice-list {
    margin: 0;
    padding-left: 1.1rem;
    color: rgba(248, 244, 238, 0.8);
    line-height: 1.85;
}

.login-panel {
    animation: rise-in 0.7s ease-out both;
}

.panel-card--elevated {
    padding: 28px;
}

.login-card {
    padding-top: 74px;
}

.login-card__crest {
    position: absolute;
    top: -20px;
    left: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 8px solid rgba(255, 250, 244, 0.78);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    box-shadow: 0 22px 40px rgba(109, 29, 25, 0.22);
    color: #fffaf5;
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.panel-card__title {
    margin: 0;
    font-size: 1.65rem;
}

.panel-card__header {
    margin-bottom: 20px;
}

.inline-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(159, 52, 42, 0.2);
    border-radius: var(--radius-md);
    background: rgba(159, 52, 42, 0.1);
    color: var(--accent-deep);
    line-height: 1.6;
}

.inline-alert--success {
    border-color: rgba(28, 101, 70, 0.18);
    background: rgba(28, 101, 70, 0.1);
    color: #17644f;
}

.inline-alert--neutral {
    border-color: rgba(24, 33, 43, 0.12);
    background: rgba(24, 33, 43, 0.06);
    color: var(--ink);
}

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

.field {
    display: grid;
    gap: 8px;
}

.field__label {
    font-size: 0.95rem;
    font-weight: 700;
}

.field__input {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field__input:focus {
    outline: none;
    border-color: rgba(159, 52, 42, 0.55);
    box-shadow: 0 0 0 4px rgba(159, 52, 42, 0.1);
    transform: translateY(-1px);
}

.field__textarea {
    width: 100%;
    min-height: 132px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field__textarea:focus {
    outline: none;
    border-color: rgba(159, 52, 42, 0.55);
    box-shadow: 0 0 0 4px rgba(159, 52, 42, 0.1);
    transform: translateY(-1px);
}

.primary-button,
.ghost-button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.primary-button {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    color: #fffaf7;
    box-shadow: 0 16px 36px rgba(109, 29, 25, 0.24);
}

.ghost-button {
    padding: 12px 18px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.58);
    color: var(--ink);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.primary-button[disabled],
.ghost-button[disabled] {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.login-card__helper {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.login-card__helper-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-card__helper-label {
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.login-card__helper-value {
    font-size: 0.98rem;
    line-height: 1.6;
}

.noscript-banner {
    position: fixed;
    inset: auto 16px 16px;
    z-index: 2;
    padding: 12px 16px;
    border-radius: 14px;
    background: #1f1f1f;
    color: #fff;
}

.admin-topbar {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 28px 32px 0;
    align-items: center;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fffaf7;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-mark__eyebrow {
    margin: 0 0 6px;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.brand-mark__title {
    margin: 0;
    font-size: 1.4rem;
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-nav {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 16px 0 0;
    padding: 0 32px;
    flex-wrap: wrap;
}

.admin-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 250, 244, 0.72);
    box-shadow: 0 12px 28px rgba(47, 36, 22, 0.08);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.admin-nav__link:hover {
    transform: translateY(-1px);
    border-color: rgba(159, 52, 42, 0.28);
}

.admin-nav__link.is-active {
    border-color: rgba(159, 52, 42, 0.22);
    background: linear-gradient(135deg, rgba(159, 52, 42, 0.12), rgba(191, 141, 74, 0.18));
    color: var(--accent-deep);
}

.user-badge {
    display: grid;
    gap: 4px;
    min-width: 176px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    background: rgba(255, 250, 244, 0.82);
    box-shadow: 0 12px 28px rgba(47, 36, 22, 0.08);
}

.user-badge__name {
    font-weight: 700;
}

.user-badge__meta {
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.admin-main {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 32px 40px;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    animation: rise-in 0.45s ease-out both;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    animation: rise-in 0.45s ease-out both;
}

.page-hero__title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.15;
}

.page-hero__summary {
    margin: 18px 0 0;
    max-width: 44rem;
    color: var(--ink-soft);
    line-height: 1.8;
}

.dashboard-hero__title {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.dashboard-hero__status {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-end;
    gap: 10px;
    min-width: 240px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid rgba(28, 101, 70, 0.14);
    border-radius: 999px;
    background: var(--success-soft);
    color: #1c6546;
    font-size: 0.92rem;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-grid .panel-card {
    padding: 24px;
    animation: rise-in 0.6s ease-out both;
}

.info-grid {
    display: grid;
    gap: 14px;
    margin: 18px 0 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-row dt {
    color: var(--ink-soft);
}

.info-row dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}

.panel-card__header--spread {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.action-strip {
    margin-top: 22px;
}

.action-strip__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    min-width: min(420px, 100%);
}

.metric-card {
    padding: 18px 18px 20px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.54);
}

.metric-card--alert {
    border-color: rgba(159, 52, 42, 0.16);
    background: linear-gradient(135deg, rgba(159, 52, 42, 0.08), rgba(255, 255, 255, 0.72));
}

.metric-card__label {
    display: block;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.metric-card__value {
    display: block;
    margin-top: 10px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1;
}

.work-orders-toolbar,
.work-orders-panel {
    margin-top: 20px;
    padding: 24px;
    animation: rise-in 0.55s ease-out both;
}

.work-orders-toolbar__hint,
.work-orders-panel__summary {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.7;
}

.work-orders-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr) auto;
    gap: 16px;
    align-items: end;
}

.field--inline {
    gap: 10px;
}

.field__select {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field__select:focus {
    outline: none;
    border-color: rgba(159, 52, 42, 0.55);
    box-shadow: 0 0 0 4px rgba(159, 52, 42, 0.1);
    transform: translateY(-1px);
}

.work-orders-filters__actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.loading-card,
.work-orders-empty {
    margin-top: 18px;
    padding: 24px;
    border: 1px dashed rgba(24, 33, 43, 0.14);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.4);
    color: var(--ink-soft);
    text-align: center;
    line-height: 1.8;
}

.work-orders-empty__title {
    margin: 0;
    color: var(--ink);
    font-size: 1.2rem;
}

.work-orders-empty__summary {
    margin: 10px 0 0;
}

.table-shell {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.62);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(24, 33, 43, 0.1);
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}

.data-table tbody td {
    padding: 20px;
    border-top: 1px solid rgba(24, 33, 43, 0.08);
    vertical-align: top;
}

.data-table tbody tr:first-child td {
    border-top: 0;
}

.data-table tbody tr.is-overdue {
    background: linear-gradient(90deg, rgba(159, 52, 42, 0.06), rgba(255, 255, 255, 0.02));
}

.data-table tbody tr.is-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.data-table tbody tr.is-clickable:hover,
.data-table tbody tr.is-clickable:focus-visible {
    background: rgba(159, 52, 42, 0.05);
    box-shadow: inset 0 0 0 1px rgba(159, 52, 42, 0.12);
    outline: none;
}

.work-order-main {
    display: grid;
    gap: 10px;
}

.work-order-main__top {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.table-id {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(24, 33, 43, 0.08);
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 700;
}

.work-order-main__title {
    font-size: 1rem;
}

.work-order-main__content {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.75;
}

.table-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(24, 33, 43, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.table-chip--accent {
    border-color: rgba(159, 52, 42, 0.16);
    background: rgba(159, 52, 42, 0.1);
    color: var(--accent-deep);
}

.table-link {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(159, 52, 42, 0.1);
    color: var(--accent-deep);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.table-link:hover {
    transform: translateY(-1px);
    background: rgba(159, 52, 42, 0.16);
}

.citizen-card,
.status-stack,
.time-stack,
.reminder-stack {
    display: grid;
    gap: 8px;
}

.citizen-card__name {
    font-size: 1rem;
}

.citizen-card__phone,
.status-stack__meta,
.reminder-stack__meta,
.time-stack__item {
    color: var(--ink-soft);
    line-height: 1.6;
}

.status-badge,
.reminder-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    width: fit-content;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
}

.status-badge--pending {
    background: rgba(191, 141, 74, 0.18);
    color: #8b6225;
}

.status-badge--processing {
    background: rgba(42, 93, 159, 0.14);
    color: #1e4f91;
}

.status-badge--done {
    background: rgba(33, 112, 91, 0.14);
    color: #17644f;
}

.status-badge--completed {
    background: rgba(24, 33, 43, 0.12);
    color: #2a3846;
}

.status-badge--archived {
    background: rgba(89, 96, 104, 0.16);
    color: #4d535a;
}

.status-badge--cancelled {
    background: rgba(159, 52, 42, 0.12);
    color: var(--accent-deep);
}

.reminder-badge {
    background: rgba(28, 101, 70, 0.12);
    color: #17644f;
}

.reminder-badge.is-alert {
    background: rgba(159, 52, 42, 0.12);
    color: var(--accent-deep);
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-bar__button {
    min-width: 110px;
}

.pagination-bar__numbers {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-chip {
    appearance: none;
    min-width: 44px;
    height: 44px;
    border: 1px solid rgba(24, 33, 43, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.64);
    color: var(--ink);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.pagination-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(159, 52, 42, 0.22);
}

.pagination-chip.is-active {
    border-color: rgba(159, 52, 42, 0.24);
    background: linear-gradient(135deg, rgba(159, 52, 42, 0.12), rgba(191, 141, 74, 0.18));
    color: var(--accent-deep);
}

.detail-hero-actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
}

.detail-hero-actions--compact {
    min-width: 0;
}

.metric-grid--detail {
    min-width: min(520px, 100%);
}

.work-order-detail-shell {
    margin-top: 20px;
}

.work-order-detail-stack {
    display: grid;
    gap: 20px;
}

.work-order-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 20px;
    align-items: start;
}

.work-order-detail-layout__main,
.work-order-detail-layout__side {
    display: grid;
    gap: 20px;
}

.detail-panel {
    padding: 24px;
    animation: rise-in 0.55s ease-out both;
}

.detail-panel__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.detail-panel__actions--stack {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.detail-panel__trigger {
    min-height: 44px;
    padding: 12px 18px;
}

.detail-panel__hint,
.work-order-section-desc {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.7;
}

.detail-panel__hint {
    font-size: 0.88rem;
    text-align: right;
}

.detail-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.detail-summary-item,
.detail-support-item,
.detail-readonly-item {
    padding: 18px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
}

.detail-summary-item--wide {
    grid-column: span 2;
}

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

.detail-kv-card {
    padding: 18px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.56);
}

.detail-kv-card--action {
    appearance: none;
    width: 100%;
    display: block;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.detail-kv-card--action:hover,
.detail-kv-card--action:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(159, 52, 42, 0.18);
    box-shadow: 0 14px 28px rgba(24, 33, 43, 0.08);
    outline: none;
}

.detail-kv-card--action.is-disabled {
    cursor: default;
}

.detail-kv-card--action.is-disabled:hover,
.detail-kv-card--action.is-disabled:focus-visible {
    transform: none;
    border-color: rgba(24, 33, 43, 0.08);
    box-shadow: none;
}

.detail-summary-item__label,
.detail-support-item__label,
.detail-readonly-item__label,
.detail-kv-card__label,
.detail-images__count {
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.detail-summary-item__value,
.detail-support-item__value,
.detail-readonly-item__value {
    display: block;
    margin-top: 10px;
    font-size: 1.05rem;
    line-height: 1.5;
}

.detail-summary-item__status {
    margin-top: 12px;
}

.detail-support-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.detail-process-tip {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(191, 141, 74, 0.32);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 244, 214, 0.92), rgba(255, 250, 239, 0.96));
    color: #8b6225;
    line-height: 1.7;
}

.detail-process-tip--alert {
    border-color: rgba(159, 52, 42, 0.24);
    background: linear-gradient(135deg, rgba(159, 52, 42, 0.12), rgba(255, 248, 246, 0.96));
    color: var(--accent-deep);
}

.detail-process-tip--success {
    border-color: rgba(28, 101, 70, 0.22);
    background: linear-gradient(135deg, rgba(28, 101, 70, 0.12), rgba(249, 255, 252, 0.96));
    color: #17644f;
}

.detail-process-tip--info {
    border-color: rgba(42, 93, 159, 0.18);
    background: linear-gradient(135deg, rgba(42, 93, 159, 0.1), rgba(246, 249, 255, 0.96));
    color: #1e4f91;
}

.detail-process-tip--neutral {
    border-color: rgba(24, 33, 43, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink-soft);
}

.detail-process-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 18px;
}

.detail-process-meta__count {
    color: var(--ink-soft);
    font-weight: 700;
}

.detail-readonly-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.detail-kv-card__value {
    display: block;
    margin-top: 10px;
    font-size: 1.06rem;
    line-height: 1.45;
}

.detail-kv-card__meta {
    display: block;
    margin-top: 8px;
    color: var(--ink-soft);
    line-height: 1.6;
}

.detail-kv-card__hint {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
    color: var(--accent-deep);
    font-size: 0.88rem;
    font-weight: 700;
}

.detail-section-title {
    margin: 0;
    font-size: 1.08rem;
}

.detail-text-block,
.detail-images {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-text-block__content {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.85;
    white-space: pre-wrap;
}

.detail-images__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

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

.detail-image-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.detail-image-card:hover {
    transform: translateY(-2px);
    border-color: rgba(159, 52, 42, 0.18);
}

.detail-image-card__img {
    width: 100%;
    aspect-ratio: 1.35 / 1;
    border-radius: 16px;
    object-fit: cover;
    background: rgba(24, 33, 43, 0.08);
}

.detail-image-card__label {
    font-size: 0.92rem;
    font-weight: 700;
}

.detail-form {
    display: grid;
    gap: 16px;
}

.detail-type-picker {
    display: grid;
    gap: 16px;
}

.detail-type-picker__select {
    min-height: 228px;
}

.detail-pill-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px;
}

.detail-search-block {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.48);
}

.detail-search-block__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.detail-search-block__hint,
.detail-search-empty {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.7;
}

.detail-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.detail-search-results {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 18px 34px rgba(24, 33, 43, 0.08);
}

.detail-search-result {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.detail-search-result:hover {
    transform: translateY(-1px);
    border-color: rgba(159, 52, 42, 0.18);
}

.detail-search-result__name {
    font-weight: 700;
}

.detail-search-result__meta {
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.detail-chip-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(159, 52, 42, 0.16);
    border-radius: 999px;
    background: rgba(159, 52, 42, 0.08);
    color: var(--accent-deep);
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 700;
}

.detail-chip__remove {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

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

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

.detail-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 33, 43, 0.42);
    backdrop-filter: blur(8px);
}

.detail-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 24px;
}

.detail-modal__close {
    flex-shrink: 0;
}

body.has-modal {
    overflow: hidden;
}

.timeline-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.timeline-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 14px;
    padding: 20px 22px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.68);
}

.timeline-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, rgba(159, 52, 42, 0.88), rgba(191, 141, 74, 0.8));
}

.timeline-card--reply::before {
    background: linear-gradient(90deg, rgba(42, 93, 159, 0.9), rgba(105, 149, 214, 0.84));
}

.timeline-card--evaluation::before {
    background: linear-gradient(90deg, rgba(28, 101, 70, 0.88), rgba(74, 156, 125, 0.82));
}

.timeline-card__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.timeline-card__title-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.timeline-card__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(159, 52, 42, 0.1);
    color: var(--accent-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

.timeline-card__badge--reply {
    background: rgba(42, 93, 159, 0.12);
    color: #1e4f91;
}

.timeline-card__badge--evaluation {
    background: rgba(28, 101, 70, 0.14);
    color: #17644f;
}

.timeline-card__body {
    display: grid;
    gap: 10px;
}

.timeline-card__title {
    margin: 0;
    font-size: 1.08rem;
}

.timeline-card__time,
.timeline-card__meta {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.7;
}

.timeline-card__content {
    margin: 0;
    color: var(--ink);
    line-height: 1.8;
    white-space: pre-wrap;
}

.roadmap-list,
.checkpoint-list {
    margin: 18px 0 0;
    padding-left: 1.15rem;
    line-height: 1.8;
    color: var(--ink-soft);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .hero-panel {
        padding-right: 0;
    }

    .hero-panel__surface {
        padding: 30px 24px;
    }

    .hero-panel__features {
        grid-template-columns: 1fr;
    }

    .dashboard-hero,
    .page-hero,
    .admin-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-hero__status {
        justify-content: flex-start;
        min-width: 0;
    }

    .detail-hero-actions {
        justify-content: flex-start;
        min-width: 0;
    }

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

    .detail-summary-item--wide {
        grid-column: span 2;
    }

    .metric-grid,
    .work-orders-filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .login-layout,
    .admin-main,
    .admin-topbar,
    .admin-nav {
        padding-left: 18px;
        padding-right: 18px;
    }

    .login-layout {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .login-card {
        padding-top: 66px;
    }

    .login-card__crest {
        left: 18px;
    }

    .panel-card--elevated,
    .dashboard-hero,
    .page-hero,
    .dashboard-grid .panel-card {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .brand-mark {
        align-items: flex-start;
    }

    .topbar-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .user-badge {
        min-width: 0;
    }

    .work-orders-toolbar,
    .work-orders-panel {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .detail-panel {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .detail-summary-grid,
    .detail-support-grid,
    .detail-readonly-grid,
    .detail-kv-grid,
    .detail-image-grid,
    .detail-search-row {
        grid-template-columns: 1fr;
    }

    .detail-process-meta,
    .timeline-card__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-panel__actions {
        justify-content: flex-start;
    }

    .detail-panel__actions--stack {
        justify-items: start;
    }

    .detail-modal {
        padding: 16px;
    }

    .detail-modal__dialog {
        max-height: calc(100vh - 32px);
        padding: 22px 18px;
        border-radius: 22px;
    }

    .metric-grid--detail {
        min-width: 0;
    }

    .detail-summary-item--wide {
        grid-column: span 1;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tbody tr {
        padding: 18px;
        border-top: 1px solid rgba(24, 33, 43, 0.08);
    }

    .data-table tbody tr:first-child {
        border-top: 0;
    }

    .data-table tbody td {
        padding: 0;
        border: 0;
    }

    .data-table tbody td + td {
        margin-top: 16px;
    }

    .data-table tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 8px;
        color: var(--ink-soft);
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .pagination-bar {
        justify-content: center;
    }
}

/* Enterprise admin density refresh */
.admin-shell {
    --admin-bg: #f5f7fa;
    --admin-surface: #ffffff;
    --admin-line: #ebebeb;
    --admin-line-strong: #d5dbe3;
    --admin-text: #1f2329;
    --admin-text-muted: #667085;
    --admin-text-subtle: #98a2b3;
    --admin-primary: #111827;
    --admin-primary-soft: #eef2f7;
    --admin-info-soft: #eef4ff;
    --admin-info-text: #2954b8;
    --admin-success: #15803d;
    --admin-success-soft: #eefbf3;
    --admin-warning: #c58a17;
    --admin-warning-soft: #fff8db;
    --admin-danger: #c2410c;
    --admin-danger-soft: #fff4ef;
    background: var(--admin-bg);
    color: var(--admin-text);
}

.admin-shell__backdrop {
    display: none;
}

.admin-shell .admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--admin-line);
    backdrop-filter: blur(10px);
}

.admin-shell .admin-topbar__inner {
    display: block;
    width: 100%;
    max-width: none;
    padding: 12px 20px;
}

.admin-shell .admin-topbar__bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    min-width: 0;
    width: 100%;
}

.admin-shell .admin-topbar__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    flex-shrink: 0;
}

.admin-shell .system-brand {
    display: grid;
    gap: 2px;
    color: #111111;
    text-decoration: none;
    min-width: 0;
}

.admin-shell .system-brand__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.admin-shell .system-brand__meta {
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.admin-shell .admin-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    min-width: 0;
}

.admin-shell .admin-nav__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--admin-line-strong);
    border-radius: 999px;
    background: #ffffff;
    color: var(--admin-text-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.admin-shell .admin-nav__item:hover {
    transform: none;
    border-color: #c7cfdb;
    background: var(--admin-primary-soft);
    color: var(--admin-text);
}

.admin-shell .admin-nav__item.is-active {
    border-color: var(--admin-primary);
    background: var(--admin-primary);
    color: #ffffff;
    font-weight: 700;
}

.admin-shell .admin-nav__item.is-muted {
    border-color: transparent;
    background: var(--admin-primary-soft);
    color: var(--admin-text-subtle);
}

.admin-shell .admin-nav__item.is-disabled {
    border-color: #e3e8ef;
    background: #f8fafc;
    color: var(--admin-text-subtle);
    cursor: not-allowed;
    box-shadow: none;
}

.admin-shell .admin-nav__item.is-disabled:hover {
    border-color: #e3e8ef;
    background: #f8fafc;
    color: var(--admin-text-subtle);
}

.admin-shell .admin-topbar__alert {
    margin: 10px 0 0;
}

.admin-shell .topbar-user {
    display: grid;
    justify-items: end;
    gap: 2px;
    min-width: 0;
}

.admin-shell .topbar-user__name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.admin-shell .topbar-user__meta {
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.admin-shell .admin-topbar .ghost-button--compact {
    min-height: 34px;
    padding: 0 14px;
}

.admin-shell .admin-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 20px 28px;
}

.admin-shell .surface-panel {
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: var(--admin-surface);
    box-shadow: none;
}

.admin-shell .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.admin-shell .page-header--list {
    align-items: center;
    margin-bottom: 10px;
}

.admin-shell .page-header__eyebrow,
.admin-shell .section-heading__eyebrow {
    margin: 0 0 4px;
    color: var(--admin-text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-shell .page-header__title {
    margin: 0;
    color: #111827;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.admin-shell .page-header__summary {
    max-width: 860px;
    margin: 4px 0 0;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-shell .page-header__actions {
    display: flex;
    align-items: flex-start;
}

.admin-shell .stat-strip {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: var(--admin-surface);
}

.admin-shell .stat-item {
    min-width: 112px;
    padding: 10px 14px;
    border-left: 1px solid var(--admin-line);
}

.admin-shell .stat-item:first-child {
    border-left: 0;
}

.admin-shell .stat-item__label {
    display: block;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.admin-shell .stat-item__value {
    display: block;
    margin-top: 4px;
    color: var(--admin-text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.admin-shell .section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.admin-shell .section-heading__title {
    margin: 0;
    color: var(--admin-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.admin-shell .section-heading__summary,
.admin-shell .work-orders-toolbar__hint,
.admin-shell .work-orders-panel__summary,
.admin-shell .detail-panel__hint,
.admin-shell .timeline-count {
    margin: 4px 0 0;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.admin-shell .work-orders-toolbar,
.admin-shell .work-orders-panel,
.admin-shell .detail-panel {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 4px;
    animation: none;
}

.admin-shell .work-orders-toolbar--compact {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
}

.admin-shell .work-orders-panel--table {
    padding: 10px 12px 12px;
}

.admin-shell .work-orders-panel__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.admin-shell .work-orders-panel__title {
    margin: 0;
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.admin-shell .detail-panel__actions {
    gap: 8px;
}

.admin-shell .detail-panel__actions--stack {
    justify-items: end;
}

.admin-shell .detail-panel__trigger {
    min-height: 30px;
    padding: 0 10px;
}

.admin-shell .field--dense {
    gap: 4px;
}

.admin-shell .field__label {
    color: var(--admin-text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.admin-shell .field__hint {
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-shell .field__input,
.admin-shell .field__select,
.admin-shell .field__textarea {
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: #ffffff;
    color: var(--admin-text);
    font-size: 13px;
    line-height: 1.45;
    box-shadow: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-shell .field__textarea {
    min-height: 104px;
}

.admin-shell .field__textarea--compact {
    min-height: 84px;
}

.admin-shell .field__input:focus,
.admin-shell .field__select:focus,
.admin-shell .field__textarea:focus {
    transform: none;
    border-color: #b9c2cf;
    background: #ffffff;
    box-shadow: none;
}

.admin-shell .primary-button,
.admin-shell .ghost-button {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
}

.admin-shell .primary-button {
    background: var(--admin-primary);
    color: #ffffff;
}

.admin-shell .ghost-button {
    border: 1px solid var(--admin-line-strong);
    background: #ffffff;
    color: var(--admin-text);
}

.admin-shell .primary-button--compact,
.admin-shell .ghost-button--compact {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
}

.admin-shell .primary-button:hover,
.admin-shell .ghost-button:hover {
    transform: none;
    box-shadow: none;
}

.admin-shell .work-orders-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 220px auto;
    gap: 8px;
    align-items: end;
}

.admin-shell .work-orders-filters__actions {
    gap: 8px;
    justify-content: flex-end;
}

.admin-shell .users-toolbar,
.admin-shell .users-panel,
.admin-shell .departments-toolbar,
.admin-shell .departments-panel {
    margin-top: 20px;
    padding: 16px;
    animation: rise-in 0.55s ease-out both;
}

.admin-shell .departments-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.admin-shell .departments-filters__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.admin-shell .users-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 220px auto;
    gap: 8px;
    align-items: end;
}

.admin-shell .users-filters__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.admin-shell .inline-alert {
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid #f1d0c5;
    border-radius: 4px;
    background: #fff6f3;
    color: #b54708;
    font-size: 12px;
    line-height: 1.55;
}

.admin-shell .inline-alert--success {
    border-color: #b6dec9;
    background: #f1fbf4;
    color: #0f7a43;
}

.admin-shell .inline-alert--neutral {
    border-color: #dbe0e6;
    background: #f8fafc;
    color: var(--admin-text);
}

.admin-shell .loading-card,
.admin-shell .work-orders-empty {
    margin-top: 8px;
    padding: 18px 14px;
    border: 1px dashed #dfe3e8;
    border-radius: 4px;
    background: #fafbfc;
    color: var(--admin-text-muted);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.admin-shell .work-orders-empty__title {
    font-size: 15px;
}

.admin-shell .table-shell {
    margin-top: 6px;
    overflow: auto;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: #ffffff;
}

.admin-shell .data-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.admin-shell .work-orders-table th:nth-child(1),
.admin-shell .work-orders-table td:nth-child(1) {
    width: 40%;
}

.admin-shell .departments-table th:nth-child(1),
.admin-shell .departments-table td:nth-child(1) {
    width: 34%;
}

.admin-shell .departments-table th:nth-child(2),
.admin-shell .departments-table td:nth-child(2) {
    width: 20%;
}

.admin-shell .departments-table th:nth-child(3),
.admin-shell .departments-table td:nth-child(3) {
    width: 16%;
}

.admin-shell .departments-table th:nth-child(4),
.admin-shell .departments-table td:nth-child(4) {
    width: 18%;
}

.admin-shell .departments-table th:nth-child(5),
.admin-shell .departments-table td:nth-child(5) {
    width: 12%;
}

.admin-shell .work-orders-table th:nth-child(2),
.admin-shell .work-orders-table td:nth-child(2) {
    width: 16%;
}

.admin-shell .work-orders-table th:nth-child(3),
.admin-shell .work-orders-table td:nth-child(3) {
    width: 11%;
}

.admin-shell .work-orders-table th:nth-child(4),
.admin-shell .work-orders-table td:nth-child(4) {
    width: 21%;
}

.admin-shell .work-orders-table th:nth-child(5),
.admin-shell .work-orders-table td:nth-child(5) {
    width: 12%;
}

.admin-shell .users-table th:nth-child(1),
.admin-shell .users-table td:nth-child(1) {
    width: 28%;
}

.admin-shell .users-table th:nth-child(2),
.admin-shell .users-table td:nth-child(2) {
    width: 18%;
}

.admin-shell .users-table th:nth-child(3),
.admin-shell .users-table td:nth-child(3) {
    width: 12%;
}

.admin-shell .users-table th:nth-child(4),
.admin-shell .users-table td:nth-child(4) {
    width: 12%;
}

.admin-shell .users-table th:nth-child(5),
.admin-shell .users-table td:nth-child(5) {
    width: 18%;
}

.admin-shell .users-table th:nth-child(6),
.admin-shell .users-table td:nth-child(6) {
    width: 12%;
}

.admin-shell .data-table thead th {
    padding: 8px 10px;
    border-bottom: 1px solid var(--admin-line);
    background: #fafbfc;
    color: var(--admin-text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-align: left;
    text-transform: none;
    white-space: nowrap;
}

.admin-shell .data-table tbody td {
    padding: 8px 10px;
    border-top: 1px solid #f0f2f5;
    vertical-align: top;
}

.admin-shell .data-table tbody tr.is-overdue {
    background: #fffaf4;
}

.admin-shell .data-table tbody tr.is-clickable:hover,
.admin-shell .data-table tbody tr.is-clickable:focus-visible {
    background: #f9fbfd;
    box-shadow: none;
    outline: none;
}

.admin-shell .work-order-main {
    gap: 3px;
    min-width: 0;
}

.admin-shell .work-order-main__top {
    gap: 6px;
    align-items: center;
}

.admin-shell .table-id {
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 11px;
    font-weight: 700;
}

.admin-shell .work-order-main__title,
.admin-shell .citizen-card__name {
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.admin-shell .work-order-main__content,
.admin-shell .citizen-card__phone,
.admin-shell .status-stack__meta,
.admin-shell .reminder-stack__meta,
.admin-shell .time-stack__item {
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-shell .work-order-main__content {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

.admin-shell .user-row-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-shell .department-tree {
    position: relative;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding-left: calc((var(--department-level, 1) - 1) * 16px);
}

.admin-shell .department-tree.is-child::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: calc((var(--department-level, 1) - 2) * 16px + 7px);
    width: 1px;
    background: var(--admin-line);
}

.admin-shell .department-tree.is-child::after {
    content: "";
    position: absolute;
    top: 14px;
    left: calc((var(--department-level, 1) - 2) * 16px + 7px);
    width: 10px;
    height: 1px;
    background: var(--admin-line);
}

.admin-shell .department-tree__main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-shell .department-tree__top {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-shell .department-tree__name,
.admin-shell .department-parent {
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.admin-shell .department-tree__meta,
.admin-shell .department-level-stack__path {
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-shell .department-tree__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-shell .department-level-stack {
    display: grid;
    gap: 4px;
}

.admin-shell .user-row-main__top {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-shell .user-row-main__name,
.admin-shell .user-department {
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.admin-shell .user-row-main__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.admin-shell .table-meta,
.admin-shell .citizen-card,
.admin-shell .status-stack,
.admin-shell .time-stack,
.admin-shell .reminder-stack {
    gap: 3px;
}

.admin-shell .table-chip,
.admin-shell .status-badge,
.admin-shell .reminder-badge,
.admin-shell .timeline-card__badge,
.admin-shell .detail-chip {
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.admin-shell .table-chip {
    border: 1px solid var(--admin-line);
    background: #ffffff;
    color: var(--admin-text-muted);
}

.admin-shell .table-chip--accent {
    border-color: #d6e4ff;
    background: var(--admin-info-soft);
    color: var(--admin-info-text);
}

.admin-shell .role-badge,
.admin-shell .account-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-shell .role-badge--super-admin {
    background: #fee4e2;
    color: #b42318;
}

.admin-shell .role-badge--admin {
    background: #e0f2fe;
    color: #0369a1;
}

.admin-shell .role-badge--worker {
    background: #f2f4f7;
    color: #475467;
}

.admin-shell .account-badge--active {
    background: var(--admin-success-soft);
    color: #0f7a43;
}

.admin-shell .account-badge--inactive {
    background: #f2f4f7;
    color: #667085;
}

.admin-shell .user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-shell .department-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-shell .articles-toolbar,
.admin-shell .articles-panel {
    margin-top: 12px;
    padding: 16px 18px;
    animation: none;
}

.admin-shell .articles-toolbar {
    display: grid;
    gap: 12px;
}

.admin-shell .articles-panel {
    display: grid;
    gap: 10px;
}

.admin-shell .articles-panel--table {
    padding: 14px 16px 16px;
}

.admin-shell .articles-filters {
    display: grid;
    grid-template-columns: 220px 220px auto;
    gap: 12px;
}

.admin-shell .articles-filters__actions,
.admin-shell .article-actions,
.admin-shell .article-delete-actions,
.admin-shell .article-editor-main__actions,
.admin-shell .article-editor-field-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-shell .articles-filters__actions {
    justify-content: flex-end;
}

.admin-shell .articles-table thead th {
    padding: 10px 14px;
}

.admin-shell .articles-table {
    min-width: 1360px;
    table-layout: auto;
}

.admin-shell .articles-table th:nth-child(1),
.admin-shell .articles-table td:nth-child(1) {
    width: 72px;
}

.admin-shell .articles-table th:nth-child(2),
.admin-shell .articles-table td:nth-child(2) {
    width: 320px;
}

.admin-shell .articles-table th:nth-child(3),
.admin-shell .articles-table td:nth-child(3) {
    width: 180px;
}

.admin-shell .articles-table th:nth-child(4),
.admin-shell .articles-table td:nth-child(4) {
    width: 110px;
}

.admin-shell .articles-table th:nth-child(5),
.admin-shell .articles-table td:nth-child(5) {
    width: 100px;
}

.admin-shell .articles-table th:nth-child(6),
.admin-shell .articles-table td:nth-child(6),
.admin-shell .articles-table th:nth-child(7),
.admin-shell .articles-table td:nth-child(7) {
    width: 160px;
}

.admin-shell .articles-table th:nth-child(8),
.admin-shell .articles-table td:nth-child(8),
.admin-shell .articles-table th:nth-child(9),
.admin-shell .articles-table td:nth-child(9) {
    width: 76px;
}

.admin-shell .articles-table th:nth-child(10),
.admin-shell .articles-table td:nth-child(10) {
    width: 240px;
}

.admin-shell .articles-table tbody td {
    padding: 12px 14px;
    vertical-align: top;
}

.admin-shell .article-cell-title {
    display: block;
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    word-break: break-word;
}

.admin-shell .article-cell-summary {
    display: block;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.6;
    white-space: normal;
    word-break: break-word;
}

.admin-shell .article-cell-number,
.admin-shell .article-cell-time {
    color: var(--admin-text);
    font-size: 12px;
    line-height: 1.6;
}

.admin-shell .article-info-form {
    gap: 12px;
}

.admin-shell .article-info-form__summary {
    grid-column: 1 / -1;
}

.admin-shell .articles-table .article-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    gap: 8px;
    min-width: 208px;
}

.admin-shell .articles-table .article-action-button {
    justify-content: center;
    width: 100%;
}

.admin-shell .article-row-main {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
}

.admin-shell .article-row-main__cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    min-height: 60px;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    overflow: hidden;
    background: #f8fafc;
}

.admin-shell .article-row-main__cover-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1.4 / 1;
}

.admin-shell .article-row-main__cover-empty,
.admin-shell .article-editor-cover-preview__empty {
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.admin-shell .article-row-main__body,
.admin-shell .article-status-stack,
.admin-shell .article-metric-stack {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-shell .article-row-main__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.admin-shell .article-row-main__title {
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.admin-shell .article-row-main__summary,
.admin-shell .article-row-main__meta,
.admin-shell .article-editor-preview-card__eyebrow,
.admin-shell .markdown-preview__empty,
.admin-shell .markdown-preview__caption {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.6;
}

.admin-shell .article-row-main__summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.admin-shell .article-row-main__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-shell .article-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-shell .article-status-badge--draft,
.admin-shell .article-status-chip--draft {
    background: #667085;
    color: #ffffff;
}

.admin-shell .article-status-badge--published,
.admin-shell .article-status-chip--published {
    background: #0f766e;
    color: #ffffff;
}

.admin-shell .article-action-button--danger {
    border-color: #f0c9c6;
    color: #b42318;
}

.admin-shell .article-delete-actions {
    justify-content: flex-end;
    margin-top: 12px;
}

.admin-shell .article-delete-actions__danger {
    background: #b42318;
}

.admin-shell .article-editor-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.admin-shell .article-editor-main,
.admin-shell .article-editor-side {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 18px 20px;
}

.admin-shell .article-editor-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.admin-shell .article-editor-form__title,
.admin-shell .article-editor-form__summary,
.admin-shell .article-editor-form__content {
    grid-column: 1 / -1;
}

.admin-shell .article-editor-cover-field {
    grid-column: 1 / -1;
}

.admin-shell .article-editor-cover-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.admin-shell .article-editor-cover-tools__actions,
.admin-shell .article-editor-form__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.admin-shell .article-editor-field-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.admin-shell .article-editor-textarea {
    min-height: 420px;
    font-family: "Cascadia Code", "Consolas", monospace;
    line-height: 1.7;
    resize: vertical;
}

.admin-shell .article-editor-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-shell .article-editor-preview-modal__dialog {
    width: min(880px, 100%);
}

.admin-shell .article-editor-preview-sheet {
    display: grid;
    gap: 14px;
}

.admin-shell .article-editor-preview-sheet__cover {
    min-height: 220px;
}

.admin-shell .article-editor-preview-card {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: #fafbfc;
}

.admin-shell .article-editor-cover-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 12px;
    border: 1px dashed #cfd6df;
    border-radius: 4px;
    background: #ffffff;
    overflow: hidden;
}

.admin-shell .article-editor-cover-preview__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1.7 / 1;
}

.admin-shell .article-editor-preview-title {
    margin: 0;
    color: var(--admin-text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-word;
}

.admin-shell .article-editor-preview-title--empty {
    color: var(--admin-text-muted);
    font-size: 16px;
    font-weight: 600;
}

.admin-shell .markdown-preview {
    display: grid;
    gap: 10px;
    min-height: 220px;
    padding: 14px 16px;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: #ffffff;
}

.admin-shell .markdown-preview__heading,
.admin-shell .markdown-preview__paragraph,
.admin-shell .markdown-preview__quote,
.admin-shell .markdown-preview__list,
.admin-shell .markdown-preview__pre,
.admin-shell .markdown-preview__table-shell,
.admin-shell .markdown-preview__divider {
    margin: 0;
}

.admin-shell .markdown-preview__heading {
    color: var(--admin-text);
    font-weight: 700;
    line-height: 1.45;
}

.admin-shell .markdown-preview__heading--1 {
    font-size: 22px;
}

.admin-shell .markdown-preview__heading--2 {
    font-size: 18px;
}

.admin-shell .markdown-preview__heading--3 {
    font-size: 15px;
}

.admin-shell .markdown-preview__paragraph,
.admin-shell .markdown-preview__list,
.admin-shell .markdown-preview__quote {
    color: var(--admin-text);
    font-size: 13px;
    line-height: 1.8;
}

.admin-shell .markdown-preview__list {
    padding-left: 18px;
}

.admin-shell .markdown-preview__list--ordered {
    list-style: decimal;
}

.admin-shell .markdown-preview__quote {
    padding-left: 12px;
    border-left: 3px solid #d7dde5;
    color: #475467;
}

.admin-shell .markdown-preview__pre {
    overflow-x: auto;
    padding: 12px;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: #101828;
    color: #f8fafc;
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 12px;
    line-height: 1.7;
}

.admin-shell .markdown-preview__divider {
    border: 0;
    border-top: 1px solid var(--admin-line);
}

.admin-shell .markdown-preview__code {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: #eef2f6;
    color: #344054;
}

.admin-shell .markdown-preview__table-shell {
    overflow-x: auto;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
}

.admin-shell .markdown-preview__table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    background: #ffffff;
}

.admin-shell .markdown-preview__table-head {
    background: #f8fafc;
}

.admin-shell .markdown-preview__table-row + .markdown-preview__table-row .markdown-preview__table-cell {
    border-top: 1px solid var(--admin-line);
}

.admin-shell .markdown-preview__table-cell {
    padding: 10px 12px;
    color: var(--admin-text);
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
    vertical-align: top;
}

.admin-shell .markdown-preview__table-cell--head {
    font-weight: 700;
}


.admin-shell .markdown-preview__figure {
    display: grid;
    gap: 8px;
}

.admin-shell .markdown-preview__img {
    display: block;
    width: 100%;
    border-radius: 4px;
    border: 1px solid var(--admin-line);
}

.admin-shell .markdown-preview__link {
    color: #155eef;
    text-decoration: none;
}

.admin-shell .markdown-preview__link:hover {
    text-decoration: underline;
}

.admin-shell .user-action-button--danger {
    border-color: #f0c9c6;
    color: #b42318;
}

.admin-shell .department-action-button--danger {
    border-color: #f0c9c6;
    color: #b42318;
}

.admin-shell .status-badge,
.admin-shell .reminder-badge {
    color: #ffffff;
}

.admin-shell .status-badge--pending {
    background: var(--admin-warning);
}

.admin-shell .status-badge--processing {
    background: #2563eb;
}

.admin-shell .status-badge--done {
    background: #0f766e;
}

.admin-shell .status-badge--completed {
    background: #475467;
}

.admin-shell .status-badge--archived {
    background: #667085;
}

.admin-shell .status-badge--cancelled {
    background: #b42318;
}

.admin-shell .reminder-badge {
    background: var(--admin-success);
}

.admin-shell .reminder-badge.is-alert {
    background: var(--admin-danger);
}

.admin-shell .pagination-bar {
    margin-top: 8px;
    gap: 12px;
    align-items: center;
}

.admin-shell .pagination-bar__numbers {
    gap: 6px;
}

.admin-shell .pagination-chip {
    min-width: 30px;
    height: 30px;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: #ffffff;
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 600;
}

.admin-shell .pagination-chip:hover {
    transform: none;
    border-color: var(--admin-line-strong);
}

.admin-shell .pagination-chip.is-active {
    border-color: #c5ccd5;
    background: var(--admin-primary-soft);
    color: var(--admin-text);
}

.admin-shell .work-order-detail-shell {
    margin-top: 0;
}

.admin-shell .work-order-detail-stack {
    gap: 12px;
}

.admin-shell .summary-sheet__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px 16px;
}

.admin-shell .summary-cell {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.admin-shell .summary-cell--span-2 {
    grid-column: span 2;
}

.admin-shell .summary-cell__label,
.admin-shell .detail-images__count,
.admin-shell .detail-readonly-item__label,
.admin-shell .detail-search-block__hint,
.admin-shell .detail-search-empty,
.admin-shell .detail-search-result__meta {
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.admin-shell .summary-cell__value,
.admin-shell .detail-readonly-item__value {
    display: block;
    margin-top: 0;
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}

.admin-shell .summary-cell__badge {
    margin-top: 2px;
}

.admin-shell .detail-text-block,
.admin-shell .detail-images {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--admin-line);
}

.admin-shell .detail-section-title {
    margin: 0;
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 700;
}

.admin-shell .detail-text-block__content {
    margin: 0;
    color: var(--admin-text);
    font-size: 13px;
    line-height: 1.75;
}

.admin-shell .detail-image-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.admin-shell .detail-image-card {
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: #ffffff;
    color: var(--admin-text);
}

.admin-shell .detail-image-card:hover {
    transform: none;
    border-color: var(--admin-line-strong);
}

.admin-shell .detail-image-card__img {
    border-radius: 2px;
    aspect-ratio: 1.4 / 1;
}

.admin-shell .detail-image-card__label {
    font-size: 12px;
    font-weight: 600;
}

.admin-shell .detail-process-tip {
    margin-top: 10px;
    padding: 6px 10px;
    border: 1px solid #e7d49a;
    border-radius: 4px;
    background: var(--admin-warning-soft);
    color: #8a5a00;
    font-size: 12px;
    line-height: 1.5;
}

.admin-shell .detail-process-tip--alert {
    border-color: #f4c3b2;
    background: var(--admin-danger-soft);
    color: #b54708;
}

.admin-shell .detail-process-tip--success {
    border-color: #b6dec9;
    background: var(--admin-success-soft);
    color: #0f7a43;
}

.admin-shell .detail-process-tip--info {
    border-color: #bfd0ff;
    background: var(--admin-info-soft);
    color: var(--admin-info-text);
}

.admin-shell .detail-process-tip--neutral {
    border-color: #dbe0e6;
    background: #f8fafc;
    color: var(--admin-text-muted);
}

.admin-shell .timeline-list {
    position: relative;
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.admin-shell .timeline-list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10px;
    width: 1px;
    background: #e8ecf2;
}

.admin-shell .timeline-card {
    position: relative;
    display: grid;
    gap: 8px;
    margin-left: 24px;
    padding: 12px 14px;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: #ffffff;
    overflow: visible;
}

.admin-shell .timeline-card::before {
    content: "";
    position: absolute;
    top: 14px;
    left: -20px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667085;
}

.admin-shell .timeline-card--log::before {
    background: var(--admin-primary);
}

.admin-shell .timeline-card--reply::before {
    background: #2563eb;
}

.admin-shell .timeline-card--evaluation::before {
    background: var(--admin-success);
}

.admin-shell .timeline-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.admin-shell .timeline-card__title-wrap,
.admin-shell .detail-pill-list,
.admin-shell .detail-chip-list {
    gap: 6px;
}

.admin-shell .timeline-card__badge {
    background: #f2f4f7;
    color: #475467;
}

.admin-shell .timeline-card__badge--reply {
    background: var(--admin-info-soft);
    color: var(--admin-info-text);
}

.admin-shell .timeline-card__badge--evaluation {
    background: var(--admin-success-soft);
    color: #0f7a43;
}

.admin-shell .timeline-card__body {
    gap: 4px;
}

.admin-shell .timeline-card__title {
    margin: 0;
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 700;
}

.admin-shell .timeline-card__time,
.admin-shell .timeline-card__meta {
    margin: 0;
    color: var(--admin-text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.admin-shell .timeline-card__content {
    margin: 2px 0 0;
    color: var(--admin-text);
    font-size: 13px;
    line-height: 1.7;
}

.admin-shell .detail-modal {
    padding: 18px;
}

.admin-shell .detail-modal__backdrop {
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(4px);
}

.admin-shell .detail-modal__dialog {
    width: min(760px, 100%);
    max-height: calc(100vh - 36px);
    padding: 16px;
    border: 1px solid var(--admin-line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.admin-shell .detail-readonly-grid,
.admin-shell .detail-form,
.admin-shell .detail-type-picker,
.admin-shell .detail-search-block,
.admin-shell .detail-search-results {
    gap: 10px;
}

.admin-shell .detail-readonly-grid {
    margin-top: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shell .detail-readonly-item,
.admin-shell .detail-search-block,
.admin-shell .detail-search-result {
    padding: 10px 12px;
    border: 1px solid var(--admin-line);
    border-radius: 4px;
    background: #fafbfc;
}

.admin-shell .detail-type-picker__select {
    min-height: 180px;
}

.admin-shell .user-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shell .department-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shell .user-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    grid-column: 1 / -1;
}

.admin-shell .department-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    grid-column: 1 / -1;
}

.admin-shell .user-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.admin-shell .department-delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.admin-shell .user-delete-actions__danger {
    background: #b42318;
}

.admin-shell .department-delete-actions__danger {
    background: #b42318;
}

.admin-shell .detail-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.admin-shell .detail-search-result {
    background: #ffffff;
}

.admin-shell .detail-search-results {
    background: #ffffff;
    border-color: var(--admin-line);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.admin-shell .detail-search-result:hover {
    transform: none;
    border-color: var(--admin-line-strong);
}

.admin-shell .detail-search-result__name {
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 600;
}

.admin-shell .detail-chip {
    border: 1px solid #d6e4ff;
    background: var(--admin-info-soft);
    color: var(--admin-info-text);
}

.admin-shell .detail-chip__remove {
    color: var(--admin-text-muted);
    font-size: 11px;
}

@media (max-width: 1100px) {
    .admin-shell .page-header,
    .admin-shell .section-heading,
    .admin-shell .admin-topbar__bar,
    .admin-shell .admin-topbar__right {
        flex-wrap: wrap;
    }

    .admin-shell .summary-sheet__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-shell .detail-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-shell .article-editor-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .admin-shell .work-orders-filters {
        grid-template-columns: 1fr;
    }

    .admin-shell .departments-filters,
    .admin-shell .articles-filters,
    .admin-shell .users-filters,
    .admin-shell .user-form-grid,
    .admin-shell .department-form-grid,
    .admin-shell .article-editor-form,
    .admin-shell .article-editor-meta {
        grid-template-columns: 1fr;
    }

    .admin-shell .page-header {
        flex-direction: column;
    }

    .admin-shell .work-orders-panel__bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-shell .stat-strip {
        width: 100%;
    }

    .admin-shell .detail-readonly-grid {
        grid-template-columns: 1fr;
    }

    .admin-shell .article-editor-cover-tools {
        grid-template-columns: 1fr;
    }

    .admin-shell .article-info-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .admin-shell .admin-topbar__inner,
    .admin-shell .admin-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .admin-shell .admin-topbar__bar {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 12px;
    }

    .admin-shell .admin-nav,
    .admin-shell .admin-topbar__right {
        width: 100%;
        justify-content: space-between;
    }

    .admin-shell .admin-nav {
        gap: 8px;
    }

    .admin-shell .system-brand__meta {
        display: none;
    }

    .admin-shell .topbar-user {
        justify-items: start;
    }

    .admin-shell .user-row-main__meta,
    .admin-shell .user-actions,
    .admin-shell .user-delete-actions,
    .admin-shell .article-actions,
    .admin-shell .article-delete-actions {
        gap: 6px;
    }

    .admin-shell .page-header__title {
        font-size: 22px;
    }

    .admin-shell .summary-sheet__grid,
    .admin-shell .detail-image-grid {
        grid-template-columns: 1fr;
    }

    .admin-shell .summary-cell--span-2 {
        grid-column: span 1;
    }

    .admin-shell .timeline-list::before {
        left: 7px;
    }

    .admin-shell .timeline-card {
        margin-left: 18px;
    }

    .admin-shell .detail-modal {
        padding: 10px;
    }

    .admin-shell .detail-modal__dialog {
        max-height: calc(100vh - 20px);
        padding: 14px;
    }

    .admin-shell .data-table tbody tr {
        padding: 12px;
        border-top: 1px solid #f0f2f5;
    }

    .admin-shell .data-table tbody td + td {
        margin-top: 12px;
    }

    .admin-shell .article-row-main {
        grid-template-columns: 1fr;
    }

    .admin-shell .article-row-main__cover {
        width: 100%;
        min-height: 140px;
    }

    .admin-shell .article-editor-field-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Enterprise login refresh */
.login-shell {
    --login-bg: #f5f7fa;
    --login-surface: #ffffff;
    --login-line: #ebebeb;
    --login-line-strong: #d0d7e2;
    --login-text: #1f2329;
    --login-text-muted: #667085;
    --login-primary: #111827;
    background: var(--login-bg);
    color: var(--login-text);
}

.login-shell__ambient {
    display: none;
}

.login-shell .login-topbar {
    border-bottom: 1px solid var(--login-line);
    background: rgba(255, 255, 255, 0.96);
}

.login-shell .login-topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    max-width: 1240px;
    min-height: 54px;
    margin: 0 auto;
    padding: 0 20px;
}

.login-shell .login-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
}

.login-shell .login-brand__title {
    color: #111111;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.login-shell .login-brand__meta,
.login-shell .login-topbar__context {
    color: var(--login-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.login-shell .login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 420px);
    gap: 18px;
    max-width: 1240px;
    min-height: calc(100vh - 55px);
    margin: 0 auto;
    padding: 24px 20px;
    align-items: center;
}

.login-shell .login-info-card,
.login-shell .login-card {
    border: 1px solid var(--login-line);
    border-radius: 6px;
    background: var(--login-surface);
    box-shadow: none;
}

.login-shell .login-info-card {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.login-shell .login-info-card__header {
    max-width: 720px;
}

.login-shell .login-info-card__eyebrow,
.login-shell .login-card__eyebrow {
    margin: 0 0 6px;
    color: var(--login-text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-shell .login-info-card__title,
.login-shell .login-card__title {
    margin: 0;
    color: var(--login-text);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.login-shell .login-card__title {
    font-size: 24px;
}

.login-shell .login-info-card__summary,
.login-shell .login-card__summary {
    margin: 8px 0 0;
    color: var(--login-text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.login-shell .login-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.login-shell .login-info-item {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--login-line);
    border-radius: 4px;
    background: #fafbfc;
}

.login-shell .login-info-item__label,
.login-shell .login-card__meta-label {
    color: var(--login-text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.login-shell .login-info-item__value,
.login-shell .login-card__meta-value {
    color: var(--login-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.login-shell .login-notice {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--login-line);
    border-radius: 4px;
    background: #fafbfc;
}

.login-shell .login-notice__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.login-shell .login-notice__title {
    margin: 0;
    color: var(--login-text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.login-shell .login-notice__tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
}

.login-shell .login-notice__list {
    margin: 0;
    padding-left: 18px;
    color: var(--login-text-muted);
    font-size: 13px;
    line-height: 1.7;
}

.login-shell .login-panel {
    animation: none;
}

.login-shell .login-card {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.login-shell .login-card__header {
    margin: 0;
}

.login-shell .inline-alert {
    margin-bottom: 0;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.55;
}

.login-shell .login-form {
    gap: 12px;
}

.login-shell .field {
    gap: 4px;
}

.login-shell .field__label {
    color: var(--login-text-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.login-shell .field__input {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--login-line);
    border-radius: 4px;
    background: #ffffff;
    color: var(--login-text);
    font-size: 13px;
    line-height: 1.5;
    box-shadow: none;
    transition: border-color 0.15s ease;
}

.login-shell .field__input:focus {
    transform: none;
    border-color: var(--login-line-strong);
    box-shadow: none;
}

.login-shell .primary-button {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 4px;
    background: var(--login-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
}

.login-shell .primary-button:hover {
    transform: none;
}

.login-shell .login-card__meta {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--login-line);
}

.login-shell .login-card__meta-row {
    display: grid;
    gap: 4px;
}

.login-shell .noscript-banner {
    inset: auto 14px 14px;
    padding: 10px 12px;
    border-radius: 4px;
}

@media (max-width: 980px) {
    .login-shell .login-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        align-items: start;
    }

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

@media (max-width: 640px) {
    .login-shell .login-topbar__inner,
    .login-shell .login-layout {
        padding-left: 14px;
        padding-right: 14px;
    }

    .login-shell .login-topbar__inner {
        flex-wrap: wrap;
        min-height: 50px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .login-shell .login-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .login-shell .login-topbar__context {
        display: none;
    }

    .login-shell .login-layout {
        padding-top: 14px;
        padding-bottom: 18px;
    }

    .login-shell .login-info-card,
    .login-shell .login-card {
        padding: 16px;
    }

    .login-shell .login-info-card__title,
    .login-shell .login-card__title {
        font-size: 22px;
    }
}
