:root {
    color-scheme: light;
    --bg: var(--hk-bg);
    --muted: var(--hk-muted);
    --line: var(--hk-line);
    --panel: var(--hk-surface);
    --accent: var(--orange);
    --accent-dark: var(--orange);
    --brand-dark: var(--ink);
    --danger-bg: #fff1f2;
    --danger-ink: #9f1239;
    --login-bg: url("../images/login-bg.87aba8457b0f.webp");
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-family);
}

.icon-sprite {
    display: none;
}

svg {
    display: block;
}

/* ─── Auth Page ─────────────────────────────────────────────────────────── */

.auth-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--auth-page-bg);
    color: var(--auth-ink);
    transition: background 0.2s ease, color 0.2s ease;
    --auth-page-bg: #f8fafc;
    --auth-ink: #111827;
    --auth-muted: #6b7280;
    --auth-card: rgba(255, 255, 255, 0.88);
    --auth-card-border: rgba(15, 23, 42, 0.10);
    --auth-card-shadow: 0 22px 70px rgba(15, 23, 42, 0.16);
    --auth-input-bg: rgba(255, 255, 255, 0.88);
    --auth-input-border: #d9dee8;
    --auth-panel-overlay: linear-gradient(90deg, rgba(5, 12, 20, 0.78), rgba(5, 12, 20, 0.26) 56%, rgba(5, 12, 20, 0.50));
    --auth-divider: rgba(100, 116, 139, 0.24);
    --auth-content-gap: clamp(18px, 2.4vh, 28px);
    --auth-form-gap: clamp(14px, 2.1vh, 20px);
    --auth-panel-pad: clamp(26px, 3vw, 48px);
    --auth-panel-width: min(100%, clamp(440px, 39vw, 580px));
    --auth-control-height: clamp(48px, 5.4vh, 56px);
    --auth-content-pad-block: clamp(24px, 5vh, 72px);
    --auth-content-pad-inline: clamp(24px, 5vw, 72px);
    --auth-showcase-pad-block: clamp(34px, 5vw, 74px);
    --auth-showcase-pad-inline: clamp(52px, 5.8vw, 92px);
}

.auth-page[data-theme="dark"] {
    --auth-page-bg: #050b12;
    --auth-ink: #f8fafc;
    --auth-muted: #a7b0c0;
    --auth-card: rgba(11, 16, 23, 0.74);
    --auth-card-border: rgba(255, 255, 255, 0.16);
    --auth-card-shadow: 0 32px 90px rgba(0, 0, 0, 0.44);
    --auth-input-bg: rgba(7, 12, 18, 0.46);
    --auth-input-border: rgba(255, 255, 255, 0.16);
    --auth-panel-overlay: linear-gradient(90deg, rgba(3, 8, 14, 0.90), rgba(3, 8, 14, 0.42) 56%, rgba(3, 8, 14, 0.74));
    --auth-divider: rgba(255, 255, 255, 0.16);
}

.auth-page::before,
.auth-page::after {
    display: none;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(360px, 46vw) minmax(420px, 1fr);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    border-radius: 0 24px 24px 0;
    background:
        var(--auth-panel-overlay),
        var(--login-bg) center / cover no-repeat;
    color: var(--white);
}

.auth-showcase-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(24px, 4vh, 42px);
    padding: var(--auth-showcase-pad-block) var(--auth-showcase-pad-inline);
}

.auth-brand {
    display: flex;
    align-items: center;
}

.auth-logo-img {
    display: block;
    width: clamp(154px, 15vw, 230px);
    max-width: 70%;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

.auth-copy {
    margin-top: auto;
    margin-bottom: auto;
}

.auth-copy h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(2.25rem, 4.6vw, 4.25rem);
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.08;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.auth-copy h1 span,
.auth-admin a,
.auth-label-row a,
.auth-theme-toggle button.is-active {
    color: var(--accent);
}

.auth-rule {
    width: 46px;
    height: 2px;
    margin: clamp(18px, 3vh, 28px) 0;
    border-radius: 999px;
    background: var(--accent);
}

.auth-copy p {
    max-width: 270px;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(0.95rem, 1.15vw, 1.05rem);
    line-height: 1.6;
}

.auth-highlights {
    display: grid;
    gap: clamp(14px, 2.5vh, 22px);
}

.auth-highlight {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-highlight > span {
    display: grid;
    width: clamp(34px, 3.4vw, 42px);
    height: clamp(34px, 3.4vw, 42px);
    flex: 0 0 auto;
    place-items: center;
    color: var(--accent);
}

.auth-highlight svg {
    width: clamp(32px, 3.2vw, 40px);
    height: clamp(32px, 3.2vw, 40px);
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.auth-highlight strong,
.auth-highlight small {
    display: block;
}

.auth-highlight strong {
    color: var(--white);
    font-size: 1rem;
}

.auth-highlight small {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9rem;
}

.auth-content {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--auth-content-gap);
    padding: var(--auth-content-pad-block) var(--auth-content-pad-inline);
}

.auth-panel {
    position: relative;
    width: var(--auth-panel-width);
    border: 1px solid var(--auth-card-border);
    border-radius: var(--hk-radius-card);
    background: var(--auth-card);
    padding: var(--auth-panel-pad);
    box-shadow: var(--auth-card-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-panel::before {
    display: none;
}

.brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(238, 153, 34, 0.62);
    border-radius: var(--hk-radius-control);
    background: linear-gradient(145deg, var(--accent), #f7bd62);
    color: var(--brand-dark);
    font-weight: 900;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 2rem;
    line-height: 1.1;
}

h2 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.auth-panel h2 {
    margin: 0;
    color: var(--auth-ink);
    font-size: clamp(1.85rem, 2.8vw, 2.55rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
}

.auth-subtitle {
    margin: clamp(8px, 1.5vh, 12px) 0 0;
    color: var(--auth-muted);
    font-size: 1.05rem;
}

.login-form {
    display: grid;
    gap: var(--auth-form-gap);
    margin-top: clamp(22px, 3.4vh, 34px);
}

.login-form label {
    display: grid;
    gap: 12px;
    color: var(--auth-ink);
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-input-wrap {
    display: flex;
    min-height: var(--auth-control-height);
    align-items: center;
    gap: 16px;
    width: 100%;
    border: 1px solid var(--auth-input-border);
    border-radius: var(--hk-radius-control);
    background: var(--auth-input-bg);
    padding: 0 18px;
    color: var(--auth-muted);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-input-wrap:focus-within {
    border-color: rgba(238, 153, 34, 0.72);
    box-shadow: 0 0 0 4px rgba(238, 153, 34, 0.16);
}

.auth-input-wrap > svg,
.auth-eye svg,
.auth-theme-toggle svg,
.auth-footer svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-input-wrap > svg {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    stroke-width: 2;
}

.auth-input-wrap input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--auth-ink);
    font: inherit;
    font-weight: 500;
    outline: 0;
}

.auth-input-wrap input::placeholder {
    color: var(--auth-muted);
}

input:focus {
    outline: 0;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-ink);
    box-shadow: 0 0 0 1000px var(--auth-input-bg) inset;
}

.auth-label-row,
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-label-row a,
.auth-admin a {
    font-weight: 700;
    text-decoration: none;
}

.auth-eye {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    padding: 0;
}

.auth-eye svg {
    width: 23px;
    height: 23px;
    stroke-width: 2;
}

.auth-options {
    margin-top: -2px;
    color: var(--auth-muted);
    font-size: 0.92rem;
    font-weight: 500;
}

.remember-check {
    display: inline-flex !important;
    grid-template-columns: none;
    align-items: center;
    gap: 10px !important;
    color: var(--auth-ink) !important;
    font-weight: 500 !important;
}

.remember-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.login-form > button,
.account-actions a,
.google-login {
    display: inline-flex;
    min-height: var(--auth-control-height);
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: var(--accent);
    color: var(--white);
    cursor: pointer;
    font: inherit;
    font-weight: 750;
    padding: 0 16px;
    text-decoration: none;
}

.login-form > button:hover,
.account-actions a:hover {
    background: var(--accent-dark);
    color: var(--white);
}

.divider {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 20px);
    margin: clamp(22px, 4vh, 34px) 0;
    color: var(--auth-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--auth-divider);
}

.google-login {
    width: 100%;
    gap: 12px;
    border: 1px solid var(--auth-input-border);
    background: transparent;
    color: var(--auth-ink);
}

.google-login:hover {
    border-color: rgba(238, 153, 34, 0.60);
    background: rgba(238, 153, 34, 0.08);
}

.google-mark {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
}

.google-mark svg {
    width: 24px;
    height: 24px;
}

.auth-admin {
    margin: clamp(22px, 4vh, 34px) 0 0;
    color: var(--auth-muted);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

.auth-theme-toggle {
    display: flex;
    width: var(--auth-panel-width);
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    color: var(--auth-muted);
}

.auth-theme-toggle button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 0;
}

.auth-theme-toggle svg {
    width: 21px;
    height: 21px;
    stroke-width: 2;
}

.auth-theme-toggle > span {
    width: 1px;
    height: 22px;
    background: var(--auth-divider);
}

.auth-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.92rem;
    font-weight: 500;
}

.auth-footer svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.message-stack {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.message,
.status-panel {
    border: 1px solid var(--line);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    padding: 14px;
}

.auth-panel .message {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.9);
}

.message-error,
.error-panel {
    border-color: #fecdd3;
    background: var(--danger-bg);
    color: var(--danger-ink);
}

/* ─── Dashboard Shell ───────────────────────────────────────────────────── */

.dashboard-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
    background: var(--bg);
}

/* ─── Sidebar ───────────────────────────────────────────────────────────── */

.dash-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    background: #1e2023;
    padding: 0;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Logo */
.dash-logo {
    display: flex;
    align-items: center;
    padding: 24px 20px 20px;
    text-decoration: none;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 8px;
}

.logo-mark {
    display: grid;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    place-items: center;
    border-radius: 10px;
    background: rgba(238, 153, 34, 0.15);
    color: var(--accent);
}

.logo-mark svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logo-text strong {
    display: block;
    color: var(--white);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    line-height: 1.2;
}

.logo-text small {
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    font-weight: 500;
    margin-top: 2px;
}

/* Nav */
.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    margin-bottom: auto;
    padding: 4px 12px;
}

.dash-nav a {
    display: flex;
    height: 42px;
    align-items: center;
    gap: 11px;
    border-radius: var(--hk-radius-control);
    border-left: 3px solid transparent;
    color: rgba(255, 255, 255, 0.48);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0 12px 0 9px;
    text-decoration: none;
    transition: background 0.13s, color 0.13s, border-color 0.13s;
}

