@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --ink-900: #121416;
    --ink-700: #2a3136;
    --ink-500: #5a6772;
    --ink-300: #9aa6b2;
    --paper-100: #f7f4ee;
    --paper-200: #efe8dc;
    --sand-300: #e4d6c5;
    --teal-500: #1f8a83;
    --teal-600: #19736e;
    --coral-500: #ef6b5b;
    --gold-400: #e2b75a;
    --surface-100: #ffffff;
    --surface-200: #f4efe6;
    --surface-300: #efe8dc;
    --shadow-soft: 0 0.75rem 2.5rem rgba(18, 20, 22, 0.12);
    --shadow-card: 0 0.5rem 1.25rem rgba(18, 20, 22, 0.08);
    --radius-xl: 1.75rem;
    --radius-lg: 1.125rem;
    --radius-md: 0.75rem;
    --radius-sm: 0.5rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink-900: #e5e7eb;
        --ink-700: #cbd5e1;
        --ink-500: #97a6b5;
        --ink-300: #7a8a99;
        --paper-100: #0f1214;
        --paper-200: #171d21;
        --sand-300: #222a31;
        --teal-500: #2fb7aa;
        --teal-600: #21a096;
        --coral-500: #f07a6b;
        --gold-400: #efc46b;
        --surface-100: #151a1d;
        --surface-200: #1c2328;
        --surface-300: #232b32;
        --shadow-soft: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.45);
        --shadow-card: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
    }
}

[data-theme="light"] {
    --ink-900: #121416;
    --ink-700: #2a3136;
    --ink-500: #5a6772;
    --ink-300: #9aa6b2;
    --paper-100: #f7f4ee;
    --paper-200: #efe8dc;
    --sand-300: #e4d6c5;
    --teal-500: #1f8a83;
    --teal-600: #19736e;
    --coral-500: #ef6b5b;
    --gold-400: #e2b75a;
    --surface-100: #ffffff;
    --surface-200: #f4efe6;
    --surface-300: #efe8dc;
    --shadow-soft: 0 0.75rem 2.5rem rgba(18, 20, 22, 0.12);
    --shadow-card: 0 0.5rem 1.25rem rgba(18, 20, 22, 0.08);
}

[data-theme="dark"] {
    --ink-900: #e5e7eb;
    --ink-700: #cbd5e1;
    --ink-500: #97a6b5;
    --ink-300: #7a8a99;
    --paper-100: #0f1214;
    --paper-200: #171d21;
    --sand-300: #222a31;
    --teal-500: #2fb7aa;
    --teal-600: #21a096;
    --coral-500: #f07a6b;
    --gold-400: #efc46b;
    --surface-100: #151a1d;
    --surface-200: #1c2328;
    --surface-300: #232b32;
    --shadow-soft: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.45);
    --shadow-card: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, sans-serif;
    color: var(--ink-900);
    background: var(--paper-100);
}

[data-theme="dark"] body {
    color: var(--ink-900);
    background: var(--paper-100);
}

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

img {
    max-width: 100%;
    display: block;
}

.auth-page {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #f8efe1 0%, #f6f1e8 45%, #e9f4f3 100%);
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(20rem, 1.1fr) minmax(20rem, 35rem);
}

.auth-hero {
    padding: 4.5rem 4.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    color: var(--ink-900);
}

.auth-hero::before,
.auth-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    z-index: 0;
}

.auth-hero::before {
    width: 26.25rem;
    height: 26.25rem;
    background: #f4d6b7;
    top: -10rem;
    left: -8.75rem;
}

.auth-hero::after {
    width: 32.5rem;
    height: 32.5rem;
    background: #c7ece6;
    bottom: -15rem;
    right: -13.75rem;
}

.auth-hero-top,
.auth-hero-grid,
.auth-hero-footer {
    position: relative;
    z-index: 1;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 62.4375rem;
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
}

.auth-hero-title {
    font-family: "Playfair Display", serif;
    font-size: 2.75rem;
    margin: 1.125rem 0 0.75rem;
}

.auth-hero-subtitle {
    font-size: 1rem;
    color: var(--ink-500);
    line-height: 1.7;
    max-width: 28.75rem;
}

.auth-hero-grid {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
}

.auth-hero-card {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 1.125rem;
    padding: 1rem 1.125rem;
    box-shadow: var(--shadow-card);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.auth-hero-card h4 {
    margin: 0 0 0.375rem;
    font-size: 0.9375rem;
}

.auth-hero-card p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--ink-500);
}

.auth-chip {
    padding: 0.375rem 0.625rem;
    border-radius: 62.4375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
    white-space: nowrap;
}

.auth-chip.warn {
    background: rgba(226, 183, 90, 0.2);
    color: #8a5b0c;
}

.auth-chip.muted {
    background: rgba(154, 166, 178, 0.2);
    color: var(--ink-500);
}

.auth-hero-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--ink-500);
}

.auth-credit {
    font-weight: 600;
}

.auth-footnote {
    font-size: 0.75rem;
    color: var(--ink-300);
}

.auth-hero-footer a {
    color: var(--teal-600);
    font-weight: 600;
}

.auth-panel {
    background: #fff;
    padding: 3.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.auth-card {
    width: 100%;
    max-width: 26.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.375rem;
}

.auth-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-card-kicker {
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    color: var(--ink-300);
    font-weight: 700;
}

.auth-title {
    font-size: 1.75rem;
    margin: 0;
}

.auth-hint {
    color: var(--ink-500);
    font-size: 0.9375rem;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-actions .btn {
    width: 100%;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input .form-control {
    padding-right: 5.25rem;
}

.auth-toggle {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
}

.auth-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--ink-500);
}

.alert {
    border-radius: var(--radius-md);
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
}

.alert-success {
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
}

.alert-error {
    background: rgba(239, 107, 91, 0.16);
    color: var(--coral-500);
}

.app-shell {
    min-height: 100vh;
    background: var(--paper-100);
    overflow: hidden;
}

.app {
    display: grid;
    grid-template-columns: 16.25rem 1fr;
    min-height: 100vh;
    height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #0f1716 0%, #141b1a 55%, #101615 100%);
    color: #eae6dc;
    padding: 1.75rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: width 0.2s ease, padding 0.2s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    border-right: 0.0625rem solid rgba(255, 255, 255, 0.06);
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.08);
    justify-content: space-between;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #1f8a83 0%, #3cb6a4 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.125rem;
    box-shadow: 0 0.75rem 1.25rem rgba(16, 25, 24, 0.45);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.brand-text span {
    font-size: 0.6875rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.brand-text h1 {
    margin: 0;
    font-family: "Playfair Display", serif;
    font-size: 1.625rem;
    color: #fff;
}

.brand-tagline {
    margin: 0;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.75rem;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.nav-section {
    margin-top: 0.875rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.625rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.875rem;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    position: relative;
}

.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.nav-label {
    white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: -1.125rem;
    width: 0.375rem;
    height: 60%;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #1f8a83 0%, #66c3b7 100%);
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    border-top: 0.0625rem solid rgba(255, 255, 255, 0.08);
    padding-top: 0.875rem;
}

.sidebar-close {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    display: none;
    align-items: center;
    justify-content: center;
}

.main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-height: 100vh;
    overflow: auto;
    scroll-padding-top: 5.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 138, 131, 0.45) rgba(17, 21, 20, 0.08);
}

.main::-webkit-scrollbar {
    width: 0.625rem;
}

.main::-webkit-scrollbar-track {
    background: rgba(17, 21, 20, 0.06);
    border-radius: 999px;
}

.main::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(31, 138, 131, 0.7), rgba(226, 183, 90, 0.6));
    border-radius: 999px;
    border: 0.125rem solid transparent;
    background-clip: padding-box;
}

