/*
  Kova — Admin Dashboard Template
  Version 1.0.0 · by Toolsy
  1. Tokens  2. Base  3. Layout  4. Sidebar  5. Topbar  6. Cards & widgets
  7. Tables  8. Apps (inbox, chat, kanban, calendar, files)  9. Auth  10. Utilities  11. Print
*/

:root, [data-bs-theme="light"] {
  --k-primary: #0d9488;
  --k-primary-rgb: 13, 148, 136;
  --k-primary-soft: rgba(var(--k-primary-rgb), .1);
  --k-primary-ink: #fff;
  --k-bg: #f4f6f8;
  --k-surface: #ffffff;
  --k-surface-2: #f8fafb;
  --k-border: #e4e8ec;
  --k-text: #0f1720;
  --k-muted: #64707d;
  --k-sidebar-bg: #ffffff;
  --k-sidebar-text: #4a5561;
  --k-sidebar-head: #98a2ad;
  --k-sidebar-hover: #f1f4f6;
  --k-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --k-shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .18);
  --k-radius: 12px;
  --k-radius-sm: 8px;
  --k-sidebar-w: 264px;
  --k-sidebar-mini: 76px;
  --k-topbar-h: 64px;
  --k-c1: var(--k-primary);
  --k-c2: #f59e0b;
  --k-c3: #8b5cf6;
  --k-c4: #0ea5e9;
  --k-c5: #f43f5e;
  --k-c6: #94a3b8;
  --k-success: #16a34a;
  --k-warning: #d97706;
  --k-danger: #e11d48;
  --k-info: #0284c7;
  --k-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --k-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --bs-body-font-family: var(--k-font);
  --bs-body-bg: var(--k-bg);
  --bs-body-color: var(--k-text);
  --bs-border-color: var(--k-border);
  --bs-secondary-color: var(--k-muted);
  --bs-primary: var(--k-primary);
  --bs-primary-rgb: var(--k-primary-rgb);
  --bs-link-color: var(--k-primary);
  --bs-link-color-rgb: var(--k-primary-rgb);
  --bs-link-hover-color: var(--k-primary);
  --bs-border-radius: var(--k-radius-sm);
  --bs-body-font-size: .9rem;
}

[data-bs-theme="dark"] {
  --k-primary: #2dd4bf;
  --k-primary-rgb: 45, 212, 191;
  --k-primary-soft: rgba(var(--k-primary-rgb), .12);
  --k-primary-ink: #04201d;
  --k-bg: #0b0f14;
  --k-surface: #121821;
  --k-surface-2: #161d27;
  --k-border: #222c38;
  --k-text: #e6ebf0;
  --k-muted: #8a96a3;
  --k-sidebar-bg: #0e131a;
  --k-sidebar-text: #a3adb8;
  --k-sidebar-head: #5f6b78;
  --k-sidebar-hover: #18202a;
  --k-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --k-shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, .6);
  --k-c2: #fbbf24;
  --k-c3: #a78bfa;
  --k-c4: #38bdf8;
  --k-c5: #fb7185;
  --k-c6: #64748b;
  --k-success: #4ade80;
  --k-warning: #fbbf24;
  --k-danger: #fb7185;
  --k-info: #38bdf8;
  --bs-body-bg: var(--k-bg);
  --bs-body-color: var(--k-text);
  --bs-border-color: var(--k-border);
  --bs-secondary-color: var(--k-muted);
  --bs-tertiary-bg: var(--k-surface-2);
}

[data-sidebar="dark"] .sidebar {
  --k-sidebar-bg: #0f172a;
  --k-sidebar-text: #aab4c3;
  --k-sidebar-head: #5c6b80;
  --k-sidebar-hover: #1a2438;
  --k-border: #1e293b;
}

/* 2. Base */
html { scroll-behavior: smooth; }
body { font-family: var(--k-font); font-size: .9rem; background: var(--k-bg); color: var(--k-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -.015em; color: var(--k-text); }
a { text-decoration: none; }
.mono, .num { font-family: var(--k-mono); font-feature-settings: "tnum"; }
.text-muted, .text-body-secondary { color: var(--k-muted) !important; }
.small-caps { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--k-muted); }
::selection { background: rgba(var(--k-primary-rgb), .25); }