.dash-nav a span {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: inherit;
}

.dash-nav a span svg,
.dash-nav svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.dash-nav a.is-active {
    background: rgba(238, 153, 34, 0.1);
    border-left-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.dash-nav a:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.88);
    border-left-color: rgba(255, 255, 255, 0.1);
}

.nav-badge {
    margin-left: auto;
    background: rgba(238, 153, 34, 0.18);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    font-style: normal;
    border-radius: 999px;
    padding: 2px 7px;
    line-height: 1.6;
}

.dash-nav a.is-active .nav-badge {
    background: rgba(238, 153, 34, 0.2);
    color: var(--accent);
}

/* Support card */
.support-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 12px 20px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.support-card strong {
    display: block;
    font-size: 0.84rem;
    color: var(--white);
}

.support-card p {
    margin: 2px 0 0;
    color: var(--accent);
    font-size: 0.76rem;
}

.support-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: var(--hk-radius-control);
    background: rgba(238, 153, 34, 0.15);
    color: var(--accent);
}

.support-icon svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.support-btn {
    display: grid;
    place-items: center;
    margin-left: auto;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: none;
    cursor: pointer;
    padding: 0;
}

.support-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
}

/* ─── Main Area ─────────────────────────────────────────────────────────── */

.dash-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg);
}

/* Topbar */
.dash-topbar {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    background: var(--panel);
    padding: 0 clamp(20px, 3vw, 36px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.dash-topbar h1 {
    color: var(--brand-dark);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.dash-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    width: min(32vw, 300px);
    min-width: 200px;
    height: 42px;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--hk-radius-control);
    background: var(--bg);
    color: var(--brand-dark);
    padding: 0 13px;
    cursor: text;
}

.search-box span {
    color: var(--muted);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.search-box span svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-box input {
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--brand-dark);
    outline: 0;
    padding: 0;
    font: inherit;
    font-size: 0.88rem;
}

.search-box input::placeholder {
    color: var(--muted);
}

.icon-button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--brand-dark);
    cursor: pointer;
    padding: 0;
}

.icon-button svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notif-btn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--white);
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
    line-height: 1;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--brand-dark);
}

.avatar-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-initials {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--white);
    border: 1px solid rgba(238, 153, 34, 0.35);
    box-shadow: 0 8px 18px rgba(238, 153, 34, 0.22);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

.profile-chip strong {
    display: block;
    font-size: 0.88rem;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.2;
}

.profile-chip p {
    margin: 0;
    font-size: 0.76rem;
    color: var(--muted);
}

/* Sidebar logo image */
.sidebar-logo-img {
    display: block;
    width: 100%;
    max-width: 160px;
    height: 32px;
    object-fit: contain;
    object-position: left center;
}

/* Auth page logo */
.auth-logo-img {
    display: block;
    width: clamp(154px, 15vw, 230px);
    max-width: 230px;
    height: auto;
    margin-bottom: 0;
}

/* Profile chip dropdown */
.profile-chip-wrap {
    position: relative;
}

.profile-chip {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
}

.profile-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 160px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 100;
    overflow: hidden;
}

.profile-chip-wrap:focus-within .profile-menu,
.profile-chip-wrap.is-open .profile-menu {
    display: block;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.12s, color 0.12s;
}

.profile-menu-item:hover {
    background: var(--bg);
    color: var(--danger-ink);
}

.profile-menu-item svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.profile-chevron {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ─── Dashboard Content ─────────────────────────────────────────────────── */

.dashboard-content {
    display: grid;
    gap: 22px;
    padding: 26px clamp(20px, 3vw, 36px);
    flex: 1;
}

.welcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.welcome-row h2 {
    margin: 0 0 4px;
    color: var(--brand-dark);
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

.welcome-row p {
    margin: 0;
    color: var(--footer-muted);
    font-size: 0.9rem;
}

.date-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--brand-dark);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0 14px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.date-pill svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: var(--accent-dark);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.chevron-sm {
    stroke: var(--muted) !important;
}

/* ─── Glass Cards ───────────────────────────────────────────────────────── */

.glass-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--hk-radius-card);
    background: var(--panel);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* ─── Metric Grid ───────────────────────────────────────────────────────── */

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 18px;
}

.metric-card {
    position: relative;
    display: grid;
    min-height: 140px;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 14px;
    row-gap: 10px;
    overflow: hidden;
    padding: 20px;
}

.metric-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--brand-dark);
    flex-shrink: 0;
}

.metric-icon svg {
    width: 1.3rem;
    height: 1.3rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.metric-card > div:first-of-type {
    min-width: 0;
}

.metric-card p {
    color: var(--footer-muted);
    font-size: 0.86rem;
    margin: 0 0 6px;
}

.metric-card strong {
    display: block;
    color: var(--ink);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}

.metric-trend {
    display: grid;
    grid-column: 1 / 3;
    grid-row: 2;
    align-self: end;
    justify-self: start;
    gap: 5px;
}

.metric-trend span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(34, 151, 67, 0.1);
    color: var(--hk-success);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0 10px;
}

.metric-trend small {
    color: var(--footer-muted);
    font-size: 0.8rem;
}

.sparkline {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: end;
    width: 110px;
    height: 54px;
    overflow: visible;
}

.sparkline polyline {
    fill: none;
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.sparkline circle {
    fill: var(--accent);
    stroke: #ffffff;
    stroke-width: 1.5;
}

/* ─── Panels ────────────────────────────────────────────────────────────── */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(250px, 1.05fr) minmax(300px, 1.1fr) minmax(240px, 1fr);
    gap: 20px;
}

.lower-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.2fr) minmax(280px, 1fr);
    gap: 20px;
}

.panel-card {
    min-width: 0;
    padding: 20px;
}

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

.panel-head h3 {
    margin: 0;
    color: var(--brand-dark);
    font-size: 0.98rem;
    font-weight: 700;
}

.panel-head a {
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
}

.panel-head a:hover {
    color: var(--accent-dark);
}

/* ─── Request List ──────────────────────────────────────────────────────── */

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

.request-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
}

