/* ==========================================================================
   Canopy — frosted-glass skin for HADS System, in the HADS colours.
   Navy, leaf green and warm gold light behind a glass shell; a white inset
   content panel; one sans family (Figtree).
   Signature: the glass shell and the navy "silk" greeting card. The sign-in
   page uses the same light backdrop as the dashboard.
   ========================================================================== */

:root {
    --deep: #141c4a;
    --navy: #2a3a85;
    --leaf: #3e8e6e;
    --leaf-soft: #e3f1ea;
    --sun: #e8b04b;
    --sun-soft: #fbf0d9;
    --mist: #e7ebf4;
    --panel: #f7f8fb;
    --card: #ffffff;
    --ink: #161b3d;
    --muted: #6b7290;
    --line: #e9ecf3;
    --danger: #c0392b;
    --font: 'Figtree', system-ui, sans-serif;
    --r-xl: 30px;
    --r-lg: 22px;
    --r-md: 14px;

    --chart-new: #2a3a85;
    --chart-closed: #a9d6c1;
    --chart-net: #e8b04b;
    --chart-grid: #eef0f6;
    --chart-text: #6b7290;
    --chart-font: 'Figtree';
    --chart-radius: 6;
}

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

body {
    margin: 0;
    background: var(--mist);
    color: var(--ink);
    font: 400 14.5px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
    margin: 0;
}

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

kbd {
    font: inherit;
}

:focus-visible {
    outline: 2px solid var(--leaf);
    outline-offset: 2px;
}

[data-lucide],
svg.lucide {
    width: 18px;
    height: 18px;
    flex: none;
}

.cn-muted {
    color: var(--muted);
}

.cn-small {
    font-size: 13px;
}

.cn-logo-icon {
    display: inline-block;
    width: 30px;
    height: 31px;
    background: currentColor;
    -webkit-mask: url('/adminlte/images/logo/hads-icon.png') center / contain no-repeat;
    mask: url('/adminlte/images/logo/hads-icon.png') center / contain no-repeat;
}

.cn-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--deep);
    font-weight: 700;
    font-size: 21px;
    letter-spacing: .04em;
    text-decoration: none;
}

/* Backdrop: brand-coloured light behind the glass. Plain gradients, no blur
   filters, so it costs nothing to keep on screen while scrolling. --------- */

.cn-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle 48vmax at 4% -6%, rgba(42, 58, 133, .36), transparent 72%),
        radial-gradient(circle 38vmax at 100% 6%, rgba(232, 176, 75, .38), transparent 72%),
        radial-gradient(circle 42vmax at 48% 112%, rgba(62, 142, 110, .3), transparent 72%),
        radial-gradient(circle 26vmax at 10% 88%, rgba(232, 176, 75, .24), transparent 72%),
        radial-gradient(circle 30vmax at 96% 104%, rgba(42, 58, 133, .24), transparent 72%),
        var(--mist);
}

/* Buttons -------------------------------------------------------------- */

.cn-btn,
.skin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--deep);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, transform .15s;
}

.cn-btn:hover,
.skin-btn:hover {
    background: var(--navy);
}

.cn-btn:active {
    transform: translateY(1px);
}

.cn-btn-block {
    width: 100%;
}

.cn-btn-soft {
    height: 38px;
    padding: 0 16px;
    background: var(--panel);
    color: var(--deep);
    box-shadow: inset 0 0 0 1px var(--line);
}

.cn-btn-soft:hover {
    background: #eef1f7;
}

.cn-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--card);
    box-shadow: inset 0 0 0 1px var(--line);
}

/* Sign in -------------------------------------------------------------- */

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

.cn-login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 16px 80px;
}

.cn-login-glass {
    width: 100%;
    max-width: 440px;
    display: grid;
    gap: 28px;
    padding: 32px 32px 26px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 32px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .34));
    box-shadow: 0 30px 80px rgba(20, 28, 74, .16), inset 0 1px 0 rgba(255, 255, 255, .8);
}

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