.btn { --bs-btn-font-weight: 500; --bs-btn-padding-x: .9rem; --bs-btn-padding-y: .45rem; --bs-btn-font-size: .875rem; border-radius: var(--k-radius-sm); }
.btn-sm { --bs-btn-padding-x: .65rem; --bs-btn-padding-y: .3rem; --bs-btn-font-size: .8rem; }
.btn-primary { --bs-btn-bg: var(--k-primary); --bs-btn-border-color: var(--k-primary); --bs-btn-color: var(--k-primary-ink); --bs-btn-hover-bg: var(--k-primary); --bs-btn-hover-border-color: var(--k-primary); --bs-btn-hover-color: var(--k-primary-ink); --bs-btn-active-bg: var(--k-primary); --bs-btn-active-border-color: var(--k-primary); --bs-btn-active-color: var(--k-primary-ink); --bs-btn-disabled-bg: var(--k-primary); --bs-btn-disabled-border-color: var(--k-primary); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-outline-primary { --bs-btn-color: var(--k-primary); --bs-btn-border-color: var(--k-primary); --bs-btn-hover-bg: var(--k-primary); --bs-btn-hover-border-color: var(--k-primary); --bs-btn-hover-color: var(--k-primary-ink); --bs-btn-active-bg: var(--k-primary); --bs-btn-active-border-color: var(--k-primary); --bs-btn-active-color: var(--k-primary-ink); }
.btn-soft { --bs-btn-color: var(--k-primary); --bs-btn-bg: var(--k-primary-soft); --bs-btn-border-color: transparent; --bs-btn-hover-color: var(--k-primary-ink); --bs-btn-hover-bg: var(--k-primary); --bs-btn-hover-border-color: var(--k-primary); --bs-btn-active-color: var(--k-primary-ink); --bs-btn-active-bg: var(--k-primary); --bs-btn-active-border-color: var(--k-primary); }
.btn-ghost { --bs-btn-color: var(--k-text); --bs-btn-bg: transparent; --bs-btn-border-color: var(--k-border); --bs-btn-hover-color: var(--k-text); --bs-btn-hover-bg: var(--k-surface-2); --bs-btn-hover-border-color: var(--k-border); --bs-btn-active-color: var(--k-text); --bs-btn-active-bg: var(--k-surface-2); --bs-btn-active-border-color: var(--k-border); --bs-btn-disabled-color: var(--k-muted); --bs-btn-disabled-border-color: var(--k-border); }
.btn-ghost.active { background: var(--k-surface-2); }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
.form-control, .form-select { border-color: var(--k-border); background-color: var(--k-surface); font-size: .875rem; border-radius: var(--k-radius-sm); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--k-primary-rgb), .6); box-shadow: 0 0 0 .2rem rgba(var(--k-primary-rgb), .15); }
.form-check-input:checked { background-color: var(--k-primary); border-color: var(--k-primary); }
.form-label { font-weight: 500; font-size: .825rem; margin-bottom: .35rem; }
.form-range::-webkit-slider-thumb { background: var(--k-primary); }
.form-range::-moz-range-thumb { background: var(--k-primary); }
.input-group-text { background: var(--k-surface-2); border-color: var(--k-border); font-size: .875rem; }
.dropdown-menu { --bs-dropdown-bg: var(--k-surface); --bs-dropdown-border-color: var(--k-border); --bs-dropdown-link-active-bg: var(--k-primary-soft); --bs-dropdown-link-active-color: var(--k-primary); --bs-dropdown-font-size: .875rem; border-radius: var(--k-radius); box-shadow: var(--k-shadow-lg); padding: .4rem; }
.dropdown-item { border-radius: 6px; padding: .45rem .7rem; }
.modal-content, .offcanvas { background: var(--k-surface); border-color: var(--k-border); }
.modal-content { border-radius: var(--k-radius); }
.nav-tabs { --bs-nav-tabs-border-color: var(--k-border); --bs-nav-tabs-link-active-bg: transparent; --bs-nav-tabs-link-active-border-color: transparent transparent var(--k-primary); }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--k-muted); font-weight: 500; padding: .7rem .2rem; margin-inline-end: 1.4rem; }
.nav-tabs .nav-link.active { color: var(--k-text); border-bottom-color: var(--k-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--k-primary); --bs-nav-pills-link-active-color: var(--k-primary-ink); }
.nav-pills .nav-link { color: var(--k-muted); font-weight: 500; }
.nav-segment { display: inline-flex; background: var(--k-surface-2); border: 1px solid var(--k-border); border-radius: 9px; padding: 3px; gap: 2px; }
.nav-segment button, .nav-segment a { border: 0; background: transparent; color: var(--k-muted); font-size: .8rem; font-weight: 500; padding: .3rem .7rem; border-radius: 6px; }
.nav-segment .active { background: var(--k-surface); color: var(--k-text); box-shadow: var(--k-shadow); }
.progress { --bs-progress-bg: var(--k-surface-2); --bs-progress-bar-bg: var(--k-primary); height: 6px; border-radius: 99px; }
.page-link { color: var(--k-text); background: var(--k-surface); border-color: var(--k-border); font-size: .825rem; }
.active > .page-link { background: var(--k-primary); border-color: var(--k-primary); color: var(--k-primary-ink); }
.alert { border-radius: var(--k-radius); font-size: .875rem; }
.toast { background: var(--k-surface); border-color: var(--k-border); }

/* Badges */
.badge { font-weight: 500; letter-spacing: .01em; }
.badge-soft { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .55rem; border-radius: 6px; font-size: .74rem; font-weight: 500; line-height: 1; white-space: nowrap; }
.badge-soft::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-soft.no-dot::before { display: none; }
.badge-success { background: rgba(22, 163, 74, .12); color: var(--k-success); }
.badge-warning { background: rgba(217, 119, 6, .13); color: var(--k-warning); }
.badge-danger { background: rgba(225, 29, 72, .11); color: var(--k-danger); }
.badge-info { background: rgba(2, 132, 199, .11); color: var(--k-info); }
.badge-primary { background: var(--k-primary-soft); color: var(--k-primary); }
.badge-neutral { background: var(--k-surface-2); color: var(--k-muted); border: 1px solid var(--k-border); }
.badge-violet { background: rgba(139, 92, 246, .12); color: var(--k-c3); }