.mini-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.request-item strong {
    display: block;
    color: var(--brand-dark);
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.request-item p {
    margin: 0;
    color: var(--footer-muted);
    font-size: 0.78rem;
}

.status-badge {
    border-radius: 6px;
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 700;
    padding: 4px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-pending {
    background: rgba(238, 153, 34, 0.12);
    color: var(--orange);
}

.status-new {
    background: var(--bg);
    color: var(--footer-muted);
    border: 1px solid #e5e7eb;
}

.status-review {
    background: rgba(139, 92, 246, 0.1);
    color: var(--hk-review);
}

.request-item time {
    color: var(--footer-muted);
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.view-all-link:hover {
    color: var(--accent-dark);
}

/* ─── Donut / Progress ──────────────────────────────────────────────────── */

.progress-body {
    display: grid;
    grid-template-columns: 186px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
}

.donut {
    display: grid;
    width: 178px;
    height: 178px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(
        var(--accent) 0deg 180deg,
        #1e2023 180deg 255deg,
        #d8c49d 255deg 300deg,
        #d1d0ce 300deg 360deg
    );
}

.donut span {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    border-radius: 50%;
    background: var(--panel);
    color: var(--brand-dark);
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.donut small {
    display: block;
    color: var(--footer-muted);
    font-size: 0.62rem;
    font-weight: 600;
    margin-top: 3px;
}

.legend-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.legend-list li {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 10px;
    color: var(--brand-dark);
    font-size: 0.84rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.not-started { background: #d1d0ce; }
.in-progress  { background: var(--accent); }
.in-review    { background: #1e2023; }
.completed    { background: #d8c49d; }

.legend-label {
    color: var(--ink);
    font-size: 0.84rem;
}

.legend-count {
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 0.84rem;
}

.legend-pct {
    color: var(--footer-muted);
    font-weight: 500;
    font-size: 0.8rem;
}

/* ─── Activity ──────────────────────────────────────────────────────────── */

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

.activity-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    align-items: start;
}

.act-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--hk-radius-control);
    flex-shrink: 0;
}

.act-icon svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.act-orange {
    background: rgba(238, 153, 34, 0.12);
    color: var(--accent);
}

.act-dark {
    background: #1e2023;
    color: var(--white);
}

.act-body strong {
    display: block;
    font-size: 0.84rem;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1.3;
}

.act-body p {
    margin: 0;
    font-size: 0.78rem;
    color: var(--footer-muted);
    line-height: 1.4;
}

.activity-item time {
    font-size: 0.76rem;
    color: var(--footer-muted);
    white-space: nowrap;
    padding-top: 2px;
    flex-shrink: 0;
}

/* ─── Task Overview ─────────────────────────────────────────────────────── */

.task-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    gap: 14px;
}

.task-card {
    position: relative;
    min-height: 130px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 10px;
    background: var(--panel);
    padding: 16px;
    overflow: hidden;
}

.task-card-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: var(--hk-radius-control);
    background: rgba(238, 153, 34, 0.1);
    color: var(--accent);
    flex-shrink: 0;
}

.task-card-icon svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.task-card p {
    margin: 12px 0 4px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 500;
}

.task-card strong {
    display: block;
    color: var(--ink);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.task-bar {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 0 0 8px 8px;
}

/* ─── Service Bars ──────────────────────────────────────────────────────── */

.service-bars {
    display: grid;
    gap: 16px;
}

.service-bar {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(100px, 42%) auto;
    align-items: center;
    gap: 14px;
}

.service-label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.service-icon-box {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 6px;
    background: var(--bg);
    color: var(--footer-muted);
}

.service-icon-box svg {
    width: 0.85rem;
    height: 0.85rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-label strong {
    color: var(--brand-dark);
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--bg);
}

.bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #f5b63c);
}

.service-pct {
    font-size: 0.8rem;
    color: var(--footer-muted);
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

/* ─── Alert card ────────────────────────────────────────────────────────── */

.alert-card {
    border-color: rgba(159, 18, 57, 0.2);
    background: rgba(255, 241, 242, 0.84);
    color: var(--danger-ink);
    padding: 16px;
}

.alert-card p {
    margin: 5px 0 0;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */

.dash-footer {
    text-align: center;
    padding: 18px 24px;
    color: var(--footer-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--panel);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (min-width: 1500px) {
    .auth-page {
        --auth-panel-width: min(100%, 620px);
        --auth-content-pad-inline: clamp(64px, 6vw, 110px);
        --auth-showcase-pad-inline: clamp(66px, 6.4vw, 116px);
    }

    .auth-layout {
        grid-template-columns: minmax(620px, 0.95fr) minmax(620px, 1fr);
    }
}

@media (max-width: 1280px) {
    .auth-page {
        --auth-panel-width: min(100%, 560px);
        --auth-content-pad-inline: clamp(28px, 4vw, 52px);
        --auth-showcase-pad-inline: clamp(42px, 4.8vw, 68px);
    }

    .auth-layout {
        grid-template-columns: minmax(340px, 44vw) minmax(410px, 1fr);
    }
}

@media (max-width: 1040px) {
    .auth-page {
        --auth-panel-width: min(100%, 600px);
        --auth-content-pad-block: clamp(30px, 5vw, 56px);
        --auth-content-pad-inline: clamp(22px, 6vw, 56px);
        --auth-showcase-pad-inline: clamp(32px, 6vw, 58px);
    }

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

    .auth-showcase {
        min-height: clamp(440px, 54vh, 620px);
        border-radius: 0 0 24px 24px;
    }

    .auth-showcase-inner {
        min-height: clamp(440px, 54vh, 620px);
    }

    .auth-content {
        min-height: auto;
    }
}

@media (max-width: 820px) {
    .auth-page {
        --auth-panel-pad: clamp(26px, 5.2vw, 40px);
        --auth-showcase-pad-inline: clamp(28px, 6vw, 48px);
    }

    .auth-showcase,
    .auth-showcase-inner {
        min-height: clamp(430px, 56vh, 560px);
    }

    .auth-logo-img {
        width: clamp(148px, 30vw, 205px);
    }

    .auth-copy h1 {
        font-size: clamp(2.15rem, 7vw, 3.35rem);
    }
}

@media (max-width: 680px) {
    .auth-page {
        overflow: auto;
        --auth-content-gap: 18px;
        --auth-form-gap: 18px;
        --auth-control-height: 56px;
        --auth-panel-pad: 24px;
        --auth-content-pad-block: 24px;
        --auth-content-pad-inline: 16px;
        --auth-showcase-pad-inline: 20px;
    }

    .auth-showcase {
        min-height: clamp(380px, 52vh, 480px);
        border-radius: 0 0 18px 18px;
    }

    .auth-showcase-inner {
        min-height: clamp(380px, 52vh, 480px);
    }

    .auth-copy h1 {
        font-size: clamp(1.9rem, 8.4vw, 2.35rem);
    }

    .auth-copy p {
        max-width: 240px;
    }

    .auth-highlight {
        gap: 12px;
    }

    .auth-highlight strong {
        font-size: 0.92rem;
    }

    .auth-highlight small {
        font-size: 0.82rem;
    }

    .auth-content {
        gap: var(--auth-content-gap);
        padding: var(--auth-content-pad-block) var(--auth-content-pad-inline) 30px;
    }

    .auth-panel {
        border-radius: 14px;
        padding: var(--auth-panel-pad);
    }

    .auth-panel h2 {
        font-size: clamp(1.65rem, 8vw, 2rem);
    }

    .auth-subtitle {
        font-size: 0.92rem;
    }

    .auth-theme-toggle {
        justify-content: center;
    }

    .auth-label-row,
    .auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .auth-input-wrap,
    .login-form > button,
    .google-login {
        min-height: var(--auth-control-height);
    }

    .divider {
        margin: 24px 0;
    }

    .auth-admin {
        margin-top: 24px;
    }

    .auth-footer {
        align-items: flex-start;
        justify-content: center;
        text-align: center;
    }

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

    .dash-sidebar {
        position: static;
        height: auto;
        min-height: auto;
    }

    .dash-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dash-topbar,
    .welcome-row,
    .dash-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
        min-width: 0;
    }

    .metric-grid,
    .dashboard-grid,
    .lower-grid,
    .task-grid,
    .progress-body {
        grid-template-columns: 1fr;
    }

    .donut {
        justify-self: center;
    }

    .request-item {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .request-item .status-badge,
    .request-item time {
        grid-column: 2;
    }

    .service-bar {
        grid-template-columns: 1fr;
    }
}

/* ─── Clients Page ──────────────────────────────────────────────────────── */

@media (max-width: 420px) {
    .auth-page {
        --auth-panel-pad: 20px;
        --auth-content-pad-inline: 12px;
        --auth-showcase-pad-inline: 16px;
    }

    .auth-showcase,
    .auth-showcase-inner {
        min-height: 400px;
    }

    .auth-showcase-inner {
        --auth-showcase-pad-block: 24px;
    }

    .auth-logo-img {
        width: 150px;
    }

    .auth-rule {
        margin: 16px 0;
    }

    .auth-input-wrap {
        gap: 12px;
        padding: 0 14px;
    }

    .auth-options {
        font-size: 0.84rem;
    }

    .divider {
        gap: 10px;
        font-size: 0.82rem;
    }
}

@media (max-width: 360px) {
    .auth-panel {
        border-radius: var(--hk-radius-card);
    }

    .auth-copy h1 {
        font-size: 1.85rem;
    }

    .auth-highlights {
        gap: 12px;
    }

    .auth-highlight > span {
        width: 30px;
        height: 30px;
    }

    .auth-highlight svg {
        width: 28px;
        height: 28px;
    }

    .auth-theme-toggle {
        gap: 10px;
        font-size: 0.84rem;
    }
}

@media (max-height: 760px) and (min-width: 1041px) {
    .auth-page {
        --auth-content-gap: 16px;
        --auth-form-gap: 15px;
        --auth-panel-pad: clamp(24px, 3vw, 38px);
        --auth-panel-width: min(100%, 540px);
        --auth-control-height: 50px;
        --auth-content-pad-block: 20px;
    }

    .auth-showcase-inner {
        gap: 18px;
        padding-block: clamp(24px, 4vh, 36px);
    }

    .auth-logo-img {
        width: clamp(150px, 13vw, 200px);
    }

    .auth-copy h1 {
        font-size: clamp(2rem, 3.5vw, 3.25rem);
    }

    .auth-copy p {
        font-size: 0.92rem;
    }

    .auth-rule {
        margin: 16px 0;
    }

    .auth-highlights {
        gap: 12px;
    }

    .auth-highlight > span {
        width: 34px;
        height: 34px;
    }

    .auth-highlight svg {
        width: 32px;
        height: 32px;
    }

    .auth-panel h2 {
        font-size: 1.9rem;
    }

    .auth-subtitle,
    .auth-highlight small,
    .auth-footer {
        font-size: 0.84rem;
    }

    .login-form {
        margin-top: 22px;
    }

    .divider {
        margin: 18px 0;
    }

    .auth-admin {
        margin-top: 18px;
    }
}

@media (max-height: 520px) and (max-width: 920px) {
    .auth-page {
        --auth-content-gap: 10px;
        --auth-form-gap: 10px;
        --auth-panel-pad: 16px;
        --auth-control-height: 44px;
        --auth-content-pad-block: 14px;
        --auth-content-pad-inline: 14px;
        --auth-showcase-pad-inline: 20px;
    }

    .auth-layout {
        grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1fr);
    }

    .auth-showcase,
    .auth-showcase-inner,
    .auth-content {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-showcase {
        border-radius: 0 18px 18px 0;
    }

    .auth-highlights {
        display: none;
    }

    .auth-panel h2 {
        font-size: 1.55rem;
    }

    .auth-label-row,
    .auth-options {
        align-items: center;
        flex-direction: row;
    }

    .auth-subtitle,
    .auth-footer {
        display: none;
    }

    .login-form {
        margin-top: 14px;
    }

    .divider {
        margin: 12px 0;
    }

    .auth-admin {
        margin-top: 12px;
    }
}

.clients-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.clients-page-title {
    margin: 0 0 4px;
    color: var(--brand-dark);
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

.clients-page-sub {
    margin: 0;
    color: var(--footer-muted);
    font-size: 0.9rem;
}

.add-client-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    border: 0;
    border-radius: var(--hk-radius-control);
    background: var(--accent);
    color: var(--brand-dark);
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0 18px;
    white-space: nowrap;
}

.add-client-btn:hover {
    background: var(--accent-dark);
    color: var(--white);
}

/* Trend colours */
.trend-up {
    color: var(--hk-success);
    font-weight: 700;
    font-size: 0.84rem;
}

.trend-down {
    color: var(--hk-danger);
    font-weight: 700;
    font-size: 0.84rem;
}

/* Filter bar */
.clients-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    flex-wrap: wrap;
}

.clients-search-box {
    display: flex;
    flex: 1;
    min-width: 220px;
    height: 40px;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--hk-radius-control);
    background: var(--bg);
    padding: 0 13px;
    cursor: text;
}

.clients-search-box svg {
    color: var(--muted);
    flex-shrink: 0;
}

.clients-search-box input {
    flex: 1;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--brand-dark);
    outline: 0;
    padding: 0;
    font: inherit;
    font-size: 0.86rem;
}

.clients-search-box input::placeholder {
    color: var(--muted);
}

.clients-filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.filter-select {
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--brand-dark);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    padding: 0 34px 0 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.select-chevron {
    position: absolute;
    right: 10px;
    pointer-events: none;
    color: var(--muted);
}

.filter-select-wrap.is-enhanced .filter-select-native,
.filter-select-wrap.is-enhanced .select-chevron,
.page-size-wrap.is-enhanced .filter-select-native,
.page-size-wrap.is-enhanced .select-chevron {
    display: none;
}

.filter-combo-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 126px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--brand-dark);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0 13px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.filter-combo-trigger::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: 0.62;
    flex: 0 0 auto;
}

.filter-combo-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-select-wrap.is-open .filter-combo-trigger,
.page-size-wrap.is-open .filter-combo-trigger,
.filter-combo-trigger:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(238, 153, 34, 0.12);
}

.filter-combo-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    display: grid;
    gap: 2px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--hk-radius-control);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 38px rgba(15, 15, 20, 0.16);
    z-index: 1000;
}

.filter-combo-menu[hidden] {
    display: none;
}

.filter-combo-option {
    width: 100%;
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--brand-dark);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    padding: 7px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.filter-combo-option:hover {
    background: rgba(238, 153, 34, 0.1);
    color: var(--accent-dark);
}

.filter-combo-option.is-selected {
    background: var(--accent);
    color: var(--white);
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--brand-dark);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0 16px;
    cursor: pointer;
}

.filter-btn:hover {
    background: var(--bg);
}