.cn-login-form h1 {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.025em;
}

.cn-login-form>.cn-muted:first-of-type {
    margin-top: -8px;
    margin-bottom: 6px;
}

.cn-field {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.cn-input-wrap {
    position: relative;
    display: block;
}

.cn-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.cn-field input,
.skin-form input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    font: 400 15px var(--font);
    transition: border-color .15s, box-shadow .15s;
}

.cn-input-wrap input {
    padding-left: 46px;
    padding-right: 52px;
}

.cn-field input:focus,
.skin-form input:focus {
    outline: none;
    border-color: var(--leaf);
    box-shadow: 0 0 0 4px rgba(62, 142, 110, .14);
}

.cn-eye {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--muted);
}

.cn-eye:hover {
    background: var(--panel);
}

.cn-alert {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--r-md);
    background: rgba(255, 236, 233, .95);
    color: #8f2a1f;
    font-weight: 500;
}

.cn-login-form .cn-btn {
    margin-top: 6px;
    height: 52px;
}

.cn-login-foot {
    padding-top: 18px;
    border-top: 1px solid rgba(20, 28, 74, .08);
    color: var(--muted);
    font-size: 12.5px;
    letter-spacing: .04em;
}

/* Scrollbars: thin and floating, no visible track. The thumb is inset with a
   transparent border so it reads as a rounded pill, and the main panel's track
   stops short of its rounded corners. Chromium/Safari use the ::-webkit
   pseudo-elements; Firefox gets the standard thin scrollbar. ---------------- */

.cn-app *::-webkit-scrollbar,
.cn-login *::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.cn-app *::-webkit-scrollbar-track,
.cn-login *::-webkit-scrollbar-track,
.cn-app *::-webkit-scrollbar-corner {
    background: transparent;
}

.cn-app *::-webkit-scrollbar-thumb,
.cn-login *::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background-color: rgba(20, 28, 74, .16);
    background-clip: padding-box;
}

.cn-app *::-webkit-scrollbar-thumb:hover {
    background-color: rgba(20, 28, 74, .3);
}

.cn-app *::-webkit-scrollbar-button {
    display: none;
}

.cn-main-scroll::-webkit-scrollbar-track {
    margin: 24px 0;
}

.cn-nav::-webkit-scrollbar,
.cn-types::-webkit-scrollbar,
.acct-list::-webkit-scrollbar {
    width: 8px;
}

.cn-nav::-webkit-scrollbar-thumb,
.cn-types::-webkit-scrollbar-thumb,
.acct-list::-webkit-scrollbar-thumb {
    border-width: 2px;
}

@supports not selector(::-webkit-scrollbar) {

    .cn-app *,
    .cn-login * {
        scrollbar-width: thin;
        scrollbar-color: rgba(20, 28, 74, .22) transparent;
    }
}

/* Glass shell ---------------------------------------------------------- */

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

.cn-shell {
    /* No z-index here: a stacking context would trap Bootstrap modals under their backdrop. */
    position: relative;
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    height: 100vh;
    padding: 10px 10px 10px 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .3));
}

.cn-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 18px 14px 6px 16px;
}

.cn-side>.cn-brand {
    padding: 4px 10px 18px;
}

.cn-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 2px;
    margin: 0 -4px;
    padding: 0 4px;
}

.cn-nav-label {
    margin: 16px 12px 6px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
}

.cn-nav-label:first-child {
    margin-top: 4px;
}

.cn-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    color: #3a4062;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
    transition: background .15s;
}

.cn-nav-link::-webkit-details-marker {
    display: none;
}

.cn-nav-link:hover {
    background: rgba(255, 255, 255, .5);
}

.cn-nav-link[aria-current] {
    background: var(--card);
    color: var(--deep);
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(20, 28, 74, .08);
}

.cn-nav-caret {
    margin-left: auto;
    width: 16px !important;
    height: 16px !important;
    opacity: .5;
    transition: transform .2s;
}

.cn-nav-group[open] .cn-nav-caret {
    transform: rotate(180deg);
}