.main::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(31, 138, 131, 0.9), rgba(226, 183, 90, 0.8));
    background-clip: padding-box;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--paper-100);
    padding: 0.875rem;
    border-bottom: 0.0625rem solid var(--paper-200);
}

[data-theme="dark"] .topbar {
    background: var(--paper-100);
    border-bottom-color: var(--sand-300);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.topbar h2 {
    margin: 0;
    font-size: 1.625rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-icon {
    position: relative;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 50%;
    background: #fff;
    color: var(--ink-700);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-card);
    border: 0.0625rem solid transparent;
    transition: border 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .topbar-icon {
    background: var(--surface-200);
    color: var(--ink-700);
}

.topbar-icon:hover,
.topbar-icon.active {
    border-color: var(--sand-300);
    transform: translateY(-0.0625rem);
}

.topbar-badge {
    position: absolute;
    top: -0.375rem;
    right: -0.25rem;
    background: var(--coral-500);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.1875rem 0.375rem;
    border-radius: 62.4375rem;
    border: 0.125rem solid #fff;
}

.pill {
    padding: 0.375rem 0.75rem;
    border-radius: 62.4375rem;
    background: #fff;
    box-shadow: var(--shadow-card);
    font-size: 0.75rem;
    color: var(--ink-500);
}

[data-theme="dark"] .pill {
    background: var(--surface-200);
    color: var(--ink-500);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: #fff;
    padding: 0.375rem 0.625rem;
    border-radius: 62.4375rem;
    box-shadow: var(--shadow-card);
}

[data-theme="dark"] .user-chip {
    background: var(--surface-200);
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--teal-500);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
    gap: 1.125rem;
}

.stat-card {
    background: #fff;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-card h4 {
    margin: 0;
    font-size: 0.875rem;
    color: var(--ink-500);
    font-weight: 600;
}

.stat-card strong {
    font-size: 1.375rem;
}

.stat-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--ink-300);
}

.panel {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

[data-theme="dark"] .panel {
    background: var(--surface-100);
    color: var(--ink-900);
}

.panel-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ff-filter>* {
    flex: 1 1 8rem;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.panel-header span {
    color: var(--ink-500);
    font-size: 0.8125rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.table th,
.table td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border-bottom: 0.0625rem solid var(--paper-200);
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-500);
}

.tag {
    padding: 0.25rem 0.625rem;
    border-radius: 62.4375rem;
    font-size: 0.6875rem;
    font-weight: 600;
}

.tag.green {
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
}

.tag.orange {
    background: rgba(226, 183, 90, 0.18);
    color: #a1731e;
}

.tag.red {
    background: rgba(239, 107, 91, 0.18);
    color: var(--coral-500);
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
    gap: 1rem;
}

.insight-card {
    background: linear-gradient(135deg, #fff, #f7f1e6);
    padding: 1.125rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.insight-card h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.8125rem;
    color: var(--ink-500);
}

.insight-card p {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #121b1a 0%, #1f2f2b 48%, #243a3b 100%);
    color: #f7f2e6;
    padding: 1.75rem 1.875rem;
    box-shadow: var(--shadow-soft);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(239, 107, 91, 0.18), transparent 55%),
        radial-gradient(circle at bottom left, rgba(226, 183, 90, 0.18), transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 62.4375rem;
    background: rgba(247, 242, 230, 0.14);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #fbe7c6;
}

.hero-title {
    margin: 0;
    font-size: 1.875rem;
    font-family: "Playfair Display", serif;
}

.hero-subtitle {
    margin: 0;
    max-width: 32.5rem;
    color: rgba(247, 242, 230, 0.78);
    font-size: 0.875rem;
    line-height: 1.6;
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.metric-pill {
    padding: 0.5rem 0.75rem;
    border-radius: 62.4375rem;
    background: rgba(17, 20, 22, 0.45);
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
    gap: 1rem;
}

.kpi-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.125rem 1.25rem;
    box-shadow: var(--shadow-card);
    border: 0.0625rem solid var(--paper-200);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-500);
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.kpi-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--ink-500);
}

.kpi-chip {
    padding: 0.25rem 0.625rem;
    border-radius: 62.4375rem;
    font-size: 0.6875rem;
    font-weight: 700;
}

.kpi-chip.good {
    background: rgba(31, 138, 131, 0.14);
    color: var(--teal-600);
}

.kpi-chip.warn {
    background: rgba(226, 183, 90, 0.2);
    color: #a1731e;
}

.kpi-chip.bad {
    background: rgba(239, 107, 91, 0.2);
    color: var(--coral-500);
}

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 1.25rem;
}