.download-btn {
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Table */
.clients-table-wrap {
    overflow-x: auto;
}

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

.clients-table thead {
    border-bottom: 1px solid var(--line);
}

.clients-table th {
    padding: 14px 16px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    background: var(--panel);
}

.clients-table td {
    padding: 14px 16px;
    color: var(--brand-dark);
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.clients-table tbody tr:last-child td {
    border-bottom: 0;
}

.clients-table tbody tr:hover td {
    background: var(--bg);
}

.client-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.client-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.client-name-cell strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.3;
}

.client-name-cell p {
    margin: 0;
    font-size: 0.775rem;
    color: var(--muted);
}

.client-contact {
    display: grid;
    gap: 4px;
}

.client-contact span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.82rem;
}

.client-contact svg {
    flex-shrink: 0;
    color: var(--muted);
}

.client-projects {
    display: grid;
    gap: 3px;
}

.proj-count {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.86rem;
    text-decoration: none;
}

.proj-count:hover {
    text-decoration: underline;
}

.proj-view {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
}

.proj-view:hover {
    text-decoration: underline;
}

.client-spent {
    font-weight: 700;
    color: var(--brand-dark);
}

.client-date {
    color: var(--muted);
    white-space: nowrap;
    font-size: 0.84rem;
}

.status-active {
    background: rgba(22, 163, 74, 0.1);
    color: var(--hk-success);
    border-radius: 6px;
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 700;
    padding: 4px 10px;
    white-space: nowrap;
}

.status-inactive {
    background: var(--bg);
    color: var(--footer-muted);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.74rem;
    font-style: normal;
    font-weight: 700;
    padding: 4px 10px;
    white-space: nowrap;
}

.client-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 7px;
    background: var(--panel);
    color: var(--muted);
    cursor: pointer;
    padding: 0;
}

.action-btn:hover {
    background: var(--bg);
    color: var(--accent);
    border-color: var(--accent);
}

.action-delete-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 7px;
    background: var(--panel);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, opacity 0.15s;
}

.action-delete-icon {
    width: 16px;
    height: 16px;
}

.action-delete-btn:hover:not(:disabled) {
    background: rgba(238, 153, 34, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.action-delete-btn:disabled {
    cursor: not-allowed;
    opacity: 0.86;
}

.action-delete-btn.is-loading .action-delete-icon {
    opacity: 0;
}

.action-delete-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(238, 153, 34, 0.24);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: action-spin 0.72s linear infinite;
}

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

/* Table footer / pagination */
.pagination-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.clients-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.table-showing {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 7px;
    background: var(--panel);
    color: var(--brand-dark);
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0 6px;
}

.page-btn:hover {
    background: var(--bg);
}

.page-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--brand-dark);
    font-weight: 700;
}

.page-active:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.page-nav {
    color: var(--muted);
}

.page-ellipsis {
    display: grid;
    place-items: center;
    min-width: 28px;
    color: var(--muted);
    font-size: 0.9rem;
}

.page-size-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.page-size-select {
    min-width: 100px;
}

/* ─── Requests Page ─────────────────────────────────────────────────────── */

/* Filter bar */
.req-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    flex-wrap: wrap;
}

.req-search-box {
    display: flex;
    width: min(260px, 100%);
    height: 38px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--hk-radius-control);
    background: var(--bg);
    padding: 0 12px;
    cursor: text;
    flex-shrink: 0;
}

.req-search-box svg {
    color: var(--muted);
    flex-shrink: 0;
}

.req-search-box input {
    flex: 1;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--brand-dark);
    outline: 0;
    padding: 0;
    font: inherit;
    font-size: 0.84rem;
    min-width: 0;
}

.req-search-box input::placeholder {
    color: var(--muted);
}

.req-filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

/* Table + Activity Panel layout */
.req-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 284px;
    gap: 18px;
    align-items: start;
}

/* Requests Table */
.req-table-wrap {
    overflow-x: auto;
}

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

.req-table thead {
    border-bottom: 1px solid var(--line);
}

.req-table th {
    padding: 12px 13px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
    text-align: left;
    background: var(--panel);
}

.req-table td {
    padding: 12px 13px;
    color: var(--brand-dark);
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.req-table tbody tr:last-child td {
    border-bottom: 0;
}

.req-table tbody tr:hover td {
    background: var(--bg);
}

.col-cb {
    width: 36px;
    padding-left: 16px !important;
    padding-right: 4px !important;
}

.col-cb input[type="checkbox"] {
    width: 15px;
    height: 15px;
    border: 1.5px solid #d1d5db;
    border-radius: 3px;
    accent-color: var(--accent);
    cursor: pointer;
    display: block;
}

.req-id {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.84rem;
}

.req-id:hover {
    text-decoration: underline;
}

.req-client strong {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.3;
}

.req-client p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.req-service {
    color: var(--brand-dark);
    font-size: 0.83rem;
    max-width: 170px;
    white-space: normal;
    line-height: 1.4;
}

.req-date span {
    display: block;
    font-size: 0.83rem;
    color: var(--brand-dark);
}

.req-date small {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 1px;
}

/* Priority badges */
.prio-badge {
    display: inline-block;
    border-radius: 5px;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 3px 10px;
}

.prio-high {
    background: rgba(220, 38, 38, 0.1);
    color: var(--hk-danger);
}

.prio-medium {
    background: rgba(238, 153, 34, 0.12);
    color: var(--orange);
}

.prio-low {
    background: rgba(22, 163, 74, 0.1);
    color: var(--hk-success);
}

.request-inline-combo {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}

.request-inline-select {
    width: 132px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 5px 9px 5px 10px;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.request-priority-select {
    width: 104px;
}

.request-inline-select::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: 0.62;
    flex: 0 0 auto;
}

.request-inline-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.request-inline-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(238, 153, 34, 0.12);
}

.request-inline-select:disabled {
    cursor: wait;
    opacity: 0.72;
}

.request-inline-select.is-saving {
    box-shadow: inset 0 -2px 0 var(--accent);
}

.request-inline-menu {
    position: fixed;
    display: grid;
    gap: 2px;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--hk-radius-control);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 38px rgba(15, 15, 20, 0.16);
    z-index: 1000;
}

.request-inline-menu[hidden] {
    display: none;
}

.request-inline-option {
    width: 100%;
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--brand-dark);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: left;
    padding: 6px 10px;
    cursor: pointer;
}

.request-inline-option:hover {
    background: rgba(238, 153, 34, 0.1);
    color: var(--accent-dark);
}

.request-inline-option.is-selected {
    background: var(--accent);
    color: var(--white);
}

.request-action-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.request-delete-btn {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(238, 153, 34, 0.32);
    border-radius: 7px;
    background: var(--panel);
    color: var(--accent-dark);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, opacity 0.15s;
}

.request-delete-btn:hover:not(:disabled) {
    background: rgba(238, 153, 34, 0.1);
    border-color: var(--accent);
    color: var(--accent-dark);
}

.request-delete-btn:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

/* Request-specific status badges */
.req-status-badge {
    display: inline-block;
    border-radius: 5px;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 3px 10px;
    white-space: nowrap;
}

.rst-new {
    background: var(--bg);
    color: var(--footer-muted);
    border: 1px solid #e5e7eb;
}

.rst-review {
    background: rgba(59, 130, 246, 0.1);
    color: var(--hk-info);
}

.rst-pending {
    background: rgba(238, 153, 34, 0.12);
    color: var(--orange);
}

.rst-approved {
    background: rgba(22, 163, 74, 0.1);
    color: var(--hk-success);
}

.rst-onhold {
    background: rgba(99, 102, 241, 0.1);
    color: var(--hk-review);
}

.rst-rejected {
    background: rgba(220, 38, 38, 0.1);
    color: var(--hk-danger);
}

/* Assignee */
.assignee {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assignee img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.assignee span {
    font-size: 0.82rem;
    color: var(--brand-dark);
    white-space: nowrap;
}

/* Progress bar */
.progress-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prog-bar {
    width: 72px;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    flex-shrink: 0;
}

.prog-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s;
}

.prog-gray {
    background: #d1d5db;
}

.prog-orange {
    background: var(--accent);
}

.prog-green {
    background: #16a34a;
}

.prog-blue {
    background: #3b82f6;
}

.prog-pct {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
    flex-shrink: 0;
}

/* Activity Panel */
.activity-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.activity-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--line);
}

.activity-panel-head strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.act-view-all {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.act-view-all:hover {
    text-decoration: underline;
}

.act-feed {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.act-feed-item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.act-feed-item:last-child {
    border-bottom: 0;
}

.act-feed-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.act-feed-green {
    background: rgba(22, 163, 74, 0.12);
    color: var(--hk-success);
}

.act-feed-blue {
    background: rgba(59, 130, 246, 0.12);
    color: var(--hk-info);
}

.act-feed-orange {
    background: rgba(238, 153, 34, 0.15);
    color: var(--accent-dark);
}

.act-feed-red {
    background: rgba(220, 38, 38, 0.1);
    color: var(--hk-danger);
}

.act-feed-body strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.3;
}

.act-feed-body p {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: var(--muted);
    white-space: normal;
    line-height: 1.4;
}

.act-feed-item time {
    font-size: 0.74rem;
    color: var(--footer-muted);
    white-space: nowrap;
    padding-top: 2px;
}

.act-view-all-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    color: var(--brand-dark);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}

.act-view-all-footer:hover {
    color: var(--accent);
}

/* ─── Projects Page ─────────────────────────────────────────────────────── */

/* Filter bar */
.proj-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    flex-wrap: wrap;
}

.proj-search-box {
    display: flex;
    width: min(300px, 100%);
    height: 38px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--hk-radius-control);
    background: var(--bg);
    padding: 0 12px;
    cursor: text;
    flex-shrink: 0;
}

.proj-search-box svg {
    color: var(--muted);
    flex-shrink: 0;
}

.proj-search-box input {
    flex: 1;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--brand-dark);
    outline: 0;
    padding: 0;
    font: inherit;
    font-size: 0.84rem;
    min-width: 0;
}

.proj-search-box input::placeholder {
    color: var(--muted);
}

.proj-filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.proj-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--brand-dark);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0 14px;
    cursor: pointer;
    white-space: nowrap;
}

.proj-filter-btn:hover {
    background: var(--bg);
}

.proj-download-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--brand-dark);
    cursor: pointer;
    flex-shrink: 0;
}

.proj-download-btn:hover {
    background: var(--bg);
}

/* Two-column layout: wider right panel for projects */
.proj-body-grid {
    grid-template-columns: minmax(0, 1fr) 284px;
}

/* Projects table */
.proj-table .proj-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--brand-dark);
    white-space: nowrap;
}

.proj-table .proj-budget {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--brand-dark);
    white-space: nowrap;
}

.proj-table .proj-deadline {
    font-size: 0.82rem;
    color: var(--brand-dark);
    white-space: nowrap;
}