.cn-nav-group ul {
    margin: 2px 0 6px;
    padding: 0 0 0 42px;
    list-style: none;
}

.cn-nav-group li a {
    display: block;
    padding: 6px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}

.cn-nav-group li a:hover {
    background: rgba(255, 255, 255, .5);
    color: var(--ink);
}

.cn-count {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: var(--deep);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.cn-user {
    position: relative;
    margin-top: 10px;
}

.cn-user>summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .6);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8);
    cursor: pointer;
    list-style: none;
}

.cn-user>summary::-webkit-details-marker {
    display: none;
}

.cn-user>summary:hover {
    background: rgba(255, 255, 255, .8);
}

.cn-user img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #fff;
    object-fit: cover;
}

.cn-user-text {
    display: grid;
    min-width: 0;
    flex: 1;
}

.cn-user-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
}

.cn-user-mail {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--muted);
    font-size: 12.5px;
}

.cn-user-caret {
    width: 16px !important;
    height: 16px !important;
    color: var(--muted);
}

.cn-scrim {
    display: none;
}

.cn-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    /* The rounded panel clips; the inner area scrolls. Safari draws a scroll
       container's scrollbar square, so it must not be the rounded element. */
    overflow: hidden;
    border-radius: 24px;
    background: rgba(250, 251, 253, .94);
    box-shadow: 0 10px 40px rgba(20, 28, 74, .08);
}

.cn-main-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.cn-top {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px 10px;
    background: linear-gradient(rgba(250, 251, 253, .96) 70%, rgba(250, 251, 253, 0));
}

.cn-menu-btn {
    display: none;
}

.cn-search {
    position: relative;
    flex: 1;
    max-width: 560px;
}

.cn-search>svg {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--muted);
}

.cn-search input {
    width: 100%;
    height: 48px;
    padding: 0 84px 0 48px;
    border: 0;
    border-radius: 999px;
    background: var(--card);
    box-shadow: 0 4px 16px rgba(20, 28, 74, .06), inset 0 0 0 1px var(--line);
    color: var(--ink);
    font: 400 14.5px var(--font);
}

.cn-search input:focus {
    outline: none;
    box-shadow: 0 4px 16px rgba(20, 28, 74, .08), inset 0 0 0 1.5px var(--leaf);
}

.cn-search input::-webkit-search-cancel-button {
    display: none;
}

.cn-side-other {
    padding-top: 4px;
}

.cn-kbd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.cn-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    margin: 0;
    padding: 6px;
    border-radius: 18px;
    background: var(--card);
    box-shadow: 0 24px 60px rgba(20, 28, 74, .18);
    list-style: none;
}

.cn-search-results a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
}

.cn-search-results a span {
    color: var(--muted);
    font-weight: 400;
    font-size: 13px;
}

.cn-search-results [aria-selected='true'] a,
.cn-search-results a:hover {
    background: var(--panel);
}

.cn-search-empty {
    padding: 12px 14px;
    color: var(--muted);
}

.cn-content {
    padding: 14px 28px 64px;
}

/* Popovers (notifications, user menu) ---------------------------------- */

.acct-pop {
    position: relative;
}

.acct-panel {
    position: absolute;
    z-index: 60;
    width: 340px;
    max-width: calc(100vw - 32px);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 24px 60px rgba(20, 28, 74, .2);
    overflow: hidden;
}

.cn-pop-side {
    bottom: 0;
    left: calc(100% + 12px);
}

.cn-pop-up {
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    width: auto;
}

.acct-panel-sm {
    padding: 8px;
}

.acct-panel-sm a,
.acct-panel-sm button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: none;
    text-align: left;
    text-decoration: none;
}

.acct-panel-sm a:hover,
.acct-panel-sm button:hover {
    background: var(--panel);
}

.acct-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 10px;
}

.acct-panel-head strong {
    font-size: 16px;
}

.acct-link {
    border: 0;
    background: none;
    color: var(--leaf);
    font-size: 13px;
    font-weight: 600;
}

