:root {
    --bg: #eef3ea;
    --bg-accent: radial-gradient(circle at top left, rgba(255, 214, 153, 0.55), transparent 28%), linear-gradient(145deg, #eef3ea 0%, #dfe8d7 100%);
    --panel: rgba(255, 255, 255, 0.82);
    --panel-strong: #ffffff;
    --text: #223126;
    --muted: #5c6d5d;
    --line: rgba(34, 49, 38, 0.12);
    --primary: #0c6e5a;
    --primary-dark: #084b3f;
    --accent: #ca7b27;
    --danger: #a94442;
    --success: #266b32;
    --shadow: 0 24px 60px rgba(49, 74, 53, 0.14);
    --radius: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    background: var(--bg-accent);
    min-height: 100vh;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.app-body {
    padding: 24px;
}

.page-frame {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 24px;
    max-width: 1560px;
    margin: 0 auto;
}

.sidebar,
.panel,
.hero-card,
.stat-card,
.auth-card,
.info-panel {
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.sidebar {
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(24, 44, 32, 0.92) 0%, rgba(14, 78, 64, 0.95) 100%);
    color: #f9f8f1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-block h1,
.page-header h2,
.hero-card h2,
.auth-copy h1,
.panel-header h3 {
    margin: 0;
    font-family: "Baskerville", "Palatino Linotype", serif;
    letter-spacing: 0.01em;
}

.brand-kicker,
.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--accent);
}

.brand-block p,
.auth-copy p {
    color: rgba(249, 248, 241, 0.78);
    line-height: 1.6;
}

.muted-text,
.page-header p,
.hero-card p {
    color: var(--muted);
    line-height: 1.6;
}

.page-content {
    display: grid;
    gap: 22px;
    align-content: start;
}

.admin-content {
    min-width: 0;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
    margin: 28px 0;
}

.nav-link {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff7eb;
    font-weight: 600;
    transition: transform 120ms ease, background 120ms ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(4px);
    text-decoration: none;
}

.nav-link.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: #fffef8;
}

.sidebar-user {
    display: grid;
    gap: 14px;
}

.sidebar-user .muted-text {
    color: rgba(255, 248, 235, 0.64);
}

.admin-mobile-dock,
.mobile-only {
    display: none;
}

.admin-dock-link {
    color: inherit;
    text-decoration: none;
}

.admin-dock-link:hover {
    text-decoration: none;
}

.admin-dock-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
}

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

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

.admin-mobile-card {
    padding: 18px;
    border: 1px solid rgba(34, 49, 38, 0.1);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 250, 244, 0.98) 100%);
}

.admin-mobile-empty {
    color: var(--muted);
    text-align: center;
}

.admin-mobile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.admin-mobile-card-head > div {
    min-width: 0;
}

.admin-mobile-card-head strong {
    display: block;
    font-size: 1rem;
}

.admin-mobile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #efff9f;
    color: #111111;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-mobile-meta {
    display: grid;
    gap: 12px;
}

.admin-mobile-meta > div {
    display: grid;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(34, 49, 38, 0.08);
}

.admin-mobile-meta > div:first-child {
    padding-top: 0;
    border-top: none;
}

.admin-mobile-meta span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-mobile-meta strong {
    font-size: 0.98rem;
    line-height: 1.35;
}

.admin-mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(34, 49, 38, 0.1);
    border-radius: 16px;
    background: #ffffff;
    font-weight: 800;
}

.admin-mobile-reset {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(34, 49, 38, 0.08);
}

.admin-mobile-reset .button {
    width: 100%;
}

.admin-reset-box {
    margin-bottom: 22px;
    padding: 20px;
    border: 1px solid #e4e1da;
    background: #ffffff;
}

.admin-inline-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-inline-actions.is-mobile {
    margin-top: 14px;
}

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

.button:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.button-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #e39f44 100%);
    color: #fffef8;
}

.button-outline {
    background: rgba(255, 255, 255, 0.52);
    border-color: var(--line);
    color: var(--text);
}

.button-danger {
    background: rgba(169, 68, 66, 0.08);
    border-color: rgba(169, 68, 66, 0.28);
    color: var(--danger);
}

.sidebar .button-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff9ef;
}

.hero-card,
.panel,
.stat-card,
.auth-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.hero-card,
.panel,
.auth-card {
    padding: 24px;
}

.hero-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(255, 248, 235, 0.92) 0%, rgba(255, 255, 255, 0.86) 100%);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.page-header {
    padding: 4px 4px 0;
}

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

.stats-grid > * {
    min-width: 0;
}

.stat-card {
    padding: 22px;
    grid-column: span 3;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.82) 0%, rgba(247, 250, 244, 0.95) 100%);
}

.stat-card span,
.stat-card small {
    display: block;
}