/* Project status badges */
.proj-status-badge {
    display: inline-block;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 4px 10px;
    white-space: nowrap;
}

.pst-inprog {
    background: rgba(249, 115, 22, 0.1);
    color: var(--orange);
}

.pst-review {
    background: rgba(59, 130, 246, 0.1);
    color: var(--hk-info);
}

.pst-plan {
    background: rgba(99, 102, 241, 0.1);
    color: var(--hk-review);
}

.pst-onhold {
    background: var(--bg);
    color: var(--footer-muted);
    border: 1px solid #e5e7eb;
}

.pst-done {
    background: rgba(22, 163, 74, 0.1);
    color: var(--hk-success);
}

/* Purple progress fill */
.prog-purple {
    background: #8b5cf6;
}

/* Three-dot action button */
.proj-more-btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.proj-more-btn:hover {
    background: var(--bg);
    color: var(--brand-dark);
}

/* Bottom analytics grid */
.proj-analytics-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 18px;
    align-items: start;
}

/* Shared section head */
.proj-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--line);
}

.proj-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-dark);
}

/* Project Phase Overview */
.proj-phase-card {
    overflow: hidden;
}

.proj-phase-row {
    display: flex;
    gap: 0;
    padding: 20px 16px;
}

.proj-phase-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border-right: 1px solid var(--line);
}

.proj-phase-item:last-child {
    border-right: 0;
}

.proj-phase-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: var(--hk-radius-control);
    flex-shrink: 0;
}

.proj-phase-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
}

.proj-phase-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1;
}

.proj-phase-pct {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}

.proj-phase-bar {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    margin-top: 2px;
}

.proj-phase-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s;
}

/* Project Status Distribution */
.proj-status-dist-card {
    overflow: hidden;
}

.proj-status-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
}

.proj-status-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.proj-stat-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 10px;
}

.proj-stat-label {
    font-size: 0.78rem;
    color: var(--brand-dark);
    font-weight: 500;
    white-space: nowrap;
}

.proj-stat-bar-wrap {
    height: 7px;
    background: var(--bg);
    border-radius: 999px;
    overflow: hidden;
}

.proj-stat-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s;
}

.proj-stat-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-dark);
    white-space: nowrap;
}

.proj-stat-count em {
    font-style: normal;
    font-weight: 400;
    color: var(--muted);
    font-size: 0.74rem;
}

/* Donut chart */
.proj-donut-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proj-donut-svg {
    display: block;
}

/* ─── Services Page ─────────────────────────────────────────────────────── */

/* Metric trend danger (red down arrow) */
.metric-trend-danger span {
    background: rgba(220, 38, 38, 0.1);
    color: var(--hk-danger);
}

/* Two-column layout — wider right panel for services */
.srv-body-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
}

/* Services table misc cells */
.srv-price {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--brand-dark);
    white-space: nowrap;
}

.srv-duration {
    font-size: 0.83rem;
    color: var(--brand-dark);
    white-space: nowrap;
}

.srv-req-count {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--brand-dark);
    text-align: center;
}

.srv-updated {
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
}

/* Category badges */
.srv-cat-badge {
    display: inline-block;
    border-radius: 5px;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 3px 10px;
    white-space: nowrap;
}

.srv-cat-planning {
    background: rgba(59, 130, 246, 0.1);
    color: var(--hk-info);
}

.srv-cat-design {
    background: rgba(249, 115, 22, 0.1);
    color: var(--orange);
}

.srv-cat-visualization {
    background: rgba(20, 184, 166, 0.1);
    color: var(--hk-teal);
}

.srv-cat-consultation {
    background: rgba(139, 92, 246, 0.1);
    color: var(--hk-review);
}

.srv-cat-execution {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange);
}

/* Service status badges */
.srv-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 3px 10px;
    white-space: nowrap;
}

.srv-active {
    background: rgba(22, 163, 74, 0.1);
    color: var(--hk-success);
}

.srv-popular {
    background: rgba(99, 102, 241, 0.1);
    color: var(--hk-review);
}

.srv-draft {
    background: var(--bg);
    color: var(--footer-muted);
    border: 1px solid #e5e7eb;
}

.srv-inactive-badge {
    background: rgba(220, 38, 38, 0.1);
    color: var(--hk-danger);
}

/* Right side panel */
.srv-side-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.srv-panel-section {
    border-bottom: 1px solid var(--line);
}

.srv-panel-section-last {
    border-bottom: 0;
}

/* Category overview: donut + legend */
.srv-cat-overview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
}

.srv-donut-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.srv-legend {
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.srv-legend li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: var(--brand-dark);
    min-width: 0;
}

.srv-legend-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.srv-legend-val {
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.srv-legend-val em {
    font-style: normal;
    font-weight: 400;
    color: var(--muted);
    font-size: 0.73rem;
}

/* Top Booked Services list */
.srv-top-list {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
}

.srv-top-item {
    display: grid;
    grid-template-columns: 20px 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.srv-top-item:last-child {
    border-bottom: 0;
}

.srv-top-rank {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
}

.srv-top-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
}

.srv-top-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.srv-top-count {
    font-size: 0.77rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Recent Service Updates list */
.srv-updates-list {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
}

.srv-update-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.srv-update-item:last-child {
    border-bottom: 0;
}

.srv-update-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
}

.srv-update-body strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1.3;
    margin-bottom: 2px;
}

.srv-update-body p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
    white-space: normal;
}

.srv-update-item time {
    font-size: 0.74rem;
    color: var(--footer-muted);
    white-space: nowrap;
    padding-top: 2px;
}

/* Services by Category bottom section */
.srv-by-category {
    overflow: hidden;
}

.srv-cat-cards {
    display: flex;
    gap: 0;
    padding: 20px 16px;
}

.srv-cat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-right: 1px solid var(--line);
}

.srv-cat-item:last-child {
    border-right: 0;
}

.srv-cat-item-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--hk-radius-control);
    flex-shrink: 0;
}

.srv-cat-item-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-dark);
    text-align: center;
}

.srv-cat-item-count {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1;
}

.srv-cat-item-bar-wrap {
    width: 100%;
    height: 5px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.srv-cat-item-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s;
}

.srv-cat-item-pct {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}

/* Ensure showing-text aligns on services page (reuses existing class) */
.showing-text {
    color: var(--muted);
    font-size: 0.82rem;
}

.srv-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 96px;
    padding: 18px;
    text-align: center;
    color: var(--muted);
}

.srv-empty-state strong {
    color: var(--brand-dark);
    font-size: 0.9rem;
}

.srv-empty-state p {
    margin: 0;
    font-size: 0.8rem;
}

.srv-empty-state-small {
    min-height: 72px;
}

.srv-action-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.srv-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    align-content: start;
    padding-top: 22px;
}

.srv-check-grid label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-dark);
    font-size: 0.82rem;
    font-weight: 600;
}

.srv-check-grid input {
    accent-color: var(--accent);
}

.svc-json-area {
    min-height: 150px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GLASSMORPHISM DASHBOARD THEME
   All rules are scoped to .dashboard-shell so the login page is unaffected.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Background: architecture photo + white overlay so content pops */
body:has(.dashboard-shell) { background: var(--hk-background); }

/* Shell itself is transparent so backdrop-filter works on children */
.dashboard-shell {
    background: transparent;
    --muted: var(--hk-muted);
    --line: var(--hk-line);
    --panel: var(--hk-surface);
    --bg: var(--hk-bg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVITY LOGS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.logs-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.logs-activity-feed { padding: 20px; }

.logs-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.logs-feed-header h3 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--ink); }

.feed-list { display: flex; flex-direction: column; gap: 14px; }

.feed-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.feed-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
}
.feed-icon-success { background: rgba(34,197,94,0.15); color: var(--hk-success); }
.feed-icon-info    { background: rgba(59,130,246,0.15); color: var(--hk-info); }
.feed-icon-warning { background: rgba(238,153,34,0.15); color: var(--accent); }
.feed-icon-danger  { background: rgba(239,68,68,0.15);  color: var(--hk-danger); }

.feed-body { flex: 1; min-width: 0; }
.feed-body strong { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.feed-body p { margin: 2px 0 0; font-size: 0.76rem; color: var(--muted); line-height: 1.4; }
.feed-time { font-size: 0.72rem; color: var(--muted); white-space: nowrap; margin-top: 2px; }

/* Log table specifics */
.logs-table .log-id { font-family: inherit; font-size: 0.8rem; color: var(--muted); }
.logs-table .log-role {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(238,153,34,0.12);
    color: var(--orange);
}
.logs-table .log-role-pm   { background: rgba(59,130,246,0.12); color: var(--hk-info); }
.logs-table .log-role-user { background: rgba(168,85,247,0.12); color: var(--hk-review); }
.logs-table .log-role-guest{ background: rgba(239,68,68,0.12);  color: var(--hk-danger); }
.logs-table .log-time,
.logs-table .log-ip { font-size: 0.8rem; }
.logs-table .log-time small,
.logs-table .log-ip small { display: block; color: var(--muted); font-size: 0.72rem; }
.log-success { background: rgba(34,197,94,0.12);  color: var(--hk-success); }
.log-failed  { background: rgba(239,68,68,0.12);  color: var(--hk-danger); }
.log-warning { background: rgba(234,179,8,0.12);  color: var(--orange); }

/* Charts bottom grid */
.logs-charts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 0;
}
.logs-chart-card { padding: 20px; }
.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.chart-card-header h3 { margin: 0; font-size: 0.9rem; font-weight: 700; color: var(--ink); }
.donut-row { display: flex; align-items: center; gap: 14px; }
.donut-svg { flex-shrink: 0; width: 110px; height: 110px; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.donut-legend li { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--ink); }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-val { margin-left: auto; color: var(--muted); font-size: 0.72rem; }

/* Bar chart */
.logs-chart-bar .donut-row { display: block; }
.bar-chart-wrap { display: flex; gap: 8px; height: 130px; }
.bar-chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 0.68rem; color: var(--muted); text-align: right; padding-right: 4px; }
.bar-chart-bars { display: flex; align-items: flex-end; gap: 4px; flex: 1; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 4px; opacity: 0.85; }
.bar-col span { font-size: 0.62rem; color: var(--muted); }

@media (max-width: 1200px) {
    .logs-charts-grid { grid-template-columns: repeat(2, 1fr); }
    .logs-body-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.settings-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

/* Tabs sidebar */
.settings-tabs {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.settings-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--hk-radius-control);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink);
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.settings-tab:hover { background: rgba(238,153,34,0.08); border-color: rgba(238,153,34,0.20); }
.settings-tab.is-active { background: rgba(238,153,34,0.12); border-color: rgba(238,153,34,0.40); color: var(--accent); font-weight: 600; }
.settings-tab-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: rgba(0,0,0,0.05);
    color: var(--muted);
    flex-shrink: 0;
}