.acct-list {
    max-height: 360px;
    margin: 0;
    padding: 0 8px 8px;
    overflow-y: auto;
    list-style: none;
}

.acct-list a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13.5px;
}

.acct-list a:hover {
    background: var(--panel);
}

.acct-empty {
    padding: 20px 12px;
    color: var(--muted);
    text-align: center;
}

/* Page heading --------------------------------------------------------- */

.cn-page-head {
    margin: 8px 0 20px;
}

.cn-page-head h1 {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.025em;
}

.cn-page-head p {
    margin-top: 2px;
}

/* Hero + KPIs ---------------------------------------------------------- */

.cn-hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.cn-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    min-height: 300px;
    padding: 22px 26px 26px;
    border-radius: 26px;
    background: radial-gradient(120% 120% at 100% 0%, #3a4ea0 0%, #1c2660 45%, #121a45 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(20, 28, 74, .22);
}

.cn-silk {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.cn-hero-chip {
    position: relative;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font-size: 13.5px;
    font-weight: 500;
}

.cn-hero-icons {
    display: flex;
}

.cn-hero-icons svg {
    width: 30px;
    height: 30px;
    padding: 7px;
    border-radius: 50%;
    background: var(--deep);
    color: var(--sun);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .15);
}

.cn-hero-icons svg+svg {
    margin-left: -6px;
}

.cn-hero-text {
    position: relative;
}

.cn-hero h2 {
    font-size: clamp(36px, 4vw, 54px);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -.035em;
}

.cn-hero-sub {
    margin-top: 12px;
    color: rgba(255, 255, 255, .72);
}

.cn-hero-today {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.cn-hero-today li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: 13px;
    font-weight: 500;
}

.cn-hero-today i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
}

.cn-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.cn-kpi {
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 6px 20px rgba(20, 28, 74, .05), inset 0 0 0 1px var(--line);
}

.cn-kpi-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: auto;
    border-radius: 12px;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--navy);
}

.cn-kpi-icon svg {
    width: 17px;
    height: 17px;
}

.cn-kpi-value {
    margin-top: 18px;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

.cn-kpi-label {
    margin-top: 6px;
    color: var(--muted);
    font-weight: 500;
}

.cn-kpi-ongoing .cn-kpi-icon {
    background: var(--sun-soft);
    color: #9a6a12;
    box-shadow: none;
}

.cn-kpi-closed .cn-kpi-icon {
    background: var(--leaf-soft);
    color: #23634a;
    box-shadow: none;
}

/* Cards ---------------------------------------------------------------- */

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

.cn-span-7 {
    grid-column: span 7;
}

.cn-span-5 {
    grid-column: span 5;
}

.cn-span-12 {
    grid-column: span 12;
}

.cn-card {
    min-width: 0;
    padding: 22px;
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 6px 20px rgba(20, 28, 74, .05), inset 0 0 0 1px var(--line);
}

.cn-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.cn-card-head>div {
    flex: 1;
    min-width: 0;
}

.cn-card-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--navy);
    flex: none;
}

.cn-card-head h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.015em;
}

.cn-card-head p {
    font-size: 13.5px;
}

.cn-chart {
    position: relative;
    height: 320px;
}

.cn-empty {
    max-width: 580px;
}

.cn-empty h2 {
    margin-bottom: 6px;
    font-size: 22px;
    font-weight: 700;
}

/* Ongoing by type ------------------------------------------------------ */