.stat-card span {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 12px;
}

.stat-card strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 22px;
}

.content-grid.two-columns {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.content-grid > * {
    min-width: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

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

.field,
.checkbox-field {
    display: grid;
    gap: 8px;
}

.field span,
.checkbox-field span {
    font-weight: 600;
    color: var(--muted);
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(34, 49, 38, 0.14);
    border-radius: var(--radius-sm);
    background: var(--panel-strong);
    color: var(--text);
}

input[type="file"] {
    padding: 10px 14px;
}

.checkbox-field {
    grid-template-columns: 22px 1fr;
    align-items: center;
}

.checkbox-field input {
    min-height: auto;
}

.table-wrap {
    min-width: 0;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(34, 49, 38, 0.1);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.inline-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.small-field {
    min-width: 220px;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.flash-stack {
    display: grid;
    gap: 10px;
}

.flash {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 600;
}

.flash-success {
    background: rgba(38, 107, 50, 0.11);
    border-color: rgba(38, 107, 50, 0.2);
    color: var(--success);
}

.flash-error {
    background: rgba(169, 68, 66, 0.1);
    border-color: rgba(169, 68, 66, 0.2);
    color: var(--danger);
}

.flash-warning {
    background: rgba(230, 255, 105, 0.24);
    border-color: rgba(17, 17, 17, 0.14);
    color: #111111;
}

.login-body {
    min-height: 100vh;
    background: #111111;
}

.login-shell {
    min-height: 100vh;
}

.login-stage {
    position: relative;
    display: flex;
    justify-content: flex-end;
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(17, 17, 17, 0.08) 0%, rgba(17, 17, 17, 0.04) 42%, rgba(17, 17, 17, 0.36) 100%),
        url("/assets/login-bg.png") center center / auto 100% no-repeat,
        linear-gradient(90deg, #c6c8bb 0%, #f7f5ee 100%);
}

.login-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 16% 16%, rgba(239, 255, 159, 0.18), transparent 18%),
        linear-gradient(180deg, rgba(17, 17, 17, 0.04) 0%, rgba(17, 17, 17, 0.22) 100%);
    pointer-events: none;
}

.login-stage-panel {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, 500px);
    min-height: 100vh;
    margin-left: auto;
    padding: 32px;
    background: linear-gradient(180deg, rgba(17, 17, 17, 0.14) 0%, rgba(17, 17, 17, 0.34) 100%);
    backdrop-filter: blur(12px);
}

.login-panel-card {
    display: grid;
    align-content: start;
    gap: 22px;
    width: min(100%, 404px);
    margin: auto 0 auto auto;
    padding: 28px;
    border: 1px solid rgba(223, 220, 212, 0.9);
    background: rgba(251, 250, 247, 0.94);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
}

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

.login-panel-brand strong {
    display: block;
    color: #111111;
    font-size: 2rem;
    line-height: 1;
}

.login-panel-head .locale-switcher {
    margin-left: auto;
}

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

.login-form .field {
    min-width: 0;
}

.login-form input {
    min-height: 54px;
    border-color: #d9d5cd;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
}

.login-form .field span {
    color: #6a675f;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-form input:focus {
    outline: none;
    border-color: #111111;
    box-shadow: 0 0 0 3px rgba(239, 255, 159, 0.65);
}

.login-submit {
    width: 100%;
    min-height: 56px;
    margin-top: 6px;
    border-radius: 0;
    background: #111111;
    color: #ffffff;
}

.auth-card {
    display: block;
}

.auth-copy {
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(18, 58, 47, 0.94) 0%, rgba(10, 91, 74, 0.9) 100%);
    color: #fff9ef;
}

.auth-copy p {
    color: rgba(255, 249, 239, 0.78);
}

.info-panel {
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 246, 228, 0.88) 0%, rgba(255, 255, 255, 0.82) 100%);
}

.auth-card-login {
    padding: 0;
}

.auth-login-panel {
    display: grid;
    gap: 18px;
    padding: 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 245, 0.94) 100%);
}

.auth-login-head {
    display: grid;
    gap: 10px;
}

.auth-login-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.auth-login-head h1 {
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    font-size: 2rem;
    line-height: 1;
    color: var(--text);
}

.auth-login-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.locale-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.locale-link:hover {
    text-decoration: none;
}

.locale-switcher {
    flex-shrink: 0;
}

.admin-body {
    background: #e8e7e2;
    color: #111111;
}

.admin-frame {
    background: #fbfaf7;
}

.admin-content {
    min-width: 0;
    padding-bottom: 32px;
    background: #fbfaf7;
}

.admin-content .flash-stack {
    padding: 20px 32px 0;
}

.admin-body .hero-card,
.admin-body .page-header,
.admin-body .stats-grid,
.admin-body .content-grid {
    margin-left: 32px;
    margin-right: 32px;
}