.surface {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    border: 0.0625rem solid var(--paper-200);
    padding: 1.375rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.surface-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.surface-title {
    margin: 0;
    font-size: 1.125rem;
}

.surface-subtitle {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    color: var(--ink-500);
}

.surface-meta {
    font-size: 0.75rem;
    color: var(--ink-300);
}

.activity-table th {
    background: transparent;
}

.activity-table td {
    font-size: 0.8125rem;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
}

.snapshot-card {
    padding: 0.875rem;
    border-radius: var(--radius-md);
    background: #fdf8f1;
    border: 0.0625rem solid var(--paper-200);
}

.snapshot-card span {
    display: block;
    font-size: 0.75rem;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.snapshot-card strong {
    display: block;
    margin-top: 0.375rem;
    font-size: 1.125rem;
}

.agent-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.agent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.agent-name {
    font-weight: 700;
    font-size: 0.8125rem;
}

.agent-sub {
    font-size: 0.75rem;
    color: var(--ink-500);
}

.agent-amount {
    font-weight: 700;
    font-size: 0.8125rem;
}

.bar {
    height: 0.375rem;
    border-radius: 62.4375rem;
    background: var(--paper-200);
    overflow: hidden;
}

.bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #1f8a83, #ef6b5b);
}

.bar-fill.good {
    background: linear-gradient(90deg, #1f8a83, #3fb4ac);
}

.bar-fill.warn {
    background: linear-gradient(90deg, #e2b75a, #f0c870);
}

.bar-fill.bad {
    background: linear-gradient(90deg, #ef6b5b, #f59c8f);
}

.bar-fill.cool {
    background: linear-gradient(90deg, #3a7d8c, #6aa7b3);
}

.chart-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chart-row {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.chart-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--ink-500);
}

.chart-row-header strong {
    color: var(--ink-900);
    font-size: 0.8125rem;
}

.chart-track {
    height: 0.5rem;
    border-radius: 62.4375rem;
    background: var(--paper-200);
    overflow: hidden;
}

.chart-footnote {
    font-size: 0.75rem;
    color: var(--ink-300);
}

.trend-chart {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.trend-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0.375rem, 1fr));
    gap: 0.375rem;
    align-items: end;
    height: 10rem;
}

.trend-bar {
    position: relative;
    height: 100%;
    border-radius: 62.4375rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bar-segment {
    position: absolute;
    left: 0;
    right: 0;
    border-radius: 62.4375rem;
}

.bar-commitment {
    background: rgba(31, 138, 131, 0.8);
}

.bar-pdc {
    background: rgba(226, 183, 90, 0.9);
}

.empty-state {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: #fdf8f1;
    border: 0.0625rem dashed var(--paper-200);
    color: var(--ink-500);
    font-size: 0.8125rem;
}

[data-theme="dark"] .empty-state {
    background: var(--surface-200);
    border-color: var(--sand-300);
    color: var(--ink-700);
}

.mobile-toggle {
    display: none;
    border: none;
    background: #111514;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .mobile-toggle {
    background: var(--surface-200);
    color: var(--ink-900);
}

.sidebar-toggle {
    border: 0.0625rem solid var(--paper-200);
    background: #fff;
    color: var(--ink-700);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

[data-theme="dark"] .sidebar-toggle {
    background: var(--surface-200);
    border-color: var(--sand-300);
    color: var(--ink-900);
}

.app.sidebar-collapsed {
    grid-template-columns: 5.75rem 1fr;
}

.app.sidebar-collapsed .sidebar {
    padding: 1.25rem 0.625rem;
}

.app.sidebar-collapsed .brand-block {
    justify-content: center;
    padding-bottom: 0.5rem;
}

.app.sidebar-collapsed .brand-group {
    justify-content: center;
}

.app.sidebar-collapsed .brand-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
}

.app.sidebar-collapsed .brand-text,
.app.sidebar-collapsed .nav-section,
.app.sidebar-collapsed .nav-label {
    display: none;
}

.app.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 0.625rem;
}

.app.sidebar-collapsed .nav-icon {
    font-size: 1.125rem;
}

.app.sidebar-collapsed .nav-item.active::before {
    left: 0;
    width: 0.25rem;
    height: 70%;
}

.app.sidebar-collapsed .sidebar-footer {
    display: none;
}

@media (max-width: 64rem) {

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

    .auth-hero {
        padding: 3.5rem 2rem 2.5rem;
    }

    .auth-panel {
        padding: 3rem 1.75rem;
    }

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

    .app.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 20;
        height: 100%;
        width: 90%;
    }

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

    .mobile-toggle {
        display: inline-flex;
    }

    .sidebar-toggle {
        display: none;
    }

    .sidebar-close {
        display: inline-flex;
    }
}

@media (max-width: 38.125rem) {
    .pill {
        display: none;
    }

    .panel {
        padding: 1.125rem;
    }
}

/* Legacy-friendly utility classes */
.container {
    width: min(75rem, 92vw);
    margin: 0 auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

.row>[class*="col-"] {
    padding: 0.75rem;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-8 {
    flex: 0 0 66.666%;
    max-width: 66.666%;
}

.col-9 {
    flex: 0 0 75%;
    max-width: 75%;
}

@media (min-width: 48rem) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    .col-md-8 {
        flex: 0 0 66.666%;
        max-width: 66.666%;
    }
}

@media (min-width: 64rem) {
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-lg-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-lg-8 {
        flex: 0 0 66.666%;
        max-width: 66.666%;
    }

    .col-lg-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }
}

.g-3 {
    gap: 1rem;
}

.g-4 {
    gap: 1.5rem;
}

.gap-2 {
    gap: 0.75rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.75rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 0.75rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 2rem;
}

.p-2 {
    padding: 0.75rem;
}

.p-3 {
    padding: 1rem;
}

.p-4 {
    padding: 1.5rem;
}

.p-5 {
    padding: 2rem;
}

.px-3 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-3 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.text-center {
    text-align: center !important;
}

.text-end {
    text-align: right !important;
}

.text-muted {
    color: var(--ink-500);
}

.text-primary {
    color: var(--teal-500);
}

.text-success {
    color: var(--teal-600);
}

.text-danger {
    color: var(--coral-500);
}

.text-secondary {
    color: var(--ink-500);
}

.text-warning {
    color: #a1731e;
}

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1rem;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-title {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--ink-500);
}

.card-text {
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    border-radius: 62.4375rem;
    font-weight: 600;
    border: 0.0625rem solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8125rem;
}

.btn-primary {
    background: var(--teal-500);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--ink-700);
    border-color: var(--sand-300);
}

.btn-success {
    background: var(--teal-600);
    color: #fff;
}

.btn-danger {
    background: var(--coral-500);
    color: #fff;
}

.btn-warning {
    background: var(--gold-400);
    color: #3c2a08;
}

.table-responsive {
    overflow-x: auto;
}

.table-striped tbody tr:nth-child(odd) {
    background: #faf6ef;
}

[data-theme="dark"] .table-striped tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.03);
}

.table-bordered th,
.table-bordered td {
    border: 0.0625rem solid var(--paper-200);
}

.form-control {
    width: 100%;
    border-radius: var(--radius-md);
    border: 0.0625rem solid var(--sand-300);
    padding: 0.625rem 0.75rem;
    background: #fffaf3;
}

[data-theme="dark"] .form-control {
    background: var(--surface-200);
    border-color: var(--sand-300);
    color: var(--ink-900);
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink-700);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    appearance: none;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 0.375rem;
    border: 0.125rem solid var(--teal-500);
    background: #fff;
    display: grid;
    place-items: center;
    margin: 0;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.form-check-input::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 0.125rem;
    background: var(--teal-500);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.form-check-input:checked {
    background: rgba(19, 150, 135, 0.12);
}

.form-check-input:checked::after {
    opacity: 1;
    transform: scale(1);
}

.form-check-input:focus-visible {
    outline: 0.125rem solid rgba(19, 150, 135, 0.35);
    outline-offset: 0.125rem;
}
}

.alert {
    border-radius: var(--radius-md);
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
}

.alert-success {
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
}

.alert-danger {
    background: rgba(239, 107, 91, 0.16);
    color: var(--coral-500);
}

.alert-info {
    background: rgba(31, 138, 131, 0.08);
    color: var(--teal-600);
}