.cn-list-head {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.cn-types {
    max-height: 316px;
    margin: 6px 0 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.cn-types>li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 16px;
}

.cn-types>li:hover {
    background: var(--panel);
}

.cn-thumb {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(145deg, #2a3a85, #141c4a);
    color: var(--sun);
    flex: none;
}

.cn-type-main {
    display: grid;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.cn-type-name {
    font-weight: 600;
}

.cn-type-fees {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cn-type-fees button {
    padding: 1px 9px;
    border: 0;
    border-radius: 999px;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.cn-type-fees button:hover {
    background: var(--deep);
    box-shadow: none;
    color: #fff;
}

.cn-type-count {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Team ----------------------------------------------------------------- */

.cn-filter {
    position: relative;
    width: 240px;
    max-width: 100%;
}

.cn-filter svg {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--muted);
}

.cn-filter input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border: 0;
    border-radius: 999px;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--ink);
    font: 400 14px var(--font);
}

.cn-filter input:focus {
    outline: none;
    box-shadow: inset 0 0 0 1.5px var(--leaf);
}

.cn-table-wrap {
    max-height: 560px;
    overflow: auto;
}

.cn-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.cn-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 0;
    background: var(--panel);
    text-align: left;
}

.cn-table th:first-child {
    border-radius: 999px 0 0 999px;
}

.cn-table th:last-child {
    border-radius: 0 999px 999px 0;
}

.cn-table th button,
.cn-table th>span {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    text-align: inherit;
}

.cn-table th.num {
    text-align: right;
}

.cn-table th[aria-sort] button {
    color: var(--deep);
}

.cn-table th[aria-sort='descending'] button::after {
    content: ' ↓';
}

.cn-table th[aria-sort='ascending'] button::after {
    content: ' ↑';
}

.cn-table td {
    padding: 9px 14px;
}

.cn-table tbody tr:hover td {
    background: var(--panel);
}

.cn-table tbody tr:hover td:first-child {
    border-radius: 16px 0 0 16px;
}

.cn-table tbody tr:hover td:last-child {
    border-radius: 0 16px 16px 0;
}

.cn-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cn-em {
    color: var(--deep);
    font-weight: 700;
}

.cn-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cn-person>span:last-child {
    display: grid;
}

.cn-person-name {
    font-weight: 600;
    white-space: nowrap;
}

.cn-person-role {
    color: var(--muted);
    font-size: 12.5px;
}

.cn-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    flex: none;
}

.cn-tone-a,
.cn-tone-b {
    background: linear-gradient(145deg, #2a3a85, #141c4a);
    box-shadow: none;
    color: var(--sun);
}

.cn-tone-c {
    background: var(--sun-soft);
    box-shadow: none;
    color: #8a5a0b;
}

.cn-tone-d {
    background: var(--leaf-soft);
    box-shadow: none;
    color: #23634a;
}

.cn-tone-e {
    background: var(--leaf-soft);
    box-shadow: none;
    color: #3ca87f;
}

.cn-col-load {
    width: 28%;
    min-width: 160px;
}

.cn-load {
    display: flex;
    gap: 2px;
    height: 10px;
}

.cn-load>span {
    width: var(--w);
    border-radius: 5px;
}

.cn-load-on {
    background: var(--deep);
}

.cn-load-idle {
    background: var(--sun);
}

.cn-load-close {
    background: #c9e3d6;
}

/* Calendar ------------------------------------------------------------- */

.cn-calendar {
    --fc-border-color: #eceff5;
    --fc-today-bg-color: var(--sun-soft);
    --fc-button-bg-color: var(--panel);
    --fc-button-border-color: transparent;
    --fc-button-text-color: var(--deep);
    --fc-button-hover-bg-color: #eceff6;
    --fc-button-hover-border-color: transparent;
    --fc-button-active-bg-color: var(--deep);
    --fc-button-active-border-color: var(--deep);
    --fc-neutral-bg-color: #f7f8fb;
}

.cn-calendar .fc-toolbar-title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.cn-calendar .fc-button {
    border-radius: 999px !important;
    margin: 0 2px !important;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    box-shadow: none !important;
}

.cn-calendar .fc-button-active {
    color: #fff !important;
}

.cn-calendar .fc-scrollgrid {
    border-radius: var(--r-md);
    overflow: hidden;
}

.cn-calendar .fc-col-header-cell-cushion {
    padding: 8px 4px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
}

.cn-calendar .fc-daygrid-day-number {
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
}

.cn-calendar .fc-event {
    border-radius: 6px;
    padding: 0 2px;
    font-size: 12px;
}

.cn-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 14px 20px;
    border-top: 1px solid var(--cn-border);
}

.cn-calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--cn-muted);
}