/* Section */
.settings-section { padding: 24px; margin-bottom: 20px; }
.settings-section h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 700; color: var(--ink); }
.settings-section p { margin: 0; font-size: 0.82rem; color: var(--muted); }

.settings-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}
.settings-mini-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.settings-mini-head h3 { margin: 0 0 2px; font-size: 0.95rem; }

.settings-form-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 24px;
}
.settings-logo-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.settings-logo-box {
    width: 120px;
    height: 120px;
    border-radius: var(--hk-radius-card);
    border: 1px solid var(--line);
    background: var(--bg);
    display: grid;
    place-items: center;
}
.settings-hint { font-size: 0.72rem; color: var(--muted); text-align: center; margin: 0; }

.settings-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.settings-field { display: flex; flex-direction: column; gap: 6px; }
.settings-field-full { margin-top: 14px; }
.settings-label { font-size: 0.8rem; font-weight: 600; color: var(--ink); display: block; }
.settings-input {
    width: 100%;
    padding: 9px 12px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: var(--panel);
    font: inherit;
    font-size: 0.875rem;
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
.settings-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(238,153,34,0.15); }
.settings-textarea { resize: vertical; }
.settings-select { width: 100%; }

.settings-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Security list */
.settings-security-list { display: flex; flex-direction: column; gap: 0; margin-top: 16px; }
.settings-security-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
.settings-security-item:last-child { border-bottom: none; }
.settings-security-item strong { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.settings-security-item p { margin: 2px 0 0; font-size: 0.76rem; color: var(--muted); }
.settings-sec-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--hk-radius-control);
    background: rgba(0,0,0,0.05);
    color: var(--muted);
    flex-shrink: 0;
}

/* Color row */
.settings-color-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.settings-color-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.60);
    border-bottom-color: rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.55);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}
.settings-color-swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.10); }

@media (max-width: 1100px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-bottom-grid { grid-template-columns: 1fr; }
    .settings-form-grid { grid-template-columns: 1fr; }
    .settings-row-2 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BACK BUTTON + TOPBAR-LEFT
   ═══════════════════════════════════════════════════════════════════════════ */

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-bottom-color: rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.80), 0 1px 4px rgba(0,0,0,0.08);
    color: var(--ink);
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s, box-shadow 0.15s;
}
.back-btn:hover {
    background: rgba(255, 255, 255, 0.80);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.90), 0 2px 8px rgba(0,0,0,0.12);
}
.back-btn svg { display: block; }

/* ═══════════════════════════════════════════════════════════════════════════
   SERVICE DETAIL PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.svc-detail-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.svc-breadcrumb { margin: 0 0 2px; font-size: 0.78rem; color: var(--muted); }
.svc-detail-title { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.svc-detail-actions { display: flex; align-items: center; gap: 8px; }

/* Hero card */
.svc-hero-card {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 24px;
}
.svc-hero-img {
    width: 160px;
    height: 120px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.60);
    border-bottom-color: rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.50);
    display: grid;
    place-items: center;
    color: var(--muted);
    flex-shrink: 0;
}
.svc-hero-body { min-width: 0; }
.svc-hero-body h3 { margin: 0 0 8px; font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.svc-badges { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.svc-badge-active {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px;
    background: rgba(34,197,94,0.12); color: var(--hk-success);
    font-size: 0.78rem; font-weight: 600;
}
.svc-badge-active::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: block; }
.svc-badge-cat {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    background: rgba(59,130,246,0.12); color: var(--hk-info);
    font-size: 0.78rem; font-weight: 600;
}
.svc-hero-desc { margin: 0 0 14px; font-size: 0.875rem; color: var(--muted); line-height: 1.55; }
.svc-price-row { display: flex; gap: 28px; }
.svc-price-item { display: flex; align-items: center; gap: 8px; }
.svc-price-item svg { color: var(--accent); flex-shrink: 0; }
.svc-price-item small { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.svc-price-item strong { display: block; font-size: 1rem; font-weight: 700; color: var(--ink); margin-top: 1px; }

.svc-hero-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
    padding-left: 24px;
    border-left: 1px solid rgba(0,0,0,0.08);
}
.svc-stat-item { display: flex; align-items: center; gap: 12px; }
.svc-stat-icon {
    width: 38px; height: 38px; border-radius: var(--hk-radius-control);
    background: rgba(238,153,34,0.12); color: var(--accent);
    display: grid; place-items: center; flex-shrink: 0;
}
.svc-stat-label { font-size: 0.75rem; color: var(--muted); margin: 0 0 1px; }
.svc-stat-value { font-size: 1.2rem; font-weight: 700; color: var(--ink); line-height: 1; }
.svc-stat-trend { font-size: 0.72rem; color: var(--hk-success); font-weight: 600; margin-top: 2px; }
.svc-stat-trend small { color: var(--muted); font-weight: 400; }

/* Detail body grid */
.svc-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.svc-detail-left { display: flex; flex-direction: column; gap: 20px; }
.svc-detail-right { display: flex; flex-direction: column; gap: 20px; }

.svc-detail-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* What's Included */
.svc-included-card, .svc-deliverables-card { padding: 20px; }
.svc-included-card h3, .svc-deliverables-card h3,
.svc-pricing-card h3, .svc-requests-card h3,
.svc-perf-card h3, .svc-info-card h3 {
    margin: 0 0 14px; font-size: 0.95rem; font-weight: 700; color: var(--ink);
}
.svc-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.svc-checklist li { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--ink); }
.svc-check-icon { width: 18px; height: 18px; border-radius: 50%; background: rgba(238,153,34,0.15); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }

/* Deliverables */
.svc-deliverables-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svc-deliverable-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border-radius: 7px; background: rgba(255,255,255,0.40); border: 1px solid rgba(255,255,255,0.60); }
.svc-deliverable-icon { width: 28px; height: 28px; border-radius: 6px; background: rgba(238,153,34,0.12); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.svc-deliverable-name { font-size: 0.8rem; font-weight: 600; color: var(--ink); margin: 0 0 1px; }
.svc-deliverable-sub { font-size: 0.72rem; color: var(--muted); margin: 0; }

/* Pricing */
.svc-pricing-card { padding: 20px; }
.svc-pricing-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 4px; }
.svc-pricing-item small { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.svc-pricing-item strong { display: block; font-size: 1.6rem; font-weight: 700; color: var(--ink); }
.svc-pricing-item p { margin: 4px 0 0; font-size: 0.75rem; color: var(--muted); }

/* Recent requests */
.svc-requests-card { padding: 20px; overflow-x: auto; }
.svc-req-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.svc-req-table th { padding: 8px 10px; text-align: left; font-size: 0.74rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid rgba(0,0,0,0.07); white-space: nowrap; }
.svc-req-table td { padding: 10px 10px; border-bottom: 1px solid rgba(0,0,0,0.05); color: var(--ink); vertical-align: middle; }
.svc-req-table tr:last-child td { border-bottom: none; }
.svc-req-id { color: var(--accent); font-weight: 600; text-decoration: none; }
.svc-req-id:hover { text-decoration: underline; }
.svc-architect { display: flex; align-items: center; gap: 7px; }
.svc-architect img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* Performance chart card */
.svc-perf-card { padding: 20px; }
.svc-perf-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.svc-perf-chart { width: 100%; height: 160px; }
.svc-chart-axis { display: flex; justify-content: space-between; margin-top: 6px; }
.svc-chart-axis span { font-size: 0.68rem; color: var(--muted); }

/* Service info */
.svc-info-card { padding: 20px; }
.svc-info-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.06); font-size: 0.84rem; }
.svc-info-row:last-child { border-bottom: none; }
.svc-info-row dt { color: var(--muted); font-weight: 500; }
.svc-info-row dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }

@media (max-width: 1100px) {
    .svc-hero-card { grid-template-columns: 1fr; }
    .svc-hero-stats { border-left: none; border-top: 1px solid rgba(0,0,0,0.08); padding-left: 0; padding-top: 16px; flex-direction: row; flex-wrap: wrap; }
    .svc-detail-grid { grid-template-columns: 1fr; }
    .svc-detail-2col { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Better 3-col grid — equal weight */
.dashboard-shell .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Lower grid — Task Overview wider, Services narrower */
.dashboard-shell .lower-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 20px;
}

/* Panel cards uniform padding */
.dashboard-shell .panel-card { padding: 22px; }

/* Welcome row alignment */
.dashboard-shell .welcome-row h2 { font-size: 1.35rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.dashboard-shell .welcome-row p { color: var(--muted); font-size: 0.875rem; margin: 0; }

/* Panel headers consistent */
.dashboard-shell .panel-head { margin-bottom: 16px; }
.dashboard-shell .panel-head h3 { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.dashboard-shell .panel-head a { font-size: 0.78rem; color: var(--accent); text-decoration: none; font-weight: 600; }

/* Request items better spacing */
.dashboard-shell .request-item { padding: 10px 0; gap: 10px; }
.dashboard-shell .request-item strong { font-size: 0.84rem; color: var(--ink); }
.dashboard-shell .request-item p { font-size: 0.76rem; color: var(--muted); margin: 0; }
.dashboard-shell .request-item time { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* Activity items */
.dashboard-shell .activity-item { padding: 10px 0; gap: 10px; }
.dashboard-shell .act-body strong { font-size: 0.84rem; color: var(--ink); }
.dashboard-shell .act-body p { font-size: 0.76rem; color: var(--muted); margin: 2px 0 0; }
.dashboard-shell .activity-item time { font-size: 0.72rem; color: var(--muted); }

/* Task cards in lower grid */
.dashboard-shell .task-card { background: rgba(255,255,255,0.45); border: 1px solid rgba(255,255,255,0.65); border-bottom-color: rgba(0,0,0,0.07); padding: 14px; border-radius: 10px; }
.dashboard-shell .task-card p { font-size: 0.78rem; color: var(--muted); margin: 4px 0 6px; }
.dashboard-shell .task-card strong { font-size: 1.5rem; font-weight: 700; color: var(--ink); }

/* Service bars */
.dashboard-shell .service-bar { gap: 10px; padding: 6px 0; }
.dashboard-shell .service-label strong { font-size: 0.82rem; color: var(--ink); }
.dashboard-shell .service-pct { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }

/* View all link */
.dashboard-shell .view-all-link { font-size: 0.82rem; color: var(--accent); text-decoration: none; font-weight: 600; display: block; text-align: center; margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,0.06); }

/* Date pill */
.dashboard-shell .date-pill { background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.65); border-bottom-color: rgba(0,0,0,0.08); color: var(--ink); font-size: 0.82rem; }

/* ===== App Management ===== */
.topbar-subtitle { font-size: 0.76rem; color: var(--muted); margin: 1px 0 0 0; line-height: 1.3; }
.am-header-btns { display: flex; align-items: center; gap: 7px; }
.am-btn-outline { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1.5px solid var(--line); border-radius: var(--hk-radius-control); background: white; font-size: 0.79rem; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color 0.13s, color 0.13s; white-space: nowrap; }
.am-btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.am-btn-accent { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border: none; border-radius: var(--hk-radius-control); background: var(--accent); font-size: 0.79rem; font-weight: 600; color: white; cursor: pointer; transition: background 0.13s; white-space: nowrap; }
.am-btn-accent:hover { background: var(--accent-dark); }
.am-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.am-section { padding: 22px 24px; }
.am-section-title { font-size: 0.93rem; font-weight: 700; color: var(--ink); margin: 0 0 16px 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.am-section-subtitle { font-size: 0.76rem; color: var(--muted); margin: -8px 0 14px 0; }
.am-field-label { display: block; font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 5px; }
.am-field-group { display: flex; flex-direction: column; }
.am-input { border: 1.5px solid var(--line); border-radius: var(--hk-radius-control); padding: 7px 10px; font-size: 0.84rem; color: var(--ink); background: white; outline: none; transition: border-color 0.13s; width: 100%; box-sizing: border-box; font-family: inherit; }
.am-input:focus { border-color: var(--accent); }
.am-textarea { resize: vertical; line-height: 1.5; }
.am-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 13px; padding-right: 28px; cursor: pointer; }
.am-brand-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; }
.am-brand-col { display: flex; flex-direction: column; }
.am-upload-zone { border: 1.5px dashed var(--line); border-radius: 10px; padding: 12px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.am-icon-upload { min-width: 108px; }
.am-icon-placeholder { width: 66px; height: 66px; border-radius: 14px; background: #fff7ed; display: flex; align-items: center; justify-content: center; }
.am-upload-btn { display: flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1.5px solid var(--line); border-radius: 7px; background: white; font-size: 0.72rem; font-weight: 500; color: var(--ink); cursor: pointer; transition: border-color 0.13s, color 0.13s; white-space: nowrap; }
.am-upload-btn:hover { border-color: var(--accent); color: var(--accent); }
.am-upload-hint { font-size: 0.67rem; color: var(--muted); margin: 0; line-height: 1.3; }
.am-fields-col { gap: 11px; }
.am-preview-col { align-items: center; gap: 10px; }
.am-icon-preview-box { width: 78px; height: 78px; border-radius: 18px; background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%); display: flex; align-items: center; justify-content: center; border: 1.5px solid #fde68a; }
.am-status-group { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.am-status-live { display: inline-block; padding: 2px 10px; border-radius: 20px; background: #dcfce7; color: var(--hk-success); font-size: 0.71rem; font-weight: 700; }
.am-version-text { font-size: 0.7rem; color: var(--muted); margin: 0; }
.am-hero-layout { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: start; }
.am-hero-fields { display: flex; flex-direction: column; gap: 10px; }
.am-hero-image-col { display: flex; flex-direction: column; }
.am-hero-upload { display: flex; flex-direction: column; align-items: center; }
.am-hero-img-placeholder { width: 100%; border-radius: var(--hk-radius-control); overflow: hidden; background: var(--bg); aspect-ratio: 16/9; }
.am-hero-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am-phone-col { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.am-phone-mockup { width: 108px; background: #1e2023; border-radius: 18px; padding: 7px 5px; box-shadow: 0 4px 20px rgba(0,0,0,0.28), inset 0 0 0 1px rgba(255,255,255,0.08); }
.am-phone-screen { background: #1a1c1f; border-radius: 11px; overflow: hidden; }
.am-phone-topbar-bar { display: flex; align-items: center; justify-content: space-between; padding: 5px 7px 3px; background: #1a1c1f; }
.am-phone-hamburger { display: flex; flex-direction: column; gap: 2px; }
.am-phone-hamburger span { display: block; width: 10px; height: 1.5px; background: white; border-radius: 1px; }
.am-phone-hero-img { width: 100%; height: 48px; background: url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?w=200&q=60&fm=webp') center/cover; }
.am-phone-hero-text { padding: 5px 7px 3px; }
.am-phone-title { font-size: 6.5px; font-weight: 700; color: white; margin: 0 0 3px 0; line-height: 1.2; }
.am-phone-subtitle { font-size: 4.5px; color: rgba(255,255,255,0.55); margin: 0 0 5px 0; line-height: 1.4; }
.am-phone-btns { display: flex; gap: 3px; }
.am-phone-btn-primary { background: #ee9922; color: white; border-radius: 3px; padding: 2px 5px; font-size: 4.5px; font-weight: 600; }
.am-phone-btn-secondary { color: white; border: 0.75px solid rgba(255,255,255,0.4); border-radius: 3px; padding: 2px 5px; font-size: 4.5px; }
.am-phone-dots { display: flex; justify-content: center; gap: 3px; padding: 5px 0; background: #1a1c1f; }
.am-phone-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.22); display: block; }
.am-phone-dot--active { background: #ee9922; }
.am-contacts-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.am-contacts-header { display: grid; grid-template-columns: 1fr 1fr 90px; padding: 9px 15px; background: #f9fafb; border-bottom: 1px solid var(--line); font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.am-contact-row { display: grid; grid-template-columns: 1fr 1fr 90px; align-items: center; padding: 11px 15px; border-bottom: 1px solid var(--line); gap: 10px; }
.am-contact-row:last-child { border-bottom: none; }
.am-contact-action { display: flex; align-items: center; gap: 9px; font-size: 0.82rem; font-weight: 500; color: var(--ink); }
.am-contact-icon { width: 29px; height: 29px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.am-contact-icon--phone { background: #fff7ed; color: var(--orange); }
.am-contact-icon--whatsapp { background: #f0fdf4; color: var(--hk-success); }
.am-contact-icon--chat { background: #f5f3ff; color: var(--hk-review); }
.am-contact-icon--email { background: #eff6ff; color: var(--hk-info); }
.am-contact-value { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-toggle { position: relative; display: inline-block; cursor: pointer; }
.am-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.am-toggle-track { display: block; width: 36px; height: 21px; background: #e5e7eb; border-radius: 11px; transition: background 0.2s; position: relative; }
.am-toggle-track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.18); transition: left 0.2s; }
.am-toggle input:checked + .am-toggle-track { background: #ee9922; }
.am-toggle input:checked + .am-toggle-track::after { left: 18px; }
.am-service-manager { display: grid; grid-template-columns: 175px 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-height: 300px; }
.am-service-list-panel { border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--bg); }
.am-service-list-header { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 0.77rem; font-weight: 600; color: var(--ink); }
.am-add-service-btn { display: flex; align-items: center; gap: 4px; border: none; background: none; font-size: 0.71rem; color: var(--accent); font-weight: 600; cursor: pointer; padding: 2px 4px; }
.am-service-items { flex: 1; overflow-y: auto; }
.am-service-item { display: flex; align-items: center; gap: 7px; padding: 8px 11px; cursor: pointer; font-size: 0.79rem; color: var(--ink); border-bottom: 1px solid var(--line); transition: background 0.1s; }
.am-service-item:last-child { border-bottom: none; }
.am-service-item:hover { background: rgba(238,153,34,0.05); }
.am-service-item--active { background: rgba(238,153,34,0.08); color: var(--accent); font-weight: 600; }
.am-service-item--active svg { stroke: var(--accent); }
.am-service-grip { color: var(--footer-muted); font-size: 0.9rem; cursor: grab; line-height: 1; }
.am-active-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: auto; flex-shrink: 0; }
.am-reorder-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 11px; border: none; border-top: 1px solid var(--line); background: white; font-size: 0.73rem; color: var(--muted); font-weight: 500; cursor: pointer; transition: color 0.13s; }
.am-reorder-btn:hover { color: var(--accent); }
.am-service-detail-panel { padding: 13px 15px; display: flex; flex-direction: column; gap: 11px; overflow-y: auto; }
.am-service-detail-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }
.am-whats-included-cover { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
.am-whats-included { display: flex; flex-direction: column; }
.am-checklist { list-style: none; margin: 6px 0 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.am-checklist li { display: flex; align-items: center; gap: 7px; font-size: 0.79rem; color: var(--ink); }
.am-check-icon { width: 16px; height: 16px; border-radius: 50%; background: #fff7ed; color: var(--accent); font-size: 0.62rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1.5px solid #fde68a; }
.am-cover-image-col { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 95px; }
.am-cover-image-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.am-cover-thumb { width: 88px; height: 68px; border-radius: var(--hk-radius-control); overflow: hidden; border: 1px solid var(--line); }
.am-cover-img { width: 100%; height: 100%; object-fit: cover; }
.am-faq-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--hk-radius-control); }
.am-faq-toggle { display: flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 0.77rem; color: var(--ink); font-weight: 500; cursor: pointer; }
.am-sections-order { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.am-order-item { display: flex; align-items: center; gap: 13px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: white; transition: background 0.1s; }
.am-order-item:last-child { border-bottom: none; }
.am-order-item:hover { background: var(--bg); }
.am-order-grip { color: var(--footer-muted); font-size: 1rem; cursor: grab; line-height: 1; }
.am-order-num { font-size: 0.79rem; font-weight: 700; color: var(--muted); width: 16px; flex-shrink: 0; }
.am-order-icon { width: 31px; height: 31px; border-radius: var(--hk-radius-control); background: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.am-order-name { flex: 1; font-size: 0.84rem; font-weight: 500; color: var(--ink); }
.am-order-expand { border: 1px solid var(--line); border-radius: 7px; background: white; padding: 4px 8px; cursor: pointer; display: flex; align-items: center; color: var(--muted); transition: color 0.13s, border-color 0.13s; }
.am-order-expand:hover { color: var(--accent); border-color: var(--accent); }
.am-last-updated-section { background: #f9fafb; }
.am-last-updated-grid { display: flex; align-items: center; gap: 44px; flex-wrap: wrap; }
.am-last-updated-admin { display: flex; align-items: center; gap: 11px; }
.am-admin-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.am-last-updated-admin strong { font-size: 0.87rem; color: var(--ink); display: block; }
.am-last-updated-admin p { font-size: 0.73rem; color: var(--muted); margin: 0; }
.am-last-updated-info { display: flex; align-items: center; gap: 10px; }
.am-last-updated-info strong { font-size: 0.87rem; color: var(--ink); display: block; }
.am-last-updated-info p { font-size: 0.73rem; color: var(--muted); margin: 0; }

/* ─── Add New Client Drawer ─────────────────────────────────────────────── */

.nc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 20, 30, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    backdrop-filter: blur(2px);
}
.nc-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.nc-drawer {
    position: fixed;
    inset: 0;
    z-index: 1001;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    background: #f8fafc;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.nc-drawer.is-open {
    transform: translateY(0);
}

.nc-drawer-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 40px 40px;
    gap: 6px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Header */
.nc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.nc-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink);
}
.nc-subtitle {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--muted);
}
.nc-close {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.nc-close:hover { color: var(--ink); border-color: rgba(0,0,0,0.22); }

/* Breadcrumb */
.nc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--muted);
    margin: 4px 0 16px;
}
.nc-breadcrumb-active { color: var(--accent); font-weight: 600; }

/* Body: form + preview side by side */
.nc-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
    flex: 1;
}

/* Form sections */
.nc-form { display: flex; flex-direction: column; gap: 14px; }

.nc-section {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--hk-radius-card);
    background: var(--panel);
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nc-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}
.nc-section-label h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
}
.nc-section-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: rgba(238, 153, 34, 0.12);
    color: var(--accent);
    flex-shrink: 0;
}

/* Rows */
.nc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.nc-row-full { grid-template-columns: 1fr; }
.nc-row-3    { grid-template-columns: 1fr 1fr 1fr; }

/* Fields */
.nc-field { display: flex; flex-direction: column; gap: 5px; }
.nc-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}
.nc-req { color: var(--accent); }

.nc-input,
.nc-select,
.nc-textarea {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d9dee8;
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-size: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.nc-input:focus,
.nc-select:focus,
.nc-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(238, 153, 34, 0.14);
}
.nc-textarea {
    height: 90px;
    padding: 10px 12px;
    resize: vertical;
}
.nc-select { appearance: none; cursor: pointer; padding-right: 32px; }

.nc-select-wrap { position: relative; }
.nc-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--muted);
}

/* Actions */
.nc-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}
.nc-btn-cancel {
    height: 40px;
    padding: 0 20px;
    border: 1px solid rgba(0,0,0,0.14);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s;
}
.nc-btn-cancel:hover { border-color: rgba(0,0,0,0.28); }
.nc-btn-save {
    height: 40px;
    padding: 0 24px;
    border: 0;
    border-radius: var(--hk-radius-control);
    background: var(--accent);
    color: var(--ink);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.nc-btn-save:hover { background: var(--accent-dark); color: var(--white); }

/* Preview sidebar */
.nc-preview { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }

.nc-preview-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: var(--hk-radius-card);
    background: var(--panel);
    padding: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.nc-preview-heading {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink);
}

.nc-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nc-avatar {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f1f3f7;
    color: var(--footer-muted);
}
.nc-preview-id {
    text-align: center;
}
.nc-preview-id small {
    display: block;
    font-size: 0.74rem;
    color: var(--muted);
    margin-bottom: 3px;
}
.nc-preview-id strong {
    font-size: 0.82rem;
    color: var(--ink);
    font-weight: 700;
}

.nc-preview-summary { display: flex; flex-direction: column; gap: 10px; }

.nc-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}
.nc-preview-row > span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    flex-shrink: 0;
}
.nc-preview-row > strong {
    color: var(--ink);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    max-width: 180px;
}
.nc-preview-status-row > .status-badge { font-size: 0.74rem; padding: 2px 10px; }

/* Tip box */
.nc-tip {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(238, 153, 34, 0.08);
    border: 1px solid rgba(238, 153, 34, 0.22);
    color: var(--orange);
    font-size: 0.8rem;
    line-height: 1.5;
}
.nc-tip svg { flex-shrink: 0; margin-top: 1px; }
.nc-tip p { margin: 0; }

/* Status badge extras */
.status-deleted {
    background: #fef2f2;
    color: var(--hk-danger);
}

/* Responsive */
@media (max-width: 960px) {
    .nc-body { grid-template-columns: 1fr; }
    .nc-preview { display: none; }
    .nc-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
    .nc-drawer-inner { padding: 20px 16px 24px; }
    .nc-row, .nc-row-3 { grid-template-columns: 1fr; }
}

/* ─── Client Detail / Edit Page ─────────────────────────────────────────── */

.cpd-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cpd-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cpd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 4px;
}
.cpd-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}
.cpd-breadcrumb a:hover { color: var(--ink); }
.cpd-breadcrumb span { color: var(--ink); font-weight: 500; }
.cpd-page-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink);
}