.admin-body .hero-card,
.admin-body .page-header {
    margin-top: 30px;
}

.admin-body .stats-grid,
.admin-body .content-grid {
    margin-top: 24px;
}

.admin-body .hero-card,
.admin-body .panel,
.admin-body .stat-card {
    border: 1px solid #e4e1da;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
}

.admin-body .hero-card {
    align-items: flex-start;
    min-width: 0;
    background: #ffffff;
}

.admin-body .page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0;
}

.admin-body .page-header h2,
.admin-body .hero-card h2,
.admin-body .panel-header h3 {
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.admin-body .page-header h2,
.admin-body .hero-card h2 {
    font-size: 2.2rem;
    line-height: 1.05;
    margin-bottom: 10px;
}

.admin-body .eyebrow {
    color: #8a887f;
    letter-spacing: 0.12em;
}

.admin-body .page-header p,
.admin-body .hero-card p {
    margin: 0;
    color: #7b786f;
}

.admin-body .stat-card {
    background: #ffffff;
}

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

.admin-usage-grid .stat-card {
    grid-column: span 1;
}

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

.admin-summary-grid .stat-card {
    grid-column: span 1;
}

.admin-chart-card {
    display: grid;
    gap: 14px;
}

.admin-chart-card strong {
    margin-bottom: 0;
}

.admin-meter {
    display: flex;
    width: 100%;
    min-height: 14px;
    overflow: hidden;
    background: #efebe4;
}

.admin-meter.is-thin {
    min-height: 10px;
}

.admin-meter-segment {
    display: block;
    min-width: 0;
    height: 100%;
    background: #111111;
}

.admin-meter-segment.is-soft {
    background: #dcd8cf;
}

.admin-meter-segment.is-accent {
    background: #efff9f;
}

.admin-chart-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-chart-meta span,
.admin-mini-metric span {
    color: #7b786f;
    font-size: 0.84rem;
}

.admin-mini-metric {
    display: grid;
    gap: 10px;
}

.admin-mini-metric > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.admin-mini-metric strong {
    font-size: 1rem;
}

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

.admin-body .content-grid.admin-dashboard-main {
    grid-template-columns: minmax(0, 1fr);
}

.admin-body .content-grid.admin-users-page {
    grid-template-columns: minmax(0, 1fr);
}

.admin-body .content-grid.admin-user-edit-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
}

.admin-body .content-grid.admin-dashboard-secondary {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: start;
}

.admin-period-tabs {
    flex-shrink: 0;
}

.admin-activity-panel {
    overflow: hidden;
}

.admin-activity-summary {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 20px;
}

.admin-activity-stat {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid #efebe4;
    background: #fbfaf7;
}

.admin-activity-stat span,
.admin-usage-values {
    color: #7b786f;
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-activity-stat strong {
    font-size: 1.5rem;
    line-height: 1;
}

.admin-activity-stat small {
    color: #8a887f;
    font-size: 0.78rem;
}

.admin-activity-legend {
    margin-bottom: 16px;
}

.admin-usage-chart-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
}

.admin-usage-chart-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 18px 18px 14px;
    border: 1px solid #efebe4;
    background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
}

.admin-usage-svg {
    width: 100%;
    height: 260px;
    overflow: visible;
}

.admin-usage-grid-line {
    stroke: rgba(17, 17, 17, 0.08);
    stroke-width: 1;
}

.admin-usage-area {
    fill: url(#adminLoginsFill);
}

.admin-usage-line {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-usage-line.is-logins {
    stroke: #111111;
}

.admin-usage-line.is-users {
    stroke: url(#adminUsersStroke);
}

.admin-usage-dot {
    stroke: #fbfaf7;
    stroke-width: 2;
}

.admin-usage-dot.is-logins {
    fill: #111111;
}

.admin-usage-dot.is-users {
    fill: #efff9f;
}

.admin-usage-labels {
    display: grid;
    gap: 8px;
}

.admin-usage-label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-usage-label strong {
    color: #111111;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.admin-usage-label small {
    color: #8a887f;
    font-size: 0.72rem;
    text-align: center;
}

.admin-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.admin-badge-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #dfdcd4;
    background: #f7f5ef;
    color: #111111;
    font-size: 0.84rem;
    font-weight: 700;
}

.admin-simple-list {
    display: grid;
    gap: 12px;
}

.admin-simple-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #efebe4;
}

.admin-simple-item:first-child {
    padding-top: 0;
    border-top: none;
}

.admin-simple-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 34px;
    padding: 0 10px;
    background: #111111;
    color: #efff9f;
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-simple-main {
    min-width: 0;
}

.admin-simple-main strong {
    display: block;
    font-size: 0.98rem;
}

.admin-simple-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-simple-stats span,
.admin-simple-last {
    color: #7b786f;
    font-size: 0.84rem;
}

.admin-simple-stats strong {
    color: #111111;
    margin-right: 4px;
}

.admin-simple-last {
    white-space: nowrap;
    text-align: right;
}

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

.admin-user-form .field {
    min-width: 0;
}

.admin-user-form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.admin-user-records-panel {
    grid-column: 1 / -1;
}

.admin-records-cleanup-form {
    display: grid;
    gap: 18px;
}

.admin-records-cleanup-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.admin-records-cleanup-meta {
    display: grid;
    gap: 4px;
}

.admin-records-cleanup-meta strong {
    font-size: 1.9rem;
    line-height: 1;
}

.admin-records-cleanup-meta span {
    color: #8a887f;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-user-list {
    display: grid;
}

.admin-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, auto) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #efebe4;
    cursor: context-menu;
}

