@font-face {
    font-family: "Hartvast Text";
    src: url("../fonts/Roboto-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Hartvast Text";
    src: url("../fonts/Roboto-SemiBold.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Hartvast Display";
    src: url("../fonts/Roboto_SemiCondensed-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #f6f1e9; }

body.portal-body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: #17332c;
    background:
        radial-gradient(circle at 9% 10%, rgba(193, 111, 77, .11), transparent 28rem),
        radial-gradient(circle at 92% 8%, rgba(83, 139, 120, .12), transparent 30rem),
        #f7f3ec;
    font-family: "Hartvast Text", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.portal-body button,
.portal-body input,
.portal-body select { font: inherit; }

.portal-body button,
.portal-body a { -webkit-tap-highlight-color: transparent; }

.portal-body a { color: inherit; text-decoration: none; }

.portal-body img,
.portal-body svg { display: block; }

.portal-body :focus-visible {
    outline: 3px solid #d7a35c;
    outline-offset: 3px;
}

.login-page { min-height: 100vh; padding: clamp(18px, 3vw, 38px); }

.login-layout {
    min-height: calc(100vh - clamp(36px, 6vw, 76px));
    max-width: 1480px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr);
    border: 1px solid rgba(28, 55, 47, .08);
    border-radius: 34px;
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 30px 90px rgba(22, 47, 39, .13);
    overflow: hidden;
}

.login-story {
    min-height: 720px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(34px, 5vw, 74px);
    color: #fff;
    background:
        linear-gradient(145deg, rgba(15, 45, 37, .97), rgba(27, 71, 60, .95)),
        #173b32;
    isolation: isolate;
    overflow: hidden;
}

.login-story::before,
.login-story::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.login-story::before {
    width: 520px;
    height: 520px;
    right: -230px;
    top: -170px;
    border: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.018);
}

.login-story::after {
    width: 360px;
    height: 360px;
    left: -180px;
    bottom: -180px;
    background: radial-gradient(circle, rgba(215, 163, 92, .28), transparent 67%);
}

.login-brand,
.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    width: fit-content;
}

.login-brand img { width: 62px; height: 62px; object-fit: contain; }
.login-brand span,
.portal-brand span { display: grid; line-height: 1; }
.login-brand strong,
.portal-brand strong { font-family: "Hartvast Display", sans-serif; font-size: 1.55rem; letter-spacing: -.025em; }
.login-brand small,
.portal-brand small { margin-top: 6px; opacity: .68; font-size: .67rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }

.login-story__content { max-width: 690px; margin: auto 0; padding: 70px 0; }
.login-kicker,
.portal-kicker,
.login-card__eyebrow,
.portal-topbar__eyebrow {
    color: #bd7457;
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .17em;
    text-transform: uppercase;
}
.login-story .login-kicker { color: #efb393; }
.login-story h1 {
    max-width: 720px;
    margin: 18px 0 24px;
    font-family: "Hartvast Display", sans-serif;
    font-size: clamp(3.1rem, 5.2vw, 6rem);
    line-height: .98;
    letter-spacing: -.045em;
    text-wrap: balance;
}
.login-story__content > p { max-width: 620px; margin: 0; color: rgba(255,255,255,.76); font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.7; }
.login-trust { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 34px; }
.login-trust span { padding: 9px 13px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: rgba(255,255,255,.82); background: rgba(255,255,255,.055); font-size: .78rem; font-weight: 600; }
.login-story__foot { margin: 0; color: rgba(255,255,255,.42); font-size: .78rem; }

.login-card-wrap { display: grid; place-items: center; align-content: center; padding: clamp(34px, 6vw, 92px); }
.login-card { width: min(100%, 500px); }
.login-card__head { display: flex; align-items: center; gap: 15px; margin-bottom: 17px; }
.login-lock { width: 50px; height: 50px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 15px; color: #fff; background: #1f463c; box-shadow: 0 12px 28px rgba(31,70,60,.2); }
.login-lock svg { width: 24px; height: 24px; fill: currentColor; }
.login-card h2 { margin: 3px 0 0; font-family: "Hartvast Display", sans-serif; font-size: clamp(2.25rem, 4vw, 3.3rem); line-height: 1; letter-spacing: -.035em; }
.login-card > p { margin: 0 0 28px; color: #68756f; line-height: 1.65; }
.login-help { margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(23,51,44,.11); }
.login-help strong { display: block; margin-bottom: 5px; font-size: .88rem; }
.login-help p { margin: 0; color: #748079; font-size: .83rem; line-height: 1.55; }
.login-back { margin-top: 22px; color: #6f7b75; font-size: .84rem; font-weight: 600; }

.portal-form { display: grid; gap: 17px; }
.portal-field { display: grid; gap: 8px; }
.portal-field > span { color: #31483f; font-size: .79rem; font-weight: 700; }
.portal-field input,
.portal-field select {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    color: #17332c;
    border: 1px solid rgba(23,51,44,.16);
    border-radius: 13px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(23,51,44,.025);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.portal-field input::placeholder { color: #a1aaa6; }
.portal-field input:focus,
.portal-field select:focus { border-color: #4d806f; box-shadow: 0 0 0 4px rgba(77,128,111,.11); }
.portal-primary {
    min-height: 54px;
    margin-top: 3px;
    padding: 0 20px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #1a4338, #285b4d);
    box-shadow: 0 14px 28px rgba(29,71,59,.18);
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.portal-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 32px rgba(29,71,59,.23); }

.portal-flashes { display: grid; gap: 9px; margin: 0 0 18px; }
.portal-flash { padding: 12px 14px; border: 1px solid rgba(23,51,44,.1); border-radius: 12px; font-size: .84rem; line-height: 1.5; }
.portal-flash--error { color: #743a32; border-color: rgba(155,75,59,.18); background: #fff1ed; }
.portal-flash--success { color: #245044; border-color: rgba(60,116,96,.18); background: #edf8f3; }

.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.portal-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 28px 22px;
    color: #fff;
    background: linear-gradient(180deg, #183b32 0%, #112e27 100%);
    border-right: 1px solid rgba(255,255,255,.06);
}
.portal-brand { padding: 4px 7px 26px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.09); }
.portal-brand img { width: 50px; height: 50px; }
.portal-brand strong { font-size: 1.25rem; }
.portal-nav { display: grid; gap: 7px; margin-top: 28px; }
.portal-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 13px; color: rgba(255,255,255,.66); border: 1px solid transparent; border-radius: 12px; font-size: .9rem; font-weight: 600; transition: .2s ease; }
.portal-nav a svg { width: 19px; height: 19px; fill: currentColor; }
.portal-nav a:hover,
.portal-nav a.is-active { color: #fff; border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.07); }
.portal-sidebar__foot { margin-top: auto; padding: 20px 7px 3px; border-top: 1px solid rgba(255,255,255,.09); }
.portal-sidebar__foot a { color: rgba(255,255,255,.58); font-size: .8rem; font-weight: 600; }

.portal-main { min-width: 0; }
.portal-topbar {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    padding: 0 clamp(22px, 4vw, 54px);
    border-bottom: 1px solid rgba(23,51,44,.08);
    background: rgba(250,248,244,.82);
    backdrop-filter: blur(14px);
}
.portal-topbar > div { display: grid; text-align: right; }
.portal-topbar__eyebrow { font-size: .61rem; letter-spacing: .13em; }
.portal-topbar strong { margin-top: 2px; font-size: .88rem; }
.portal-logout { min-height: 39px; padding: 0 13px; color: #344b42; border: 1px solid rgba(23,51,44,.12); border-radius: 10px; background: #fff; font-size: .78rem; font-weight: 700; cursor: pointer; }

.portal-content { max-width: 1500px; margin: 0 auto; padding: clamp(28px, 4vw, 54px); }
.portal-heading { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; margin-bottom: 30px; }
.portal-heading h1 { margin: 7px 0 8px; font-family: "Hartvast Display", sans-serif; font-size: clamp(2.3rem, 4vw, 4.15rem); line-height: .98; letter-spacing: -.042em; }
.portal-heading p { max-width: 720px; margin: 0; color: #6b7771; line-height: 1.6; }
.security-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 5px; padding: 9px 12px; white-space: nowrap; color: #356251; border: 1px solid rgba(63,122,101,.15); border-radius: 999px; background: rgba(232,246,239,.75); font-size: .74rem; font-weight: 700; }
.security-chip span { width: 7px; height: 7px; border-radius: 50%; background: #48a178; box-shadow: 0 0 0 4px rgba(72,161,120,.12); }

.portal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.portal-stats article { position: relative; min-height: 150px; padding: 23px; border: 1px solid rgba(23,51,44,.08); border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: 0 14px 36px rgba(22,47,39,.055); overflow: hidden; }
.portal-stats article::after { content: ""; position: absolute; width: 120px; height: 120px; right: -48px; top: -50px; border-radius: 50%; background: rgba(183,93,61,.07); }
.portal-stats span { display: block; color: #6d7973; font-size: .78rem; font-weight: 700; }
.portal-stats strong { display: block; margin: 13px 0 1px; font-family: "Hartvast Display", sans-serif; font-size: 2.7rem; line-height: 1; }
.portal-stats small { color: #87918c; font-size: .75rem; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(320px, .62fr); gap: 20px; margin-bottom: 20px; }
.portal-panel { padding: clamp(22px, 2.4vw, 32px); border: 1px solid rgba(23,51,44,.08); border-radius: 22px; background: rgba(255,255,255,.86); box-shadow: 0 14px 38px rgba(22,47,39,.055); }
.portal-panel__head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 12px; }
.portal-panel__head h2 { margin: 6px 0 0; font-family: "Hartvast Display", sans-serif; font-size: 1.65rem; letter-spacing: -.025em; }
.portal-panel > p { margin: 0 0 24px; color: #718079; line-height: 1.6; font-size: .9rem; }
.portal-panel__icon { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; border-radius: 13px; background: #1e4a3e; font-size: 1.55rem; line-height: 1; }
.portal-form--admin { gap: 15px; }
.portal-password-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.password-policy { display: grid; gap: 4px; padding: 12px 14px; color: #5d6e66; border-radius: 12px; background: #f4f6f3; font-size: .77rem; line-height: 1.5; }
.password-policy strong { color: #2f4d42; }

.audit-list { display: grid; gap: 4px; margin-top: 18px; }
.audit-item { display: grid; grid-template-columns: 9px 1fr; gap: 11px; align-items: start; padding: 12px 0; border-bottom: 1px solid rgba(23,51,44,.07); }
.audit-item:last-child { border-bottom: 0; }
.audit-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #b76b4f; }
.audit-item div { display: grid; gap: 3px; }
.audit-item strong { font-size: .8rem; }
.audit-item span:last-child { color: #829089; font-size: .7rem; }
.portal-muted { color: #829089; font-size: .84rem; }

.portal-panel--users { padding: 0; overflow: hidden; }
.portal-panel__head--users { align-items: center; padding: 25px 28px 16px; margin: 0; }
.portal-count { padding: 7px 10px; border-radius: 999px; color: #567064; background: #f0f4f1; font-size: .72rem; font-weight: 700; }
.portal-table-wrap { width: 100%; overflow-x: auto; }
.portal-table { width: 100%; min-width: 820px; border-collapse: collapse; }
.portal-table th { padding: 13px 20px; color: #77847d; background: #f7f8f6; border-top: 1px solid rgba(23,51,44,.07); border-bottom: 1px solid rgba(23,51,44,.07); text-align: left; font-size: .67rem; letter-spacing: .08em; text-transform: uppercase; }
.portal-table td { padding: 17px 20px; border-bottom: 1px solid rgba(23,51,44,.065); color: #5c6b64; font-size: .79rem; vertical-align: middle; }
.portal-table tbody tr:last-child td { border-bottom: 0; }
.portal-table td:first-child { display: grid; gap: 3px; }
.portal-table td:first-child strong { color: #233f35; font-size: .84rem; }
.portal-table td:first-child span { color: #87928d; font-size: .72rem; }
.role-badge,
.status-badge { display: inline-flex; align-items: center; padding: 6px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700; }
.role-badge--main_admin { color: #714934; background: #f9e9de; }
.role-badge--subadmin { color: #315d50; background: #e7f2ed; }
.role-badge--customer { color: #4e5d72; background: #eef1f5; }
.status-badge--active { color: #2f7259; background: #e9f6ef; }
.status-badge--disabled { color: #8b4c44; background: #faece9; }
.status-note { display: block; margin-top: 5px; color: #a17c4e; font-size: .63rem; }
.protected-label { color: #89938f; font-size: .7rem; font-weight: 700; }
.table-action { min-height: 32px; padding: 0 10px; color: #315d50; border: 1px solid rgba(49,93,80,.16); border-radius: 8px; background: #f1f7f4; font-size: .68rem; font-weight: 700; cursor: pointer; }
.table-action--danger { color: #8a4b43; border-color: rgba(138,75,67,.14); background: #fbefed; }

.empty-portal-card { min-height: 480px; display: grid; place-items: center; align-content: center; max-width: 980px; margin: 34px auto 0; padding: clamp(42px, 8vw, 100px); text-align: center; border: 1px solid rgba(23,51,44,.08); border-radius: 28px; background: rgba(255,255,255,.8); box-shadow: 0 20px 55px rgba(22,47,39,.06); }
.empty-portal-card__mark { width: 76px; height: 76px; display: grid; place-items: center; margin-bottom: 22px; color: #fff; border-radius: 22px; background: linear-gradient(145deg, #1c473b, #37715e); box-shadow: 0 16px 36px rgba(29,72,60,.2); }
.empty-portal-card__mark svg { width: 38px; height: 38px; fill: currentColor; }
.empty-portal-card h2 { max-width: 620px; margin: 8px 0 12px; font-family: "Hartvast Display", sans-serif; font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -.035em; }
.empty-portal-card > p { max-width: 680px; margin: 0; color: #708078; line-height: 1.7; }
.empty-portal-card__checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.empty-portal-card__checks span { padding: 8px 11px; color: #4c665b; border: 1px solid rgba(47,96,80,.1); border-radius: 999px; background: #f0f6f3; font-size: .72rem; font-weight: 700; }

.password-panel { max-width: 760px; }
.password-panel__intro { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid rgba(23,51,44,.08); }
.password-panel__icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; border-radius: 14px; background: #1e493e; }
.password-panel__icon svg { width: 24px; height: 24px; fill: currentColor; }
.password-panel__intro div { display: grid; gap: 3px; }
.password-panel__intro strong { font-size: .88rem; }
.password-panel__intro span { color: #7a8781; font-size: .77rem; }
.password-form { max-width: 560px; }

@media (max-width: 1100px) {
    .login-layout { grid-template-columns: 1fr 470px; }
    .login-story { padding: 42px; }
    .login-card-wrap { padding: 48px; }
    .portal-shell { grid-template-columns: 220px minmax(0, 1fr); }
    .portal-sidebar { padding-inline: 16px; }
    .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .login-page { padding: 0; }
    .login-layout { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
    .login-story { min-height: auto; padding: 28px 24px 36px; }
    .login-story__content { padding: 70px 0 20px; }
    .login-story h1 { font-size: clamp(2.7rem, 12vw, 4.7rem); }
    .login-story__content > p { font-size: .95rem; }
    .login-story__foot { display: none; }
    .login-card-wrap { padding: 42px 24px 54px; background: #fbfaf7; }

    .portal-shell { display: block; }
    .portal-sidebar { position: static; width: 100%; height: auto; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; padding: 17px 20px; }
    .portal-brand { padding: 0; border: 0; }
    .portal-brand img { width: 42px; height: 42px; }
    .portal-brand strong { font-size: 1.05rem; }
    .portal-brand small { font-size: .56rem; }
    .portal-nav { display: flex; margin: 0; }
    .portal-nav a { width: 42px; height: 42px; padding: 0; justify-content: center; }
    .portal-nav a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .portal-sidebar__foot { display: none; }
    .portal-topbar { height: 68px; padding: 0 20px; }
    .portal-content { padding: 28px 20px 44px; }
    .portal-heading { display: grid; }
    .security-chip { width: fit-content; }
    .portal-stats { grid-template-columns: 1fr; }
    .portal-stats article { min-height: 122px; }
    .portal-password-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .login-brand img { width: 52px; height: 52px; }
    .login-brand strong { font-size: 1.3rem; }
    .login-story { padding: 22px 20px 30px; }
    .login-story__content { padding-top: 54px; }
    .login-trust { gap: 6px; }
    .login-trust span { font-size: .69rem; }
    .login-card-wrap { padding-inline: 20px; }
    .login-card__head { align-items: flex-start; }
    .login-lock { width: 44px; height: 44px; border-radius: 13px; }
    .portal-sidebar { padding-inline: 15px; }
    .portal-topbar { justify-content: space-between; padding-inline: 15px; }
    .portal-topbar > div { text-align: left; }
    .portal-content { padding-inline: 15px; }
    .portal-heading h1 { font-size: 2.55rem; }
    .portal-panel { padding: 20px; border-radius: 18px; }
    .portal-panel--users { padding: 0; }
    .portal-panel__head--users { padding: 20px; }
    .empty-portal-card { min-height: 430px; padding: 42px 22px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================
   HARTVAST ADMIN SUITE 2026
   ========================================================= */
.portal-sidebar { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.portal-nav--admin { gap: 4px; margin-top: 20px; }
.portal-nav--admin a { min-height: 40px; padding: 9px 10px; font-size: .79rem; }
.portal-nav__glyph { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 25px; border-radius: 8px; color: rgba(255,255,255,.78); background: rgba(255,255,255,.07); font-family: "Hartvast Display", sans-serif; font-size: .62rem; letter-spacing: -.02em; }
.portal-nav--admin a.is-active .portal-nav__glyph { color: #17332c; background: #f3c1a4; }
.portal-content { max-width: 1620px; }
.admin-heading { margin-bottom: 24px; }

.portal-field textarea {
    width: 100%; min-height: 92px; padding: 13px 15px; resize: vertical;
    color: #17332c; border: 1px solid rgba(23,51,44,.16); border-radius: 13px;
    background: #fff; box-shadow: inset 0 1px 2px rgba(23,51,44,.025); outline: none;
    font: inherit; line-height: 1.5; transition: border-color .2s ease, box-shadow .2s ease;
}
.portal-field textarea:focus { border-color: #4d806f; box-shadow: 0 0 0 4px rgba(77,128,111,.11); }
.portal-field small { margin-top: -3px; color: #8a9690; font-size: .67rem; line-height: 1.35; }

.admin-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.admin-kpi { position: relative; min-height: 132px; display: block; padding: 20px; border: 1px solid rgba(23,51,44,.08); border-radius: 20px; background: rgba(255,255,255,.87); box-shadow: 0 13px 34px rgba(22,47,39,.05); overflow: hidden; }
.admin-kpi::after { content: ""; position: absolute; width: 100px; height: 100px; top: -45px; right: -38px; border-radius: 50%; background: rgba(183,93,61,.06); }
.admin-kpi:hover { border-color: rgba(32,82,68,.16); transform: translateY(-1px); }
.admin-kpi span { display: block; color: #6d7973; font-size: .75rem; font-weight: 700; }
.admin-kpi strong { display: block; margin: 12px 0 4px; color: #17332c; font-family: "Hartvast Display", sans-serif; font-size: clamp(1.72rem, 2.5vw, 2.45rem); line-height: 1; letter-spacing: -.025em; }
.admin-kpi small { color: #89938f; font-size: .68rem; }
.admin-kpi--alert strong { color: #a64f39; }
.admin-kpi-grid--reports { grid-template-columns: repeat(4, minmax(0,1fr)); }

.admin-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 20px; margin-bottom: 20px; }
.panel-link { align-self: center; color: #5f736a; font-size: .72rem; font-weight: 700; }
.compact-list { display: grid; gap: 5px; }
.compact-list__item { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(23,51,44,.07); }
.compact-list__item:last-child { border-bottom: 0; }
.compact-list__item > div:nth-child(2) { display: grid; gap: 3px; }
.compact-list__item strong { color: #29473d; font-size: .83rem; }
.compact-list__item span, .compact-list__item small { color: #7c8983; font-size: .69rem; }
.date-tile { width: 42px; height: 42px; display: grid; place-items: center; align-content: center; border-radius: 11px; background: #eef4f1; }
.date-tile strong { font-size: .95rem; line-height: 1; }
.date-tile span { margin-top: 2px; font-size: .58rem; }
.warning-list { display: grid; gap: 3px; }
.warning-list article { display: grid; grid-template-columns: 9px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid rgba(23,51,44,.07); }
.warning-list article:last-child { border-bottom: 0; }
.warning-list article div { display: grid; gap: 3px; }
.warning-list strong { color: #3a4e46; font-size: .79rem; }
.warning-list small { color: #89938f; font-size: .68rem; line-height: 1.4; }
.warning-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #c07255; box-shadow: 0 0 0 4px rgba(192,114,85,.1); }
.warning-dot--invoice { background: #b65145; }.warning-dot--employee { background: #b78342; }.warning-dot--client { background: #4d806f; }
.activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 24px; }
.activity-grid article { display: grid; grid-template-columns: 9px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(23,51,44,.06); }
.activity-grid article div { display: grid; gap: 3px; }.activity-grid strong { font-size: .78rem; }.activity-grid small { color: #86918c; font-size: .68rem; }

.admin-create-box { margin-bottom: 20px; border: 1px solid rgba(23,51,44,.08); border-radius: 22px; background: rgba(255,255,255,.87); box-shadow: 0 14px 38px rgba(22,47,39,.05); overflow: hidden; }
.admin-create-box > summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 20px 24px; cursor: pointer; list-style: none; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(249,248,244,.93)); }
.admin-create-box > summary::-webkit-details-marker { display: none; }
.admin-create-box > summary span { color: #24463a; font-family: "Hartvast Display", sans-serif; font-size: 1.22rem; }
.admin-create-box > summary small { color: #85918b; font-size: .71rem; }
.admin-create-box[open] > summary { border-bottom: 1px solid rgba(23,51,44,.07); }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 22px 24px 25px; }
.admin-form-grid--inside { padding: 20px; background: #f9faf7; border-radius: 0 0 16px 16px; }
.admin-span-2 { grid-column: 1 / -1; }
.admin-form-actions { display: flex; justify-content: flex-end; }
.admin-form-actions .portal-primary { width: auto; min-width: 190px; padding-inline: 22px; }
.portal-check { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid rgba(23,51,44,.1); border-radius: 13px; background: #f9fbf9; color: #40554c; font-size: .78rem; font-weight: 600; }
.portal-check input { width: 17px; height: 17px; accent-color: #24584a; }
.admin-two-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.admin-three-column { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.admin-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.admin-panel-pad { padding: 24px 26px 16px; margin: 0; }
.portal-panel--flush { padding: 0; overflow: hidden; }
.admin-empty { padding: 28px; color: #83908a; font-size: .82rem; }

.admin-record-list { display: grid; }
.admin-record { border-top: 1px solid rgba(23,51,44,.07); }
.admin-record > summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 17px 24px; cursor: pointer; list-style: none; }
.admin-record > summary::-webkit-details-marker { display:none; }
.admin-record > summary > div { display: grid; gap: 4px; }
.admin-record > summary strong { color: #27463c; font-size: .85rem; }
.admin-record > summary span { color: #82908a; font-size: .7rem; }
.admin-record[open] > summary { background: #fafbf8; }
.admin-record-meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #f0f4f1; color: #677770; font-size: .7rem; }

.employee-card { padding: 22px; }
.employee-card__top { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 12px; align-items: center; }
.avatar { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(145deg,#1b4a3c,#427362); font-family: "Hartvast Display",sans-serif; font-size: 1.2rem; }
.employee-card__top h2 { margin: 0 0 3px; font-family: "Hartvast Display",sans-serif; font-size: 1.15rem; }
.employee-card__top p { margin: 0; color: #83908a; font-size: .7rem; }
.employee-mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.employee-mini-stats span { display: grid; gap: 3px; padding: 10px 12px; border-radius: 11px; background: #f4f6f3; color: #7b8982; font-size: .66rem; }
.employee-mini-stats strong { color: #315449; font-size: .8rem; }
.inline-details { border-top: 1px solid rgba(23,51,44,.08); }
.inline-details > summary { padding: 13px 0 3px; cursor: pointer; color: #48675c; font-size: .74rem; font-weight: 700; }
.employee-card__status { margin-top: 12px; }

.admin-table { min-width: 1000px; }
.admin-table td { vertical-align: top; }
.admin-table td strong + span { display: block; margin-top: 4px; color: #8a958f; font-size: .67rem; }
.inline-action { display: flex; align-items: center; gap: 6px; }
.inline-action select { min-height: 31px; padding: 0 7px; border: 1px solid rgba(23,51,44,.12); border-radius: 8px; background: #fff; color: #3b554b; font-size: .67rem; }
.inline-action button { min-height: 31px; padding: 0 8px; border: 0; border-radius: 8px; background: #eaf3ef; color: #315d50; font-size: .65rem; font-weight: 700; cursor: pointer; }
.table-actions { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.table-actions form { margin: 0; }

.privacy-notice { display: grid; gap: 5px; margin-bottom: 20px; padding: 15px 18px; border: 1px solid rgba(170,98,67,.14); border-radius: 15px; background: #fff4ec; color: #6c554a; }
.privacy-notice strong { color: #664537; font-size: .83rem; }.privacy-notice span { font-size: .74rem; line-height: 1.5; }
.care-card__top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.record-type { padding: 6px 8px; border-radius: 999px; background: #edf4f0; color: #486c60; font-size: .63rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.care-card h2 { margin: 14px 0 6px; font-family: "Hartvast Display",sans-serif; font-size: 1.2rem; }.care-card > p { margin: 0 0 14px; color: #7b8982; font-size: .72rem; }
.care-card__content { max-height: 200px; overflow: auto; padding: 13px; border-radius: 11px; background: #f6f7f4; color: #4f625a; font-size: .78rem; line-height: 1.55; white-space: pre-wrap; }
.care-card > small { display: block; margin-top: 12px; color: #929c97; font-size: .64rem; }
.priority { display: inline-flex; padding: 5px 7px; border-radius: 999px; background: #eef3f0; color: #60736b; font-size: .62rem; font-weight: 700; }
.priority--urgent { color: #8a3d34; background: #fae8e4; }.priority--high { color:#8b5c32; background:#fbf0df; }

.export-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.admin-button-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; width: auto; margin: 0; padding: 0 16px; }
.rank-list { display: grid; }.rank-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(23,51,44,.07); }
.rank-list > div:last-child { border-bottom: 0; }.rank-list span { color: #66776f; font-size: .74rem; }.rank-list strong { color: #2f5448; font-size: .75rem; }
.settings-panel { max-width: 1080px; }
.portal-table code { color: #6d625e; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .64rem; white-space: normal; }

@media (max-width: 1280px) {
    .admin-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .admin-three-column { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
    .portal-shell { grid-template-columns: 230px minmax(0,1fr); }
    .admin-dashboard-grid, .admin-two-column, .admin-card-grid { grid-template-columns: 1fr; }
    .admin-three-column { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .portal-sidebar { overflow: visible; }
    .portal-nav--admin { grid-column: 1 / -1; width: 100%; display: flex; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .portal-nav--admin::-webkit-scrollbar { display:none; }
    .portal-nav--admin a { min-width: 45px; width: auto; height: 44px; padding: 0 10px; flex: 0 0 auto; }
    .portal-nav--admin a span:last-child { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: nowrap; font-size: .66rem; }
    .portal-nav--admin .portal-nav__glyph { width: 24px; height: 24px; flex-basis: 24px; }
    .admin-kpi-grid { grid-template-columns: 1fr 1fr; }
    .activity-grid { grid-template-columns: 1fr; }
    .admin-form-grid { grid-template-columns: 1fr; padding: 18px; }
    .admin-span-2 { grid-column: 1; }
    .admin-form-actions { justify-content: stretch; }
    .admin-form-actions .portal-primary { width: 100%; }
    .admin-create-box > summary { padding: 17px 18px; }
}

@media (max-width: 560px) {
    .admin-kpi-grid { grid-template-columns: 1fr; }
    .admin-kpi { min-height: 112px; }
    .admin-heading h1 { font-size: 2.25rem; }
    .admin-heading .security-chip { display: none; }
    .admin-create-box > summary { display: grid; gap: 4px; }
    .employee-card__top { grid-template-columns: 42px minmax(0,1fr); }
    .employee-card__top .status-badge { grid-column: 2; width: fit-content; }
    .avatar { width:42px;height:42px; }
    .employee-mini-stats { grid-template-columns: 1fr; }
    .portal-content { padding-top: 22px; }
}
.admin-panel-pad--calendar { align-items: end; }
.admin-panel-pad--calendar small { display:block; margin-top:5px; color:#8a958f; font-size:.68rem; }
.calendar-filter { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.calendar-filter select, .calendar-filter input { min-height:36px; padding:0 9px; border:1px solid rgba(23,51,44,.13); border-radius:9px; background:#fff; color:#40564d; font-size:.72rem; }
.calendar-filter button { min-height:36px; padding:0 12px; border:0; border-radius:9px; background:#244f42; color:#fff; font-size:.7rem; font-weight:700; cursor:pointer; }
@media (max-width: 720px) { .admin-panel-pad--calendar { display:grid; } .calendar-filter { width:100%; } }
.settings-logo { display:grid; grid-template-columns:110px minmax(0,1fr); gap:18px; align-items:center; padding:14px; border:1px solid rgba(23,51,44,.08); border-radius:15px; background:#f8faf7; }
.settings-logo > div { width:96px; height:72px; display:grid; place-items:center; overflow:hidden; border-radius:12px; background:#fff; border:1px solid rgba(23,51,44,.08); }
.settings-logo img { max-width:88px; max-height:64px; object-fit:contain; }
.settings-logo__placeholder { width:52px; height:52px; display:grid; place-items:center; border-radius:15px; background:#234e42; color:#fff; font-family:"Hartvast Display",sans-serif; }
@media (max-width:560px){ .settings-logo{grid-template-columns:1fr;} .settings-logo > div{width:100%;} }
.permission-grid { margin:0; padding:14px; border:1px solid rgba(23,51,44,.1); border-radius:13px; background:#f7f9f6; }
.permission-grid legend { padding:0 6px; color:#31483f; font-size:.75rem; font-weight:700; }
.permission-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.permission-grid label { display:flex; align-items:center; gap:8px; min-height:38px; padding:8px 10px; border-radius:10px; background:#fff; color:#53665e; font-size:.72rem; }
.permission-grid input { width:16px; height:16px; accent-color:#24584a; }
@media(max-width:560px){.permission-grid{grid-template-columns:1fr;}}
