:root {
  --brand: #0f9f4b;
  --brand-dark: #08783a;
  --brand-soft: #eaf8ef;
  --ink: #18251f;
  --muted: #6f7d76;
  --line: #e5ebe7;
  --surface: #ffffff;
  --canvas: #f6f8f7;
  --danger: #d14343;
  --danger-soft: #fff0f0;
  --warning: #b66a00;
  --warning-soft: #fff6e6;
  --blue: #2878e8;
  --blue-soft: #edf5ff;
  --purple: #7a54d1;
  --purple-soft: #f3efff;
  --shadow-sm: 0 8px 24px rgba(23, 43, 33, 0.06);
  --shadow-md: 0 18px 48px rgba(23, 43, 33, 0.10);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 30;
  display: flex; flex-direction: column; gap: 28px;
  padding: 24px 18px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; font-size: 20px; font-weight: 900;
  background: linear-gradient(145deg, #19b65c, var(--brand-dark));
  box-shadow: 0 10px 22px rgba(15, 159, 75, 0.24);
}
.brand-mark-large { width: 52px; height: 52px; border-radius: 17px; font-size: 24px; }
.brand-copy, .login-brand > span:last-child { display: grid; line-height: 1.05; }
.brand-copy strong, .login-brand strong { font-size: 15px; letter-spacing: .035em; }
.brand-copy small, .login-brand small { margin-top: 5px; color: var(--muted); font-size: 11px; }

.side-nav { display: grid; gap: 6px; }
.nav-link {
  width: 100%; min-height: 46px; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 0; border-radius: 13px; background: transparent;
  color: #536159; font-weight: 650; cursor: pointer; text-align: left;
  transition: .18s ease;
}
.nav-link:hover { color: var(--brand-dark); background: #f0f8f3; transform: translateX(2px); }
.nav-link.active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-icon {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px;
  background: rgba(118, 134, 124, .08); font-size: 17px;
}
.nav-link.active .nav-icon { color: #fff; background: var(--brand); }
.sidebar-foot { margin-top: auto; display: grid; gap: 14px; }
.sidebar-foot form { margin: 0; }
.logout-button { color: #7a5959; }
.store-status {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb;
}
.store-status > span:last-child { display: grid; }
.store-status strong { font-size: 12px; }
.store-status small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #16ad58; box-shadow: 0 0 0 4px rgba(22, 173, 88, .12); }

.page-shell { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; min-height: 76px;
  display: flex; align-items: center; gap: 18px; padding: 14px 30px;
  background: rgba(255,255,255,.93); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.topbar-title { display: grid; line-height: 1.25; }
.topbar-title strong { font-size: 17px; }
.topbar-title small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.online-pill, .soft-badge, .payment-badge, .status-badge, .stock-pill, .large-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; white-space: nowrap;
}
.online-pill { padding: 8px 12px; color: var(--brand-dark); background: var(--brand-soft); font-size: 12px; font-weight: 700; }
.profile-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--brand-dark); font-weight: 800; }
.profile-copy { display: grid; line-height: 1.15; }
.profile-copy strong { font-size: 13px; }
.profile-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.icon-button { border: 0; background: transparent; cursor: pointer; }
.mobile-menu { display: none; font-size: 21px; }
.page-content { max-width: 1540px; margin: 0 auto; padding: 30px; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.035em; }
h2 { margin-bottom: 8px; font-size: 20px; letter-spacing: -.02em; }
p { color: var(--muted); line-height: 1.6; }
.eyebrow { display: inline-block; margin-bottom: 8px; color: var(--brand-dark); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow.light { color: #bceccc; }
.muted { color: var(--muted); }

.button {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border: 1px solid transparent; border-radius: 11px;
  font-weight: 750; cursor: pointer; transition: .18s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.button-primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.button-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button-danger { color: var(--danger); background: var(--danger-soft); border-color: #ffd6d6; }
.button-full { width: 100%; }
.button-small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.text-link, .back-link, .invoice-link { color: var(--brand-dark); font-weight: 750; }
.text-link:hover, .back-link:hover, .invoice-link:hover { text-decoration: underline; }

.welcome-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 28px 30px; margin-bottom: 22px; overflow: hidden; position: relative;
  border: 1px solid #d8eee0; border-radius: 22px;
  background: linear-gradient(115deg, #ffffff 0%, #f0fbf4 68%, #dff5e7 100%);
  box-shadow: var(--shadow-sm);
}
.welcome-panel::after { content: ""; position: absolute; width: 170px; height: 170px; right: 8%; top: -100px; border-radius: 50%; border: 28px solid rgba(15,159,75,.08); }
.welcome-panel > * { position: relative; z-index: 1; }
.welcome-panel p { margin-bottom: 0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.metric-card {
  min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.metric-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-weight: 900; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 750; }
.metric-card > strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: clamp(20px, 2.3vw, 28px); letter-spacing: -.03em; white-space: nowrap; }
.metric-card > small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.metric-green .metric-icon { color: var(--brand-dark); background: var(--brand-soft); }
.metric-blue .metric-icon { color: var(--blue); background: var(--blue-soft); }
.metric-orange .metric-icon { color: var(--warning); background: var(--warning-soft); }
.metric-purple .metric-icon { color: var(--purple); background: var(--purple-soft); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.content-card { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stock-alert-card, .quick-card { padding: 22px; }
.card-heading, .section-toolbar, .page-heading-row, .pos-heading, .checkout-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.card-heading h2 { margin-bottom: 0; }
.large-badge { min-width: 52px; height: 52px; padding: 0 16px; color: var(--warning); background: var(--warning-soft); font-size: 21px; font-weight: 850; }
.quick-actions { display: grid; gap: 8px; }
.quick-actions a { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 11px; border-radius: 13px; transition: .18s ease; }
.quick-actions a:hover { background: var(--brand-soft); }
.quick-actions span:nth-child(2) { display: grid; }
.quick-actions small { margin-top: 3px; color: var(--muted); }
.quick-icon, .section-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--brand-dark); background: var(--brand-soft); font-weight: 850; }

.page-heading-row { margin-bottom: 20px; }
.page-heading-row p { margin-bottom: 0; }
.table-card { overflow: hidden; }
.search-toolbar { display: flex; gap: 10px; padding: 18px; border-bottom: 1px solid var(--line); }
.search-field {
  min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; border: 1px solid #d8e1db; border-radius: 11px; background: #fff;
  transition: .18s ease;
}
.search-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,159,75,.10); }
.search-field > span { color: var(--muted); font-size: 21px; }
.search-field input { width: 100%; min-height: 42px; padding: 0; border: 0; outline: 0; background: transparent; }
.search-field-large { min-height: 50px; margin-bottom: 16px; border-radius: 14px; }
kbd { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #f8faf9; font: 700 10px/1 inherit; }
.section-toolbar { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title > div { display: grid; }
.section-title small { margin-top: 4px; color: var(--muted); }
.soft-badge { padding: 7px 10px; color: #59665f; background: #f1f4f2; font-size: 11px; font-weight: 750; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; color: #758078; background: #fafbfa; font-size: 10px; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-top: 1px solid #edf0ee; font-size: 12px; white-space: nowrap; vertical-align: middle; }
.data-table tbody tr { transition: .15s ease; }
.data-table tbody tr:hover { background: #fbfdfb; }
.product-cell, .cart-product { display: flex; align-items: center; gap: 11px; }
.product-cell > span:last-child, .cart-product > span:last-child { display: grid; }
.product-cell small, .cart-product small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.product-avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: var(--brand-dark); background: var(--brand-soft); font-weight: 850; }
.product-avatar-large { width: 42px; height: 42px; border-radius: 13px; }
.status-badge, .payment-badge { padding: 6px 10px; font-size: 10px; font-weight: 850; letter-spacing: .03em; }
.status-success { color: var(--brand-dark); background: var(--brand-soft); }
.status-muted { color: #66716a; background: #edf0ee; }
.payment-badge { color: #325d95; background: var(--blue-soft); }
.text-danger { color: var(--danger); }
.pagination-bar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pagination-bar > div { display: flex; gap: 8px; }
.empty-state { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr); gap: 16px; align-items: start; }
.receipt-card { position: sticky; top: 98px; padding: 22px; }
.receipt-lines { margin-top: 22px; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.receipt-lines p { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0; color: var(--muted); }
.receipt-lines strong { color: var(--ink); }
.receipt-total { display: grid; gap: 7px; margin-top: 20px; }
.receipt-total span { color: var(--muted); font-size: 12px; }
.receipt-total strong { color: var(--brand-dark); font-size: 26px; }

.shift-empty-state { max-width: 520px; margin: 60px auto; padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-md); text-align: center; }
.shift-illustration { width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 24px; color: var(--brand-dark); background: var(--brand-soft); font-size: 34px; }
.shift-form { max-width: 340px; margin: 24px auto 0; text-align: left; }
.shift-form label, .stack-form label, .checkout-options label, .close-shift label { display: grid; gap: 7px; margin-bottom: 14px; color: #4f5d55; font-size: 12px; font-weight: 700; }
input, select {
  width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #d7e0da; border-radius: 10px; outline: 0; color: var(--ink); background: #fff;
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,159,75,.10); }
.money-input { display: flex; align-items: center; border: 1px solid #d7e0da; border-radius: 10px; overflow: hidden; background: #fff; }
.money-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,159,75,.10); }
.money-input b { padding-left: 12px; color: var(--muted); }
.money-input input { border: 0; box-shadow: none; }

.pos-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(340px, .85fr); gap: 18px; align-items: start; }
.catalog-panel { min-width: 0; }
.pos-heading { margin-bottom: 14px; }
.pos-heading h1 { margin-bottom: 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 12px; }
.product-card {
  min-height: 200px; display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  padding: 14px; border: 1px solid var(--line); border-radius: 16px;
  color: var(--ink); background: #fff; box-shadow: 0 4px 16px rgba(23,43,33,.035);
  text-align: left; cursor: pointer; transition: .18s ease;
}
.product-card:hover { border-color: #b8dec7; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.product-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.stock-pill { padding: 5px 8px; border-radius: 999px; color: #5d6a62; background: #f1f4f2; font-size: 9px; font-weight: 750; }
.product-card-name { min-height: 36px; overflow: hidden; font-size: 13px; font-weight: 750; line-height: 1.35; }
.product-card-sku { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.product-card > strong { margin-top: auto; color: var(--brand-dark); font-size: 16px; }
.add-product { margin-top: 3px; color: var(--brand-dark); font-size: 11px; font-weight: 800; }
.product-empty { grid-column: 1/-1; }
.checkout-panel { position: sticky; top: 94px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-md); }
.checkout-panel > form { padding: 20px; }
.checkout-head { margin-bottom: 12px; }
.checkout-head h2 { margin-bottom: 0; font-size: 24px; }
.cart-count { padding: 7px 10px; border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); font-size: 10px; font-weight: 800; }
.cart-list { max-height: 330px; overflow-y: auto; margin: 0 -5px 16px; padding: 0 5px; }
.empty-cart { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed #d9e4dc; border-radius: 14px; color: var(--muted); text-align: center; }
.empty-cart > span { font-size: 29px; }
.empty-cart strong { color: var(--ink); }
.empty-cart small { max-width: 220px; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf0ee; }
.qty-control { display: flex; align-items: center; grid-column: 1; gap: 5px; margin-left: 45px; }
.qty-control button { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.qty-control input { width: 56px; min-height: 28px; padding: 4px; text-align: center; }
.cart-item-total { grid-column: 2; grid-row: 1 / span 2; display: grid; justify-items: end; align-content: space-between; }
.remove-item { padding: 0; border: 0; color: var(--danger); background: none; font-size: 10px; cursor: pointer; }
.checkout-options { padding: 16px 0 4px; border-top: 1px solid var(--line); }
.checkout-summary { padding: 14px 0; border-top: 1px dashed var(--line); }
.checkout-summary p { display: flex; justify-content: space-between; margin: 8px 0; font-size: 12px; }
.checkout-summary strong { color: var(--ink); }
.checkout-summary .checkout-total { align-items: end; margin-top: 14px; }
.checkout-total strong { color: var(--brand-dark); font-size: 22px; }
.checkout-button { min-height: 50px; justify-content: space-between; padding-inline: 18px; }
.close-shift { padding: 15px 20px; border-top: 1px solid var(--line); background: #fafbfa; }
.close-shift summary { color: var(--muted); font-size: 11px; font-weight: 750; cursor: pointer; }
.close-shift form { padding-top: 15px; }

.auth-body { background: #fff; }
.auth-body > main { min-height: 100vh; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(440px, .9fr); }
.login-brand-panel {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(32px, 6vw, 74px); overflow: hidden; position: relative;
  color: #fff; background: linear-gradient(140deg, #075e2e 0%, #0d8c43 52%, #16aa55 100%);
}
.login-brand-panel::before, .login-brand-panel::after { content: ""; position: absolute; border-radius: 50%; border: 60px solid rgba(255,255,255,.07); }
.login-brand-panel::before { width: 380px; height: 380px; right: -210px; top: -150px; }
.login-brand-panel::after { width: 250px; height: 250px; left: -170px; bottom: -130px; }
.login-brand, .login-message, .login-feature-list { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 13px; }
.login-brand .brand-mark { background: #fff; color: var(--brand-dark); box-shadow: none; }
.login-brand small { color: #c6ead3; }
.login-message { max-width: 630px; }
.login-message h1 { max-width: 600px; margin-bottom: 18px; font-size: clamp(38px, 5vw, 64px); line-height: 1.04; }
.login-message p { max-width: 570px; color: #d5f0df; font-size: 16px; }
.login-feature-list { display: flex; flex-wrap: wrap; gap: 14px 22px; color: #e9f8ee; font-size: 12px; font-weight: 650; }
.login-form-panel { display: grid; place-items: center; padding: 38px; background: #f9fbfa; }
.login-card { width: min(100%, 430px); padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-md); }
.login-card h2 { margin-bottom: 8px; font-size: 30px; }
.stack-form { margin-top: 24px; }
.login-note { display: block; margin-top: 18px; color: var(--muted); text-align: center; }
.alert { margin: 14px 0; padding: 12px 14px; border: 1px solid #ffd5d5; border-radius: 11px; color: #9c2727; background: var(--danger-soft); }

.sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-layout { grid-template-columns: minmax(0, 1.45fr) minmax(330px, .9fr); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 260px; transition: transform .22s ease; box-shadow: var(--shadow-md); }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(12,26,18,.38); }
  .sidebar-open .sidebar-backdrop { display: block; }
  .mobile-menu { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); }
  .topbar { padding-inline: 18px; }
  .page-content { padding: 22px 18px; }
  .pos-layout, .detail-grid { grid-template-columns: 1fr; }
  .checkout-panel, .receipt-card { position: static; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .login-layout { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: auto; gap: 60px; padding: 40px 28px; }
  .login-message h1 { font-size: 40px; }
  .login-form-panel { padding: 32px 20px; }
}

@media (max-width: 650px) {
  .topbar-title small, .online-pill, .profile-copy { display: none; }
  .topbar-actions { gap: 8px; }
  .page-content { padding: 18px 12px 28px; }
  .welcome-panel, .page-heading-row, .pos-heading { align-items: flex-start; flex-direction: column; }
  .welcome-panel { padding: 22px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card > strong { font-size: 25px; }
  .search-toolbar { flex-wrap: wrap; }
  .search-toolbar .search-field { flex-basis: 100%; }
  .search-toolbar .button { flex: 1; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .product-card { min-height: 190px; padding: 12px; }
  .data-table th, .data-table td { padding-inline: 12px; }
  .pagination-bar { align-items: flex-start; flex-direction: column; }
  .login-card { padding: 26px 20px; }
  .login-brand-panel { gap: 48px; }
  .login-message h1 { font-size: 34px; }
  .login-feature-list { display: grid; }
}

@media (max-width: 390px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* Operational modules */
.nav-group { margin: 2px 0; }
.nav-group summary { display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:12px; color:#516057; font-size:13px; font-weight:750; cursor:pointer; list-style:none; }
.nav-group summary::-webkit-details-marker { display:none; }
.nav-group summary b { margin-left:auto; transition:.18s; }
.nav-group[open] summary b { transform:rotate(180deg); }
.nav-group summary:hover { color:var(--brand-dark); background:#f4faf6; }
.nav-submenu { display:grid; gap:2px; padding:2px 0 7px 45px; }
.nav-sublink { padding:8px 10px; border-radius:9px; color:#617067; font-size:12px; font-weight:650; }
.nav-sublink:hover,.nav-sublink.active { color:var(--brand-dark); background:var(--brand-soft); }
.flash-message { margin-bottom:16px; padding:13px 16px; border-radius:12px; font-size:13px; font-weight:650; }
.flash-success { color:#087338; background:#eaf8ef; border:1px solid #ccebd7; }
.flash-error { color:#9c2727; background:#fff0f0; border:1px solid #ffd5d5; }
.two-column-layout { display:grid; grid-template-columns:minmax(300px,.72fr) minmax(0,1.5fr); gap:18px; align-items:start; }
.narrow-form { grid-template-columns:minmax(300px,.6fr) minmax(0,1.6fr); }
.form-card { padding:22px; }
.form-wide { max-width:980px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.form-grid label,.stack-form label { display:grid; gap:7px; color:#59665e; font-size:11px; font-weight:750; }
.form-grid input,.form-grid select,.form-grid textarea,.stack-form input,.stack-form select,.stack-form textarea,.filter-bar input,.filter-bar select,.inline-form input,.inline-form select { width:100%; min-height:42px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); }
.stack-form { display:grid; gap:14px; }
.span-2 { grid-column:1/-1; }
.button-full { width:100%; }
.button-danger { color:#fff; background:#d63f3f; border-color:#d63f3f; }
.filter-bar,.inline-form { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.filter-bar { padding:16px 18px; border-bottom:1px solid var(--line); }
.filter-bar > * { flex:1 1 140px; }
.inline-form > * { flex:0 1 auto; }
.table-input { min-width:100px; max-width:180px; padding:7px 9px; border:1px solid var(--line); border-radius:8px; }
.mini-metric-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:18px 0; }
.mini-metric-grid div { padding:14px; border-radius:12px; background:#f6faf7; }
.mini-metric-grid span { display:block; color:var(--muted); font-size:10px; }
.mini-metric-grid strong { display:block; margin-top:5px; font-size:16px; }
.section-card-head,.summary-line { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.summary-line { padding:11px 0; border-bottom:1px solid #edf1ee; }
.master-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-bottom:18px; }
.chip-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; max-height:220px; overflow:auto; }
.topbar-cta { white-space:nowrap; }
.link-danger { border:0; background:none; color:#c73737; cursor:pointer; font-weight:700; }
.status-warning { color:#8b5c00; background:#fff4d8; }
@media(max-width:1000px){.two-column-layout,.narrow-form,.master-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.topbar-cta{display:none}}