.admin-user-row:first-child {
    padding-top: 0;
    border-top: none;
}

.admin-user-main {
    min-width: 0;
}

.admin-user-main strong {
    display: block;
    font-size: 1rem;
}

.admin-user-kpis {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-user-kpi {
    display: grid;
    gap: 4px;
    min-width: 84px;
}

.admin-user-kpi span {
    color: #8a887f;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-user-kpi strong {
    font-size: 0.94rem;
}

.admin-user-menu-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #dfdcd4;
    background: #ffffff;
}

.admin-user-menu-button span {
    display: block;
    width: 4px;
    height: 4px;
    background: #111111;
}

.admin-context-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 120;
    display: grid;
    min-width: 210px;
    border: 1px solid #dfdcd4;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(17, 17, 17, 0.12);
}

.admin-context-menu[hidden] {
    display: none;
}

.admin-context-menu a,
.admin-context-menu button {
    padding: 12px 14px;
    border-top: 1px solid #efebe4;
    color: #111111;
    font-weight: 700;
    text-decoration: none;
    background: #ffffff;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.admin-context-menu a:first-child,
.admin-context-menu button:first-child {
    border-top: none;
}

.admin-context-menu a:hover,
.admin-context-menu button:hover {
    background: #f5f3ee;
    text-decoration: none;
}

.admin-context-menu button.is-danger {
    color: var(--danger);
}

.admin-body .stat-card span,
.admin-body .stat-card small,
.admin-body th {
    color: #9a968d;
}

.admin-body .button {
    border-radius: 0;
    font-weight: 800;
}

.admin-body .button-primary {
    background: #111111;
    color: #ffffff;
}

.admin-body .button-outline {
    background: #ffffff;
    border-color: #dfdcd4;
    color: #111111;
}

.admin-body input,
.admin-body select {
    border-radius: 0;
}

.admin-body td {
    border-bottom: 1px solid #efebe4;
}

.admin-body .content-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.usage-section + .usage-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #efebe4;
}

.usage-section-head {
    margin-bottom: 16px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a887f;
}

.usage-bar-list {
    display: grid;
    gap: 14px;
}

.usage-bar-row {
    display: grid;
    gap: 8px;
}

.usage-bar-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.usage-bar-head strong,
.usage-feed-title {
    font-size: 0.96rem;
}

.usage-bar-head span,
.usage-feed-meta {
    color: #7b786f;
    font-size: 0.84rem;
}

.usage-bar-track {
    position: relative;
    height: 10px;
    overflow: hidden;
    background: #f1eee8;
}

.usage-bar-fill {
    display: block;
    height: 100%;
    background: #111111;
}

.usage-feed {
    display: grid;
    gap: 14px;
}

.usage-feed-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid #efebe4;
}

.usage-feed-item:first-child {
    padding-top: 0;
    border-top: none;
}

.usage-feed-date {
    flex-shrink: 0;
    white-space: nowrap;
    text-align: right;
}