.d-flex {
    display: flex;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-between {
    justify-content: space-between;
}

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

.align-items-center {
    align-items: center;
}

.text-nowrap {
    white-space: nowrap;
}

.fw-bold {
    font-weight: 700;
}

.fw-semibold {
    font-weight: 600;
}

.fs-1 {
    font-size: 2rem;
}

.fs-2 {
    font-size: 1.75rem;
}

.fs-3 {
    font-size: 1.5rem;
}

.fs-4 {
    font-size: 1.25rem;
}

.fs-5 {
    font-size: 1.1rem;
}

.fs-6 {
    font-size: 0.95rem;
}

.rounded {
    border-radius: var(--radius-sm);
}

.rounded-3 {
    border-radius: var(--radius-md);
}

.shadow {
    box-shadow: var(--shadow-soft);
}

.shadow-sm {
    box-shadow: var(--shadow-card);
}

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

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.border {
    border: 0.0625rem solid var(--paper-200);
}

.border-bottom {
    border-bottom: 0.0625rem solid var(--paper-200);
}

.border-secondary {
    border-color: var(--sand-300);
}

.bg-white {
    background: #fff;
}

.bg-light {
    background: #fffaf3;
}

.bg-primary {
    background: var(--teal-500);
}

.bg-danger {
    background: var(--coral-500);
}

.bg-success {
    background: var(--teal-600);
}

.bg-warning {
    background: var(--gold-400);
}

.bg-info {
    background: rgba(31, 138, 131, 0.18);
    color: var(--teal-600);
}

.text-white {
    color: #fff;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(18, 20, 22, 0.45);
    z-index: 1000;
}

.modal.fade {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-dialog {
    max-width: 40rem;
    width: 100%;
    transition: transform 0.2s ease;
}

.modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: visible;
}

[data-theme="dark"] .modal-content {
    background: var(--surface-100);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 0.0625rem solid var(--paper-200);
}

.modal-title {
    margin: 0;
    font-size: 1.125rem;
}

.modal-body {
    padding: 1.125rem 1.25rem;
    overflow: visible;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    border-top: 0.0625rem solid var(--paper-200);
}

.modal-footer.justify-content-center {
    justify-content: center;
}

.modal-footer.justify-content-between {
    justify-content: space-between;
}

.modal-dialog.modal-lg {
    max-width: 53.75rem;
}

.modal-dialog.modal-sm {
    max-width: 26.25rem;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

.modal.fade .modal-dialog {
    transform: translateY(0.75rem);
}

.modal-header.bg-danger,
.modal-header.bg-primary,
.modal-header.bg-success,
.modal-header.bg-warning {
    color: #fff;
    border-bottom-color: transparent;
}

.modal-header.bg-warning {
    color: #3c2a08;
}

.btn-close {
    border: none;
    background: transparent;
    font-size: 1.125rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.btn-close-white {
    color: #fff;
}

/* UI system refresh + compatibility layer */
.content-header {
    margin-bottom: 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 0.8125rem;
    color: var(--ink-500);
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    margin: 0 0.375rem 0 0.125rem;
    color: var(--ink-300);
}

.btn-group {
    display: inline-flex;
    gap: 0.375rem;
    align-items: center;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
}

.btn-outline-primary {
    color: var(--teal-600);
    border-color: var(--teal-500);
    background: transparent;
}

.btn-outline-danger {
    color: var(--coral-500);
    border-color: var(--coral-500);
    background: transparent;
}

.btn-outline-success {
    color: var(--teal-600);
    border-color: var(--teal-600);
    background: transparent;
}

.btn-outline-teal {
    color: var(--teal-600);
    border-color: var(--teal-500);
    background: transparent;
}

.btn-outline-secondary {
    color: var(--ink-500);
    border-color: var(--sand-300);
    background: transparent;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 62.4375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
}

.rounded-pill {
    border-radius: 62.4375rem;
}

.table-wrapper {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.table th,
.table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 0.0625rem solid var(--paper-200);
    vertical-align: middle;
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-500);
    background: #fbf7f0;
}

.table-striped tbody tr:nth-child(even) {
    background: #fcf8f2;
}

.table-bordered {
    border: 0.0625rem solid var(--paper-200);
}

.table-bordered th,
.table-bordered td {
    border: 0.0625rem solid var(--paper-200);
}

.form-select,
.custom-select {
    width: 100%;
    border-radius: var(--radius-md);
    border: 0.0625rem solid var(--sand-300);
    padding: 0.625rem 0.75rem;
    background: #fffaf3;
    font-size: 0.8125rem;
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    border: 0.0625rem solid var(--sand-300);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: #fff;
    font-size: 0.8125rem;
}

.input-group .form-control {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group-append button {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-sm .form-control,
.input-group-sm .input-group-text {
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: max-content;
    background: #fff;
    border: 0.0625rem solid var(--paper-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 0.5rem;
    display: none;
    z-index: 50;
}

[data-theme="dark"] .dropdown-menu {
    background: var(--surface-100);
    border-color: var(--sand-300);
}

.modal .dropdown-menu {
    z-index: 1050;
}

.dropdown-menu-end {
    left: auto;
    right: 0;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--ink-700);
}

[data-theme="dark"] .dropdown-item {
    color: var(--ink-700);
}

.dropdown-item:hover {
    background: var(--paper-200);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--surface-300);
}

.dropdown-divider {
    height: 0.0625rem;
    background: var(--paper-200);
    margin: 0.375rem 0;
}

[data-theme="dark"] .dropdown-divider {
    background: var(--sand-300);
}

.dropdown-theme {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.25rem 0;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.02);
}

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

.dropdown-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-500);
    padding: 0 0.5rem;
}

.theme-option {
    justify-content: flex-start;
    border: 0.0625rem solid transparent;
    border-radius: 0.5rem;
    padding: 0.5rem 0.625rem;
    transition: background 0.2s ease, border 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    cursor: pointer;
}

.theme-icon {
    width: 1rem;
    height: 1rem;
}

.theme-option.active {
    background: rgba(31, 138, 131, 0.15);
    color: var(--teal-600);
    border-color: rgba(31, 138, 131, 0.25);
}

[data-theme="dark"] .theme-option.active {
    background: rgba(47, 183, 170, 0.2);
    color: var(--teal-500);
    border-color: rgba(47, 183, 170, 0.35);
}

[data-theme="dark"] .theme-option {
    background: var(--ink-300);
}

.theme-option:hover {
    background: var(--paper-200);
}

[data-theme="dark"] .theme-option:hover {
    background: var(--surface-300);
}

[data-theme="dark"] .dropdown-theme {
    background: rgba(255, 255, 255, 0.04);
}

.topbar-user {
    border: none;
    cursor: pointer;
    padding-right: 0.75rem;
}

[data-theme="dark"] .topbar-user {
    color: var(--ink-900);
}

.topbar-user i {
    font-size: 0.75rem;
    color: var(--ink-500);
}

.dropdown-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    border: 0.0625rem solid var(--sand-300);
    background: #fffaf3;
    font-size: 0.8125rem;
    width: 100%;
}

[data-theme="dark"] .dropdown-toggle-btn {
    background: var(--surface-200);
    border-color: var(--sand-300);
    color: var(--ink-900);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}

.neo-pagination .pagination {
    margin: 0;
}

.page-item {
    display: inline-flex;
}

.page-link {
    padding: 0.375rem 0.75rem;
    border-radius: 62.4375rem;
    border: 0.0625rem solid var(--paper-200);
    background: #fff;
    color: var(--ink-700);
    font-size: 0.75rem;
    font-weight: 600;
}

[data-theme="dark"] .page-link {
    background: var(--surface-100);
    border-color: var(--sand-300);
    color: var(--ink-900);
}

.page-item.active .page-link {
    background: var(--teal-500);
    border-color: var(--teal-500);
    color: #fff;
}

.page-item.disabled .page-link {
    color: var(--ink-300);
    background: #f9f6f0;
}

[data-theme="dark"] .page-item.disabled .page-link {
    color: var(--ink-700);
    background: var(--surface-200);
}

.list-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.125rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.125rem;
}

.per-page-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--ink-500);
}

.per-page-form .form-control {
    width: auto;
}

.pagination-meta {
    font-size: 0.75rem;
    color: var(--ink-500);
}

.pagination-links {
    margin-left: auto;
}

.page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.625rem;
    border-radius: 0.625rem;
    border: 0.0625rem solid var(--paper-200);
    background: #fff;
    font-size: 0.75rem;
    color: var(--ink-700);
}

[data-theme="dark"] .page-item .page-link {
    background: var(--surface-100);
    border-color: var(--sand-300);
    color: var(--ink-900);
}