/* 3. Layout */
.app { min-height: 100vh; }
.main { margin-inline-start: var(--k-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-inline-start .2s ease; }
.content { padding: 1.5rem; flex: 1; width: 100%; max-width: 1680px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head .breadcrumb { margin-bottom: .35rem; font-size: .8rem; --bs-breadcrumb-divider-color: var(--k-muted); --bs-breadcrumb-item-active-color: var(--k-muted); }
.page-head .breadcrumb a { color: var(--k-muted); }
.page-head .breadcrumb a:hover { color: var(--k-primary); }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.footer { padding: 1rem 1.5rem; border-top: 1px solid var(--k-border); color: var(--k-muted); font-size: .8rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: space-between; }
.footer a { color: var(--k-muted); }
.footer a:hover { color: var(--k-primary); }

/* 4. Sidebar */
.sidebar { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: var(--k-sidebar-w); background: var(--k-sidebar-bg); border-inline-end: 1px solid var(--k-border); z-index: 1040; display: flex; flex-direction: column; transition: width .2s ease, transform .25s ease; }
.sidebar-brand { height: var(--k-topbar-h); display: flex; align-items: center; gap: .65rem; padding: 0 1.25rem; flex-shrink: 0; color: var(--k-text); }
[data-sidebar="dark"] .sidebar-brand { color: #fff; }
.sidebar-brand img { width: 30px; height: 30px; }
.sidebar-brand .name { font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.sidebar-brand .tag { font-family: var(--k-mono); font-size: .65rem; padding: .1rem .35rem; border-radius: 4px; background: var(--k-primary-soft); color: var(--k-primary); }
.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .5rem .75rem 1rem; scrollbar-width: thin; }
.nav-head { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--k-sidebar-head); padding: 1.1rem .75rem .45rem; white-space: nowrap; }
.side-link { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; border-radius: 8px; color: var(--k-sidebar-text); font-weight: 500; font-size: .875rem; white-space: nowrap; position: relative; border: 0; background: none; width: 100%; text-align: start; }
.side-link > i:first-child { font-size: 1.05rem; width: 20px; text-align: center; flex-shrink: 0; }
.side-link:hover { background: var(--k-sidebar-hover); color: var(--k-text); }
[data-sidebar="dark"] .side-link:hover { color: #fff; }
.side-link.active { background: var(--k-primary-soft); color: var(--k-primary); }
[data-sidebar="dark"] .side-link.active { background: rgba(var(--k-primary-rgb), .16); }
.side-link .chev { margin-inline-start: auto; font-size: .7rem; transition: transform .2s; }
.side-link[aria-expanded="true"] .chev { transform: rotate(90deg); }
.side-link .count { margin-inline-start: auto; font-family: var(--k-mono); font-size: .68rem; padding: .1rem .4rem; border-radius: 5px; background: var(--k-primary); color: var(--k-primary-ink); }
.side-sub { list-style: none; padding: .15rem 0 .35rem 2.15rem; margin: 0; position: relative; }
.side-sub::before { content: ""; position: absolute; inset-inline-start: 1.35rem; top: .2rem; bottom: .5rem; width: 1px; background: var(--k-border); }
.side-sub a { display: block; padding: .35rem .75rem; color: var(--k-sidebar-text); font-size: .84rem; border-radius: 6px; white-space: nowrap; }
.side-sub a:hover { color: var(--k-text); background: var(--k-sidebar-hover); }
[data-sidebar="dark"] .side-sub a:hover { color: #fff; }
.side-sub a.active { color: var(--k-primary); font-weight: 600; }
.sidebar-foot { padding: .75rem; border-top: 1px solid var(--k-border); flex-shrink: 0; }
.upgrade-card { border-radius: 10px; padding: .9rem; background: linear-gradient(135deg, rgba(var(--k-primary-rgb), .14), rgba(139, 92, 246, .12)); font-size: .8rem; }
.upgrade-card strong { display: block; font-size: .85rem; margin-bottom: .2rem; color: var(--k-text); }
[data-sidebar="dark"] .upgrade-card strong { color: #fff; }

@media (min-width: 992px) {
  html[data-layout="mini"] .sidebar { width: var(--k-sidebar-mini); }
  html[data-layout="mini"] .main { margin-inline-start: var(--k-sidebar-mini); }
  html[data-layout="mini"] .sidebar .name,
  html[data-layout="mini"] .sidebar .tag,
  html[data-layout="mini"] .sidebar .nav-head,
  html[data-layout="mini"] .sidebar .side-link span,
  html[data-layout="mini"] .sidebar .chev,
  html[data-layout="mini"] .sidebar .count,
  html[data-layout="mini"] .sidebar .side-sub,
  html[data-layout="mini"] .sidebar-foot { display: none !important; }
  html[data-layout="mini"] .sidebar .side-link { justify-content: center; padding: .65rem; }
  html[data-layout="mini"] .sidebar-brand { justify-content: center; padding: 0; }
  html[data-layout="mini"] .sidebar:hover { width: var(--k-sidebar-w); box-shadow: var(--k-shadow-lg); }
  html[data-layout="mini"] .sidebar:hover .name, html[data-layout="mini"] .sidebar:hover .tag,
  html[data-layout="mini"] .sidebar:hover .side-link span, html[data-layout="mini"] .sidebar:hover .chev,
  html[data-layout="mini"] .sidebar:hover .count { display: inline !important; }
  html[data-layout="mini"] .sidebar:hover .nav-head, html[data-layout="mini"] .sidebar:hover .sidebar-foot { display: block !important; }
  html[data-layout="mini"] .sidebar:hover .side-sub.show { display: block !important; }
  html[data-layout="mini"] .sidebar:hover .side-link { justify-content: flex-start; padding: .5rem .75rem; }
  html[data-layout="mini"] .sidebar:hover .sidebar-brand { justify-content: flex-start; padding: 0 1.25rem; }
}
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: none; box-shadow: var(--k-shadow-lg); }
  .main { margin-inline-start: 0; }
  .content { padding: 1rem; }
}
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(8, 12, 18, .45); z-index: 1035; opacity: 0; visibility: hidden; transition: opacity .2s; }
.sidebar-backdrop.show { opacity: 1; visibility: visible; }

/* 5. Topbar */
.topbar { position: sticky; top: 0; z-index: 1020; height: var(--k-topbar-h); display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; background: color-mix(in srgb, var(--k-bg) 82%, transparent); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--k-border); }
.topbar .tb-btn { width: 38px; height: 38px; border-radius: 9px; border: 0; background: transparent; color: var(--k-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; position: relative; }
.topbar .tb-btn:hover { background: var(--k-surface); color: var(--k-text); }
.topbar .tb-btn .dot { position: absolute; top: 8px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--k-danger); border: 2px solid var(--k-bg); }
.search-trigger { display: flex; align-items: center; gap: .6rem; height: 38px; padding: 0 .75rem; border-radius: 9px; border: 1px solid var(--k-border); background: var(--k-surface); color: var(--k-muted); min-width: 280px; font-size: .85rem; }
.search-trigger:hover { border-color: rgba(var(--k-primary-rgb), .5); }
.search-trigger kbd, .kbd { margin-inline-start: auto; font-family: var(--k-mono); font-size: .7rem; padding: .12rem .4rem; border-radius: 5px; background: var(--k-surface-2); border: 1px solid var(--k-border); color: var(--k-muted); box-shadow: none; }
.tb-user { display: flex; align-items: center; gap: .6rem; border: 0; background: transparent; padding: .25rem .4rem; border-radius: 10px; color: var(--k-text); }
.tb-user:hover { background: var(--k-surface); }
.tb-user .meta { line-height: 1.15; text-align: start; }
.tb-user .meta small { color: var(--k-muted); font-size: .75rem; }
.notif-menu { width: 360px; padding: 0; overflow: hidden; }
.notif-menu .head { padding: .85rem 1rem; border-bottom: 1px solid var(--k-border); display: flex; justify-content: space-between; align-items: center; }
.notif-item { display: flex; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--k-border); color: var(--k-text); font-size: .84rem; }
.notif-item:hover { background: var(--k-surface-2); color: var(--k-text); }
.notif-item.unread { background: rgba(var(--k-primary-rgb), .05); }
.notif-item small { color: var(--k-muted); }
@media (max-width: 767.98px) {
  .topbar { padding: 0 .75rem; gap: .35rem; }
  .search-trigger { min-width: 0; width: 38px; padding: 0; justify-content: center; }
  .search-trigger .label, .search-trigger kbd { display: none; }
  .notif-menu { width: calc(100vw - 1.5rem); }
}

/* Command palette */
.cmdk .modal-dialog { max-width: 620px; margin-top: 12vh; }
.cmdk .modal-content { overflow: hidden; box-shadow: var(--k-shadow-lg); }
.cmdk-input { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--k-border); }
.cmdk-input input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 1rem; color: var(--k-text); }
.cmdk-list { max-height: 380px; overflow-y: auto; padding: .5rem; }
.cmdk-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--k-muted); padding: .6rem .75rem .3rem; font-weight: 600; }
.cmdk-item { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: 8px; color: var(--k-text); cursor: pointer; }
.cmdk-item i { color: var(--k-muted); font-size: 1rem; }
.cmdk-item .hint { margin-inline-start: auto; font-size: .75rem; color: var(--k-muted); }
.cmdk-item.sel { background: var(--k-primary-soft); color: var(--k-primary); }
.cmdk-item.sel i { color: var(--k-primary); }
.cmdk-empty { padding: 2rem; text-align: center; color: var(--k-muted); }
.cmdk-foot { display: flex; gap: 1rem; padding: .6rem 1rem; border-top: 1px solid var(--k-border); font-size: .75rem; color: var(--k-muted); }