@media (max-width: 1180px) {
    .page-frame,
    .content-grid,
    .auth-card {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .stat-card {
        grid-column: span 6;
    }

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

    .admin-usage-grid .stat-card {
        grid-column: span 1;
    }

    .admin-summary-grid {
        grid-template-columns: 1fr;
    }

    .admin-summary-grid .stat-card {
        grid-column: span 1;
    }

    .admin-body .content-grid {
        grid-template-columns: 1fr;
    }

    .admin-mobile-stack,
    .admin-activity-summary {
        grid-template-columns: 1fr;
    }

    .admin-body .content-grid.admin-dashboard-secondary {
        grid-template-columns: 1fr;
    }

    .admin-body .content-grid.admin-user-edit-layout {
        grid-template-columns: 1fr;
    }

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

    .admin-user-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .admin-user-kpis {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .app-body,
    .guest-body {
        padding: 14px;
    }

    .hero-card,
    .panel,
    .auth-card,
    .stat-card {
        padding: 18px;
    }

    .auth-login-panel {
        padding: 24px 18px;
    }

    .login-body {
        background: #111111;
    }

    .login-shell {
        min-height: 100vh;
    }

    .login-stage {
        align-items: flex-end;
    }

    .login-stage-panel {
        width: 100%;
        min-height: 100vh;
        padding: 16px;
        background: linear-gradient(180deg, rgba(17, 17, 17, 0.08) 0%, rgba(17, 17, 17, 0.46) 100%);
    }

    .login-panel-card {
        width: 100%;
        margin-top: auto;
        padding: 22px 18px;
    }

    .login-panel-head {
        align-items: center;
    }

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

    .stat-card {
        grid-column: span 1;
    }

    .admin-usage-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .inline-form,
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .mobile-only.admin-mobile-stack {
        display: grid !important;
    }

    .admin-mobile-card {
        border-radius: 24px;
    }

    .admin-content {
        padding-bottom: 24px;
    }

    .admin-content .flash-stack {
        padding: 18px 18px 0;
    }

    .admin-body .hero-card,
    .admin-body .page-header,
    .admin-body .stats-grid,
    .admin-body .content-grid {
        margin-left: 18px;
        margin-right: 18px;
    }

    .admin-body .hero-card,
    .admin-body .page-header {
        margin-top: 24px;
    }

    .admin-body .stats-grid,
    .admin-body .content-grid {
        margin-top: 18px;
    }

    .admin-body .page-header {
        align-items: stretch;
    }

    .admin-body .hero-card {
        align-items: stretch;
    }

    .admin-body .hero-actions .button {
        width: 100%;
    }

    .usage-bar-head,
    .usage-feed-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .usage-feed-date {
        text-align: left;
        white-space: normal;
    }

    .admin-activity-summary {
        grid-template-columns: 1fr;
    }

    .admin-usage-chart-card {
        padding: 16px 14px 12px;
    }

    .admin-usage-svg {
        height: 220px;
    }

    .admin-simple-item {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .admin-simple-stats {
        justify-content: flex-start;
    }

    .admin-simple-last {
        text-align: left;
        white-space: normal;
    }

    .admin-badge-row {
        gap: 8px;
    }

    .admin-user-form-actions .button {
        width: 100%;
    }

    .admin-user-menu-button {
        width: 44px;
        height: 44px;
    }

    .admin-context-menu {
        min-width: 190px;
    }

    .pilot-entry-screen .pilot-entry-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin-top: 4px;
        padding: 14px 0 0;
        background: linear-gradient(180deg, rgba(251, 250, 247, 0) 0%, rgba(251, 250, 247, 0.96) 24%, rgba(251, 250, 247, 1) 100%);
    }

    .pilot-entry-screen .pilot-entry-actions .pilot-primary-button,
    .pilot-entry-screen .pilot-entry-actions .pilot-secondary-button {
        width: 100%;
    }
}

/* Pilot workspace theme */

.pilot-body {
    padding: 0;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: #e8e7e2;
    color: #111111;
}

.pilot-frame {
    width: 100%;
    height: 100vh;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    gap: 0;
    grid-template-columns: 300px minmax(0, 1fr);
    background: #fbfaf7;
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.pilot-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 300px;
    height: 100vh;
    min-width: 0;
    padding: 28px 20px;
    background: #f7f6f1;
    border-right: 1px solid #e3e0d9;
    overflow: hidden;
    z-index: 30;
}

.pilot-sidebar-inner {
    display: grid;
    gap: 24px;
    min-width: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.pilot-brand h1,
.pilot-page-header h2,
.pilot-section-head h3,
.pilot-profile-chip strong {
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
}

.pilot-brand-kicker,
.pilot-overline,
.pilot-preview-label {
    display: inline-block;
    margin-bottom: 10px;
    color: #8a887f;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pilot-brand p,
.pilot-page-header p,
.pilot-section-head p,
.pilot-account-meta,
.pilot-preview-card span,
.pilot-update-note span {
    margin: 0;
    color: #7b786f;
    line-height: 1.55;
}

.pilot-preview-card,
.pilot-account-card {
    padding: 16px;
    border: 1px solid #e1ded7;
    border-radius: 0;
    background: #ffffff;
}

.pilot-preview-card {
    display: grid;
    gap: 8px;
}

.pilot-preview-card strong,
.pilot-account-card strong {
    font-size: 1rem;
}

.pilot-mini-link,
.pilot-inline-link {
    color: #111111;
    font-size: 0.9rem;
    font-weight: 700;
}

.pilot-inline-link.muted {
    color: #7b786f;
}

.pilot-nav {
    display: grid;
    gap: 8px;
}

.pilot-nav-group {
    display: grid;
    gap: 10px;
}

.pilot-nav-label {
    color: #9a968d;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.pilot-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 0;
    color: #535048;
    font-weight: 700;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.pilot-nav-link:hover {
    background: #efeee9;
    color: #111111;
    transform: translateX(2px);
    text-decoration: none;
}

.pilot-nav-link.is-active {
    background: #111111;
    color: #f3ff72;
}

.pilot-nav-link.is-cta {
    background: #efff9f;
    color: #111111;
}

.pilot-nav-link.is-cta:hover {
    background: #e8fb7d;
}

.pilot-nav-link.is-cta.is-active {
    background: #111111;
    color: #f3ff72;
}

.pilot-nav-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

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

.pilot-account-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pilot-avatar-large,
.pilot-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff7cc 0%, #e6ff69 100%);
    color: #111111;
    font-weight: 800;
}

.pilot-avatar-large {
    width: 52px;
    height: 52px;
    font-size: 1rem;
}

.pilot-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.88rem;
}

.pilot-sidebar-footer {
    display: grid;
    gap: 12px;
}

.pilot-mobile-dock {
    display: none;
}

.pilot-mobile-dock-link {
    color: inherit;
    text-decoration: none;
}

.pilot-mobile-dock-link:hover {
    text-decoration: none;
}

.pilot-mobile-dock-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.pilot-mobile-dock-icon svg {
    width: 100%;
    height: 100%;
}

.pilot-primary-button,
.pilot-secondary-button,
.pilot-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 0;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
}

.pilot-primary-button,
.pilot-action-button {
    background: #111111;
    color: #ffffff;
}

.pilot-secondary-button {
    background: #ffffff;
    color: #111111;
    border-color: #dfdcd4;
}

.pilot-content {
    grid-column: 2;
    gap: 0;
    min-width: 0;
    height: 100vh;
    min-height: 100vh;
    align-content: start;
    background: #fbfaf7;
    overflow-x: hidden;
    overflow-y: auto;
}

.pilot-body input,
.pilot-body select {
    border-radius: 0;
}

.pilot-content .flash-stack {
    padding: 20px 32px 0;
}

.pilot-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 26px 32px;
    border-bottom: 1px solid #e6e2db;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
}

.pilot-tab-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid #e5e1d9;
    border-radius: 0;
    background: #f4f2ed;
}