.page-item.active .page-link {
    background: var(--teal-500);
    border-color: var(--teal-500);
    color: #fff;
}

.d-none {
    display: none;
}

.d-inline {
    display: inline;
}

.d-inline-block {
    display: inline-block;
}

.me-1 {
    margin-right: 0.375rem;
}

.me-2 {
    margin-right: 0.75rem;
}

.ms-1 {
    margin-left: 0.375rem;
}

.ms-2 {
    margin-left: 0.75rem;
}

.mx-1 {
    margin-left: 0.375rem;
    margin-right: 0.375rem;
}

.mx-2 {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

.my-1 {
    margin-top: 0.375rem;
    margin-bottom: 0.375rem;
}

.my-2 {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.pt-2 {
    padding-top: 0.75rem;
}

.pb-2 {
    padding-bottom: 0.75rem;
}

.px-2 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.py-2 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.px-4 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-1 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-decoration-none {
    text-decoration: none;
}

.float-end {
    float: right;
}

.lead {
    font-size: 1rem;
    color: var(--ink-500);
}

.display-6 {
    font-size: 1.6rem;
    font-weight: 700;
}

.w-full {
    width: 100%;
}

.text-sm {
    font-size: 0.75rem;
}

.text-gray-700 {
    color: var(--ink-700);
}

.text-gray-800 {
    color: var(--ink-900);
}

.text-blue-600 {
    color: #2b6cb0;
}

.text-red-600 {
    color: #c53030;
}

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

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

.divide-y>*+* {
    border-top: 0.0625rem solid var(--paper-200);
}

.divide-gray-200>*+* {
    border-top-color: var(--paper-200);
}

.transition-all {
    transition: all 0.2s ease;
}

.duration-200 {
    transition-duration: 0.2s;
}

.hover\:bg-indigo-50:hover {
    background: #f0f5ff;
}

.border-start-0 {
    border-left: none;
}

.border-end-0 {
    border-right: none;
}

.rounded-start {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.rounded-end {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.border-0 {
    border: 0;
}

.bg-transparent {
    background: transparent;
}

.bg-secondary {
    background: #8a8f97;
}

.shadow-lg {
    box-shadow: 0 1.125rem 3rem rgba(18, 20, 22, 0.18);
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

.p-0 {
    padding: 0;
}

.gap-1 {
    gap: 0.375rem;
}

.g-2 {
    gap: 0.75rem;
}

.me-0 {
    margin-right: 0;
}

.ms-0 {
    margin-left: 0;
}

.text-start {
    text-align: left;
}

.rounded-circle {
    border-radius: 50%;
}

.modal-dialog-centered {
    margin: auto;
}

/* Tailwind-style compatibility helpers */
.flex {
    display: flex;
}

.flex-nowrap {
    flex-wrap: nowrap;
}

.items-center {
    align-items: center;
}

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

.justify-between {
    justify-content: space-between;
}

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

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.text-xl {
    font-size: 1.25rem;
}

.text-black {
    color: #000;
}

.text-dark {
    color: var(--ink-900);
}

.text-gray-900 {
    color: var(--ink-900);
}

.text-gray-300 {
    color: var(--ink-300);
}

.rounded-lg {
    border-radius: var(--radius-md);
}

.rounded-4 {
    border-radius: 1.25rem;
}

.bg-light-subtle {
    background: #fbf7f0;
}

.bg-indigo-50 {
    background: #eef6f5;
}

.bg-indigo-600 {
    background: var(--teal-600);
}

.bg-green-600 {
    background: var(--teal-600);
}

.bg-red-600 {
    background: var(--coral-500);
}

.bg-orange-600 {
    background: var(--gold-400);
    color: #3c2a08;
}

.text-indigo-800 {
    color: #1c615c;
}

.border-gray-300 {
    border-color: var(--sand-300);
}

.border-primary {
    border-color: var(--teal-500);
}

.border-success {
    border-color: var(--teal-600);
}

.border-danger {
    border-color: var(--coral-500);
}

.border-warning {
    border-color: var(--gold-400);
}

.border-2 {
    border-width: 0.125rem;
}

.px-5 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-5 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.mt-6 {
    margin-top: 2.25rem;
}

.mt-8 {
    margin-top: 3rem;
}

.mb-6 {
    margin-bottom: 2.25rem;
}

.min-h-\[6.25rem\] {
    min-height: 6.25rem;
}

.hover\:bg-indigo-700:hover {
    background: #145e59;
}

.hover\:bg-green-700:hover {
    background: #14625d;
}

.hover\:bg-red-700:hover {
    background: #d85a4d;
}

.hover\:bg-orange-700:hover {
    background: #c8933b;
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 0.1875rem rgba(31, 138, 131, 0.25);
}

.focus\:ring-indigo-500:focus {
    box-shadow: 0 0 0 0.1875rem rgba(31, 138, 131, 0.25);
}

.focus\:ring-red-500:focus {
    box-shadow: 0 0 0 0.1875rem rgba(239, 107, 91, 0.25);
}

.focus\:ring-orange-500:focus {
    box-shadow: 0 0 0 0.1875rem rgba(226, 183, 90, 0.3);
}

.focus\:ring-green-500:focus {
    box-shadow: 0 0 0 0.1875rem rgba(31, 138, 131, 0.25);
}

/* Simple tabs + collapse support */
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 62.4375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    cursor: pointer;
    background: #fff;
}

.nav-link.active {
    background: var(--teal-500);
    color: #fff;
}

.tab-content {
    margin-top: 1rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.collapse {
    display: none;
}

.collapse.show {
    display: block;
}

.hover-shadow:hover {
    box-shadow: var(--shadow-card);
}

.notification-unviewed {
    border: 0.0625rem solid rgba(31, 138, 131, 0.35);
}

.link-style {
    color: var(--teal-600);
    cursor: pointer;
}

.icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

.icon.spin {
    animation: icon-spin 0.8s linear infinite;
}

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

/* Dashboard: Command layout */
.dash {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.875rem;
}

.dash-header {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    padding: 1.75rem;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #f7f1e8 0%, #eef5f4 52%, #f9efe0 100%);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    animation: dash-rise 0.6s ease;
}

.dash-header::after {
    content: "";
    position: absolute;
    width: 16.25rem;
    height: 16.25rem;
    border-radius: 50%;
    background: rgba(18, 65, 87, 0.08);
    right: -7.5rem;
    top: -7.5rem;
}

[data-theme="dark"] .dash-header {
    background: linear-gradient(135deg, #1a2226 0%, #1b2626 52%, #1e2428 100%);
}

[data-theme="dark"] .dash-header::after {
    background: rgba(47, 183, 170, 0.12);
}

.dash-header-main {
    position: relative;
    z-index: 1;
}

.dash-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 62.4375rem;
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dash-date {
    font-size: 0.75rem;
    color: var(--ink-500);
}

.dash-title {
    font-family: "Playfair Display", serif;
    font-size: 2.125rem;
    margin: 1rem 0 0.625rem;
}

.dash-subtitle {
    color: var(--ink-500);
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 32.5rem;
}

.dash-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 1.25rem;
}

.dash-header-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.125rem;
}

.dash-header-kpi {
    background: rgba(255, 255, 255, 0.84);
    border-radius: 0.875rem;
    padding: 0.75rem 0.875rem;
    border: 0.0625rem solid var(--paper-200);
}

[data-theme="dark"] .dash-header-kpi {
    background: var(--surface-200);
    border-color: var(--sand-300);
}

.dash-header-kpi span {
    color: var(--ink-500);
    font-size: 0.75rem;
}

.dash-header-kpi strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.0625rem;
}

.dash-header-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 1.375rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.dash-panel-label {
    font-size: 0.75rem;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.dash-panel-top strong {
    display: block;
    font-size: 1.625rem;
    margin-top: 0.375rem;
}

.dash-panel-meta {
    color: var(--ink-500);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.dash-progress {
    background: #f0ebe1;
    border-radius: 62.4375rem;
    height: 0.625rem;
    overflow: hidden;
}

.dash-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #ef6b5b, #f4b261);
}

.dash-exposure-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--ink-500);
}

.dash-exposure-grid strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--ink-900);
    font-size: 0.875rem;
}