/* Action bar */
.cpd-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.cpd-action-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cpd-btn-more {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.cpd-btn-more:hover { border-color: #aaa; background: var(--bg); }
.cpd-btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid rgba(238, 153, 34, 0.32);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--accent-dark);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, opacity 0.15s;
}
.cpd-btn-delete-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}
.cpd-btn-delete:hover:not(:disabled) {
    background: rgba(238, 153, 34, 0.1);
    border-color: var(--accent);
    color: var(--accent-dark);
}
.cpd-btn-delete:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}
.cpd-btn-cancel {
    padding: 9px 18px;
    border: 1px solid var(--line);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: border-color 0.15s;
}
.cpd-btn-cancel:hover { border-color: #aaa; }
.cpd-btn-save {
    padding: 9px 22px;
    border: none;
    border-radius: var(--hk-radius-control);
    background: var(--accent);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.cpd-btn-save:hover:not(:disabled) { background: var(--accent-dark); }
.cpd-btn-save:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    background: var(--accent);
}

/* Two-column layout */
.cpd-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

/* Identity card */
.cpd-identity-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.cpd-identity-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.cpd-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--line);
}
.cpd-identity-info { display: flex; flex-direction: column; gap: 4px; }
.cpd-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cpd-client-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}
.cpd-company {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
}
.cpd-id-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}
.cpd-contact-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cpd-contact-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.cpd-contact-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Edit form card */
.cpd-form-card {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cpd-section-title {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--ink);
    padding-bottom: 4px;
}
.cpd-divider {
    height: 1px;
    background: var(--line);
    margin: 4px 0;
}
.cpd-form-grid {
    display: grid;
    gap: 14px;
}
.cpd-grid-2 { grid-template-columns: 1fr 1fr; }
.cpd-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.cpd-grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.cpd-grid-full { grid-template-columns: 1fr; }
.cpd-field { display: flex; flex-direction: column; gap: 5px; }
.cpd-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}
.cpd-req { color: var(--accent); }
.cpd-input,
.cpd-select,
.cpd-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: var(--hk-radius-control);
    background: var(--panel);
    font-size: 0.875rem;
    color: var(--ink);
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.cpd-input:focus,
.cpd-select:focus,
.cpd-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(238,153,34,0.12);
}
.cpd-select { appearance: none; cursor: pointer; padding-right: 32px; }
.cpd-textarea { resize: vertical; min-height: 90px; }
.cpd-select-wrap {
    position: relative;
}
.cpd-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--muted);
}
.cpd-required-note {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0;
}

/* Right panel cards */
.cpd-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 16px;
}
.cpd-summary-card,
.cpd-comm-card,
.cpd-activity-card,
.cpd-docs-card {
    padding: 18px 20px;
}
.cpd-summary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.cpd-summary-header h4 {
    margin: 0;
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--ink);
}
.cpd-summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.cpd-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cpd-stat strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}
.cpd-stat span {
    font-size: 0.75rem;
    color: var(--muted);
}
.cpd-latest-project {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    margin-bottom: 12px;
}
.cpd-latest-label {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 6px;
}
.cpd-latest-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.cpd-proj-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
}
.cpd-latest-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.75rem;
    color: var(--muted);
}
.cpd-view-all-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.cpd-view-all-link:hover { color: var(--accent-dark); }

/* Comm prefs card */
.cpd-card-title {
    margin: 0 0 4px;
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--ink);
}
.cpd-card-sub {
    margin: 0 0 14px;
    font-size: 0.8rem;
    color: var(--muted);
}
.cpd-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.cpd-view-all-orange {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.cpd-view-all-orange:hover { color: var(--accent-dark); }
.cpd-comm-list { display: flex; flex-direction: column; gap: 12px; }
.cpd-comm-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.cpd-comm-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cpd-comm-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--hk-radius-control);
    background: #f1f3f7;
    color: var(--muted);
    flex-shrink: 0;
}
.cpd-comm-left strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
}
.cpd-comm-left p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
}

/* Toggle switch */
.cpd-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}
.cpd-toggle input { opacity: 0; width: 0; height: 0; }
.cpd-toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 11px;
    background: #d1d5db;
    transition: background 0.2s;
}
.cpd-toggle-track::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--panel);
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cpd-toggle input:checked + .cpd-toggle-track { background: var(--accent); }
.cpd-toggle input:checked + .cpd-toggle-track::before { transform: translateX(18px); }

/* Activity */
.cpd-activity-list { display: flex; flex-direction: column; gap: 12px; }
.cpd-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.cpd-activity-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
}
.cpd-act-project { background: #eef2ff; color: var(--hk-review); }
.cpd-act-payment { background: #f0fdf4; color: var(--hk-success); }
.cpd-act-request { background: #fff7ed; color: var(--accent); }
.cpd-activity-text p {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink);
}
.cpd-activity-text small {
    font-size: 0.74rem;
    color: var(--muted);
}

/* Documents */
.cpd-doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cpd-doc-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--hk-radius-control);
    background: #fee2e2;
    color: var(--hk-danger);
    flex-shrink: 0;
}
.cpd-doc-info { flex: 1; min-width: 0; }
.cpd-doc-info strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cpd-doc-info p {
    margin: 0;
    font-size: 0.74rem;
    color: var(--muted);
}
.cpd-doc-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.cpd-doc-btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.cpd-doc-btn:hover { color: var(--ink); border-color: #aaa; }

/* Responsive */
@media (max-width: 1100px) {
    .cpd-layout { grid-template-columns: 1fr 290px; }
    .cpd-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .cpd-layout { grid-template-columns: 1fr; }
    .cpd-right { position: static; }
    .cpd-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
    .cpd-grid-2,
    .cpd-grid-3,
    .cpd-grid-4 { grid-template-columns: 1fr; }
    .cpd-identity-card { flex-direction: column; align-items: flex-start; }
}