/* Customizer */
.swatch-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--k-surface); box-shadow: 0 0 0 1px var(--k-border); cursor: pointer; position: relative; }
.swatch.active { box-shadow: 0 0 0 2px var(--k-text); }
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.opt { border: 1px solid var(--k-border); border-radius: 10px; padding: .6rem; text-align: center; font-size: .8rem; cursor: pointer; background: var(--k-surface); color: var(--k-text); }
.opt i { display: block; font-size: 1.2rem; margin-bottom: .2rem; }
.opt.active { border-color: var(--k-primary); color: var(--k-primary); background: var(--k-primary-soft); }

/* 6. Cards & widgets */
.card { --bs-card-bg: var(--k-surface); --bs-card-border-color: var(--k-border); --bs-card-border-radius: var(--k-radius); --bs-card-cap-bg: transparent; --bs-card-spacer-x: 1.25rem; --bs-card-spacer-y: 1.15rem; box-shadow: var(--k-shadow); }
.card-header { border-bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding-top: 1rem; padding-bottom: 1rem; }
.card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.card-sub { color: var(--k-muted); font-size: .8rem; margin: .15rem 0 0; }
.card-footer { background: transparent; }
.stat { display: flex; flex-direction: column; gap: .35rem; height: 100%; }
.stat .label { color: var(--k-muted); font-size: .825rem; font-weight: 500; display: flex; align-items: center; gap: .5rem; }
.stat .value { font-size: 1.65rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-family: var(--k-font); font-feature-settings: "tnum"; }
.stat .foot { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--k-muted); }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.ic-primary { background: var(--k-primary-soft); color: var(--k-primary); }
.ic-amber { background: rgba(245, 158, 11, .14); color: var(--k-c2); }
.ic-violet { background: rgba(139, 92, 246, .13); color: var(--k-c3); }
.ic-sky { background: rgba(14, 165, 233, .13); color: var(--k-c4); }
.ic-rose { background: rgba(244, 63, 94, .12); color: var(--k-c5); }
.delta { display: inline-flex; align-items: center; gap: .15rem; font-weight: 600; font-size: .76rem; padding: .1rem .35rem; border-radius: 5px; font-family: var(--k-mono); }
.delta.up { color: var(--k-success); background: rgba(22, 163, 74, .1); }
.delta.down { color: var(--k-danger); background: rgba(225, 29, 72, .1); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--k-muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.list-row { display: flex; align-items: center; gap: .85rem; padding: .7rem 0; border-bottom: 1px dashed var(--k-border); }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row small { color: var(--k-muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--k-surface-2); }
.avatar-sm { width: 28px; height: 28px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 96px; height: 96px; }
.avatar-text { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .8rem; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid var(--k-surface); margin-inline-start: -8px; }
.avatar-stack .avatar:first-child { margin-inline-start: 0; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--k-surface-2); flex-shrink: 0; }
.thumb-lg { width: 64px; height: 64px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 2px solid var(--k-surface); }
.online { background: var(--k-success); }
.away { background: var(--k-warning); }
.offline { background: var(--k-c6); }
.av-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.av-wrap .status-dot { position: absolute; inset-inline-end: 0; bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.15rem 1.75rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 6px; top: 16px; bottom: 0; width: 1px; background: var(--k-border); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; inset-inline-start: 0; top: 4px; width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--k-surface); box-shadow: 0 0 0 1px var(--k-border); background: var(--k-primary); }
.timeline small { color: var(--k-muted); }
.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: .55rem 1rem; font-size: .86rem; margin: 0; }
.kv dt { color: var(--k-muted); font-weight: 400; }
.kv dd { margin: 0; font-weight: 500; }
.meter { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--k-surface-2); gap: 2px; }
.meter span { display: block; height: 100%; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--k-muted); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; }
.goal-ring { position: relative; display: inline-flex; }
.goal-ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.welcome-card { background: linear-gradient(120deg, rgba(var(--k-primary-rgb), .16), rgba(139, 92, 246, .1) 60%, transparent), var(--k-surface); }
.map-dots { position: relative; }
.map-dots svg { width: 100%; height: auto; display: block; }
.dropzone { border: 1.5px dashed var(--k-border); border-radius: var(--k-radius); padding: 1.75rem 1rem; text-align: center; color: var(--k-muted); background: var(--k-surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--k-primary); background: var(--k-primary-soft); color: var(--k-primary); }
.dropzone i { font-size: 1.6rem; display: block; margin-bottom: .35rem; }
.dz-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .6rem; margin-top: .75rem; }
.dz-previews .pv { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--k-border); }
.dz-previews .pv img { width: 100%; height: 100%; object-fit: cover; }
.dz-previews .pv button { position: absolute; top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: .7rem; display: flex; align-items: center; justify-content: center; }
.tag-input { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; min-height: 38px; padding: .3rem .5rem; border: 1px solid var(--k-border); border-radius: var(--k-radius-sm); background: var(--k-surface); cursor: text; }
.tag-input:focus-within { border-color: rgba(var(--k-primary-rgb), .6); box-shadow: 0 0 0 .2rem rgba(var(--k-primary-rgb), .15); }
.tag-input .tag { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .25rem .15rem .5rem; background: var(--k-primary-soft); color: var(--k-primary); border-radius: 5px; font-size: .8rem; font-weight: 500; }
.tag-input .tag button { border: 0; background: none; color: inherit; padding: 0 .15rem; line-height: 1; font-size: .9rem; }
.tag-input input { border: 0; outline: 0; flex: 1; min-width: 100px; background: transparent; color: var(--k-text); font-size: .875rem; padding: .15rem 0; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: .45rem; }
.pw-meter span { height: 4px; border-radius: 4px; background: var(--k-border); transition: background .2s; }
.editor { border: 1px solid var(--k-border); border-radius: var(--k-radius-sm); background: var(--k-surface); }
.editor-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: .35rem; border-bottom: 1px solid var(--k-border); }
.editor-bar button { border: 0; background: transparent; width: 32px; height: 30px; border-radius: 6px; color: var(--k-muted); }
.editor-bar button:hover, .editor-bar button.on { background: var(--k-surface-2); color: var(--k-text); }
.editor-area { min-height: 160px; padding: .75rem .9rem; outline: 0; }
.editor-area:empty::before { content: attr(data-placeholder); color: var(--k-muted); }
.seo-preview { border: 1px solid var(--k-border); border-radius: var(--k-radius-sm); padding: .9rem 1rem; background: var(--k-surface-2); }
.seo-preview .u { color: var(--k-success); font-size: .8rem; }
.seo-preview .t { color: #1a0dab; font-size: 1.05rem; margin: .1rem 0; }
[data-bs-theme="dark"] .seo-preview .t { color: #8ab4f8; }
.seo-preview .d { color: var(--k-muted); font-size: .84rem; }
.plan-card { border: 1px solid var(--k-border); border-radius: var(--k-radius); padding: 1.4rem; background: var(--k-surface); height: 100%; display: flex; flex-direction: column; }
.plan-card.current { border-color: var(--k-primary); box-shadow: 0 0 0 3px rgba(var(--k-primary-rgb), .15); }
.plan-card .price { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; }
.plan-card ul { list-style: none; padding: 0; margin: 1rem 0 1.25rem; font-size: .86rem; flex: 1; }
.plan-card li { display: flex; gap: .5rem; padding: .3rem 0; }
.plan-card li i { color: var(--k-primary); }
.pay-card { border: 1px solid var(--k-border); border-radius: var(--k-radius); padding: 1rem; display: flex; align-items: center; gap: .9rem; }
.pay-card.default { border-color: var(--k-primary); }
.cc-logo { width: 46px; height: 30px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .7rem; color: #fff; flex-shrink: 0; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--k-border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .t { font-weight: 500; }
.setting-row small { color: var(--k-muted); display: block; }
.side-tabs .nav-link { display: flex; align-items: center; gap: .65rem; color: var(--k-muted); border-radius: 8px; padding: .55rem .8rem; font-weight: 500; text-align: start; }
.side-tabs .nav-link.active { background: var(--k-primary-soft); color: var(--k-primary); }
.profile-cover { height: 180px; border-radius: var(--k-radius) var(--k-radius) 0 0; background: url(../img/media/cover.svg) center/cover; }
.profile-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; padding: .9rem 1.5rem 1.25rem; }
.profile-head .avatar-xl { border: 4px solid var(--k-surface); margin-top: -64px; }
[data-bs-theme="dark"] .profile-cover { opacity: .55; }
.code-block { font-family: var(--k-mono); font-size: .8rem; background: var(--k-surface-2); border: 1px solid var(--k-border); border-radius: var(--k-radius-sm); padding: .6rem .8rem; display: flex; align-items: center; gap: .6rem; }
.code-block code { color: var(--k-text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-box { border: 1px dashed var(--k-border); border-radius: var(--k-radius-sm); padding: 1rem; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .5rem; }
.icon-grid div { text-align: center; padding: .9rem .25rem; border: 1px solid var(--k-border); border-radius: 8px; font-size: .7rem; color: var(--k-muted); }
.icon-grid i { display: block; font-size: 1.4rem; color: var(--k-text); margin-bottom: .3rem; }

/* Charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart .grid line { stroke: var(--k-border); stroke-dasharray: 3 4; }
.chart .axis text { fill: var(--k-muted); font-size: 11px; font-family: var(--k-mono); }
.chart .tip { position: absolute; pointer-events: none; background: var(--k-surface); border: 1px solid var(--k-border); box-shadow: var(--k-shadow-lg); border-radius: 8px; padding: .5rem .65rem; font-size: .78rem; opacity: 0; transition: opacity .12s; z-index: 5; white-space: nowrap; min-width: 120px; }
.chart .tip.show { opacity: 1; }
.chart .tip .h { font-weight: 600; margin-bottom: .25rem; }
.chart .tip .r { display: flex; align-items: center; gap: .45rem; color: var(--k-muted); }
.chart .tip .r b { margin-inline-start: auto; color: var(--k-text); font-family: var(--k-mono); font-weight: 500; padding-inline-start: .75rem; }
.chart .tip .r i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart .hover-line { stroke: var(--k-muted); stroke-dasharray: 3 3; opacity: 0; }
.chart .bar { transition: opacity .15s; }
.chart .bar.dim { opacity: .35; }
.chart .donut-seg { transition: opacity .15s; }
.chart .donut-seg.dim { opacity: .3; }
.chart .center-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.chart .center-label b { font-size: 1.4rem; font-weight: 600; letter-spacing: -.02em; }
.chart .center-label small { color: var(--k-muted); font-size: .75rem; }
.heat { display: grid; gap: 4px; }
.heat div { aspect-ratio: 1; border-radius: 4px; background: var(--k-primary); }

/* 7. Tables */
.table { --bs-table-bg: transparent; --bs-table-color: var(--k-text); --bs-table-border-color: var(--k-border); --bs-table-hover-bg: var(--k-surface-2); --bs-table-hover-color: var(--k-text); --bs-table-striped-bg: var(--k-surface-2); --bs-table-active-bg: rgba(var(--k-primary-rgb), .07); font-size: .86rem; margin: 0; }
.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--k-muted); font-weight: 600; background: var(--k-surface-2); border-bottom-width: 1px; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-sm > :not(caption) > * > * { padding: .5rem .75rem; }
.table-card .card-header + .table-responsive, .table-card .card-header + .table-toolbar { border-top: 1px solid var(--k-border); }
.table-card .table thead th:first-child { padding-inline-start: 1.25rem; }
.table-card .table td:first-child { padding-inline-start: 1.25rem; }
.table-card .table thead th:last-child, .table-card .table td:last-child { padding-inline-end: 1.25rem; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]::after { content: "\F127"; font-family: "bootstrap-icons"; margin-inline-start: .35rem; opacity: .35; font-size: .7rem; }
th[data-sort].asc::after { content: "\F148"; opacity: 1; color: var(--k-primary); }
th[data-sort].desc::after { content: "\F128"; opacity: 1; color: var(--k-primary); }
tr.selected { --bs-table-bg-state: rgba(var(--k-primary-rgb), .07); }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--k-border); }
.table-toolbar .search { position: relative; flex: 1 1 220px; max-width: 320px; }
.table-toolbar .search i { position: absolute; inset-inline-start: .7rem; top: 50%; transform: translateY(-50%); color: var(--k-muted); }
.table-toolbar .search input { padding-inline-start: 2.1rem; }
.table-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1.25rem; border-top: 1px solid var(--k-border); font-size: .82rem; color: var(--k-muted); }
.bulk-bar { display: none; align-items: center; gap: .6rem; padding: .6rem 1.25rem; background: var(--k-primary-soft); color: var(--k-primary); font-size: .85rem; font-weight: 500; border-bottom: 1px solid var(--k-border); }
.bulk-bar.show { display: flex; }
.cell-user { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.cell-user .t { font-weight: 500; color: var(--k-text); white-space: nowrap; }
.cell-user small { color: var(--k-muted); display: block; white-space: nowrap; }
.table .form-check-input { margin-top: 0; }
.row-actions { white-space: nowrap; text-align: end; }

/* 8. Apps */
.app-shell { display: grid; border: 1px solid var(--k-border); border-radius: var(--k-radius); background: var(--k-surface); overflow: hidden; box-shadow: var(--k-shadow); height: calc(100vh - var(--k-topbar-h) - 9.5rem); min-height: 560px; }
.app-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.app-pane + .app-pane { border-inline-start: 1px solid var(--k-border); }
.pane-head { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-bottom: 1px solid var(--k-border); flex-shrink: 0; min-height: 60px; }
.pane-body { flex: 1; overflow-y: auto; min-height: 0; }

.inbox-shell { grid-template-columns: 220px 360px 1fr; }
.mail-folders { padding: .75rem; }
.mail-folders a { display: flex; align-items: center; gap: .65rem; padding: .5rem .7rem; border-radius: 8px; color: var(--k-muted); font-weight: 500; font-size: .86rem; }
.mail-folders a:hover { color: var(--k-text); background: var(--k-surface-2); }
.mail-folders a.active { background: var(--k-primary-soft); color: var(--k-primary); }
.mail-folders a .n { margin-inline-start: auto; font-family: var(--k-mono); font-size: .72rem; }
.mail-item { display: flex; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--k-border); cursor: pointer; position: relative; }
.mail-item:hover { background: var(--k-surface-2); }
.mail-item.active { background: var(--k-primary-soft); }
.mail-item.unread .from, .mail-item.unread .subj { font-weight: 600; color: var(--k-text); }
.mail-item.unread::before { content: ""; position: absolute; inset-inline-start: 4px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--k-primary); }
.mail-item .grow { flex: 1; min-width: 0; }
.mail-item .from { font-size: .86rem; color: var(--k-text); font-weight: 500; }
.mail-item .subj { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--k-text); }
.mail-item .prev { font-size: .8rem; color: var(--k-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item .time { font-size: .74rem; color: var(--k-muted); white-space: nowrap; font-family: var(--k-mono); }
.mail-item .star { border: 0; background: none; padding: 0; color: var(--k-muted); }
.mail-item .star.on { color: var(--k-c2); }
.mail-read { padding: 1.5rem; }
.mail-read .body p { line-height: 1.65; }
.attach { display: inline-flex; align-items: center; gap: .6rem; border: 1px solid var(--k-border); border-radius: 8px; padding: .5rem .75rem; font-size: .8rem; color: var(--k-text); }
.attach i { font-size: 1.3rem; color: var(--k-danger); }

.chat-shell { grid-template-columns: 320px 1fr; }
.chat-contact { display: flex; gap: .75rem; padding: .75rem 1rem; cursor: pointer; align-items: center; border-radius: 0; }
.chat-contact:hover { background: var(--k-surface-2); }
.chat-contact.active { background: var(--k-primary-soft); }
.chat-contact .grow { flex: 1; min-width: 0; }
.chat-contact .nm { font-weight: 500; font-size: .87rem; }
.chat-contact .lm { font-size: .8rem; color: var(--k-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-contact .unread-n { background: var(--k-primary); color: var(--k-primary-ink); font-size: .68rem; font-family: var(--k-mono); padding: .1rem .4rem; border-radius: 99px; }
.chat-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; background: var(--k-surface-2); }
.msg { display: flex; gap: .6rem; max-width: 78%; align-items: flex-end; }
.msg .bubble { padding: .6rem .85rem; border-radius: 14px 14px 14px 4px; background: var(--k-surface); border: 1px solid var(--k-border); font-size: .87rem; line-height: 1.5; }
.msg .meta { font-size: .7rem; color: var(--k-muted); margin-top: .2rem; font-family: var(--k-mono); }
.msg.me { margin-inline-start: auto; flex-direction: row-reverse; }
.msg.me .bubble { background: var(--k-primary); color: var(--k-primary-ink); border-color: var(--k-primary); border-radius: 14px 14px 4px 14px; }
.msg.me .meta { text-align: end; }
.day-sep { text-align: center; font-size: .72rem; color: var(--k-muted); text-transform: uppercase; letter-spacing: .08em; }
.typing { display: inline-flex; gap: 3px; padding: .75rem .9rem; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--k-muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-compose { display: flex; gap: .5rem; padding: .85rem 1rem; border-top: 1px solid var(--k-border); align-items: center; }
.chat-compose input { flex: 1; }

.kanban { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .75rem; align-items: flex-start; }
.k-col { flex: 1 0 270px; max-width: 380px; background: var(--k-surface-2); border: 1px solid var(--k-border); border-radius: var(--k-radius); display: flex; flex-direction: column; max-height: calc(100vh - 13rem); }
.k-col-head { display: flex; align-items: center; gap: .5rem; padding: .85rem 1rem; font-weight: 600; font-size: .9rem; }
.k-col-head .n { font-family: var(--k-mono); font-size: .72rem; background: var(--k-surface); border: 1px solid var(--k-border); padding: .05rem .45rem; border-radius: 99px; color: var(--k-muted); font-weight: 500; }
.k-col-head .bar { width: 8px; height: 8px; border-radius: 3px; }
.k-list { padding: 0 .75rem .75rem; display: flex; flex-direction: column; gap: .6rem; min-height: 60px; overflow-y: auto; }
.k-list.over { background: rgba(var(--k-primary-rgb), .06); border-radius: 8px; }
.k-card { background: var(--k-surface); border: 1px solid var(--k-border); border-radius: 10px; padding: .85rem; cursor: grab; box-shadow: var(--k-shadow); }
.k-card:active { cursor: grabbing; }
.k-card.dragging { opacity: .45; }
.k-card .t { font-weight: 500; font-size: .87rem; margin: .4rem 0 .6rem; }
.k-card .foot { display: flex; align-items: center; justify-content: space-between; font-size: .75rem; color: var(--k-muted); }
.k-card .foot span { display: inline-flex; align-items: center; gap: .25rem; }
.k-card img.cover { width: 100%; height: 110px; object-fit: cover; border-radius: 7px; margin-bottom: .4rem; }
.k-add { border: 1px dashed var(--k-border); background: transparent; border-radius: 8px; padding: .5rem; color: var(--k-muted); font-size: .82rem; width: 100%; }
.k-add:hover { color: var(--k-primary); border-color: var(--k-primary); }

.cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--k-border); }
.cal-head h2 { font-size: 1.15rem; margin: 0; min-width: 160px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: .55rem .75rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--k-muted); font-weight: 600; border-bottom: 1px solid var(--k-border); background: var(--k-surface-2); }
.cal-day { min-height: 118px; border-inline-end: 1px solid var(--k-border); border-bottom: 1px solid var(--k-border); padding: .4rem; cursor: pointer; min-width: 0; }
.cal-day:nth-child(7n) { border-inline-end: 0; }
.cal-day:hover { background: var(--k-surface-2); }
.cal-day .d { font-size: .8rem; font-family: var(--k-mono); color: var(--k-muted); display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; }
.cal-day.other .d { opacity: .4; }
.cal-day.today .d { background: var(--k-primary); color: var(--k-primary-ink); font-weight: 600; }
.cal-ev { display: block; font-size: .74rem; padding: .2rem .45rem; border-radius: 5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; border-inline-start: 3px solid currentColor; }
.ev-primary { background: var(--k-primary-soft); color: var(--k-primary); }
.ev-amber { background: rgba(245, 158, 11, .14); color: #b45309; }
[data-bs-theme="dark"] .ev-amber { color: var(--k-c2); }
.ev-violet { background: rgba(139, 92, 246, .13); color: #7c3aed; }
[data-bs-theme="dark"] .ev-violet { color: var(--k-c3); }
.ev-rose { background: rgba(244, 63, 94, .12); color: #be123c; }
[data-bs-theme="dark"] .ev-rose { color: var(--k-c5); }
.ev-sky { background: rgba(14, 165, 233, .13); color: #0369a1; }
[data-bs-theme="dark"] .ev-sky { color: var(--k-c4); }
.cal-more { font-size: .72rem; color: var(--k-muted); padding-inline-start: .3rem; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: .75rem; }
.mini-cal span { padding: .3rem 0; border-radius: 6px; font-family: var(--k-mono); }
.mini-cal .h { color: var(--k-muted); font-family: var(--k-font); font-weight: 600; }
.mini-cal .t { background: var(--k-primary); color: var(--k-primary-ink); }
.mini-cal .o { opacity: .35; }
.mini-cal .e { position: relative; }
.mini-cal .e::after { content: ""; position: absolute; inset-inline-start: 50%; bottom: 2px; width: 4px; height: 4px; margin-inline-start: -2px; border-radius: 50%; background: var(--k-primary); }
.agenda-item { display: flex; gap: .75rem; padding: .6rem 0; border-bottom: 1px dashed var(--k-border); font-size: .84rem; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-item .bar { width: 3px; border-radius: 3px; flex-shrink: 0; }

.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.file-card { border: 1px solid var(--k-border); border-radius: var(--k-radius); background: var(--k-surface); padding: .9rem; position: relative; transition: border-color .15s, box-shadow .15s; }
.file-card:hover { border-color: rgba(var(--k-primary-rgb), .5); box-shadow: var(--k-shadow-lg); }
.file-card .ico { height: 92px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; margin-bottom: .7rem; overflow: hidden; }
.file-card .ico img { width: 100%; height: 100%; object-fit: cover; }
.file-card .nm { font-weight: 500; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card small { color: var(--k-muted); font-size: .74rem; }
.file-card .dropdown { position: absolute; top: .5rem; inset-inline-end: .5rem; }
.files-grid.as-list { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--k-border); border-radius: var(--k-radius); overflow: hidden; }
.files-grid.as-list .file-card { display: flex; align-items: center; gap: .9rem; border: 0; border-bottom: 1px solid var(--k-border); border-radius: 0; padding: .6rem 1rem; box-shadow: none; }
.files-grid.as-list .file-card:last-child { border-bottom: 0; }
.files-grid.as-list .file-card .ico { width: 40px; height: 40px; margin: 0; font-size: 1.2rem; flex-shrink: 0; }
.files-grid.as-list .file-card .dropdown { position: static; margin-inline-start: auto; }
.folder-card { display: flex; align-items: center; gap: .8rem; border: 1px solid var(--k-border); border-radius: var(--k-radius); background: var(--k-surface); padding: .9rem 1rem; color: var(--k-text); }
.folder-card:hover { border-color: rgba(var(--k-primary-rgb), .5); color: var(--k-text); }
.folder-card i { font-size: 1.6rem; }
.folder-card small { color: var(--k-muted); display: block; font-size: .75rem; }

@media (max-width: 1199.98px) {
  .inbox-shell { grid-template-columns: 200px 1fr; }
  .inbox-shell .mail-pane-read { display: none; }
  .inbox-shell.reading .mail-pane-list { display: none; }
  .inbox-shell.reading .mail-pane-read { display: flex; border-inline-start: 1px solid var(--k-border); }
}
@media (max-width: 767.98px) {
  .app-shell { height: auto; min-height: 0; }
  .inbox-shell { grid-template-columns: 1fr; }
  .inbox-shell .mail-pane-folders { display: none; }
  .inbox-shell .app-pane + .app-pane { border-inline-start: 0; }
  .inbox-shell .pane-body { max-height: 70vh; }
  .chat-shell { grid-template-columns: 1fr; }
  .chat-shell .chat-list { display: none; }
  .chat-shell .app-pane + .app-pane { border-inline-start: 0; }
  .chat-shell .pane-body { height: 60vh; }
  .cal-day { min-height: 64px; padding: .2rem; }
  .cal-ev { font-size: 0; padding: 0; height: 5px; border-inline-start: 0; background: currentColor; margin-top: 2px; }
  .cal-dow { padding: .45rem .2rem; text-align: center; font-size: .65rem; }
  .k-col { flex-basis: 85vw; }
}

/* 9. Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 2.5rem clamp(1.25rem, 6vw, 6rem); background: var(--k-surface); }
.auth-form .inner { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-side { background: radial-gradient(800px 500px at 20% 10%, rgba(var(--k-primary-rgb), .35), transparent 60%), radial-gradient(700px 500px at 90% 90%, rgba(139, 92, 246, .35), transparent 60%), #0b1220; color: #e6ebf0; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.2rem); max-width: 520px; line-height: 1.2; }
.auth-side .mock { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 1.1rem; backdrop-filter: blur(6px); max-width: 460px; }
.auth-side .mock .v { font-size: 1.6rem; font-weight: 600; color: #fff; }
.auth-side .quote { font-size: .95rem; color: #c3ccd6; max-width: 460px; }
.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--k-muted); font-size: .8rem; margin: 1.25rem 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--k-border); }
.btn-social { border: 1px solid var(--k-border); background: var(--k-surface); color: var(--k-text); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-social:hover { background: var(--k-surface-2); color: var(--k-text); border-color: var(--k-border); }
.otp { display: flex; gap: .5rem; }
.otp input { flex: 1 1 0; min-width: 0; max-width: 52px; height: 54px; text-align: center; font-size: 1.3rem; font-family: var(--k-mono); }
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem 1rem; }
.error-page .code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 700; letter-spacing: -.06em; line-height: 1; background: linear-gradient(135deg, var(--k-primary), var(--k-c3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 991.98px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

/* 10. Utilities */
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fs-xs { font-size: .75rem; }
.fs-sm { font-size: .84rem; }
.text-primary { color: var(--k-primary) !important; }
.text-success { color: var(--k-success) !important; }
.text-danger { color: var(--k-danger) !important; }
.text-warning { color: var(--k-warning) !important; }
.bg-primary { background-color: var(--k-primary) !important; }
.bg-surface-2 { background: var(--k-surface-2) !important; }
.border-dashed { border-style: dashed !important; }
.min-w-0 { min-width: 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hover-lift { transition: transform .15s, box-shadow .15s; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--k-shadow-lg); }
.toast-stack { position: fixed; inset-inline-end: 1rem; bottom: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; }
.k-toast { display: flex; align-items: center; gap: .65rem; background: var(--k-text); color: var(--k-bg); padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--k-shadow-lg); font-size: .86rem; animation: toastIn .2s ease; max-width: 360px; }
.k-toast i { color: var(--k-primary); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.overflow-x-clip { overflow-x: clip; }

/* 11. Print */
@media print {
  .sidebar, .topbar, .footer, .page-head .actions, .no-print, .toast-stack { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; }
}

/* Store switcher */
.store-switch { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--k-border); background: var(--k-surface); border-radius: 10px; padding: .3rem .6rem .3rem .35rem; color: var(--k-text); height: 42px; }
.store-switch:hover { border-color: rgba(var(--k-primary-rgb), .5); }
.store-switch small { font-size: .7rem; }
.store-mark { width: 28px; height: 28px; border-radius: 7px; background: #131417; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
[data-bs-theme="dark"] .store-mark { box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.btn-check:checked + .swatch { box-shadow: 0 0 0 2px var(--k-text); }
.btn-ghost.position-fixed { background: var(--k-surface); z-index: 10; }

/* Packing slips & labels */
.print-area { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.print-sheet { background: #fff; color: #111; border: 1px solid var(--k-border); border-radius: 6px; box-shadow: var(--k-shadow); }
.print-sheet .text-muted, .print-sheet small { color: #555 !important; }
.print-sheet .table { --bs-table-color: #111; --bs-table-border-color: #ddd; }
.print-sheet .table thead th { background: #f4f4f4; color: #555; }
.print-sheet.slip { width: 640px; max-width: 100%; padding: 2rem; }
.print-sheet.label { width: 384px; height: 576px; max-width: 100%; padding: 1.1rem; display: flex; flex-direction: column; font-family: Arial, sans-serif; border: 2px solid #111; }
.label-service { display: inline-block; background: #111; color: #fff; font-weight: 700; padding: .2rem .6rem; font-size: .9rem; letter-spacing: .05em; }
.barcode { width: 100%; height: 56px; fill: #000; display: block; }
.label .barcode { height: 90px; }
.slip .barcode { max-width: 220px; margin-inline-start: auto; }
.pick-box { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #333; border-radius: 3px; }
@media print {
  .print-area { display: block; }
  .print-sheet { border: 0; box-shadow: none; border-radius: 0; break-after: page; page-break-after: always; margin: 0 auto; }
  .print-sheet.label { border: 2px solid #000; width: 4in; height: 6in; }
}

/* Customizable dashboard */
.dash-editbar { display: none; border-color: rgba(var(--k-primary-rgb), .4); background: var(--k-primary-soft); }
.dash-editing .dash-editbar { display: block; position: sticky; top: calc(var(--k-topbar-h) + .5rem); z-index: 15; }
[data-widget] { position: relative; }
[data-widget].is-hidden { display: none !important; }
.widget-tools { display: none; position: absolute; top: -10px; inset-inline-start: calc(var(--bs-gutter-x) * .5 + 10px); inset-inline-end: calc(var(--bs-gutter-x) * .5 + 10px); z-index: 5; align-items: center; gap: 4px; }
.dash-editing .widget-tools { display: flex; }
.dash-editing [data-widget] > .card { outline: 2px dashed rgba(var(--k-primary-rgb), .45); outline-offset: 2px; cursor: grab; }
.dash-editing [data-widget].dragging > .card { opacity: .4; }
.widget-tools .wt-grip { margin-inline-end: auto; display: inline-flex; align-items: center; gap: .25rem; background: var(--k-primary); color: var(--k-primary-ink); font-size: .72rem; font-weight: 600; padding: .15rem .55rem .15rem .3rem; border-radius: 6px; cursor: grab; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.widget-tools button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--k-border); background: var(--k-surface); color: var(--k-text); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; box-shadow: var(--k-shadow); }
.widget-tools button:hover { background: var(--k-primary); color: var(--k-primary-ink); border-color: var(--k-primary); }

/* RTL */
[dir="rtl"] .side-link .chev { transform: scaleX(-1); }
[dir="rtl"] .side-link[aria-expanded="true"] .chev { transform: rotate(90deg); }
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { float: right; }
@media (max-width: 991.98px) { [dir="rtl"] .sidebar { transform: translateX(100%); } [dir="rtl"] .sidebar.open { transform: none; } }
[dir="rtl"] .bi-arrow-right, [dir="rtl"] .bi-arrow-left, [dir="rtl"] .bi-chevron-right:not(.chev), [dir="rtl"] .bi-chevron-left { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .msg .bubble { border-radius: 14px 14px 4px 14px; }
[dir="rtl"] .msg.me .bubble { border-radius: 14px 14px 14px 4px; }
[dir="rtl"] .mono:not(td):not(th), [dir="rtl"] .stat .value, [dir="rtl"] .delta, [dir="rtl"] .kbd, [dir="rtl"] kbd { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] td.mono, [dir="rtl"] th.mono { unicode-bidi: plaintext; }