.dash-sparkline {
    background: #f8f4ed;
    border-radius: 1rem;
    padding: 0.75rem;
    min-height: 7.5rem;
}

[data-theme="dark"] .dash-sparkline,
[data-theme="dark"] .dash-line-chart,
[data-theme="dark"] .dash-mix-shell,
[data-theme="dark"] .dash-bar-chart {
    background: var(--surface-200);
}

.dash-sparkline-area {
    padding: 0.625rem;
}

.dash-sparkline svg,
.dash-line-chart svg {
    width: 100%;
    height: 100%;
}

.dash-line-grid {
    stroke: rgba(18, 65, 87, 0.08);
    stroke-width: 0.8;
    stroke-dasharray: 3 6;
}

.dash-line-fill {
    fill: url(#dashLineFill);
    stroke: none;
}

.dash-line-fill.chart {
    fill: url(#dashTrendFill);
}

.dash-line-total {
    fill: none;
    stroke: #124157;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dash-line-total.bold {
    stroke-width: 2.6;
}

.dash-line-com {
    fill: none;
    stroke: #1f8a83;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dash-line-pdc {
    fill: none;
    stroke: #e2b75a;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6;
    stroke-dasharray: 5 6;
}

.dash-line-axis {
    display: flex;
    justify-content: space-between;
    font-size: 0.6875rem;
    color: var(--ink-500);
    margin-top: 0.5rem;
    padding: 0 0.375rem;
}

.dash-line-dot {
    fill: #124157;
    opacity: 0.75;
}

.dash-header-area-com {
    fill: url(#dashHeaderComFill);
    stroke: none;
}

.dash-header-area-pdc {
    fill: url(#dashHeaderPdcFill);
    stroke: none;
}

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dash-kpi {
    background: #fff;
    border-radius: 1.125rem;
    padding: 1rem 1.125rem;
    box-shadow: var(--shadow-card);
    border: 0.0625rem solid var(--paper-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-kpi span {
    font-size: 0.75rem;
    color: var(--ink-500);
}

.dash-kpi strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.125rem;
}

.dash-kpi-tag {
    padding: 0.375rem 0.625rem;
    border-radius: 62.4375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dash-kpi-tag.good {
    background: rgba(31, 138, 131, 0.15);
    color: var(--teal-600);
}

.dash-kpi-tag.bad {
    background: rgba(239, 107, 91, 0.2);
    color: var(--coral-500);
}

.dash-kpi-tag.warn {
    background: rgba(226, 183, 90, 0.25);
    color: #8a5b0c;
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1.25rem;
}

.dash-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    border: 0.0625rem solid var(--paper-200);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: dash-rise 0.6s ease;
}

[data-theme="dark"] .dash-card,
[data-theme="dark"] .dash-header-card,
[data-theme="dark"] .dash-kpi,
[data-theme="dark"] .dash-mini {
    background: var(--surface-100);
    border-color: var(--sand-300);
}

.dash-chart-card {
    gap: 1.125rem;
}

.dash-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.dash-card-head h3 {
    margin: 0;
    font-size: 1.125rem;
}

.dash-card-head p {
    margin: 0.25rem 0 0;
    color: var(--ink-500);
    font-size: 0.8125rem;
}

.dash-card-meta {
    font-size: 0.75rem;
    color: var(--ink-500);
}

.dash-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    min-width: 45rem;
    white-space: nowrap;
}

.dash-table thead th {
    text-align: left;
    color: var(--ink-500);
    font-weight: 600;
    padding-bottom: 0.625rem;
    border-bottom: 0.0625rem solid var(--paper-200);
}

.dash-table tbody td {
    padding: 0.75rem 0.375rem;
    border-bottom: 0.0625rem dashed var(--paper-200);
}

@media (max-width: 48rem) {
    .dash-table {
        min-width: 48rem;
    }
}

.dash-chip {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 62.4375rem;
    font-size: 0.6875rem;
    font-weight: 700;
}

.dash-chip.com {
    background: rgba(31, 138, 131, 0.15);
    color: var(--teal-600);
}

.dash-chip.pdc {
    background: rgba(226, 183, 90, 0.2);
    color: #8a5b0c;
}

.dash-empty {
    text-align: center;
    color: var(--ink-500);
    padding: 1.25rem 0;
}

.dash-trend-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.dash-trend-summary span {
    font-size: 0.75rem;
    color: var(--ink-500);
}

.dash-trend-summary strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1rem;
}

.dash-line-chart {
    background: #f8f4ed;
    border-radius: 1.125rem;
    padding: 0.875rem;
    min-height: 13.75rem;
}

.dash-chart-wrap {
    position: relative;
    width: 100%;
    height: 16.25rem;
}

.dash-chart-legend {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
}

.dash-legend-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 62.4375rem;
    font-weight: 600;
    background: rgba(18, 65, 87, 0.08);
    color: #124157;
}

.dash-legend-pill.com {
    background: rgba(31, 138, 131, 0.15);
    color: var(--teal-600);
}

.dash-legend-pill.pdc {
    background: rgba(226, 183, 90, 0.2);
    color: #8a5b0c;
}

.dash-mix-shell {
    background: #f8f4ed;
    border-radius: 1.125rem;
    padding: 1.125rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    height: 100%;
}

.dash-mix {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.dash-donut {
    position: relative;
    width: 8.75rem;
    height: 8.75rem;
    margin: 0 auto;
}

.dash-donut svg {
    width: 8.75rem;
    height: 8.75rem;
    transform: rotate(-90deg);
}

.dash-ring {
    fill: none;
    stroke-width: 14;
    stroke-linecap: round;
}

.dash-ring-bg {
    fill: none;
    stroke: #f0ebe1;
    stroke-width: 14;
}

.dash-ring-com {
    stroke: #1f8a83;
}

.dash-ring-pdc {
    stroke: #e2b75a;
}

.dash-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.dash-donut-center span {
    font-size: 0.6875rem;
    color: var(--ink-500);
}

.dash-donut-center strong {
    font-size: 0.9375rem;
}

.dash-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dash-legend-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.75rem;
    color: var(--ink-500);
}

.dash-legend-item strong {
    display: block;
    color: var(--ink-900);
}

.dash-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    display: inline-block;
}

.dash-dot.com {
    background: #1f8a83;
}

.dash-dot.pdc {
    background: #e2b75a;
}

.dash-dot.risk {
    background: #ef6b5b;
}

.dash-mix-bars {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    width: 100%;
}

.dash-mix-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--ink-500);
}