.pilot-tab {
    padding: 10px 16px;
    border-radius: 0;
    color: #6d6a61;
    font-weight: 800;
}

.pilot-tab.is-active {
    background: #111111;
    color: #ffffff;
}

.pilot-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 0;
    margin-left: auto;
    gap: 12px;
}

.pilot-icon-button {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid #e3dfd8;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    cursor: default;
}

.pilot-alert-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef5036;
}

.pilot-profile-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 10px;
    min-width: 0;
}

.pilot-profile-chip > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pilot-profile-chip span {
    color: #7b786f;
    font-size: 0.88rem;
}

.pilot-page-header,
.pilot-dashboard-grid,
.pilot-data-grid {
    padding: 0 32px 32px;
}

.pilot-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 30px;
}

.pilot-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.pilot-page-header h2 {
    font-size: 2.2rem;
    line-height: 1.05;
    margin-bottom: 10px;
}

.pilot-update-note {
    min-width: 180px;
    padding: 16px 18px;
    border: 1px solid #e4e0d8;
    border-radius: 0;
    background: #ffffff;
    text-align: right;
}

.pilot-update-note strong {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
}

.pilot-dashboard-grid,
.pilot-data-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(300px, 0.95fr);
    align-items: start;
    gap: 24px;
}

.pilot-main-column,
.pilot-side-column {
    display: grid;
    gap: 24px;
    align-content: start;
    min-width: 0;
}

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

.pilot-balance-card,
.pilot-chart-card,
.pilot-table-card,
.pilot-side-card,
.pilot-filter-card,
.pilot-mini-stat {
    padding: 22px;
    border: 1px solid #e4e1da;
    border-radius: 0;
    background: #ffffff;
    min-width: 0;
}

.pilot-balance-card {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    min-height: 145px;
}

.pilot-balance-card span,
.pilot-mini-stat span,
.pilot-activity-body span,
.pilot-activity-value span,
.pilot-progress-body span,
.pilot-role-split span {
    color: #7b786f;
}

.pilot-balance-card strong,
.pilot-mini-stat strong,
.pilot-role-split strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 2rem;
    line-height: 1;
}

.pilot-balance-card svg {
    width: 92px;
    height: 46px;
    color: #8b8a85;
}

.pilot-balance-card small {
    color: #7b786f;
}

