:root {
  --ink: #000000;
  --muted: #5f6863;
  --line: #e2e6df;
  --canvas: #f4f6f2;
  --paper: #ffffff;
  --accent: #d9f15a;
  --accent-deep: #9fb82a;
  --cyan: #00aeef;
  --cyan-deep: #006b93;
  --green: #207a56;
  --green-soft: #e9f6ef;
  --orange: #974b12;
  --orange-soft: #fff1e5;
  --red: #b84040;
  --red-soft: #fcecec;
  --blue: #006b93;
  --blue-soft: #e1f6fd;
  --shadow: 0 18px 48px rgba(0, 0, 0, .08);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .045);
  --shadow-lg: 0 28px 72px rgba(0, 0, 0, .14);
  --radius: 20px;
  --sidebar-width: 272px;
  --header-height: 76px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 30; width: 248px; height: 100vh; background: var(--ink); color: #fff; padding: 26px 18px 18px; display: flex; flex-direction: column; }
.brand { overflow: hidden; margin: 0 0 28px; border-radius: 14px; background: var(--accent); }
.brand-logo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 5; object-fit: cover; object-position: center; }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { margin: 23px 12px 9px; color: #686e6a; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.nav-item { width: 100%; min-height: 43px; border: 0; color: #aeb3af; background: transparent; border-radius: 11px; display: flex; align-items: center; gap: 12px; padding: 0 12px; text-align: left; font-size: 13px; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { background: var(--accent); color: var(--ink); font-weight: 750; }
.nav-icon { width: 18px; font-size: 18px; text-align: center; }
.nav-item em { margin-left: auto; background: rgba(255,255,255,.12); color: inherit; min-width: 22px; height: 20px; border-radius: 7px; display: grid; place-items: center; font-style: normal; font-size: 10px; }
.nav-item.active em { background: rgba(23,26,25,.12); }
.soon { margin-left: auto; color: #686e6a; font-size: 7px; letter-spacing: .08em; }
.sidebar-bottom { margin-top: auto; }
.user-card { color: #fff; background: transparent; width: 100%; border: 0; border-top: 1px solid #2b2f2d; padding: 16px 7px 2px; display: flex; gap: 9px; align-items: center; text-align: left; }
.user-card > span:nth-child(2) { flex: 1; }
.user-card strong, .user-card small { display: block; }
.user-card strong { font-size: 11px; }
.user-card small { color: #787e79; margin-top: 2px; font-size: 9px; }
.avatar { width: 31px; height: 31px; background: #343936; color: var(--accent); border-radius: 9px; display: grid !important; place-items: center; font-size: 10px; font-weight: 800; }
.main-area { grid-column: 2; min-width: 0; }
.topbar { height: 70px; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; backdrop-filter: blur(12px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #99a09b; }
.breadcrumb b { color: #d4d7d4; }
.breadcrumb strong { color: var(--ink); }
.top-actions { display: flex; gap: 9px; align-items: center; }
.search-button { border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; height: 36px; padding: 0 9px 0 12px; color: #888e89; display: flex; gap: 8px; align-items: center; font-size: 10px; }
kbd { font-family: inherit; font-size: 8px; border: 1px solid #dfe2de; background: #fff; color: #a0a5a1; padding: 3px 5px; border-radius: 5px; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.icon-button { border: 1px solid var(--line); background: #fff; width: 36px; height: 36px; border-radius: 10px; color: var(--ink); display: grid; place-items: center; font-size: 18px; }
.menu-button { display: none; }
.notification-button { position: relative; }
.notification-button i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #f26d5b; right: 7px; top: 7px; border: 2px solid #fff; }
.primary-button, .secondary-button, .ghost-button, .danger-button { border-radius: 10px; min-height: 40px; padding: 0 16px; border: 0; font-weight: 750; font-size: 11px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; }
.primary-button { background: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(23,26,25,.16); }
.primary-button:hover { background: #2b302d; transform: translateY(-1px); }
.primary-button.compact { height: 36px; min-height: 36px; padding: 0 13px; }
.secondary-button { background: var(--accent); color: var(--ink); }
.ghost-button { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.danger-button { background: var(--red-soft); color: var(--red); }
.content { max-width: 1440px; margin: 0 auto; padding: 32px 34px 64px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-heading h1 { font-size: clamp(25px, 3vw, 35px); line-height: 1.05; margin: 5px 0 7px; letter-spacing: -.045em; }
.page-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.eyebrow { margin: 0; color: #909690; font-size: 9px; font-weight: 850; letter-spacing: .15em; }
.heading-actions { display: flex; gap: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 17px; }
.stat-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 19px; min-height: 128px; position: relative; overflow: hidden; }
.stat-card.highlight { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; }
.highlight .stat-top { color: #9aa09c; }
.stat-icon { width: 27px; height: 27px; background: var(--canvas); border-radius: 8px; display: grid; place-items: center; color: var(--ink); font-size: 14px; }
.highlight .stat-icon { background: var(--accent); }
.stat-value { display: block; font-size: 28px; letter-spacing: -.05em; margin: 13px 0 4px; }
.stat-caption { color: var(--muted); font-size: 9px; }
.highlight .stat-caption { color: #878f89; }
.trend { color: var(--green); font-weight: 750; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.85fr); gap: 17px; margin-bottom: 17px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-header { min-height: 64px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.card-header h2 { margin: 3px 0 0; font-size: 14px; letter-spacing: -.02em; }
.text-button { background: none; border: 0; color: var(--ink); font-size: 10px; font-weight: 750; padding: 5px; }
.orders-list { padding: 3px 11px 8px; }
.order-row { display: grid; grid-template-columns: 42px minmax(110px,1fr) minmax(150px,1.4fr) 95px 82px 24px; gap: 12px; align-items: center; padding: 12px 9px; border-bottom: 1px solid #eff1ee; font-size: 10px; }
.order-row:last-child { border-bottom: 0; }
.device-thumb { width: 37px; height: 37px; border-radius: 10px; background: var(--canvas); color: #555d58; display: grid; place-items: center; font-weight: 900; font-size: 12px; }
.order-main strong, .order-device strong { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-main small, .order-device small { display: block; color: #929893; margin-top: 3px; font-size: 8px; }
.status { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 5px 8px; width: fit-content; font-size: 8px; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.analysis { color: var(--orange); background: var(--orange-soft); }
.status.progress { color: var(--blue); background: var(--blue-soft); }
.status.ready { color: var(--green); background: var(--green-soft); }
.status.waiting { color: #866b2a; background: #fff7da; }
.status.overdue { color: var(--red); background: var(--red-soft); }
.status.paid { color: var(--green); background: var(--green-soft); }
.more-button { border: 0; background: transparent; color: #9aa09c; padding: 5px; }
.imei-card { background: #edf8c7; border-color: #ddeaaf; position: relative; }
.imei-card::after { content: ""; position: absolute; right: -55px; top: -55px; width: 165px; height: 165px; border: 24px solid rgba(255,255,255,.25); border-radius: 50%; }
.imei-inner { padding: 23px; position: relative; z-index: 1; }
.imei-icon { width: 39px; height: 39px; background: var(--ink); color: var(--accent); border-radius: 12px; display: grid; place-items: center; margin-bottom: 29px; font-size: 18px; }
.imei-inner h2 { margin: 0 0 7px; font-size: 21px; letter-spacing: -.04em; }
.imei-inner > p { color: #66704a; font-size: 10px; line-height: 1.55; margin: 0 0 15px; max-width: 300px; }
.imei-form { display: flex; padding: 4px; background: #fff; border-radius: 11px; position: relative; }
.imei-form input { width: 100%; border: 0; outline: 0; padding: 0 10px; font-size: 11px; letter-spacing: .06em; min-width: 0; }
.imei-form button { width: 40px; height: 36px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; }
.imei-hint { display: flex; gap: 6px; margin-top: 8px; color: #7b855c; font-size: 8px; }
.imei-result { background: rgba(255,255,255,.72); border-radius: 11px; padding: 12px; margin-top: 10px; font-size: 10px; line-height: 1.5; }
.bottom-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.65fr); gap: 17px; }
.stock-list { padding: 5px 16px 13px; }
.stock-row { display: grid; grid-template-columns: minmax(130px,1.5fr) 90px 1fr 60px; gap: 14px; align-items: center; border-bottom: 1px solid #eff1ee; padding: 11px 4px; font-size: 9px; }
.stock-row:last-child { border: 0; }
.stock-row strong { display: block; font-size: 10px; }
.stock-row small { color: var(--muted); font-size: 8px; }
.stock-bar { height: 4px; background: #ecefeb; border-radius: 99px; overflow: hidden; }
.stock-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent-deep); }
.stock-bar.danger i { background: #f28170; }
.reminders { padding: 8px 16px 14px; }
.reminder { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 10px 3px; border-bottom: 1px solid #eff1ee; }
.reminder:last-child { border: 0; }
.reminder-date { width: 34px; height: 38px; border: 1px solid var(--line); border-radius: 9px; display: grid; place-items: center; text-align: center; font-size: 7px; color: var(--muted); line-height: 1.1; }
.reminder-date strong { display: block; font-size: 13px; color: var(--ink); }
.reminder strong { display: block; font-size: 10px; margin-top: 2px; }
.reminder small { display: block; color: var(--muted); font-size: 8px; margin-top: 4px; }
.table-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-toolbar { padding: 15px 18px; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.filter-search { min-width: 240px; max-width: 380px; flex: 1; height: 38px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 8px; padding: 0 11px; color: #999f9a; }
.filter-search input { border: 0; outline: 0; width: 100%; font-size: 10px; }
.filter-group { display: flex; gap: 8px; }
.filter-group select { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 0 11px; color: var(--muted); font-size: 9px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; background: #fafbf9; color: #969c97; font-size: 8px; letter-spacing: .08em; padding: 11px 17px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 14px 17px; border-bottom: 1px solid #eff1ee; font-size: 10px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfdfb; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.cell-main strong, .cell-main small { display: block; }
.cell-main small { color: var(--muted); margin-top: 3px; font-size: 8px; }
.product-thumb { width: 35px; height: 35px; border-radius: 9px; background: var(--canvas); display: grid; place-items: center; font-weight: 900; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }
.stock-pill { min-width: 54px; display: inline-flex; gap: 5px; align-items: center; }
.stock-pill.low { color: var(--red); font-weight: 700; }
.table-empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 11px; }
.mobile-cards { display: none; }
.report-placeholder { min-height: 420px; display: grid; place-items: center; text-align: center; padding: 50px; }
.report-placeholder .big-symbol { width: 72px; height: 72px; background: var(--canvas); border-radius: 22px; display: grid; place-items: center; font-size: 28px; margin: 0 auto 18px; }
.report-placeholder h2 { margin: 0 0 8px; font-size: 20px; }
.report-placeholder p { max-width: 390px; color: var(--muted); line-height: 1.6; font-size: 11px; }
.modal-backdrop, .command-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15,17,16,.48); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; }
[hidden] { display: none !important; }
.modal { width: min(650px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 21px; box-shadow: 0 30px 80px rgba(0,0,0,.23); }
.modal > header { position: sticky; top: 0; z-index: 2; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); display: flex; justify-content: space-between; align-items: center; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.modal h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.03em; }
.modal-body { padding: 22px 23px 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 9px; font-weight: 800; letter-spacing: .04em; color: #686e6a; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfa; outline: 0; padding: 0 12px; font-size: 11px; color: var(--ink); }
.field input, .field select { height: 42px; }
.field textarea { min-height: 85px; padding-top: 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #a8bd62; box-shadow: 0 0 0 3px rgba(224,249,103,.3); background: #fff; }
.field-help { color: var(--muted); font-size: 8px; margin-top: -2px; }
.form-section { grid-column: 1 / -1; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0 0 14px; font-size: 11px; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.command-backdrop { place-items: start center; padding-top: 12vh; }
.command-palette { width: min(620px, 100%); max-height: 65vh; overflow: hidden; background: #fff; border-radius: 17px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.command-input { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.command-input input { flex: 1; border: 0; outline: 0; font-size: 12px; }
.command-results { max-height: calc(65vh - 58px); overflow: auto; padding: 8px; }
.command-result { width: 100%; border: 0; background: transparent; border-radius: 10px; padding: 11px; text-align: left; display: flex; justify-content: space-between; align-items: center; }
.command-result:hover { background: var(--canvas); }
.command-result strong, .command-result small { display: block; }
.command-result strong { font-size: 11px; }
.command-result small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.command-kind { color: #8c938e; font-size: 8px; background: var(--canvas); padding: 4px 6px; border-radius: 6px; }
.notification-drawer { position: fixed; z-index: 110; width: min(370px, 100vw); height: 100vh; right: 0; top: 0; background: #fff; box-shadow: -20px 0 60px rgba(0,0,0,.14); transform: translateX(105%); transition: transform .25s ease; padding: 20px; }
.notification-drawer.open { transform: translateX(0); }
.notification-drawer > header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.notification-drawer h2 { margin: 4px 0 0; font-size: 20px; }
.drawer-item { padding: 15px 4px; border-bottom: 1px solid var(--line); }
.drawer-item strong { display: block; font-size: 11px; }
.drawer-item p { color: var(--muted); font-size: 9px; line-height: 1.5; margin: 5px 0 7px; }
.drawer-item time { color: var(--orange); font-size: 8px; font-weight: 800; }
.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { width: min(340px, calc(100vw - 40px)); background: var(--ink); color: #fff; border-radius: 12px; padding: 13px 15px; box-shadow: var(--shadow); font-size: 10px; animation: toast-in .22s ease; }
.toast.success { border-left: 4px solid var(--accent); }
.toast.error { border-left: 4px solid #f47666; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .bottom-grid { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: 39px minmax(0, 1fr) minmax(0, .95fr) max-content max-content 32px; }
}
@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .main-area { width: 100%; }
  .topbar { height: 62px; padding: 0 15px; }
  .menu-button { display: grid; }
  .breadcrumb span, .breadcrumb b, .search-button, .notification-button { display: none; }
  .content { padding: 24px 15px 50px; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 27px; }
  .data-table { display: none; }
  .mobile-cards { display: grid; gap: 10px; padding: 12px; }
  .mobile-card { border: 1px solid var(--line); border-radius: 12px; padding: 13px; display: grid; gap: 10px; }
  .mobile-card-top { display: flex; justify-content: space-between; gap: 10px; }
  .mobile-card strong, .mobile-card small { display: block; }
  .mobile-card small { color: var(--muted); margin-top: 3px; font-size: 8px; }
  .mobile-card-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 9px; }
  .filter-group { display: none; }
  .filter-search { min-width: 0; }
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 116px; padding: 15px; }
  .stat-value { font-size: 23px; }
  .page-heading { display: block; }
  .heading-actions { margin-top: 15px; }
  .order-row { grid-template-columns: 38px minmax(100px,1fr) 84px 20px; gap: 8px; }
  .order-row .order-device { display: none; }
  .stock-row { grid-template-columns: 1.5fr 65px 50px; }
  .stock-row .stock-bar { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full, .form-section, .form-actions { grid-column: 1; }
  .top-actions .primary-button { font-size: 0; width: 37px; padding: 0; }
  .top-actions .primary-button span { font-size: 16px; }
}

/* Cellf design system: accessible foundations and the complete product UI. */
html {
  color-scheme: light;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scrollbar-color: #cdd3ca transparent;
}

body {
  min-height: 100dvh;
  line-height: 1.5;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(224, 249, 103, .105), transparent 36%),
    var(--canvas);
}

::selection { color: var(--ink); background: rgba(224, 249, 103, .8); }
a { color: inherit; text-decoration-color: rgba(23, 26, 25, .24); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }

:focus-visible {
  outline: 3px solid rgba(168, 204, 47, .78);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip-link {
  position: fixed;
  z-index: 250;
  top: 10px;
  left: 12px;
  padding: 11px 15px;
  transform: translateY(-180%);
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

.app-shell { max-width: 100%; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }

/* Navigation */
.sidebar {
  isolation: isolate;
  width: var(--sidebar-width);
  height: 100dvh;
  padding: 22px 16px 16px;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(224, 249, 103, .085), transparent 43%),
    linear-gradient(175deg, #1b1e1c, #111412);
}

.sidebar-header { display: flex; align-items: center; min-width: 0; }
.sidebar-header .brand { flex: 1 1 auto; min-width: 0; }

.brand {
  position: relative;
  flex: 0 0 auto;
  margin: 0 0 7px;
  border: 1px solid rgba(224, 249, 103, .28);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .2);
}

.brand-logo { aspect-ratio: 16 / 5.5; }

.brand-caption {
  display: block;
  margin: 0 6px 17px;
  color: #abb3ad;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .035em;
  text-align: center;
}

.main-nav {
  flex: 1 1 auto;
  gap: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
  padding: 0 3px 12px 0;
}

.nav-group, .nav-section { display: grid; gap: 3px; margin: 0; }

.nav-label {
  margin: 17px 10px 7px;
  color: #9da69f;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.nav-group:first-child .nav-label { margin-top: 6px; }

.nav-item {
  min-height: 42px;
  padding: 0 11px;
  gap: 11px;
  color: #c0c7c2;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 530;
  transition: color .18s var(--ease-out), background .18s var(--ease-out), border-color .18s var(--ease-out);
}

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

.nav-item.active, .nav-item[aria-current="page"] {
  background: var(--accent);
  color: var(--ink);
  font-weight: 750;
  box-shadow: 0 5px 18px rgba(224, 249, 103, .13);
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  font-size: 18px;
  stroke-width: 1.75;
}

.nav-item em, .nav-badge {
  min-width: 23px;
  height: 21px;
  font-size: 10px;
  font-weight: 750;
}

.soon { color: #a4aca5; font-size: 9px; }

.sidebar-bottom {
  flex: 0 0 auto;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .075);
}

.user-card strong { font-size: 12px; }
.user-card small { color: #adb5af; font-size: 10px; }

.user-card {
  gap: 10px;
  padding: 10px 5px 0;
  border-top: 0;
  border-radius: 10px;
}

.user-card > span:nth-child(2) { min-width: 0; }
.user-card strong, .user-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; font-size: 11px; }
.sidebar-close { position: absolute; top: 15px; right: 14px; display: none; }
.sidebar-backdrop { display: none; margin: 0; padding: 0; border: 0; }

/* Workspace header and shared actions */
.main-area { min-width: 0; max-width: 100%; min-height: 100dvh; }

.topbar {
  height: var(--header-height);
  padding: 0 34px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px) saturate(150%);
}

.topbar-left, .topbar-right, .quick-actions, .page-actions, .heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-left { min-width: 0; gap: 14px; }
.top-actions { flex: 0 0 auto; gap: 10px; }
.mobile-brand { display: none; color: var(--ink); font-size: 15px; font-weight: 850; letter-spacing: -.06em; }
.breadcrumb { min-width: 0; gap: 9px; font-size: 12px; white-space: nowrap; }
.breadcrumb strong { overflow: hidden; font-weight: 700; text-overflow: ellipsis; }
.topbar-context { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-divider { width: 1px; height: 26px; background: var(--line); }

.search-button, .topbar-search {
  height: 40px;
  padding: 0 11px 0 13px;
  gap: 9px;
  color: #616a64;
  background: #fff;
  font-size: 12px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.search-button:hover, .topbar-search:hover { border-color: #b7c493; box-shadow: 0 0 0 3px rgba(224, 249, 103, .16); }
kbd { font-size: 10px; color: #666e68; }

.icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.icon-button:hover { background: #f6f8f3; border-color: #cbd2c8; }
.notification-button i { width: 9px; height: 9px; right: 7px; top: 7px; }

.primary-button, .secondary-button, .ghost-button, .danger-button, .quick-action {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform .18s var(--ease-out), background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.primary-button { background: var(--ink); box-shadow: 0 7px 18px rgba(23, 26, 25, .15); }
.primary-button:hover { background: #2d342e; box-shadow: 0 10px 23px rgba(23, 26, 25, .2); }
.primary-button.compact { height: 40px; min-height: 40px; }
.secondary-button { border: 1px solid #d3ed55; background: var(--accent); }
.secondary-button:hover { background: #e8fc86; transform: translateY(-1px); }
.ghost-button { border: 1px solid var(--line); }
.ghost-button:hover { border-color: #c7d1bd; background: #f8faf5; }
.danger-button:hover { background: #f9dddd; }
.text-button { border-radius: 7px; color: #333a35; font-size: 11px; }
.text-button:hover { background: #f2f5ee; }
.more-button { min-width: 32px; min-height: 32px; border-radius: 8px; color: #5f6861; font-size: 14px; }
.more-button:hover { background: #f0f3ed; color: var(--ink); }

/* Page layout and metrics */
.content { width: min(100%, 1560px); min-width: 0; max-width: 100%; padding: 37px 36px 76px; }
.page-heading, .page-header { margin-bottom: 26px; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-heading h1, .page-title {
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: clamp(27px, 3.1vw, 39px);
  font-weight: 780;
  letter-spacing: -.065em;
  line-height: 1.08;
}

.page-heading > div > p:last-child, .page-subtitle { margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow { color: #647069; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.page-actions, .heading-actions { flex-wrap: wrap; justify-content: flex-end; }

.stats-grid, .kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card, .kpi-card {
  position: relative;
  min-height: 148px;
  overflow: hidden;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, transform .2s var(--ease-out), box-shadow .2s ease;
}

.stat-card:hover, .kpi-card:hover { transform: translateY(-2px); border-color: #d5ddcc; box-shadow: var(--shadow); }

.stat-card.highlight, .kpi-card.highlight, .kpi-card.featured {
  color: #fff;
  background: radial-gradient(ellipse at 100% 0%, rgba(224, 249, 103, .13), transparent 48%), var(--ink);
  border-color: var(--ink);
}

.stat-top, .kpi-label { color: #5e6861; font-size: 10px; font-weight: 750; letter-spacing: .055em; }
.highlight .stat-top, .highlight .kpi-label, .featured .kpi-label { color: #ccd2cd; }
.stat-icon, .kpi-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #f1f4ed; color: var(--ink); font-size: 17px; }
.highlight .stat-icon, .highlight .kpi-icon { color: var(--ink); background: var(--accent); }
.stat-value, .kpi-value { display: block; margin: 14px 0 4px; overflow: hidden; font-size: clamp(24px, 2.4vw, 32px); font-weight: 760; letter-spacing: -.06em; text-overflow: ellipsis; white-space: nowrap; }
.stat-caption, .kpi-caption { color: #626c65; font-size: 11px; }
.highlight .stat-caption, .highlight .kpi-caption { color: #c0c8c1; }
.trend, .trend-up, .positive { color: var(--green); font-weight: 700; }
.trend-down, .negative, .text-danger { color: var(--red); font-weight: 700; }

.dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(305px, .85fr); gap: 19px; margin-bottom: 19px; }
.bottom-grid, .content-grid, .report-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(290px, .8fr); gap: 19px; }
.stats-grid > *, .kpi-grid > *, .dashboard-grid > *, .bottom-grid > *, .content-grid > *, .report-grid > * { min-width: 0; }

.card, .table-card, .section-card, .content-card, .detail-section, .settings-card, .report-card {
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-header, .section-header, .report-header, .settings-header {
  min-height: 71px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.card-header h2, .section-header h2, .report-header h2, .settings-header h2 { margin: 4px 0 0; font-size: 15px; font-weight: 720; letter-spacing: -.025em; }
.card-body, .section-body, .settings-body, .report-body { padding: 20px; }

/* Overview lists */
.orders-list { padding: 4px 11px 8px; }
.dashboard-grid > .card:first-child {
  container-name: dashboard-orders;
  container-type: inline-size;
}

.order-row {
  grid-template-columns: 39px minmax(0, 1fr) minmax(0, .95fr) max-content max-content 32px;
  column-gap: 12px;
  row-gap: 9px;
  min-width: 0;
  padding: 13px 9px;
  font-size: 12px;
}

.order-row > * { min-width: 0; }
.order-main, .order-device { min-width: 0; }
.order-main small, .order-device small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.order-row > .order-status, .order-row > .status {
  max-width: 100%;
  justify-self: start;
}

.order-row > .order-value, .order-row > .money {
  justify-self: end;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.order-row > .more-button { justify-self: end; }
.order-main strong, .order-device strong, .stock-row strong, .reminder strong { font-size: 12px; font-weight: 670; }
.order-main small, .order-device small, .stock-row small, .reminder small { color: #69736d; font-size: 10px; }
.device-thumb, .product-thumb { width: 39px; height: 39px; flex: 0 0 39px; border: 1px solid #edf0e9; background: #f4f6f1; border-radius: 11px; font-size: 12px; }
.order-row, .stock-row, .reminder, .activity-item, .timeline-item { transition: background .16s ease; }
.order-row:hover, .stock-row:hover, .reminder:hover { background: #fafbf8; }

.status, .status-badge, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 730;
  white-space: nowrap;
}

.status::before, .status-badge::before { width: 6px; height: 6px; }
.status.delivered, .badge-success, .status-badge.success { color: var(--green); background: var(--green-soft); }
.badge-warning, .status-badge.warning { color: #825c12; background: #fff5d9; }
.badge-danger, .status-badge.danger { color: var(--red); background: var(--red-soft); }
.badge-info, .status-badge.info { color: var(--blue); background: var(--blue-soft); }
.badge-neutral, .status-badge.neutral { color: #525b55; background: #f0f2ee; }
.badge-accent { color: #465818; background: #eef8c1; }

.inline-status {
  min-height: 35px;
  padding: 0 27px 0 10px;
  border: 1px solid #e0e5dc;
  border-radius: 9px;
  background: #fbfcfa;
  color: #38433b;
  font-size: 11px;
  font-weight: 600;
}

.imei-card {
  max-width: 100%;
  overflow: hidden;
  contain: paint;
  background: linear-gradient(145deg, #effacb, #e2f4a0);
  border-color: #d8e8a4;
}

.imei-card::after { top: 0; right: 0; width: 125px; height: 125px; border-width: 19px; opacity: .75; }
.imei-inner { min-width: 0; max-width: 100%; padding: 24px; }
.imei-icon { width: 44px; height: 44px; margin-bottom: 25px; font-size: 19px; }
.imei-inner h2 { font-size: 23px; }
.imei-inner > p { color: #4f5e32; font-size: 12px; line-height: 1.6; }
.imei-form { padding: 5px; box-shadow: 0 5px 19px rgba(59, 70, 34, .09); }
.imei-form input { font-size: 12px; }
.imei-form button { width: 42px; height: 39px; }
.imei-hint { color: #53623c; font-size: 10px; }
.imei-result { font-size: 11px; }
.stock-row {
  grid-template-columns: minmax(0, 1.5fr) max-content minmax(60px, 1fr) max-content;
  column-gap: 12px;
  row-gap: 8px;
  min-width: 0;
  padding: 12px 4px;
  font-size: 11px;
}

.stock-row > * { min-width: 0; }
.stock-row > div:first-child :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-row > .money { justify-self: end; white-space: nowrap; }
.stock-bar, .progress-bar { height: 6px; overflow: hidden; background: #ebefe7; border-radius: 999px; }
.progress-bar > i, .progress-bar > span, .progress-fill { display: block; height: 100%; background: var(--accent-deep); border-radius: inherit; }
.reminder-date { width: 38px; height: 42px; font-size: 9px; }
.reminder-date strong { font-size: 14px; }

/* Search, filters, tables, and empty states */
.table-card {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.data-table th .sr-only { top: 0; left: 0; }

.table-toolbar, .toolbar, .filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 75px;
  padding: 16px 18px;
}

.table-toolbar { position: sticky; left: 0; min-width: 0; border-bottom: 1px solid var(--line); }

.filter-search, .search-box {
  display: flex;
  align-items: center;
  flex: 1 1 260px;
  gap: 9px;
  min-width: 180px;
  max-width: 390px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #dfe4db;
  border-radius: 11px;
  background: #fbfcfa;
  color: #647069;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.filter-search:focus-within, .search-box:focus-within { border-color: #aebf75; background: #fff; box-shadow: 0 0 0 3px rgba(224, 249, 103, .2); }
.filter-search input, .search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-group select, .toolbar select, .filter-bar select { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #4e5951; font-size: 11px; }
.table-wrap, .table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.data-table { min-width: 760px; border-spacing: 0; }
.data-table[data-table="orders"], .data-table[data-table="payables"], .data-table[data-table="deliveries"] { min-width: 1030px; }
.data-table[data-table="customers"] { min-width: 890px; }
.data-table[data-table="products"], .data-table[data-table="services"] { min-width: 820px; }
.data-table th { padding: 13px 17px; background: #f8faf6; color: #58635b; font-size: 10px; font-weight: 750; letter-spacing: .075em; white-space: nowrap; }
.data-table td { padding: 15px 17px; color: #364039; font-size: 13px; line-height: 1.45; }
.data-table td > small, .data-table td small { color: #66716a; font-size: 10px; }
.data-table td.money { min-width: 108px; }
.data-table td > :is(.status, .status-badge, .badge) { max-width: 100%; }
.data-table .inline-status { min-width: 166px; max-width: 100%; }
.data-table tbody tr:hover { background: #f9fbf6; }
.cell-main { min-width: 170px; }
.cell-main strong { color: var(--ink); font-size: 12px; }
.cell-main small { font-size: 10px; }
.money { font-feature-settings: "tnum"; white-space: nowrap; }

.empty-state, .table-empty, .report-placeholder {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 190px;
  padding: 40px 22px;
  color: var(--muted);
  text-align: center;
}

.empty-state-icon, .empty-icon, .report-placeholder .big-symbol {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border: 1px solid #e8ece3;
  border-radius: 19px;
  background: #f2f5ed;
  color: #455046;
  font-size: 25px;
}

.empty-state h2, .empty-state h3, .empty-state strong { margin: 0; color: var(--ink); font-size: 16px; }
.empty-state p { max-width: 390px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.empty-state button { margin-top: 9px; }
.table-empty { min-height: 120px; font-size: 12px; }

/* Dialogs, forms, tabs, and detail views */
.modal-backdrop, .command-backdrop { background: rgba(12, 15, 12, .53); backdrop-filter: blur(7px); }
.modal { width: min(690px, 100%); max-height: min(820px, calc(100dvh - 40px)); border: 1px solid rgba(255, 255, 255, .78); border-radius: 23px; box-shadow: 0 35px 100px rgba(0, 0, 0, .3); }
.modal > header, .modal-header { min-height: 77px; padding: 18px 24px; }
.modal h2 { font-size: 22px; }
.modal-body { padding: 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 24px; border-top: 1px solid var(--line); }
.form-grid { gap: 17px; }
.field, .form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full, .form-field.full, .full-width { grid-column: 1 / -1; }
.field label, .form-field label { color: #48534b; font-size: 10px; font-weight: 750; letter-spacing: .035em; }

.field input, .field select, .field textarea,
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 0 12px;
  border: 1px solid #dfe4dc;
  border-radius: 10px;
  outline: 0;
  background: #fbfcfa;
  color: var(--ink);
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field input, .field select, .form-field input, .form-field select { min-height: 44px; }
.field textarea, .form-field textarea { min-height: 100px; padding-top: 11px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #a5ba64; box-shadow: 0 0 0 3px rgba(224, 249, 103, .27); background: #fff; }
.field input[type="checkbox"], .form-field input[type="checkbox"] { width: 16px; min-height: 16px; accent-color: #859e2d; }
.field input::placeholder, .field textarea::placeholder, .form-field input::placeholder { color: #818b83; }
.checkbox-field > span { display: flex; align-items: center; gap: 9px; min-height: 31px; color: #404a43; font-size: 12px; }
.checkbox-field input[type="checkbox"] { flex: 0 0 auto; }
.field-help, .field-error { color: #616b64; font-size: 10px; }
.field-error { color: var(--red); }
.form-section h3 { margin-bottom: 3px; font-size: 12px; }
.form-actions { gap: 9px; padding-top: 11px; }

select:not([multiple]) {
  appearance: none;
  padding-right: 37px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23636d65' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

select:not([multiple]):hover { border-color: #b9c498; background-color: #fff; }
select:not([multiple]):focus-visible { border-color: #a5ba64; box-shadow: 0 0 0 3px rgba(224, 249, 103, .27); }

@supports (appearance: base-select) {
  select:not([multiple]), ::picker(select) { appearance: base-select; }
  select:not([multiple]) { align-items: center; justify-content: space-between; gap: 10px; padding-right: 12px; background-image: none; }
  select:not([multiple])::picker-icon {
    display: grid;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    align-self: center;
    place-items: center;
    color: #687268;
    line-height: 1;
    transition: rotate .18s ease;
  }
  select:not([multiple]):open::picker-icon { rotate: 180deg; }

  ::picker(select) {
    max-height: min(320px, 50dvh);
    padding: 7px;
    border: 1px solid #e3e8df;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(34, 42, 34, .14), 0 4px 12px rgba(34, 42, 34, .08);
    color: #39443c;
    scrollbar-width: none;
  }

  select:not([multiple]) option {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    background: transparent;
    color: #4b554e;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
  }

  select:not([multiple]) option:hover,
  select:not([multiple]) option:focus-visible { outline: 0; background: #f2f5ee; color: var(--ink); }
  select:not([multiple]) option:checked { background: #eff6d8; color: #405015; font-weight: 680; }
  select:not([multiple]) option::checkmark { order: 1; margin-left: auto; color: #627a20; }
  select:not([multiple]) option:disabled { color: #9aa29b; cursor: not-allowed; }
}

.tabs, .tab-list {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf6;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar, .tab-list::-webkit-scrollbar { display: none; }

.tab, .tab-button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #626c65;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.tab:hover, .tab-button:hover { color: var(--ink); background: #edf0e9; }
.tab.active, .tab-button.active, .tab[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(23, 26, 25, .09); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-section { padding: 18px; }
.detail-section h3 { margin: 0 0 13px; font-size: 13px; }
.detail-label { color: var(--muted); font-size: 10px; }
.detail-value { margin-top: 3px; color: var(--ink); font-size: 13px; font-weight: 650; }

/* Customer profiles, activity, and timelines */
.customer-grid, .customers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 15px; }
.customer-card { display: grid; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.customer-card:hover { border-color: #d3ddc3; box-shadow: var(--shadow-sm); }
.customer-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 15px; }
.customer-header, .customer-identity { display: flex; align-items: center; gap: 12px; }
.customer-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: #eef7cf; color: #425416; font-size: 13px; font-weight: 780; }
.customer-name { margin: 0; font-size: 13px; font-weight: 720; }
.customer-meta, .customer-detail { color: var(--muted); font-size: 11px; }
.mobile-card .customer-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mobile-card .customer-meta > div { min-width: 0; }
.customer-stats { display: flex; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.customer-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.customer-metrics strong { display: block; font-size: 14px; }
.customer-metrics span, .customer-metrics small { color: var(--muted); font-size: 10px; }
.customer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.customer-detail { display: grid; gap: 17px; color: var(--ink); font-size: 13px; }
.customer-profile { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e8ece3; border-radius: 14px; background: #fafbf8; }
.customer-profile > div { min-width: 0; flex: 1 1 auto; }
.customer-profile > div strong, .customer-profile > div small { display: block; }
.customer-profile > div strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.customer-profile > div small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.customer-profile > .status { flex: 0 0 auto; }
.customer-detail .detail-section > p { margin: 0; color: #566159; font-size: 12px; line-height: 1.6; }
.address-form-heading { display: grid; gap: 4px; }
.address-form-heading h3 { margin: 0; }
.address-form-heading p { margin: 0; color: #66716a; font-size: 11px; line-height: 1.5; }
.fulfillment-address-fields { gap: 15px; padding: 17px; border: 1px solid #e4eadb; border-radius: 15px; background: #fafbf7; }
.fulfillment-address-fields[hidden] { display: none; }
.fulfillment-address-fields .form-section { margin-top: 0; }
.fulfillment-address-fields .form-grid { gap: 14px; }
.sale-delivery-address { display: grid; gap: 13px; padding: 13px; border: 1px solid #e3ead9; border-radius: 13px; background: #fafbf7; }
.sale-delivery-address .address-form-heading h3 { color: var(--ink); font-size: 12px; }
.sale-address-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.sale-address-grid .field label { font-size: 9px; }
.sale-address-grid .field input { min-height: 41px; padding-right: 9px; padding-left: 9px; font-size: 10px; }
.address-detail-section > small { display: block; margin-top: 4px; color: #647067; font-size: 10px; line-height: 1.5; }
.address-detail-section > p { margin: 0; color: #4e5951; font-size: 12px; line-height: 1.65; }
.delivery-address-cell { display: block; max-width: 270px; min-width: 190px; overflow-wrap: anywhere; line-height: 1.5; }
.delivery-mobile-card { gap: 10px; }
.delivery-mobile-address { margin: 0; color: #59645c; font-size: 11px; line-height: 1.55; }
.delivery-detail { display: grid; gap: 18px; }
.delivery-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid #e8ece3; border-radius: 14px; background: #fafbf8; }
.delivery-detail-heading > div { min-width: 0; }
.delivery-detail-heading > div > strong { font-size: 15px; }
.delivery-detail-heading > div > p { margin: 4px 0 0; color: #68736b; font-size: 10px; }

.activity-list, .timeline { display: grid; }
.activity-item, .timeline-item { position: relative; display: grid; grid-template-columns: 37px minmax(0, 1fr); gap: 11px; padding: 12px 0; }
.activity-list .activity-item { width: 100%; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid #eef0eb; background: transparent; text-align: left; }
.activity-list .activity-item:last-child { border-bottom: 0; }
.activity-list .activity-item:hover { background: #fafbf8; }
.activity-list .activity-item > span:first-child strong, .activity-list .activity-item > span:first-child small { display: block; }
.activity-list .activity-item > span:first-child strong { font-size: 12px; }
.activity-list .activity-item > span:first-child small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.activity-icon, .timeline-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #f0f3ed; color: #39433c; }
.activity-content strong, .timeline-content strong { display: block; font-size: 12px; }
.activity-content p, .timeline-content p { margin: 3px 0; color: var(--muted); font-size: 11px; }
.activity-time, .timeline-time { color: #68726c; font-size: 10px; }

/* Point-of-sale workspace */
.pos-layout, .pos-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(305px, .78fr); align-items: start; gap: 18px; }
.pos-catalog, .pos-products, .pos-cart, .pos-summary { min-width: 0; }
.pos-catalog, .pos-cart, .pos-summary { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.pos-search { padding: 15px 16px 0; }
.pos-search .search-box { max-width: none; }
.pos-products, .pos-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 11px; padding: 16px; }
.pos-product, .pos-product-card { display: grid; gap: 8px; min-height: 136px; padding: 13px; border: 1px solid #e9ede5; border-radius: 13px; background: #fafbf8; text-align: left; transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.pos-product:hover, .pos-product-card:hover { transform: translateY(-2px); border-color: #bacb84; background: #f8fbe9; }
.pos-product { position: relative; }
.pos-product-copy { min-width: 0; }
.pos-product-copy strong, .pos-product-copy small { display: block; }
.pos-product-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 690; text-overflow: ellipsis; white-space: nowrap; }
.pos-product-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.pos-product > .money { font-size: 14px; }
.pos-add { position: absolute; top: 14px; right: 12px; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: #edf4d6; color: #465825; font-size: 16px; }
.pos-product.is-unavailable { background: #f6f7f4; opacity: .58; }
.pos-product-name { font-size: 12px; font-weight: 700; }
.pos-product-price { color: var(--ink); font-size: 15px; font-weight: 750; }
.pos-product-stock, .pos-product-category { color: var(--muted); font-size: 10px; }
.pos-cart { position: sticky; top: calc(var(--header-height) + 17px); }
.pos-cart-header, .pos-summary-header { padding: 17px; border-bottom: 1px solid var(--line); }
.pos-cart-content { padding: 2px 15px 17px; }
.pos-cart-items { display: grid; max-height: 350px; overflow-y: auto; padding: 5px 15px; }
.pos-cart-item, .cart-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pos-cart-item:last-child, .cart-item:last-child { border-bottom: 0; }
.cart-item-info { min-width: 0; }
.cart-item-info strong, .cart-item-info small { display: block; }
.cart-item-info strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-info small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.cart-item-actions { display: flex; align-items: center; gap: 4px; }
.cart-item > .money { grid-column: 2; justify-self: end; font-size: 12px; }
.cart-fields { display: grid; gap: 13px; padding-top: 15px; }
.pos-item-name, .cart-item-name { font-size: 12px; font-weight: 650; }
.pos-item-meta, .cart-item-meta { color: var(--muted); font-size: 10px; }
.pos-quantity, .quantity-control { display: inline-flex; align-items: center; gap: 9px; }
.pos-quantity button, .quantity-control button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pos-total, .cart-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-top: 1px solid var(--line); }
.pos-total strong, .cart-total strong { font-size: 19px; letter-spacing: -.04em; }
.pos-actions { display: grid; gap: 8px; padding: 0 17px 17px; }
.pos-checkout { width: 100%; min-height: 47px; display: inline-flex; margin-top: 14px; padding: 0 17px; }
.stripe-checkout-button { background: linear-gradient(135deg, #635bff, #4f46e5); color: #fff; box-shadow: 0 12px 28px rgba(99, 91, 255, .25); }
.stripe-checkout-button:hover { box-shadow: 0 16px 34px rgba(99, 91, 255, .32); transform: translateY(-1px); }
.stripe-payment-help { display: block; margin-top: 7px; color: var(--muted); line-height: 1.45; }
.stripe-payment-error { border-color: rgba(214, 66, 66, .28); background: rgba(214, 66, 66, .06); }
.cart-summary { display: grid; gap: 10px; padding: 15px 17px; border-top: 1px solid var(--line); }
.cart-summary > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 10px; min-width: 0; color: #566058; font-size: 12px; }
.cart-summary > div > strong { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-summary > div:last-child { padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 750; }
.payment-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.payment-method { min-height: 39px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #4e5851; font-size: 11px; }
.payment-method:hover { border-color: #bdcc94; }
.payment-method.active, .payment-method[aria-pressed="true"] { border-color: #a9bf67; background: #f2f8da; color: var(--ink); font-weight: 700; }
.sale-history {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  max-width: 100%;
  margin-top: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.sale-history > .card-header { position: sticky; left: 0; min-width: 0; }
.sale-history > .data-table { min-width: 960px; }
.receipt { display: grid; gap: 11px; padding: 19px; border: 1px dashed #d7ddd0; border-radius: 13px; background: #fcfcfa; }
.receipt-row { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }

.order-detail { display: grid; gap: 18px; }
.order-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 16px; border: 1px solid #e9ece5; border-radius: 14px; background: #fafbf8; }
.order-detail-header > div { min-width: 0; }
.order-detail-header h3 { margin: 10px 0 4px; color: var(--ink); font-size: 17px; letter-spacing: -.025em; }
.order-detail-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.order-detail-value { flex: 0 0 auto; font-size: 17px; letter-spacing: -.04em; white-space: nowrap; }
.order-detail .detail-section > p { margin: 0; color: #566159; font-size: 12px; line-height: 1.6; }
.order-detail .detail-section > small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
.reminder-callout { border-color: #f0ddb1; background: #fff8e8; }
.reminder-callout h3 { color: #805717; }

/* Service-order boards */
.kanban-board, .kanban-grid { display: grid; grid-template-columns: repeat(4, minmax(245px, 1fr)); align-items: start; gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.kanban-column { min-height: 300px; padding: 11px; border: 1px solid #e5e9e1; border-radius: 16px; background: #eef1eb; }
.kanban-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 3px 12px; }
.kanban-header h3, .kanban-title { margin: 0; font-size: 12px; font-weight: 750; }
.kanban-count { min-width: 23px; height: 22px; display: grid; place-items: center; border-radius: 8px; background: #fff; color: #566058; font-size: 10px; font-weight: 700; }
.kanban-cards, .kanban-list { display: grid; gap: 9px; }
.kanban-card { display: grid; gap: 9px; padding: 13px; border: 1px solid #e5e8e1; border-radius: 12px; background: #fff; box-shadow: 0 2px 6px rgba(23, 26, 25, .035); }
.kanban-card:hover { border-color: #cbd5b5; box-shadow: var(--shadow-sm); }
.kanban-card-header, .kanban-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.kanban-card-title { font-size: 12px; font-weight: 700; }
.kanban-card-meta, .kanban-card-subtitle { color: var(--muted); font-size: 10px; }

/* Appointment calendar */
.calendar-layout, .agenda-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .7fr); gap: 18px; }
.calendar-card, .calendar-sidebar { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.calendar-title { margin: 0; font-size: 15px; font-weight: 720; text-transform: capitalize; }
.calendar-nav { display: flex; gap: 7px; }
.calendar-controls { display: flex; align-items: center; flex: 0 0 auto; gap: 7px; }
.calendar-controls .icon-button { width: 35px; height: 35px; flex-basis: 35px; font-size: 20px; }
.calendar-weekdays, .calendar-grid, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays > * { padding: 12px 4px; color: #5f6a62; font-size: 10px; font-weight: 730; text-align: center; }
.calendar-weekday { padding: 12px 4px; color: #5f6a62; font-size: 10px; font-weight: 730; text-align: center; }
.calendar-day { position: relative; display: grid; align-content: start; gap: 4px; min-width: 0; min-height: 85px; padding: 8px; border: 0; border-top: 1px solid #eef0eb; border-left: 1px solid #eef0eb; background: #fff; text-align: left; appearance: none; }
.calendar-day:nth-child(7n + 1) { border-left: 0; }
.calendar-day:hover { background: #f9fbf4; }
.calendar-day.today, .calendar-day.is-today { background: #f4f9e2; }
.calendar-day.muted, .calendar-day.outside, .calendar-day.is-outside { color: #8b948d; background: #fafbf9; }
.calendar-day.is-selected { z-index: 1; box-shadow: inset 0 0 0 2px #a6bd62; }
.calendar-date, .calendar-day-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; font-size: 11px; }
.calendar-day.today .calendar-date, .calendar-day.is-today .calendar-day-number { background: var(--ink); color: var(--accent); font-weight: 750; }
.calendar-event { overflow: hidden; padding: 3px 5px; border-radius: 5px; background: #eaf2de; color: #40502a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.warning { background: var(--orange-soft); color: var(--orange); }
.calendar-event.info { background: var(--blue-soft); color: var(--blue); }
.calendar-event-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--accent-deep); }
.calendar-day .calendar-event-dot + .calendar-event-dot { margin-left: 3px; }
.calendar-event-dot.event-repair { background: #658ac1; }
.calendar-event-dot.event-delivery { background: #4d986d; }
.calendar-event-dot.event-reminder { background: #d59a36; }
.calendar-event-dot.event-payment { background: #bf6666; }
.calendar-day-events { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; min-height: 9px; }
.calendar-day-events .calendar-event-dot + .calendar-event-dot { margin-left: 0; }
.calendar-day-events small { color: var(--muted); font-size: 9px; }
.calendar-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 15px; padding: 15px 16px; border-top: 1px solid var(--line); }
.calendar-legend > span { display: inline-flex; align-items: center; gap: 6px; color: #58635c; font-size: 10px; }
.calendar-agenda, .calendar-events { display: grid; padding: 7px 15px; }
.calendar-agenda-item { display: grid; grid-template-columns: 45px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.calendar-agenda-item:last-child { border-bottom: 0; }
.calendar-time { color: #556058; font-size: 10px; font-weight: 700; }
.agenda-list { display: grid; gap: 0; padding: 5px 15px; }
.agenda-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: start; gap: 9px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.agenda-item:last-child { border-bottom: 0; }
.agenda-time { color: #526048; font-size: 11px; font-weight: 750; }
.agenda-item strong { display: block; font-size: 12px; }
.agenda-item small, .agenda-item p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.agenda-item-content { min-width: 0; }
.agenda-item-content small { display: block; }
.agenda-item-content .status { margin-top: 7px; }
.agenda-item-actions { display: flex; align-items: center; gap: 2px; }
.agenda-item-actions .more-button { min-width: 29px; min-height: 29px; padding: 3px; }
.agenda-item.is-done .agenda-item-content > strong { color: #66716a; }

/* Reports and data visualization */
.reports-grid, .report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.report-card.wide, .report-card.full, .chart-card.wide { grid-column: 1 / -1; }
.report-card, .chart-card { min-width: 0; }
.report-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 17px; }
.report-priority { margin-bottom: 20px; overflow: hidden; border: 1px solid rgba(0, 174, 239, .2); border-radius: 22px; background: linear-gradient(145deg, rgba(0, 174, 239, .07), rgba(217, 241, 90, .08) 52%, #fff 100%); box-shadow: var(--shadow-sm); }
.report-priority-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 19px 20px 14px; }
.report-priority-heading h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.035em; }
.report-priority-heading > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.report-priority-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 0 12px 12px; }
.report-priority-card { min-width: 0; min-height: 142px; padding: 17px; border: 1px solid rgba(0, 174, 239, .16); border-radius: 16px; background: rgba(255, 255, 255, .9); box-shadow: 0 8px 24px rgba(13, 24, 31, .055); transition: transform .2s var(--ease-out), border-color .2s ease, box-shadow .2s ease; }
.report-priority-card:hover { transform: translateY(-2px); border-color: rgba(0, 174, 239, .42); box-shadow: 0 12px 28px rgba(13, 24, 31, .09); }
.report-priority-card.is-primary { grid-column: span 2; color: #fff; border-color: #000; background: radial-gradient(ellipse at 100% 0%, rgba(0, 174, 239, .28), transparent 47%), radial-gradient(ellipse at 0% 100%, rgba(217, 241, 90, .15), transparent 50%), #000; }
.report-priority-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #53605a; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.report-priority-card.is-primary > div { color: #c9d2cd; }
.report-priority-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: #006f99; background: var(--blue-soft); font-size: 15px; }
.report-priority-card.is-primary .report-priority-icon { color: #000; background: var(--accent); }
.report-priority-card > strong { display: block; margin: 18px 0 5px; overflow: hidden; color: var(--ink); font-size: clamp(23px, 2.25vw, 32px); font-weight: 790; letter-spacing: -.06em; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.report-priority-card.is-primary > strong { color: #fff; font-size: clamp(28px, 2.8vw, 38px); }
.report-priority-card > small { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }
.report-priority-card.is-primary > small { color: #c1cac4; }
.report-support-grid .stat-card { min-height: 126px; }
.report-body, .chart-body { min-height: 230px; padding: 19px; }
.report-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 15px 19px; }
.card.report-summary { display: block; padding: 0; }
.report-metric-label { color: var(--muted); font-size: 10px; }
.report-metric-value { display: block; margin-top: 4px; font-size: 19px; font-weight: 740; letter-spacing: -.045em; }
.chart, .chart-container, .bar-chart { min-height: 215px; }
.report-chart { min-width: 0; min-height: 230px; padding: 0; }
.chart-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 215px; padding: 19px 15px 0; }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; padding: 24px 4px 27px; }
.chart-bar, .bar-chart-item { position: relative; flex: 1 1 0; min-width: 13px; min-height: 5px; border-radius: 7px 7px 2px 2px; background: linear-gradient(to top, #a8c932, #e0f967); }
.chart-bars .chart-bar { display: grid; align-content: end; justify-items: center; gap: 6px; height: 178px; background: transparent; }
.chart-bar-track { width: min(100%, 38px); height: 125px; display: flex; align-items: flex-end; }
.chart-bar-fill { width: 100%; min-height: 5px; display: block; border-radius: 7px 7px 2px 2px; background: linear-gradient(to top, #a8c932, #e0f967); }
.chart-bar-value { width: 100%; min-height: 13px; overflow: hidden; color: #647069; font-size: 8px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.chart-bars .chart-bar > small { color: #68716a; font-size: 10px; }
.chart-caption { padding: 12px 17px 16px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.chart-bar:hover, .bar-chart-item:hover { filter: brightness(.92); }
.chart-label { position: absolute; right: 0; bottom: -21px; left: 0; color: #66706a; font-size: 9px; text-align: center; white-space: nowrap; }
.chart-grid { display: grid; gap: 8px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: #59635d; font-size: 10px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--accent-deep); }
.report-list, .ranking-list { display: grid; gap: 1px; }
.report-list-item, .ranking-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.report-list-item:last-child, .ranking-item:last-child { border-bottom: 0; }
.report-breakdown { display: grid; gap: 14px; padding: 17px 19px; }
.breakdown-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; font-size: 12px; }
.breakdown-row strong { font-size: 12px; }
.breakdown-row.is-negative strong { color: var(--red); }
.breakdown-row.is-total { padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 750; }
.breakdown-row.is-total strong { font-size: 14px; }
.breakdown-item { display: grid; gap: 8px; }
.breakdown-row small { color: var(--muted); font-size: 10px; }
.breakdown-bar { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 999px; background: #edf0e9; }
.breakdown-bar > *, .breakdown-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent-deep); }

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

.settings-layout.settings-tabs-layout, .settings-layout.settings-tab-layout {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 17px;
  min-width: 0;
  max-width: 100%;
}

.settings-tabs {
  position: sticky;
  z-index: 9;
  top: calc(var(--header-height) + 9px);
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(11px);
  scrollbar-width: none;
  scroll-padding-inline: 7px;
  scroll-snap-type: x proximity;
}

.settings-tabs::-webkit-scrollbar { display: none; }

.settings-tabs .settings-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #526056;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: -.01em;
  text-align: center;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.settings-tabs .settings-tab:hover { background: #f0f4ea; color: var(--ink); }

.settings-tabs .settings-tab[aria-selected="true"],
.settings-tabs .settings-tab.active {
  border-color: #d3e95d;
  background: var(--accent);
  color: var(--ink);
  font-weight: 760;
  box-shadow: 0 4px 13px rgba(162, 188, 53, .17);
}

.settings-tabs .settings-tab:focus-visible {
  z-index: 1;
  outline: 3px solid rgba(139, 169, 39, .74);
  outline-offset: -2px;
}

.settings-tabs .settings-tab > :first-child { flex: 0 0 auto; }
.settings-tab-icon { width: 17px; height: 17px; display: grid; place-items: center; flex: 0 0 auto; font-size: 15px; }

.settings-tab-content {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.settings-tab-content > [role="tabpanel"] { min-width: 0; max-width: 100%; }
.settings-tab-content > [role="tabpanel"][hidden] { display: none !important; }
.settings-tab-content > .settings-actions.company-savebar { margin-top: 1px; }

.settings-nav { position: sticky; top: calc(var(--header-height) + 17px); display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.settings-nav-item, .settings-tab { min-height: 39px; display: flex; align-items: center; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: #566058; font-size: 11px; font-weight: 600; text-align: left; text-decoration: none; }
.settings-nav-item:hover, .settings-tab:hover { background: #f1f4ed; }
.settings-nav-item.active, .settings-tab.active { color: var(--ink); background: #edf6cc; font-weight: 720; }
.settings-content { display: grid; gap: 16px; min-width: 0; }
.settings-card { padding: 0; }
.settings-section { display: grid; gap: 14px; padding: 19px; }
.card.settings-section { gap: 0; padding: 0; scroll-margin-top: calc(var(--header-height) + 15px); }
.settings-section + .settings-section { border-top: 1px solid var(--line); }
.settings-section h3 { margin: 0; font-size: 13px; }
.settings-section > p, .settings-description { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 19px; }
.settings-notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #dfebba; border-radius: 11px; background: #f4f9e6; color: #47552d; font-size: 12px; line-height: 1.55; }
.settings-notice > span { flex: 0 0 auto; font-size: 15px; }
.settings-notice strong { display: block; color: #394723; font-size: 12px; }
.settings-notice p { margin: 5px 0 0; color: #536141; font-size: 11px; }
.settings-toggles { grid-template-columns: 1fr; }
.settings-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #edf0e9; cursor: pointer; }
.settings-toggle:last-child { border-bottom: 0; }
.settings-toggle strong, .settings-toggle small { display: block; }
.settings-toggle strong { color: var(--ink); font-size: 12px; }
.settings-toggle small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.settings-toggle input { width: 19px; height: 19px; flex: 0 0 auto; accent-color: #80992b; }
.settings-actions { display: flex; justify-content: flex-end; padding: 3px 0 10px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eff1ed; }
.settings-row:last-child { border-bottom: 0; }
.settings-row strong { display: block; font-size: 12px; }
.settings-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.toggle-switch { position: relative; width: 39px; height: 23px; border: 0; border-radius: 999px; background: #d9ded7; }
.toggle-switch::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; content: ""; transition: transform .18s ease; }
.toggle-switch.active, .toggle-switch[aria-checked="true"] { background: #a6c23e; }
.toggle-switch.active::after, .toggle-switch[aria-checked="true"]::after { transform: translateX(16px); }

/* Company profile, business identity, and secure document management. */
.company-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(285px, .78fr);
  align-items: start;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}

.company-layout > *, .company-content > *, .company-grid > * { min-width: 0; }

.company-hero {
  position: relative;
  isolation: isolate;
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  padding: 25px;
  border: 1px solid #242a25;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(224, 249, 103, .17), transparent 48%),
    linear-gradient(130deg, #202520, #141815 72%);
  box-shadow: 0 17px 40px rgba(23, 26, 25, .14);
  color: #fff;
}

.company-hero::after {
  position: absolute;
  z-index: -1;
  top: 16px;
  right: 15px;
  width: 115px;
  height: 115px;
  border: 1px solid rgba(224, 249, 103, .15);
  border-radius: 50%;
  content: "";
}

.company-hero-brand {
  display: flex;
  align-items: center;
  gap: 19px;
  min-width: 0;
}

.company-logo-preview {
  width: 166px;
  height: 83px;
  flex: 0 0 166px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(224, 249, 103, .57);
  border-radius: 15px;
  background: var(--accent);
  box-shadow: 0 9px 25px rgba(0, 0, 0, .2);
}

img.company-logo-preview, .company-logo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

img.company-logo-preview { width: 166px; flex-basis: 166px; }

.company-hero-copy { min-width: 0; flex: 1 1 auto; }
.company-hero-copy > :is(h1, h2, h3, strong) { display: block; margin: 3px 0 5px; color: #fff; font-size: clamp(21px, 2.15vw, 29px); font-weight: 770; letter-spacing: -.05em; line-height: 1.15; }
.company-hero-copy > :is(p, small, span) { display: block; margin: 0; color: #ced6cf; font-size: 13px; line-height: 1.55; }
.company-hero-copy > .eyebrow { margin-bottom: 5px; color: var(--accent); font-size: 10px; }

.company-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 19px;
}

.company-hero-meta > :is(span, small, div) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .065);
  color: #e4e9e4;
  font-size: 10px;
}

.company-content { display: grid; gap: 17px; min-width: 0; }
.company-section, .company-document-panel, .company-summary { min-width: 0; max-width: 100%; }
.company-section > .card-header, .company-document-panel > .card-header, .company-summary > .card-header { min-height: 72px; }

.company-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  min-width: 0;
  padding: 20px;
}

.company-grid .field, .company-grid .form-field { min-width: 0; }
.company-grid .field.full, .company-grid .form-field.full { grid-column: 1 / -1; }

.company-summary {
  position: sticky;
  top: calc(var(--header-height) + 17px);
  display: grid;
  gap: 0;
  align-self: start;
}

.company-summary-content, .company-summary-list { display: grid; gap: 0; padding: 4px 18px 12px; }

.company-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px 10px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid #edf0e9;
}

.company-summary > .company-summary-item { margin: 0 18px; }
.company-summary-item:last-child { border-bottom: 0; }
.company-summary-item > span, .company-summary-item > small { color: var(--muted); font-size: 11px; }
.company-summary-item > strong { min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 12px; font-weight: 690; text-align: right; }
.company-summary-item > div { min-width: 0; }
.company-summary-item > div strong, .company-summary-item > div small { display: block; }
.company-summary-item > div strong { overflow-wrap: anywhere; font-size: 12px; }
.company-summary-item > div small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.company-document-panel { overflow: hidden; }
.settings-content > .company-document-panel { scroll-margin-top: calc(var(--header-height) + 15px); }
.settings-content > .company-document-panel > .card-header { background: linear-gradient(115deg, #fff, #fbfcf7); }
.company-document-content { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.company-document-content > .document-upload, .company-document-content > .document-list { min-width: 0; padding: 0; }
.company-document-content > .company-privacy-note { grid-column: 1 / -1; margin: 0; }
.document-upload { display: grid; gap: 13px; min-width: 0; padding: 18px; }

.document-upload-zone {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 149px;
  overflow: hidden;
  padding: 20px 14px;
  border: 1.5px dashed #c8d2bb;
  border-radius: 15px;
  background: linear-gradient(145deg, #fbfcf8, #f5f8ef);
  color: #475248;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.document-upload-zone:hover, .document-upload-zone:focus-visible,
.document-upload-zone:focus-within, .document-upload-zone.is-dragover {
  border-color: #9eaf5c;
  background: #f4f8e7;
  box-shadow: 0 0 0 3px rgba(224, 249, 103, .17);
}

.document-upload-zone > :is(strong, b) { color: var(--ink); font-size: 13px; }
.document-upload-zone > :is(p, small, span) { max-width: 350px; margin: 0; color: #647067; font-size: 11px; line-height: 1.55; }
.document-upload-zone > span:not(.document-upload-icon) { min-width: 0; }
.document-upload-zone > span:not(.document-upload-icon) > strong { display: block; color: var(--ink); font-size: 12px; }
.document-upload-zone > span:not(.document-upload-icon) > small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.document-upload-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #e4eacb;
  border-radius: 12px;
  background: #edf5d2;
  color: #526426;
  font-size: 18px;
}

.document-upload-zone > .document-upload-icon { color: #526426; font-size: 18px; }

.document-upload-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(50%);
}

.document-upload-field { display: grid; gap: 7px; min-width: 0; }
.document-upload-field > label { color: #48534b; font-size: 10px; font-weight: 750; letter-spacing: .035em; }
.document-upload-field > :is(input, select) { width: 100%; min-width: 0; min-height: 43px; padding: 0 12px; border: 1px solid #dfe4dc; border-radius: 10px; outline: 0; background: #fbfcfa; color: var(--ink); font-size: 14px; }
.document-upload-field > :is(input, select):focus { border-color: #a5ba64; background: #fff; box-shadow: 0 0 0 3px rgba(224, 249, 103, .27); }
.document-file-status { min-height: 17px; color: var(--muted); font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.document-file-status.is-error { color: var(--red); }
.document-file-status.is-success { color: var(--green); }
.document-upload-button { width: 100%; }

.document-list { display: grid; min-width: 0; padding: 0 16px 14px; }

.document-item {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px 2px;
  border-bottom: 1px solid #edf0e9;
}

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

.document-icon {
  width: 41px;
  height: 41px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #e8ebdf;
  border-radius: 12px;
  background: #f2f5ed;
  color: #4c5a42;
  font-size: 17px;
}

.document-icon.pdf, .document-icon.document-pdf { color: #9c4242; background: #fceeee; border-color: #f3dddd; }
.document-icon.image, .document-icon.document-image { color: #33795a; background: #eaf5ed; border-color: #deede3; }
.document-icon.doc, .document-icon.document-doc { color: #386a9a; background: #edf3fa; border-color: #e0e9f4; }

.document-copy { min-width: 0; }
.document-copy > :is(strong, b) { display: block; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.document-copy > :is(small, p) { display: block; margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.document-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  min-width: 0;
  margin-top: 5px;
  color: #657068;
  font-size: 10px;
}

.document-meta > * { min-width: 0; }
.document-copy > .document-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.document-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #edf1e7;
  color: #4d5947;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.document-badge-pdf { background: #f9e8e8; color: #a14141; }
.document-badge-image { background: #e8f3ea; color: #34764d; }
.document-badge-doc { background: #eaf0f8; color: #396791; }

.document-actions { display: flex; align-items: center; gap: 4px; }
.document-actions :is(button, a) { min-width: 34px; min-height: 34px; }
.document-actions .icon-button { width: 34px; height: 34px; flex: 0 0 34px; }
.document-actions .danger-button, .document-actions .document-remove { color: var(--red); }
.document-actions .document-remove:hover { background: var(--red-soft); }

.document-progress { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 999px; background: #ecf0e7; }
.document-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent-deep); }
.document-upload-zone.is-uploading { cursor: progress; }
.document-list > .empty-state { min-height: 165px; padding: 25px 14px; }

.company-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e0e8ce;
  border-radius: 13px;
  background: #f5f8ec;
  color: #4e5d42;
  font-size: 11px;
  line-height: 1.6;
}

.company-privacy-note > :first-child { flex: 0 0 auto; }
.company-privacy-note > div { min-width: 0; }
.company-privacy-note strong { display: block; color: #3f4c32; font-size: 12px; }
.company-privacy-note p { margin: 4px 0 0; }
.company-document-panel > .company-privacy-note { margin: 0 18px 18px; }

.company-savebar {
  position: sticky;
  z-index: 4;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 9px 28px rgba(23, 26, 25, .085);
  backdrop-filter: blur(10px);
}

.company-savebar > :is(span, small, p) { min-width: 0; margin: 0; color: var(--muted); font-size: 11px; }
.settings-actions.company-savebar { justify-content: flex-end; }

/* Global search, notifications, and feedback */
.command-palette { width: min(640px, 100%); max-height: 68dvh; border-radius: 19px; }
.command-input { height: 63px; gap: 12px; padding: 0 18px; }
.command-input input { font-size: 14px; }
.command-results { max-height: calc(68dvh - 63px); padding: 9px; }
.command-result { min-height: 53px; padding: 11px 12px; }
.command-result strong { font-size: 12px; }
.command-result small, .command-kind { font-size: 10px; }
.notification-drawer {
  width: min(395px, 100vw);
  height: 100dvh;
  overflow-x: clip;
  overflow-y: auto;
  padding: 22px;
  transform: none;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  clip-path: inset(0 0 0 100%);
  transition: clip-path .24s var(--ease-out), opacity .18s ease, visibility .24s ease;
}

.notification-drawer.open {
  transform: none;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  clip-path: inset(0);
}
.notification-drawer h2 { font-size: 21px; }
.drawer-item { width: 100%; display: block; margin: 0; padding: 15px 6px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.drawer-item:hover { background: #f8faf6; }
.drawer-item strong { font-size: 12px; }
.drawer-item p { font-size: 11px; }
.drawer-item time { font-size: 10px; }
.toast-region, .toast-stack { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 9px; }
.toast { width: min(360px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 13px; font-size: 12px; }

.action-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  transition: border-color .18s ease, transform .18s ease;
}

.action-card:hover { transform: translateY(-1px); border-color: #bfcd99; }
.action-card strong { display: block; font-size: 12px; }
.action-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }

.content .quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; min-width: 0; max-width: 100%; margin-bottom: 20px; }
.content .quick-action { min-width: 0; min-height: 68px; display: grid; grid-template-columns: 33px minmax(0, 1fr); align-content: center; column-gap: 9px; row-gap: 2px; overflow-wrap: anywhere; border: 1px solid var(--line); background: #fff; color: var(--ink); text-align: left; white-space: normal; box-shadow: var(--shadow-sm); }
.content .quick-action > * { min-width: 0; }
.content .quick-action > span:first-child { grid-row: 1 / 3; width: 33px; height: 33px; display: grid; place-items: center; border-radius: 10px; background: #f0f4e9; color: #465632; font-size: 16px; }
.content .quick-action > strong { align-self: end; font-size: 12px; line-height: 1.3; }
.content .quick-action > small { align-self: start; overflow-wrap: normal; color: var(--muted); font-size: 10px; line-height: 1.3; }
.content .quick-action:hover { transform: translateY(-1px); border-color: #c2cd9e; background: #fcfdf9; }
.insight-grid, .summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.summary-card { padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.summary-card strong { display: block; margin-top: 4px; font-size: 20px; letter-spacing: -.04em; }
.summary-card small, .result-count { color: var(--muted); font-size: 11px; }
.result-count { align-self: center; white-space: nowrap; }
.segmented-control { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf6; }
.segment { min-height: 35px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: #58635b; font-size: 11px; font-weight: 650; }
.segment.active, .segment[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(23, 26, 25, .09); }
.inline-actions { display: inline-flex; align-items: center; gap: 5px; }
.icon-action { width: 33px; height: 33px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #536057; }
.icon-action:hover { border-color: #e4e8e0; background: #f3f5f0; }

/* Responsive layout: preserve complete functionality on touch devices. */
@media (max-width: 1280px) {
  :root { --sidebar-width: 254px; }
  .content { padding-right: 28px; padding-left: 28px; }
  .topbar { padding-right: 28px; padding-left: 28px; }
  .stats-grid, .kpi-grid { gap: 13px; }
  .stat-card, .kpi-card { padding: 17px; }
  .data-table th, .data-table td { padding-right: 12px; padding-left: 12px; }
  .topbar-context { display: none; }
  .company-layout { grid-template-columns: minmax(0, 1.3fr) minmax(255px, .8fr); gap: 16px; }
}

@media (max-width: 1080px) {
  .stats-grid, .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight-grid, .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .bottom-grid, .content-grid, .calendar-layout, .agenda-layout, .pos-layout, .pos-grid { grid-template-columns: 1fr; }
  .pos-cart { position: static; }
  .settings-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .order-row { grid-template-columns: 39px minmax(0, 1fr) minmax(0, .95fr) max-content max-content 32px; }
  .reports-grid, .report-grid { grid-template-columns: 1fr; }
  .report-priority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-priority-card.is-primary { grid-column: 1 / -1; }
  .report-card.wide, .report-card.full, .chart-card.wide { grid-column: auto; }
  .company-layout { grid-template-columns: 1fr; }
  .company-summary { position: static; }
  .company-summary-content, .company-summary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
  .company-document-content { grid-template-columns: 1fr; }
  .settings-layout.settings-tabs-layout, .settings-layout.settings-tab-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-tabs .settings-tab { min-height: 41px; padding: 0 12px; font-size: 11px; }
}

@media (max-width: 780px) {
  :root { --header-height: 66px; --sidebar-width: min(300px, 86vw); }
  body { min-width: min(320px, 100%); }
  .app-shell { display: block; }

  .sidebar {
    z-index: 70;
    padding-top: 49px;
    transform: translateX(-108%);
    transition: transform .24s var(--ease-out);
    box-shadow: 15px 0 45px rgba(0, 0, 0, .25);
  }

  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: grid; width: 31px; height: 31px; min-height: 31px; border-color: rgba(255, 255, 255, .17); background: rgba(255, 255, 255, .07); color: #fff; }
  .sidebar-close:hover { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .13); }
  .sidebar-backdrop { position: fixed; z-index: 60; inset: 0; display: block; background: rgba(14, 17, 14, .49); backdrop-filter: blur(3px); }
  .sidebar-backdrop[hidden] { display: none !important; }
  .main-area { width: 100%; }
  .topbar { height: var(--header-height); padding: 0 15px; }
  .topbar-left { gap: 10px; }
  .menu-button { display: grid; }
  .mobile-brand { display: block; }
  .breadcrumb { max-width: 160px; }
  .breadcrumb > span, .breadcrumb > b { display: none; }
  .breadcrumb strong { display: block; max-width: 145px; font-size: 11px; }
  .search-button { display: none; }
  .topbar-divider { display: none; }
  .notification-button { display: grid; }
  .top-actions { gap: 7px; }
  .topbar-cta { display: none; }
  .content { padding: 25px 16px 60px; }
  .page-heading, .page-header { align-items: flex-start; gap: 15px; }
  .page-heading h1, .page-title { font-size: 29px; }
  .page-heading > div > p:last-child, .page-subtitle { font-size: 12px; }
  .heading-actions, .page-actions { gap: 7px; }
  .data-table { display: none; }
  .table-wrap .data-table, .table-scroll .data-table { display: table; min-width: 650px; }
  .mobile-cards { display: grid; gap: 10px; padding: 12px; }
  .mobile-card { display: grid; gap: 11px; padding: 14px; border: 1px solid #e5e9e2; border-radius: 13px; background: #fff; }
  .mobile-card-top { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
  .mobile-card-top > :first-child { min-width: 0; }
  .mobile-card-top > :first-child > :is(strong, small) { overflow-wrap: anywhere; }
  .mobile-card-top > .more-button { flex: 0 0 auto; }
  .mobile-card strong, .mobile-card small { display: block; }
  .mobile-card strong { color: var(--ink); font-size: 12px; }
  .mobile-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
  .mobile-card-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 12px;
    min-width: 0;
    font-size: 11px;
  }

  .mobile-card-bottom > :is(.status, .status-badge, .badge) { max-width: 100%; }
  .mobile-card-bottom > .money, .mobile-card-bottom > strong:last-child {
    flex: 0 0 auto;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .table-toolbar, .toolbar, .filter-bar { align-items: stretch; flex-wrap: wrap; gap: 9px; padding: 13px; }
  .filter-search, .search-box { min-width: 0; max-width: none; }
  .filter-group { display: flex; flex: 1 1 100%; }
  .filter-group select { flex: 1 1 auto; min-height: 38px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-layout.settings-tabs-layout, .settings-layout.settings-tab-layout { gap: 14px; }
  .settings-tabs { top: calc(var(--header-height) + 7px); gap: 4px; padding: 6px; border-radius: 14px; }
  .settings-tabs .settings-tab { min-height: 40px; padding: 0 11px; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-nav-item, .settings-tab { flex: 0 0 auto; white-space: nowrap; }
  .calendar-day { min-height: 69px; padding: 6px 4px; }
  .calendar-event { padding: 2px 3px; font-size: 8px; }
  .calendar-legend { gap: 8px 12px; padding: 12px; }
  .kanban-board, .kanban-grid { grid-template-columns: repeat(4, 250px); }
  .company-hero { padding: 20px; border-radius: 18px; }
  .company-hero-brand { gap: 14px; }
  .company-logo-preview, img.company-logo-preview { width: 137px; height: 70px; flex-basis: 137px; }
  .company-hero-copy > :is(h1, h2, h3, strong) { font-size: 23px; }
  .company-grid { padding: 17px; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 11px; }
  .topbar-left { gap: 7px; }
  .mobile-brand { font-size: 13px; }
  .breadcrumb strong { max-width: 106px; }
  .content { padding: 22px 12px 54px; }
  .page-heading, .page-header { display: block; margin-bottom: 20px; }
  .page-heading h1, .page-title { font-size: 27px; }
  .heading-actions, .page-actions { justify-content: flex-start; margin-top: 14px; }
  .heading-actions button, .page-actions button { flex: 1 1 auto; min-height: 40px; padding: 0 10px; font-size: 11px; }
  .stats-grid, .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .report-priority-heading { align-items: flex-start; padding: 16px 14px 12px; }
  .report-priority-heading > span { display: none; }
  .report-priority-grid { grid-template-columns: 1fr; gap: 9px; padding: 0 9px 9px; }
  .report-priority-card, .report-priority-card.is-primary { grid-column: auto; min-height: 122px; padding: 14px; }
  .report-priority-card > strong { margin-top: 14px; }
  .stat-card, .kpi-card { min-height: 132px; padding: 13px; border-radius: 15px; }
  .stat-top, .kpi-label { font-size: 9px; }
  .stat-icon, .kpi-icon { width: 28px; height: 28px; font-size: 15px; }
  .stat-value, .kpi-value { margin-top: 12px; font-size: 23px; }
  .stat-caption, .kpi-caption { font-size: 10px; }
  .card, .table-card, .section-card, .content-card { border-radius: 16px; }
  .card-header, .section-header, .report-header, .settings-header { min-height: 64px; padding: 13px 14px; }
  .card-header h2, .section-header h2 { font-size: 13px; }
  .order-row { column-gap: 10px; row-gap: 8px; padding: 11px 3px; }
  .order-row .order-device { display: none; }
  .device-thumb { width: 34px; height: 34px; }
  .status, .status-badge { gap: 4px; padding: 5px 6px; font-size: 9px; }
  .stock-row { grid-template-columns: minmax(0, 1fr) max-content max-content; column-gap: 10px; row-gap: 8px; }
  .stock-row > div:first-child { min-width: 0; }
  .stock-row > div:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stock-row .stock-bar { display: none; }
  .imei-inner { padding: 19px; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid { padding: 15px; }
  .settings-tabs { gap: 3px; padding: 5px; scroll-padding-inline: 5px; }
  .settings-tabs .settings-tab { gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 9px; font-size: 10px; }
  .settings-tab-icon { width: 15px; height: 15px; font-size: 13px; }
  .customer-profile { gap: 9px; padding: 11px; }
  .customer-profile > div strong { font-size: 12px; }
  .fulfillment-address-fields { padding: 13px; }
  .sale-address-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-detail-heading { align-items: flex-start; }
  .order-detail-header { display: grid; gap: 10px; padding: 13px; }
  .order-detail-value { font-size: 16px; }
  .field.full, .form-field.full, .form-section, .form-actions { grid-column: 1; }
  .form-actions, .modal-footer { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 88dvh; border-radius: 22px 22px 0 0; }
  .modal > header, .modal-header { min-height: 70px; padding: 15px 17px; }
  .modal-body { padding: 19px 17px 26px; }
  .command-backdrop { padding: 12px; padding-top: 11dvh; }
  .notification-drawer { width: 100vw; padding: 18px; }
  .pos-products, .pos-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
  .pos-product, .pos-product-card { min-height: 130px; padding: 11px; }
  .pos-product-copy strong { font-size: 11px; }
  .calendar-header { padding: 14px 11px; }
  .calendar-day { min-height: 57px; padding: 5px 2px; }
  .calendar-weekdays > * { padding: 10px 1px; font-size: 9px; }
  .calendar-event { overflow: hidden; width: 8px; height: 8px; padding: 0; border-radius: 50%; color: transparent; }
  .calendar-legend > span { font-size: 9px; }
  .chart-bars { gap: 5px; padding-right: 9px; padding-left: 9px; }
  .chart-bar-track { width: min(100%, 29px); }
  .chart-bar-value { font-size: 7px; }
  .report-summary { grid-template-columns: 1fr; }
  .customer-list { grid-template-columns: 1fr; }
  .content .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .content .quick-action { min-height: 64px; grid-template-columns: 28px minmax(0, 1fr); column-gap: 7px; padding: 8px; font-size: 11px; }
  .content .quick-action > span:first-child { width: 28px; height: 28px; font-size: 14px; }
  .content .quick-action > strong { font-size: 11px; }
  .content .quick-action > small { font-size: 9px; }
  .toast-region, .toast-stack { right: 10px; bottom: 12px; }
  .top-actions .topbar-cta { display: none; }
  .company-layout, .company-content { gap: 13px; }
  .company-hero { padding: 17px; }
  .company-hero-brand { align-items: flex-start; gap: 12px; }
  .company-logo-preview, img.company-logo-preview { width: 104px; height: 59px; flex-basis: 104px; border-radius: 11px; }
  .company-hero-copy > :is(h1, h2, h3, strong) { font-size: 20px; }
  .company-hero-copy > :is(p, small, span) { font-size: 11px; }
  .company-hero-meta { gap: 6px; margin-top: 14px; }
  .company-hero-meta > :is(span, small, div) { max-width: 100%; font-size: 9px; }
  .company-grid { grid-template-columns: 1fr; gap: 14px; padding: 15px; }
  .company-grid .field.full, .company-grid .form-field.full { grid-column: 1; }
  .company-summary-content, .company-summary-list { grid-template-columns: 1fr; }
  .document-upload { gap: 10px; padding: 14px; }
  .document-upload-zone { min-height: 125px; padding: 15px 10px; }
  .document-list { padding: 0 11px 10px; }
  .document-item { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 7px; padding: 11px 0; }
  .document-icon { width: 35px; height: 35px; border-radius: 10px; font-size: 15px; }
  .document-copy > :is(strong, b) { font-size: 11px; }
  .document-meta { gap: 4px; font-size: 9px; }
  .document-actions { gap: 1px; }
  .document-actions :is(button, a) { min-width: 30px; min-height: 30px; }
  .document-actions .icon-button { width: 30px; height: 30px; flex-basis: 30px; }
  .company-document-panel > .company-privacy-note { margin: 0 14px 14px; }
  .company-savebar { bottom: 8px; padding: 11px; }
  .company-savebar .primary-button { min-height: 39px; padding: 0 11px; font-size: 11px; }
}

@media (max-width: 380px) {
  .mobile-brand { display: none; }
  .breadcrumb strong { max-width: 127px; }
  .order-row { column-gap: 9px; row-gap: 8px; }
  .device-thumb { width: 31px; height: 31px; font-size: 10px; }
  .order-main strong { font-size: 11px; }
  .stat-card, .kpi-card { padding: 11px; }
  .company-hero-brand { display: grid; gap: 11px; }
  .company-logo-preview, img.company-logo-preview { width: 126px; height: 63px; }
  .document-item { grid-template-columns: 33px minmax(0, 1fr) 30px; }
  .document-icon { width: 32px; height: 32px; }
  .document-actions { display: grid; gap: 2px; }
}

/* Dashboard cards adapt to their own width instead of sacrificing price or status. */
@container dashboard-orders (max-width: 560px) {
  .order-row {
    grid-template-columns: 39px minmax(0, 1fr) max-content max-content 32px;
    column-gap: 10px;
    row-gap: 9px;
  }

  .order-row > .order-device { display: none; }
}

@container dashboard-orders (max-width: 430px) {
  .order-row {
    grid-template-columns: 39px minmax(0, 1fr) max-content;
    column-gap: 10px;
    row-gap: 8px;
  }

  .order-row > .device-thumb { grid-column: 1; grid-row: 1 / 3; align-self: center; }
  .order-row > .order-main { grid-column: 2; grid-row: 1; }
  .order-row > :is(.order-status, .status) { grid-column: 2; grid-row: 2; }
  .order-row > :is(.order-value, .money) { grid-column: 3; grid-row: 2; }
  .order-row > .more-button { grid-column: 3; grid-row: 1; }
}

@container dashboard-orders (max-width: 340px) {
  .order-row {
    grid-template-columns: 35px minmax(0, 1fr) 32px;
    column-gap: 9px;
    row-gap: 8px;
  }

  .order-row > .device-thumb { grid-column: 1; grid-row: 1; }
  .order-row > .order-main { grid-column: 2; grid-row: 1; }
  .order-row > .more-button { grid-column: 3; grid-row: 1; }
  .order-row > :is(.order-status, .status) { grid-column: 2 / 4; grid-row: 2; }
  .order-row > :is(.order-value, .money) { grid-column: 2 / 4; grid-row: 3; justify-self: start; }
}

.cloud-logout-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 35px;
  margin: 8px 0 0;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #aab2ab;
  font-size: 11px;
  text-align: left;
}

.cloud-logout-button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.cloud-session-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

body.cloud-auth-mode {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 14% 13%, rgba(224, 249, 103, .17), transparent 34%),
    radial-gradient(ellipse at 87% 88%, rgba(224, 249, 103, .1), transparent 36%),
    #f5f7f2;
}

body.cloud-auth-mode .app-shell { display: block; min-height: 100dvh; }
body.cloud-auth-mode .sidebar,
body.cloud-auth-mode .sidebar-backdrop,
body.cloud-auth-mode .topbar { display: none !important; }
body.cloud-auth-mode .main-area { display: grid; min-height: 100dvh; grid-column: auto; place-items: center; }
body.cloud-auth-mode .content { display: grid; width: 100%; min-height: 100dvh; max-width: none; margin: 0; padding: 34px 20px; place-items: center; }

.cloud-access-screen { width: min(100%, 466px); min-width: 0; }
.cloud-access-card {
  overflow: hidden;
  border: 1px solid rgba(31, 36, 31, .075);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(24, 32, 23, .11), 0 8px 28px rgba(24, 32, 23, .055);
}

.cloud-brand {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 158px;
  overflow: hidden;
  background: #daf66b;
  place-items: center;
}

.cloud-brand::after {
  position: absolute;
  right: -58px;
  bottom: -85px;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(23, 26, 25, .07);
  border-radius: 50%;
  content: "";
}

.cloud-brand img {
  z-index: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}
.cloud-access-body { padding: 31px 34px 27px; }
.cloud-access-heading { margin-bottom: 25px; }
.cloud-access-kicker { color: #5f685f; font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.cloud-access-heading h1 { margin: 8px 0 7px; color: var(--ink); font-size: 26px; font-weight: 790; letter-spacing: -.055em; line-height: 1.12; }
.cloud-access-heading p { margin: 0; color: #69736b; font-size: 12px; line-height: 1.7; }
.cloud-login-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }

.cloud-account {
  display: flex;
  min-height: 69px;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid #e9ede6;
  border-radius: 13px;
  background: #fbfcfa;
}

.cloud-account-avatar {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
  place-items: center;
}

.cloud-account > span:nth-child(2) { min-width: 0; flex: 1; }
.cloud-account strong, .cloud-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-account strong { color: var(--ink); font-size: 12px; }
.cloud-account small { margin-top: 4px; color: #5f685f; font-size: 10px; }
.cloud-account-check { display: grid; width: 22px; height: 22px; border-radius: 50%; background: #eaf6eb; color: #277b4a; font-size: 12px; place-items: center; }
.cloud-password-field { gap: 8px; }
.cloud-password-control { position: relative; }
.cloud-password-control input { min-height: 48px; padding-right: 46px; border-radius: 11px; background: #fff; font-size: 13px; }
.cloud-password-control input[aria-invalid="true"] { border-color: #c6534b; }
.cloud-password-toggle { position: absolute; top: 4px; right: 5px; display: grid; width: 39px; height: 39px; border: 0; border-radius: 8px; background: transparent; color: #6e786f; font-size: 15px; place-items: center; }
.cloud-password-toggle:hover { background: #f2f5ef; color: var(--ink); }
.cloud-privacy { display: grid; min-width: 0; gap: 12px; padding: 12px 13px; border: 1px solid #e8ece5; border-radius: 12px; background: #fbfcfa; }
.cloud-privacy-details { min-width: 0; }
.cloud-privacy-details summary { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: var(--ink); font-size: 11px; font-weight: 740; list-style: none; cursor: pointer; }
.cloud-privacy-details summary::-webkit-details-marker { display: none; }
.cloud-privacy-hint { color: #5f685f; font-size: 9px; font-weight: 550; }
.cloud-privacy-information { display: grid; gap: 8px; padding-top: 12px; }
.cloud-privacy-information p { margin: 0; color: #667069; font-size: 10px; line-height: 1.65; }
.cloud-privacy-information strong { color: var(--ink); }
.cloud-privacy-consent { display: flex; min-width: 0; align-items: flex-start; gap: 9px; color: #515b53; font-size: 10px; line-height: 1.6; cursor: pointer; }
.cloud-privacy-consent input { width: 15px; height: 15px; flex: 0 0 15px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.cloud-privacy-consent input[aria-invalid="true"] { outline: 2px solid #c6534b; outline-offset: 2px; }
.cloud-login-status { min-height: 15px; margin: -9px 0 -8px; color: #667069; font-size: 10px; line-height: 1.5; }
.cloud-login-status.is-error { color: #b83b39; }
.cloud-login-submit { display: flex; width: 100%; min-height: 48px; justify-content: space-between; padding: 0 17px; border-radius: 11px; font-size: 12px; }
.cloud-login-submit:disabled { cursor: progress; opacity: .72; }
.cloud-access-security { display: flex; flex-wrap: wrap; gap: 9px 16px; margin-top: 22px; padding-top: 17px; border-top: 1px solid #edf0eb; }
.cloud-access-security > span { display: inline-flex; align-items: center; gap: 6px; color: #6f7971; font-size: 10px; }
.cloud-access-security > span > span { color: #748d28; }
.cloud-access-details { display: grid; gap: 12px; color: #4e5750; font-size: 12px; }
.cloud-access-details > span:first-child { display: grid; width: 38px; height: 38px; border-radius: 12px; background: #f2f5ec; color: #627822; font-size: 19px; place-items: center; }
.cloud-access-details p { margin: 0; color: #667069; line-height: 1.7; }
.cloud-access-details.is-loading { grid-template-columns: 31px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 0; }
.cloud-loading-spinner { width: 24px !important; height: 24px !important; border: 2px solid #e6eadf !important; border-top-color: #879e36 !important; border-radius: 50% !important; background: transparent !important; animation: cloud-spin .8s linear infinite; }
.cloud-access-footer { margin: 20px 0 0; color: #69736c; font-size: 11px; text-align: center; }

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

@media (max-width: 520px) {
  body.cloud-auth-mode .content { min-height: 100dvh; padding: 20px 14px; }
  .cloud-access-screen { width: min(100%, 420px); }
  .cloud-access-card { border-radius: 21px; }
  .cloud-brand { height: 132px; }
  .cloud-access-body { padding: 25px 22px 22px; }
  .cloud-access-heading h1 { font-size: 23px; }
  .cloud-access-heading p { font-size: 11px; }
  .cloud-session-actions { display: grid; width: 100%; }
  .cloud-session-actions > button { width: 100%; }
}

/* CELLF — identidade visual oficial: impacto, solidez e tecnologia. */
body {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(217, 241, 90, .13), transparent 34%),
    radial-gradient(ellipse at 0% 100%, rgba(0, 174, 239, .055), transparent 30%),
    var(--canvas);
}

::selection { color: var(--ink); background: rgba(217, 241, 90, .88); }

:focus-visible {
  outline-color: rgba(0, 174, 239, .82);
  box-shadow: 0 0 0 2px rgba(217, 241, 90, .62);
}

.sidebar {
  background:
    radial-gradient(ellipse at 7% 0%, rgba(217, 241, 90, .11), transparent 38%),
    radial-gradient(ellipse at 100% 100%, rgba(0, 174, 239, .09), transparent 42%),
    #000;
}

.brand {
  border-color: rgba(0, 174, 239, .58);
  background: var(--accent);
  box-shadow: 0 13px 34px rgba(0, 0, 0, .38), 0 0 0 1px rgba(217, 241, 90, .17);
}

.brand-caption { color: #8edcf8; letter-spacing: .055em; }
.nav-label { color: #929b95; }
.nav-item { color: #c4cbc6; }
.nav-item:hover { background: rgba(0, 174, 239, .1); }
.nav-item.active, .nav-item[aria-current="page"] {
  background: var(--accent);
  box-shadow: 0 6px 20px rgba(217, 241, 90, .2);
}
.sidebar .avatar { background: rgba(0, 174, 239, .15); color: #62d2fb; }

.topbar { border-bottom-color: #dfe5dc; box-shadow: 0 1px 0 rgba(0, 174, 239, .06); }
.mobile-brand::after { color: var(--cyan); content: "."; }
.search-button:hover, .topbar-search:hover { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 174, 239, .14); }

.primary-button {
  background: #000;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .18), inset 0 -2px 0 rgba(0, 174, 239, .28);
}
.primary-button:hover { background: #151817; box-shadow: 0 10px 24px rgba(0, 0, 0, .24), inset 0 -2px 0 var(--cyan); }
.secondary-button { border-color: #bfd43f; background: var(--accent); }
.secondary-button:hover { background: #e3f778; }
.text-button { color: var(--cyan-deep); }
.icon-button:hover { border-color: rgba(0, 174, 239, .5); }

.eyebrow { color: var(--cyan-deep); }
.stat-card:hover, .kpi-card:hover, .card:hover { border-color: rgba(0, 174, 239, .24); }
.stat-card.highlight, .kpi-card.highlight, .kpi-card.featured {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(0, 174, 239, .2), transparent 43%),
    radial-gradient(ellipse at 0% 100%, rgba(217, 241, 90, .12), transparent 48%),
    #000;
  border-color: #000;
}
.highlight .stat-icon, .highlight .kpi-icon { background: var(--accent); }
.status.progress, .badge-info, .status-badge.info { color: var(--cyan-deep); background: var(--blue-soft); }

.imei-card {
  border-color: rgba(0, 174, 239, .34);
  background: linear-gradient(145deg, #e9f88c, var(--accent));
  box-shadow: inset 4px 0 0 var(--cyan);
}
.imei-icon { background: #000; color: var(--cyan); }
.imei-form button { background: #000; box-shadow: inset 0 -2px 0 var(--cyan); }

.filter-search:focus-within, .search-box:focus-within,
.field input:focus, .field select:focus, .field textarea:focus,
.form-field input:focus, .form-field select:focus, .form-field textarea:focus,
.document-upload-field > :is(input, select):focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, .14);
}

select:not([multiple]):hover { border-color: rgba(0, 174, 239, .58); }
select:not([multiple]):focus-visible { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 174, 239, .14); }
.tab.active, .tab-button.active, .tab[aria-selected="true"] { background: var(--accent); }
.customer-avatar { background: var(--blue-soft); color: var(--cyan-deep); }
.pos-add { background: var(--blue-soft); color: var(--cyan-deep); }
.pos-product:hover, .pos-product-card:hover { border-color: rgba(0, 174, 239, .55); background: #f5fbfc; }
.payment-method.active, .payment-method[aria-pressed="true"] { border-color: #b4ca38; background: #f2f8d7; }

.chart-bar, .bar-chart-item, .chart-bar-fill {
  background: linear-gradient(to top, var(--cyan), var(--accent));
}
.calendar-event-dot.event-repair { background: var(--cyan); }

.settings-tabs .settings-tab[aria-selected="true"],
.settings-tabs .settings-tab.active {
  border-color: #bdd43a;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(159, 184, 42, .2);
}
.settings-tabs .settings-tab:focus-visible { outline-color: var(--cyan); }
.settings-nav-item.active, .settings-tab.active { background: var(--accent); }
.toggle-switch.active, .toggle-switch[aria-checked="true"] { background: var(--cyan); }

.company-hero {
  border-color: #171b19;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(0, 174, 239, .24), transparent 43%),
    radial-gradient(ellipse at 0% 100%, rgba(217, 241, 90, .13), transparent 46%),
    #000;
}
.company-hero::after { border-color: rgba(0, 174, 239, .3); }
.company-logo-preview { border-color: rgba(0, 174, 239, .65); background: var(--accent); }
.company-hero-copy > .eyebrow { color: var(--accent); }
.document-upload-zone:hover, .document-upload-zone:focus-visible,
.document-upload-zone:focus-within, .document-upload-zone.is-dragover {
  border-color: var(--cyan);
  background: #f3fbfd;
  box-shadow: 0 0 0 3px rgba(0, 174, 239, .13);
}
.document-upload-icon { border-color: #bde8f8; background: var(--blue-soft); color: var(--cyan-deep); }

body.cloud-auth-mode {
  background:
    radial-gradient(ellipse at 12% 10%, rgba(217, 241, 90, .2), transparent 31%),
    radial-gradient(ellipse at 88% 88%, rgba(0, 174, 239, .2), transparent 34%),
    #000;
}
.cloud-access-card { border-color: rgba(0, 174, 239, .4); box-shadow: 0 34px 100px rgba(0, 0, 0, .42), 0 0 0 1px rgba(217, 241, 90, .1); }
.cloud-brand { border-bottom: 4px solid var(--cyan); background: var(--accent); }
.cloud-brand::after { border-color: rgba(0, 174, 239, .3); }
.cloud-account-avatar { background: #000; color: var(--cyan); }
.cloud-account-check { background: var(--blue-soft); color: var(--cyan-deep); }
.cloud-password-control input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 174, 239, .14); }
.cloud-login-submit { box-shadow: 0 8px 20px rgba(0, 0, 0, .2), inset 0 -3px 0 var(--cyan); }
.cloud-access-security > span > span { color: var(--cyan-deep); }
.cloud-access-details > span:first-child { background: var(--blue-soft); color: var(--cyan-deep); }
.cloud-loading-spinner { border-top-color: var(--cyan) !important; }
.cloud-access-footer { color: #bbc4be; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Public presentation and on-demand account access. */
body.cloud-auth-mode .content { display: block; padding: 0; }
.cellf-public-page { width: 100%; background: #f7f8f2; color: #101310; }
.cellf-public-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: calc(100% - 32px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 28px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 24px;
  background: #f0f3e9;
  box-shadow: 0 12px 40px rgba(22, 37, 22, .09), inset 0 1px 0 #fff;
}
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .cellf-public-header {
    background: linear-gradient(120deg, rgba(255, 255, 255, .8), rgba(239, 248, 221, .62));
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
  }
}
.cellf-public-brand { display: block; width: 170px; }
.cellf-public-brand img { display: block; width: 100%; height: auto; }
.cellf-public-header nav { display: flex; align-items: center; gap: 32px; }
.cellf-public-header a, .cellf-public-footer a { color: inherit; text-decoration: none; font-weight: 650; }
.cellf-login-trigger { display: inline-flex; align-items: center; gap: 30px; border: 0; border-radius: 100px; padding: 15px 24px; background: #101310; color: white; font: inherit; font-weight: 700; cursor: pointer; }
.cellf-login-trigger:hover { background: #006b93; }
.cellf-public-hero { max-width: 1280px; margin: auto; padding: 55px 40px 80px; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; }
.cellf-public-eyebrow { color: #46503c; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.cellf-hero-copy h1 { margin: 25px 0; font-size: clamp(44px, 5.8vw, 80px); line-height: 1.03; letter-spacing: -.065em; font-weight: 850; }
.cellf-hero-copy h1 span { color: #006b93; }
.cellf-hero-description { max-width: 430px; font-size: 17px; line-height: 1.75; color: #536050; }
.cellf-public-cta { display: inline-flex; gap: 24px; align-items: center; margin-top: 24px; padding: 18px 24px; border-radius: 100px; background: #d9f15a; color: #101310; font-weight: 750; text-decoration: none; }
.cellf-hero-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; aspect-ratio: 1 / 1.1; padding: 30px; border-radius: 36px; background: #d9f15a; }
.cellf-art-label { font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.cellf-hero-art img { display: block; width: 85%; height: auto; max-height: 330px; object-fit: contain; align-self: center; }
.cellf-art-caption { display: flex; justify-content: space-between; align-items: end; font-size: 23px; line-height: 1.2; font-weight: 750; letter-spacing: -.04em; }
.cellf-art-caption > span:last-child { font-size: 44px; }
.cellf-public-services { background: #101310; color: #fff; padding: 72px max(40px, calc((100vw - 1200px) / 2)); scroll-margin-top: 120px; }
.cellf-services-heading .cellf-public-eyebrow { color: #d9f15a; }
.cellf-services-heading h2 { font-size: clamp(28px, 3vw, 42px); line-height: 1.15; letter-spacing: -.04em; margin: 16px 0; }
.cellf-services-heading > p:last-child { color: #bbc5b7; line-height: 1.65; }
.cellf-service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 38px; }
.cellf-service-grid article { display: flex; flex-direction: column; padding: 27px 23px; border: 1px solid #394034; border-radius: 20px; background: #1a2018; }
.cellf-service-number { color: #d9f15a; font-size: 13px; }
.cellf-service-grid h3 { font-size: 23px; letter-spacing: -.035em; margin: 32px 0 12px; }
.cellf-service-grid p { color: #bbc5b7; line-height: 1.75; font-size: 14px; margin: 0 0 28px; }
.cellf-service-tag { margin-top: auto; padding-top: 17px; border-top: 1px solid #394034; color: #d9f15a; font-size: 12px; font-weight: 650; }
.cellf-public-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding: 34px 40px; max-width: 1280px; margin: auto; font-size: 12px; }
.cellf-public-footer strong { font-size: 20px; }
.cellf-public-footer strong span { display: block; margin-top: 4px; font-size: 10px; font-weight: 500; }
.cellf-login-dialog { border: 0; padding: 0; width: min(466px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; border-radius: 26px; background: #fff; color: #101310; overflow-y: auto; }
.cellf-login-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px); }
.cellf-login-dialog .cloud-access-footer { color: #536050; padding-bottom: 18px; }
.cellf-login-close { position: absolute; z-index: 3; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: #fff; background: #101310; font-size: 26px; cursor: pointer; }
@media (max-width: 900px) {
  .cellf-public-hero { gap: 32px; }
  .cellf-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .cellf-public-header { top: 8px; width: calc(100% - 20px); padding: 12px; gap: 12px; border-radius: 20px; }
  .cellf-public-brand { width: 130px; }
  .cellf-public-header nav > a { display: none; }
  .cellf-login-trigger { gap: 16px; padding: 13px 19px; }
  .cellf-public-hero { grid-template-columns: 1fr; padding: 32px 20px 48px; gap: 36px; }
  .cellf-hero-copy h1 { font-size: clamp(42px, 10vw, 60px); }
  .cellf-hero-art { aspect-ratio: 1.15; padding: 24px; }
  .cellf-hero-art img { height: 190px; width: 70%; }
  .cellf-art-caption { font-size: 20px; }
  .cellf-public-services { padding: 45px 20px; }
  .cellf-service-grid { grid-template-columns: 1fr; }
  .cellf-service-grid h3 { margin-top: 20px; }
  .cellf-public-footer { padding: 28px 20px; }
}

.cellf-public-page { padding-top: 12px; }
.cellf-public-header nav > a { position: relative; }
.cellf-public-header nav > a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; background: #006b93; transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.cellf-public-header nav > a:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.cellf-public-page :is(button, a):focus-visible { outline: 3px solid #006b93; outline-offset: 5px; }
.cellf-public-cta, .cellf-login-trigger, .cellf-login-close, .cellf-public-brand { transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.cellf-public-cta > span, .cellf-login-trigger > span { display: inline-block; transition: transform .2s ease; }
.cellf-public-cta:is(:hover, :focus-visible) { background: #e4f783; box-shadow: 0 8px 24px rgba(102, 128, 12, .18); }
.cellf-public-cta:is(:hover, :focus-visible) > span { transform: translateY(3px); }
.cellf-login-trigger:is(:hover, :focus-visible) > span { transform: translate(2px, -2px); }
.cellf-public-page :is(.cellf-public-cta, .cellf-login-trigger, .cellf-login-close):active { transform: scale(.97); }
.cellf-service-grid article { transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.cellf-hero-art img { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) and (pointer: fine) {
  .cellf-service-grid article:hover { transform: translateY(-7px); border-color: #d9f15a; background: #242e20; box-shadow: 0 16px 30px rgba(0,0,0,.22); }
  .cellf-hero-art:hover img { transform: translateY(-6px) rotate(-3deg) scale(1.035); }
  .cellf-public-brand:hover { transform: scale(1.035); }
}
@keyframes cellf-enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  html:has(.cellf-public-page) { scroll-behavior: smooth; }
  .cellf-hero-copy { animation: cellf-enter .6s ease both; }
  .cellf-hero-art { animation: cellf-enter .7s .1s ease both; }
  .cellf-login-dialog[open] { animation: cellf-enter .22s ease both; }
  @supports (animation-timeline: view()) {
    .cellf-services-heading { animation: cellf-enter linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .cellf-public-page *, .cellf-public-page *::after { animation: none !important; transition: none !important; }
  .cellf-public-page :is(article, img, a, button, span) { transform: none !important; }
}

@media print {
  .sidebar, .topbar, .heading-actions, .page-actions, .table-toolbar, .toast-region { display: none !important; }
  .app-shell { display: block; }
  .content { max-width: none; padding: 0; }
  .data-table { display: table !important; }
  .mobile-cards { display: none !important; }
  .card, .table-card, .stat-card, .kpi-card { box-shadow: none; break-inside: avoid; }
}