.dash-track {
    background: #f1ede5;
    border-radius: 62.4375rem;
    height: 0.5rem;
    overflow: hidden;
}

.dash-track span {
    display: block;
    height: 100%;
    background: #ef6b5b;
}

.dash-track.pdc span {
    background: #e2b75a;
}

.dash-track.slim {
    height: 0.375rem;
    margin-top: 0.375rem;
}

.dash-agent-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dash-agent {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 8.75rem);
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 1rem;
    background: #f9f6f0;
    border: 0.0625rem solid var(--paper-200);
}

[data-theme="dark"] .dash-agent {
    background: var(--surface-200);
    border-color: var(--sand-300);
}

.dash-agent-main {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.dash-agent-avatar {
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 0.875rem;
    background: rgba(31, 138, 131, 0.14);
    color: var(--teal-600);
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.8125rem;
}

.dash-agent-name {
    font-weight: 600;
}

.dash-agent-sub {
    font-size: 0.75rem;
    color: var(--ink-500);
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
    margin-top: 0.5rem;
}

.dash-agent-amount {
    font-weight: 600;
    text-align: right;
    font-size: 0.875rem;
}

.dash-agent-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
}

@keyframes dash-rise {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }

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

@media (max-width: 68.75rem) {
    .dash-header {
        grid-template-columns: 1fr;
    }

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

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

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

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

@media (max-width: 45rem) {

    .dash-header-kpis,
    .dash-kpis,
    .dash-exposure-grid {
        grid-template-columns: 1fr;
    }

    .dash-mix {
        grid-template-columns: 1fr;
    }

    .dash-chart-wrap {
        height: 13.75rem;
    }
}

/* List pages */
.list-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0.875rem;
}

.list-hero {
    background: linear-gradient(135deg, #fff9ef 0%, #eef6f5 100%);
    border-radius: 1.375rem;
    padding: 1.375rem;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 1.25rem;
    box-shadow: var(--shadow-card);
}

[data-theme="dark"] .list-hero {
    background: linear-gradient(135deg, #1a2226 0%, #1d2a2b 100%);
}

.list-hero-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-flag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 62.4375rem;
    background: rgba(31, 138, 131, 0.15);
    color: var(--teal-600);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.list-title {
    font-family: "Playfair Display", serif;
    font-size: 1.75rem;
    margin: 0;
}

.list-subtitle {
    color: var(--ink-500);
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 32.5rem;
}

.list-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: center;
}

.list-icon-btn {
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
    cursor: pointer;
}

.list-icon-btn.danger {
    background: rgba(239, 107, 91, 0.15);
    color: var(--coral-500);
}

.list-hero-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: center;
}

.list-metric {
    background: #fff;
    border-radius: 1rem;
    padding: 0.75rem 0.875rem;
    box-shadow: var(--shadow-card);
}

[data-theme="dark"] .list-metric {
    background: var(--surface-100);
    color: var(--ink-900);
}

.list-metric span {
    font-size: 0.75rem;
    color: var(--ink-500);
}

.list-metric strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.125rem;
}

.list-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

[data-theme="dark"] .list-card {
    background: var(--surface-100);
    color: var(--ink-900);
}

.list-alerts {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.list-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.list-card-head h3 {
    margin: 0;
    font-size: 1.125rem;
}

.list-card-head p {
    margin: 0.25rem 0 0;
    color: var(--ink-500);
    font-size: 0.8125rem;
}

.list-filters {
    /* display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)); */
    gap: 0.75rem;
    display: flex;
    flex-wrap: wrap;
}

.list-filters>* {
    flex: 1;
    min-width: 10rem;
}

.list-filters button[type="submit"] {
    flex: 0;
    min-width: auto;
}

.list-date-range {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.625rem;
    align-items: center;
    font-size: 0.75rem;
    color: var(--ink-500);
}

.list-date-range.d-none {
    display: none;
}

.list-table-wrap {
    overflow-x: auto;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.list-table thead th {
    text-align: left;
    color: var(--ink-500);
    font-weight: 600;
    padding: 0.75rem 0.375rem;
    border-bottom: 0.0625rem solid var(--paper-200);
}

.list-table tbody td {
    padding: 0.75rem 0.375rem;
    border-bottom: 0.0625rem dashed var(--paper-200);
}

.list-actions {
    display: inline-flex;
    gap: 0.625rem;
    align-items: center;
}

.list-action {
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 50%;
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.list-action.danger {
    background: rgba(239, 107, 91, 0.16);
    color: var(--coral-500);
}

.list-action.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.notify-tabs {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.notify-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    border-radius: 62.4375rem;
    padding: 0.5rem 0.875rem;
    border: 0.0625rem solid var(--paper-200);
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink-700);
    cursor: pointer;
}

[data-theme="dark"] .notify-tab {
    background: var(--surface-100);
    border-color: var(--sand-300);
    color: var(--ink-900);
}

.notify-tab.active {
    border-color: rgba(31, 138, 131, 0.4);
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
}

[data-theme="dark"] .notify-tab.active {
    border-color: rgba(47, 183, 170, 0.45);
    background: rgba(47, 183, 170, 0.2);
    color: var(--teal-500);
}

.notify-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.375rem;
    padding: 0 0.5rem;
    border-radius: 62.4375rem;
    background: var(--coral-500);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
}

.notify-card {
    background: #fff;
    border-radius: 1.125rem;
    padding: 1rem 1.125rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
    border: 0.0625rem solid transparent;
}

[data-theme="dark"] .notify-card {
    background: var(--surface-100);
    border-color: var(--sand-300);
}

.notification-unviewed {
    border-color: rgba(31, 138, 131, 0.4);
    background: rgba(31, 138, 131, 0.06);
}

[data-theme="dark"] .notification-unviewed {
    border-color: rgba(47, 183, 170, 0.45);
    background: rgba(47, 183, 170, 0.12);
}

.notify-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.notify-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
}

.notify-tag {
    padding: 0.25rem 0.625rem;
    border-radius: 62.4375rem;
    background: rgba(31, 138, 131, 0.12);
    color: var(--teal-600);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

[data-theme="dark"] .notify-tag {
    background: rgba(47, 183, 170, 0.2);
    color: var(--teal-500);
}

.notify-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
}

.notify-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--ink-500);
}

.notify-item strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.notify-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--ink-500);
}

.notify-date {
    font-weight: 600;
}

.notify-load {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}