.pilot-balance-card.is-dark {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.pilot-balance-card.is-dark span,
.pilot-balance-card.is-dark small {
    color: rgba(255, 255, 255, 0.7);
}

.pilot-balance-card.is-dark svg {
    color: #d8ff60;
}

.pilot-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.pilot-section-head.compact {
    align-items: center;
}

.pilot-section-head h3 {
    font-size: 1.85rem;
    line-height: 1.05;
    margin-bottom: 6px;
}

.pilot-chart-legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: #6b685f;
    font-size: 0.92rem;
    font-weight: 700;
}

.legend-swatch {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 6px;
    border-radius: 999px;
    background: #111111;
}

.legend-swatch.is-lime {
    background: #e6ff69;
}

.legend-swatch.is-line {
    background: #111111;
}

.pilot-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 16px;
    align-items: end;
    min-height: 300px;
    padding-top: 18px;
    background-image: linear-gradient(to top, rgba(17, 17, 17, 0.04) 1px, transparent 1px);
    background-size: 100% 22%;
}

.pilot-chart-column {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-width: 0;
}

.pilot-chart-track {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(17, 17, 17, 0.02) 0%, rgba(17, 17, 17, 0.06) 100%);
    overflow: hidden;
}

.pilot-chart-bar {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #efff9f 0%, #e1ff5f 100%);
    box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.04);
}

.pilot-chart-line {
    position: absolute;
    left: 16px;
    right: 16px;
    height: 3px;
    border-radius: 999px;
    background: #111111;
}

.pilot-chart-column strong {
    font-size: 0.92rem;
}

.pilot-chart-column small {
    color: #7b786f;
}

.pilot-clean-table {
    min-width: 100%;
}

.pilot-clean-table th {
    color: #9a968d;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.pilot-clean-table td {
    padding: 16px 10px;
    border-bottom: 1px solid #efebe4;
}

.pilot-clean-table tr:last-child td {
    border-bottom: none;
}

.pilot-activity-list,
.pilot-progress-list {
    display: grid;
    gap: 16px;
}

.pilot-activity-item,
.pilot-progress-item {
    display: grid;
    gap: 12px;
    align-items: center;
}

.pilot-activity-item {
    grid-template-columns: 52px minmax(0, 1fr) auto;
}

.pilot-progress-item {
    grid-template-columns: 64px minmax(0, 1fr);
}

.pilot-activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #f2f1ec;
    color: #111111;
    font-size: 0.9rem;
    font-weight: 800;
}

.pilot-activity-body,
.pilot-activity-value,
.pilot-progress-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.pilot-activity-body strong,
.pilot-activity-value strong,
.pilot-progress-body strong {
    font-size: 1rem;
}

.pilot-activity-value {
    text-align: right;
}

.pilot-progress-circle {
    --progress: 0;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: conic-gradient(#111111 calc(var(--progress) * 1%), #eff0ea 0);
}

.pilot-progress-circle span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    color: #111111;
}

.pilot-action-button {
    width: 100%;
    margin-top: 8px;
}

.pilot-empty-state {
    display: grid;
    place-items: center;
    min-height: 140px;
    border: 1px dashed #ddd8cf;
    border-radius: 0;
    color: #7b786f;
    text-align: center;
}

.pilot-empty-state.compact {
    min-height: 96px;
}

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

.pilot-mini-stat strong {
    margin-top: 10px;
    font-size: 1.55rem;
}

.pilot-entry-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    gap: 24px;
    align-items: start;
}

.pilot-entry-card {
    min-width: 0;
}

.pilot-entry-card .pilot-section-head h3 {
    font-size: 1.5rem;
}

.pilot-entry-hint {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #ece7dd;
    border-radius: 0;
    background: #f7f5ef;
    color: #6e6a62;
    line-height: 1.55;
}

.pilot-entry-hint.is-warning {
    border-color: #dfd59e;
    background: #fffce8;
    color: #4d493f;
}

.pilot-review-card {
    border-color: #e7dfb6;
    background: linear-gradient(180deg, #fffef8 0%, #fffced 100%);
}

.pilot-review-stats {
    margin-bottom: 18px;
}

.pilot-entry-prefill-note {
    margin: 0 0 14px;
    color: #6e6a62;
    font-weight: 700;
}

.pilot-entry-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.pilot-entry-form.is-compact {
    grid-template-columns: 1fr;
}

.pilot-entry-form .field,
.pilot-entry-form .checkbox-field {
    min-width: 0;
}

.pilot-entry-form .field.is-span-2,
.pilot-entry-form .checkbox-field.is-span-2,
.pilot-entry-actions {
    grid-column: 1 / -1;
}

.pilot-entry-form .checkbox-field {
    padding-top: 4px;
}

.pilot-entry-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.pilot-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pilot-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #efebe4;
}

.pilot-pagination-summary {
    color: #7b786f;
    font-size: 0.92rem;
}

.pilot-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pilot-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #dfdcd4;
    background: #ffffff;
    color: #111111;
    font-weight: 800;
    text-decoration: none;
}