.cn-calendar-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.cn-calendar-legend-dot.holiday {
    background: #C80000;
}

.cn-calendar-legend-dot.birthday {
    background: #BF40BF;
}

.cn-calendar-legend-dot.on-leave {
    background: #3788D8;
}

.cn-calendar-legend-dot.sick-leave {
    background: #F0D700;
}

.cn-calendar-legend-dot.business-trip {
    background: #257E4A;
}

/* Dialogs -------------------------------------------------------------- */

.skin-dialog {
    width: min(420px, calc(100vw - 32px));
    padding: 28px;
    border: 0;
    border-radius: 28px;
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 40px 90px rgba(20, 28, 74, .35);
}

.skin-dialog::backdrop {
    background: rgba(20, 28, 74, .35);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.skin-dialog h2 {
    margin-bottom: 18px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.skin-dialog-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

.skin-dialog-close button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--panel);
    color: var(--muted);
}

.skin-dialog-eyebrow {
    color: var(--leaf);
    font-weight: 600;
}

.fee-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
}

.fee-list>div {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--panel);
}

.fee-list dt {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.fee-list dd {
    margin: 2px 0 0;
    font-size: 19px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.fee-loading {
    grid-column: 1 / -1;
    color: var(--muted);
}

.skin-form {
    display: grid;
    gap: 14px;
}

.skin-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.skin-form input {
    background: var(--panel);
    box-shadow: inset 0 0 0 1px var(--line);
}

.skin-form-msg:empty {
    display: none;
}

.skin-form-msg[data-state='error'] {
    color: var(--danger);
}

.skin-form-msg[data-state='ok'] {
    color: #23634a;
}

/* Collapsible sidebar (desktop) ----------------------------------------
   The top-bar button shrinks the sidebar to an icon rail so pages get the
   full width; menu groups then open as a flyout beside the rail. The choice
   is kept per browser (localStorage "cn-side"). Below 961px the sidebar is
   the slide-in drawer instead, so none of this applies there. */

.cn-collapse-btn {
    display: none;
}

@media (min-width: 961px) {
    .cn-collapse-btn {
        display: inline-grid;
        flex: none;
        color: var(--ink);
    }

    .cn-collapse-btn .lucide-panel-left-open,
    .cn-mini .cn-collapse-btn .lucide-panel-left-close {
        display: none;
    }

    .cn-mini .cn-collapse-btn .lucide-panel-left-open {
        display: block;
    }

    .cn-side-anim .cn-shell {
        transition: grid-template-columns .25s ease;
    }

    .cn-mini .cn-shell {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .cn-mini .cn-side {
        padding: 18px 8px 6px 10px;
    }

    .cn-mini .cn-side>.cn-brand {
        justify-content: center;
        padding: 4px 0 18px;
    }

    .cn-mini .cn-brand-text,
    .cn-mini .cn-side .cn-nav-text,
    .cn-mini .cn-nav-caret,
    .cn-mini .cn-user-text,
    .cn-mini .cn-user-caret,
    .cn-mini .cn-nav>.cn-nav-label:first-child {
        display: none;
    }

    /* Section labels become thin dividers */
    .cn-mini .cn-side .cn-nav-label {
        height: 1px;
        margin: 10px 12px;
        overflow: hidden;
        background: rgba(20, 28, 74, .1);
        font-size: 0;
    }

    .cn-mini .cn-side .cn-nav-link {
        position: relative;
        justify-content: center;
        gap: 0;
        padding: 11px 0;
    }

    .cn-mini .cn-nav-link.is-active {
        background: var(--card);
        color: var(--deep);
        box-shadow: 0 6px 18px rgba(20, 28, 74, .08);
    }

    .cn-mini .cn-side .cn-count {
        position: absolute;
        top: 2px;
        right: 2px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 9px;
        font-size: 10px;
        line-height: 18px;
    }

    /* Group items: hidden in the rail, shown as a flyout once opened */
    .cn-mini .cn-nav-group>ul {
        display: none;
    }

    .cn-mini .cn-nav-group[open][data-fly]>ul {
        display: block;
        position: fixed;
        top: var(--fly-y, 80px);
        left: var(--fly-x, 90px);
        z-index: 70;
        width: 240px;
        max-height: calc(100vh - var(--fly-y, 80px) - 12px);
        margin: 0;
        padding: 8px;
        overflow-y: auto;
        border-radius: 18px;
        background: var(--card);
        box-shadow: 0 24px 60px rgba(20, 28, 74, .2);
    }

    .cn-mini .cn-nav-group>ul::before {
        content: attr(data-label);
        display: block;
        padding: 6px 10px 8px;
        color: var(--deep);
        font-weight: 600;
    }

    .cn-mini .cn-nav-group li a[aria-current] {
        background: var(--panel);
        color: var(--deep);
        font-weight: 600;
    }

    .cn-mini .cn-user>summary {
        justify-content: center;
        padding: 8px 0;
        background: none;
        box-shadow: none;
    }

    .cn-mini .cn-pop-up {
        right: auto;
        width: 240px;
    }
}

/* Responsive ----------------------------------------------------------- */

@media (max-width: 1280px) {
    .cn-hero-row {
        grid-template-columns: 1fr;
    }

    .cn-kpis {
        grid-template-columns: repeat(4, 1fr);
    }

    .cn-span-7,
    .cn-span-5 {
        grid-column: span 12;
    }
}

@media (max-width: 960px) {
    .cn-shell {
        display: block;
        height: auto;
        min-height: 100vh;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
    }

    .cn-side {
        position: fixed;
        top: 10px;
        bottom: 10px;
        left: 10px;
        z-index: 100;
        width: 286px;
        border: 1px solid rgba(255, 255, 255, .7);
        border-radius: 26px;
        background: rgba(244, 246, 251, .97);
        box-shadow: 0 30px 80px rgba(20, 28, 74, .25);
        transform: translateX(calc(-100% - 24px));
    }

    /* Slide only when the menu button is used, not when folding or
       unfolding the phone crosses this breakpoint. */
    .cn-nav-anim .cn-side {
        transition: transform .25s ease;
    }

    .nav-open .cn-side {
        transform: none;
    }

    .nav-open .cn-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 90;
        background: rgba(20, 28, 74, .3);
    }

    .cn-pop-side {
        left: 0;
        right: 0;
        bottom: calc(100% + 6px);
        width: auto;
    }

    .cn-main {
        overflow: visible;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .cn-main-scroll {
        overflow: visible;
    }

    .cn-top {
        padding: 12px 16px;
        background: rgba(236, 239, 247, .96);
    }

    .cn-menu-btn {
        display: inline-grid;
    }

    .cn-kbd {
        display: none;
    }

    .cn-search input {
        height: 44px;
        padding-right: 16px;
    }

    .cn-content {
        padding: 8px 16px 80px;
    }

    .cn-kpis {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .cn-hero {
        min-height: 240px;
        padding: 18px;
    }

    .cn-kpis,
    .cn-grid,
    .cn-hero-row {
        gap: 12px;
    }

    .cn-kpi {
        padding: 14px 16px;
    }

    .cn-kpi-value {
        font-size: 28px;
    }

    .cn-card {
        padding: 18px 14px;
    }

    .cn-col-load {
        display: none;
    }

    .cn-login-glass {
        padding: 24px 20px 20px;
    }

    .cn-filter {
        width: 100%;
    }
}

/* Reduced motion: animations finish instantly instead of being removed.
   "animation: none" meant animationend never fired, and SweetAlert2 waits
   for that event before removing a closed dialog, so alerts stayed on
   screen after "No" / "OK". Near-zero durations still fire the events. */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
}