.status-pill {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 62.4375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pill.warn {
    background: rgba(226, 183, 90, 0.25);
    color: #8a5b0c;
}

.status-pill.danger {
    background: rgba(239, 107, 91, 0.22);
    color: var(--coral-500);
}

.status-pill.success {
    background: rgba(31, 138, 131, 0.18);
    color: var(--teal-600);
}

.status-pill.muted {
    background: rgba(154, 166, 178, 0.25);
    color: var(--ink-500);
}

@media (max-width: 68.75rem) {
    .list-hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 45rem) {
    .list-hero-metrics {
        grid-template-columns: 1fr;
    }

    .list-filters {
        grid-template-columns: 1fr;
    }

    .list-date-range {
        grid-template-columns: 1fr;
    }

    .notify-foot {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Form & detail pages */
.form-page,
.detail-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0 0 1.75rem;
}

.form-hero,
.detail-hero {
    background: linear-gradient(135deg, #fff7eb 0%, #eef6f5 100%);
    border-radius: 1.375rem;
    padding: 1.375rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-card);
}

[data-theme="dark"] .form-hero,
[data-theme="dark"] .detail-hero {
    background: linear-gradient(135deg, #1a2226 0%, #1d2a2b 100%);
}

.form-hero h1,
.detail-hero h1 {
    margin: 0 0 0.375rem;
    font-size: 1.625rem;
    font-family: "Playfair Display", serif;
}

.form-hero p,
.detail-hero p {
    margin: 0;
    color: var(--ink-500);
    font-size: 0.875rem;
}

.form-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: center;
}

.form-card,
.detail-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.375rem;
    box-shadow: var(--shadow-card);
}

[data-theme="dark"] .form-card,
[data-theme="dark"] .detail-card {
    background: var(--surface-100);
    color: var(--ink-900);
}

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

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field .form-control {
    padding-right: 4.875rem;
}

.password-toggle {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0.0625rem solid var(--paper-200);
    background: #fff;
    color: var(--ink-600);
    border-radius: 62.4375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.password-toggle:hover {
    border-color: var(--teal-500);
    color: var(--teal-500);
}

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

.table-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-user-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    object-fit: cover;
    border: 0.125rem solid var(--teal-500);
    background: #fff;
}

[data-theme="dark"] .table-user-avatar {
    background: var(--surface-200);
    border-color: var(--teal-500);
}

.table-user-name {
    display: block;
    font-weight: 600;
    color: var(--ink-700);
}

.list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.permission-panel {
    border: 0.0625rem solid var(--paper-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: #fff;
    max-height: 32.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.permission-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 600;
    color: var(--ink-700);
    cursor: pointer;
    margin-bottom: 1rem;
}

.permission-choice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    border: 0.0625rem solid var(--paper-200);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.permission-choice:hover {
    border-color: var(--teal-500);
    box-shadow: 0 0.625rem 1.25rem rgba(15, 23, 42, 0.08);
}

.permission-choice input[type="checkbox"],
.permission-group-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.permission-check {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 0.375rem;
    border: 0.125rem solid var(--teal-500);
    display: grid;
    place-items: center;
    background: #fff;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.permission-check::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 0.125rem;
    background: var(--teal-500);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.permission-choice input[type="checkbox"]:checked+.permission-check,
.permission-group-toggle input[type="checkbox"]:checked+.permission-check {
    background: rgba(19, 150, 135, 0.12);
}

.permission-choice input[type="checkbox"]:checked+.permission-check::after,
.permission-group-toggle input[type="checkbox"]:checked+.permission-check::after {
    opacity: 1;
    transform: scale(1);
}

.permission-group-toggle input[data-indeterminate="1"]+.permission-check::after {
    opacity: 1;
    transform: scale(1);
    width: 0.625rem;
    height: 0.125rem;
    border-radius: 0.125rem;
}

.permission-text {
    font-size: 0.8125rem;
    color: var(--ink-700);
}

.password-strength {
    margin-top: 0.625rem;
    display: grid;
    gap: 0.375rem;
}

.password-meter {
    width: 100%;
    height: 0.5rem;
    border-radius: 62.4375rem;
    background: #f1f5f9;
    overflow: hidden;
}

.password-meter span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: var(--coral-500);
    transition: width 0.2s ease, background 0.2s ease;
}

.password-strength-label {
    font-size: 0.75rem;
    color: var(--ink-500);
}

.password-rules {
    display: grid;
    gap: 0.375rem;
}

.password-rule {
    font-size: 0.75rem;
    color: var(--ink-500);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.password-rule::before {
    content: "•";
    color: var(--ink-400);
}

.password-rule.is-valid {
    color: var(--teal-500);
}

.password-rule.is-valid::before {
    content: "✓";
    color: var(--teal-500);
}

.password-match {
    font-size: 0.75rem;
    margin-top: 0.375rem;
    color: var(--ink-500);
}

.password-match.good {
    color: var(--teal-500);
}

.password-match.bad {
    color: var(--coral-500);
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.color-swatch {
    border: 0.0625rem solid var(--paper-200);
    background: #fff;
    cursor: pointer;
}

.color-value {
    max-width: 11.25rem;
}

.permission-group {
    padding-bottom: 0.75rem;
    border-bottom: 0.0625rem dashed var(--paper-200);
}

.permission-group:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.permission-group-title {
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 0.5rem;
}

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

.permission-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.8125rem;
    color: var(--ink-700);
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.875rem;
}

.detail-item {
    background: #fff;
    border-radius: 1rem;
    padding: 0.75rem 0.875rem;
    box-shadow: var(--shadow-card);
}

[data-theme="dark"] .detail-item {
    background: var(--surface-100);
    color: var(--ink-900);
}

.detail-item span {
    font-size: 0.75rem;
    color: var(--ink-500);
    display: block;
}

.detail-item strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.9375rem;
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    overflow: hidden;
    border: 0.125rem solid var(--teal-500);
    background: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--teal-500);
    font-size: 1.375rem;
}

.profile-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.profile-tag {
    padding: 0.25rem 0.625rem;
    border-radius: 62.4375rem;
    background: #fff;
    border: 0.0625rem solid var(--paper-200);
    font-size: 0.75rem;
    color: var(--ink-600);
}

.profile-summary {
    display: flex;
    gap: 1.125rem;
    align-items: center;
    flex-wrap: wrap;
}

.profile-summary-info h4 {
    margin: 0 0 0.375rem;
    font-size: 1.25rem;
}

.profile-summary-info p {
    margin: 0;
    color: var(--ink-500);
    font-size: 0.8125rem;
}

.profile-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.profile-photo-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 1rem;
    border: 0.0625rem solid var(--paper-200);
    background: #fffaf3;
    flex-wrap: wrap;
}

.profile-photo-wrap {
    position: relative;
}

.profile-photo-badge {
    position: absolute;
    bottom: -0.375rem;
    right: -0.375rem;
    background: var(--teal-500);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 62.4375rem;
    border: 0.125rem solid #fffaf3;
}

.profile-photo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    border: 0.0625rem dashed var(--teal-500);
    color: var(--teal-500);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    width: fit-content;
}

.profile-upload:hover {
    background: rgba(19, 150, 135, 0.08);
    border-color: var(--teal-500);
}

.profile-upload-icon {
    font-size: 1rem;
}

.profile-upload-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.profile-photo {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    border: 0.125rem solid var(--teal-500);
    object-fit: cover;
    background: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
}

.profile-photo-fallback {
    background: var(--teal-500);
    font-size: 1.375rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.section-head h3 {
    margin: 0;
    font-size: 1.125rem;
}

.section-head p {
    margin: 0.25rem 0 0;
    color: var(--ink-500);
    font-size: 0.8125rem;
}

.note-card {
    background: #fffaf3;
    border: 0.0625rem solid var(--paper-200);
    border-radius: 1rem;
    padding: 0.875rem;
    color: var(--ink-700);
    font-size: 0.8125rem;
    line-height: 1.6;
}

[data-theme="dark"] .note-card {
    background: var(--surface-200);
    border-color: var(--sand-300);
    color: var(--ink-700);
}

@media (max-width: 61.25rem) {

    .form-hero,
    .detail-hero {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

    .profile-hero-main {
        width: 100%;
    }
}

@media (max-width: 40rem) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-summary {
        flex-direction: column;
        align-items: flex-start;
    }
}