.pilot-page-link:hover {
    text-decoration: none;
    background: #f5f3ee;
}

.pilot-page-link.is-active {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.pilot-page-ellipsis {
    color: #7b786f;
    font-weight: 800;
}

.pilot-inline-form {
    margin: 0;
}

.pilot-inline-button {
    padding: 0;
    border: none;
    background: transparent;
    color: #111111;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.pilot-inline-button.is-danger {
    color: #9b2c2c;
}

.pilot-inline-button:hover {
    text-decoration: underline;
}

.pilot-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.pilot-filter-form.is-vertical {
    flex-direction: column;
    align-items: stretch;
}

.pilot-filter-form .field {
    min-width: 220px;
}

.pilot-filter-form.is-vertical .field {
    min-width: 0;
}

.pilot-role-split {
    display: grid;
    gap: 16px;
}

.pilot-role-split > div {
    padding: 14px 0;
    border-bottom: 1px solid #efebe4;
}

.pilot-role-split > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

@media (max-width: 1180px) {
    .pilot-body {
        height: auto;
        overflow: auto;
    }

    .pilot-frame,
    .pilot-dashboard-grid,
    .pilot-data-grid {
        grid-template-columns: 1fr;
    }

    .pilot-frame {
        height: auto;
    }

    .pilot-sidebar {
        position: static;
        border-right: none;
        border-bottom: 1px solid #e3e0d9;
        width: auto;
        height: auto;
        overflow: visible;
    }

    .pilot-sidebar-inner {
        overflow: visible;
        padding-right: 0;
    }

    .pilot-content {
        grid-column: auto;
        height: auto;
        min-height: 0;
        overflow: visible;
    }

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

    .pilot-entry-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .pilot-body {
        padding: 0;
        height: auto;
        overflow: auto;
    }

    .pilot-topbar,
    .pilot-page-header,
    .pilot-dashboard-grid,
    .pilot-data-grid,
    .pilot-content .flash-stack {
        padding-left: 18px;
        padding-right: 18px;
    }

    .pilot-sidebar {
        display: none;
    }

    .pilot-content {
        min-height: 100vh;
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
    }

    .pilot-topbar {
        position: sticky;
        top: 0;
        z-index: 25;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        padding-top: calc(14px + env(safe-area-inset-top));
        padding-bottom: 14px;
        background: rgba(251, 250, 247, 0.96);
    }

    .pilot-workspace-tabs {
        display: none;
    }

    .pilot-topbar-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
        margin-left: 0;
    }

    .pilot-profile-chip {
        flex: 1;
        justify-content: flex-end;
        padding-left: 0;
        gap: 10px;
        min-width: 0;
    }

    .pilot-profile-chip strong {
        display: block;
        max-width: 180px;
        font-size: 0.98rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .pilot-profile-chip span {
        display: none;
    }

    .locale-switcher {
        flex-shrink: 0;
    }

    .locale-switcher .pilot-tab {
        min-width: 52px;
        padding: 10px 12px;
        text-align: center;
    }

    .pilot-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding-top: 22px;
    }

    .pilot-page-header h2 {
        font-size: 1.9rem;
    }

    .pilot-mobile-dock {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        z-index: 40;
        padding: 8px;
        border: 1px solid #e4e0d8;
        background: rgba(251, 250, 247, 0.98);
        backdrop-filter: blur(14px);
        box-shadow: 0 18px 44px rgba(17, 17, 17, 0.12);
    }

    .pilot-mobile-dock.is-pilot {
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 6px;
    }

    .pilot-mobile-dock.is-admin {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .pilot-mobile-dock-link {
        display: grid;
        justify-items: center;
        gap: 6px;
        min-width: 0;
        padding: 10px 4px 8px;
        border: 1px solid transparent;
        color: #6d6a61;
        font-size: 0.64rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .pilot-mobile-dock-link span:last-child {
        white-space: nowrap;
    }

    .pilot-mobile-dock-link.is-active {
        background: #111111;
        color: #f3ff72;
    }

    .pilot-mobile-dock-link.is-cta {
        background: #efff9f;
        color: #111111;
    }

    .pilot-mobile-dock-link.is-cta.is-active {
        background: #111111;
        color: #f3ff72;
    }

    .pilot-page-actions {
        justify-content: flex-start;
    }

    .pilot-filter-form {
        flex-wrap: wrap;
    }

    .pilot-pagination-bar {
        align-items: stretch;
    }

    .pilot-metric-grid,
    .pilot-mini-stats,
    .pilot-entry-form {
        grid-template-columns: 1fr;
    }

    .pilot-activity-item {
        grid-template-columns: 44px 1fr;
    }

    .pilot-activity-value {
        grid-column: 2;
        text-align: left;
    }

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