/* Tokens loaded from tokens.css - all colors centralized there */

/* ── Bootstrap Overrides (RestaurantOS Color Kit) ── */
.btn-primary {
  background: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
  color: white !important;
  box-shadow: var(--shadow-gold) !important;
}
.btn-sm {
    padding: 0.4rem !important;
}
/* Inline-style migrations */
.app-toast-layer { z-index: 1080; }

.auth-card-wide { max-width: 980px; }
.auth-card-medium { max-width: 720px; }

.attendance-cell-w-180 { width: 180px; }
.attendance-cell-w-220 { width: 220px; }

.journal-reason-input { width: 180px; }
.journal-col-account { width: 55%; }
.journal-col-debit { width: 20%; }
.journal-col-credit { width: 20%; }
.journal-col-actions { width: 5%; }

.kds-progress-thin { height: 8px; }

.waiter-order-cell-min { min-width: 220px; }
.waiter-select-min { min-width: 170px; }

.users-agent-cell { max-width: 520px; }

.purchase-col-item { width: 55%; }
.purchase-col-qty { width: 15%; }
.purchase-col-unit { width: 20%; }
.purchase-col-actions { width: 10%; }

.menu-thumb-sm {
    width: 56px;
    height: 56px;
    object-fit: cover;
}


.menu-thumb-md {
    width: 96px;
    height: 96px;
    object-fit: cover;
}

.order-summary-col-qty { width: 50px; }
.order-summary-col-price { width: 70px; }
.order-summary-col-action { width: 40px; }
.order-discount-mode-select { max-width: 110px; }
.order-discount-input { max-width: 110px; }
.order-tax-input { max-width: 120px; }
.order-service-input { max-width: 120px; }

.split-bill-amount-cell { max-width: 180px; }
.btn-primary:hover {
  background: var(--color-accent-hover) !important;
  border-color: var(--color-accent-hover) !important;
/*  color: var(--navy-950) !important;*/
  filter: brightness(.98);
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 .28rem var(--overlay-accent-30) !important;
}
.btn-outline-primary {
  border-color: var(--color-accent) !important;
  color: var(--color-accent-dark) !important;
}
.btn-outline-primary:hover {
  background: var(--color-accent-light) !important;
  border-color: var(--color-accent) !important;
  color: var(--gold-600) !important;
}
.btn-outline-secondary {
  border-color: var(--navy-100) !important;
  color: var(--color-text) !important;
}
    .btn-outline-secondary:hover {
        border-color: var(--gold-500) !important;
        background: var(--gold-50) !important;
        color: var(--gold-500) !important;
    }
.btn-outline-success {
  border-color: var(--color-success) !important;
  color: var(--color-success) !important;
}
.btn-outline-success:hover,
.btn-outline-success:focus-visible {
  background: var(--color-success-bg) !important;
  border-color: var(--color-success) !important;
  color: var(--color-success) !important;
}
.btn-outline-danger { border-color: var(--color-danger); color: var(--color-danger); }
    .btn-outline-danger:hover {
        background: var(--color-danger-bg);
        border-color: var(--color-danger);
        color: var(--color-danger)
    }
.badge.bg-primary { background-color: var(--color-accent) !important; color: var(--navy-950) !important; }
.bg-primary { background-color: var(--color-accent) !important; }
.text-primary { color: var(--color-accent) !important; }
.border-primary { border-color: var(--color-accent) !important; }

html { font-size: var(--font-root-mobile); scroll-behavior: smooth; }
@media (min-width: 768px) { html { font-size: var(--font-root-desktop); } }

html, body { height: 100%; }
body {
    font-family: var(--font-family-base);
    /*  background: var(--app-bg);*/
    background: var(--cream);
    color: var(--app-text);
    line-height: var(--line-height-body);
    font-weight: var(--font-weight-regular);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Global typographic rhythm (LinkedIn-style readability) */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-text-sm);
  color: var(--color-text-strong);
  line-height: var(--line-height-heading);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--font-size-fluid-title-3); }
h2 { font-size: var(--font-size-fluid-title-2); }
h3 { font-size: var(--font-size-h4); }
h4 { font-size: var(--font-size-h5); }
h5 { font-size: var(--font-size-h6); }
h6 { font-size: var(--font-size-100); }

p {
  margin-top: 0;
  margin-bottom: var(--space-text-md);
  line-height: var(--line-height-body);
}

.text-muted {
  line-height: var(--line-height-body);
}

.admin-main-content p,
.admin-main-content li {
  line-height: var(--line-height-body);
}

.admin-main-content .small,
.admin-main-content small {
  line-height: var(--line-height-caption);
}

.admin-main-content h1 + p,
.admin-main-content h2 + p,
.admin-main-content h3 + p,
.admin-main-content h4 + p {
  margin-top: var(--space-text-xs);
}

.table td,
.table th {
  line-height: var(--line-height-caption);
}

a{ color: var(--color-accent); }
a:hover{ color: var(--color-accent-dark); }

/* Make main content naturally fill remaining screen height */
.app-content{
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
}

/* Top navbar */
.app-navbar{
  background: var(--overlay-white-86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--app-border);
}
.app-navbar .navbar-brand{
  letter-spacing: -.01em;
}
.app-logo{
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}
.app-logo-sm{ height: 28px; }
.app-logo-lg{ height: 48px; }
.app-navbar .nav-link{
  color: var(--app-text);
  opacity: .82;
  border-radius: var(--nav-pill-radius);
  padding: var(--nav-pill-padding-y) var(--nav-pill-padding-x);
  transition: all .18s ease;
}
.app-navbar .nav-link:hover{
  opacity: 1;
  background: var(--overlay-accent-08);
}
.app-navbar .nav-link.active{
  opacity: 1;
  font-weight: 600;
  background: var(--overlay-accent-12);
  color: var(--color-accent-dark);
}
.public-navbar .container-fluid{
  row-gap: var(--space-sm);
}
.app-navbar-links{
  gap: var(--nav-pill-gap);
}
.app-navbar-actions{
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}
.app-navbar-branch{
  min-width: 220px;
}
.app-user-pill{
  display: inline-flex;
  align-items: center;
  gap: var(--btn-gap);
  color: var(--app-muted);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--app-border);
  background: var(--overlay-white-90);
  border-radius: 999px;
  padding: .38rem .7rem;
}
.app-logout-btn{
  border-color: var(--overlay-ink-18);
}
.app-brand-mark{
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-accent), var(--gold-500));
  box-shadow: var(--shadow-gold);
}
.app-brand-mark-success{
  background: linear-gradient(135deg, var(--color-success), var(--color-success-light)) !important;
  box-shadow: 0 2px 8px var(--overlay-success-focus) !important;
  color: var(--color-white) !important;
}
.app-brand-mark-primary{
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700)) !important;
  box-shadow: var(--shadow-md) !important;
  color: var(--color-white) !important;
}
.app-brand-mark-info{
  background: linear-gradient(135deg, var(--color-info), var(--color-info-light)) !important;
  box-shadow: 0 2px 8px var(--overlay-info-soft-3) !important;
  color: var(--color-white) !important;
}

/* Branch switcher */
.branch-switcher{
  width: 100%;
  position: relative;
}
.branch-switcher-toggle{
  min-width: 0;
  width: 100%;
  min-height: var(--control-min-height);
  border-radius: var(--btn-border-radius);
  border: 1px solid var(--overlay-accent-28);
  background: linear-gradient(180deg, var(--overlay-white-98), var(--overlay-shell-94));
  color: var(--navy-950);
  box-shadow: 0 6px 18px var(--overlay-navy-05), inset 0 1px 0 var(--overlay-surface-85);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--control-padding-y) calc(var(--control-padding-x) + .1rem);
  font-size: var(--font-size-084);
  font-weight: var(--font-weight-medium);
  text-align: left;
}
.branch-switcher-toggle-label{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.branch-switcher-toggle:hover,
.branch-switcher-toggle.show{
  border-color: var(--overlay-accent-35);
  background: linear-gradient(180deg, var(--color-white), var(--overlay-shell-96));
  color: var(--navy-950);
}
.branch-switcher-toggle:focus,
.branch-switcher-toggle:active{
  border-color: var(--gold-500) !important;
  box-shadow: 0 0 0 .25rem var(--overlay-accent-18) !important;
  color: var(--navy-950) !important;
}
.branch-switcher-toggle::after{
  margin-left: .75rem;
  border: 0;
  width: 1rem;
  height: 1rem;
  background: center / 1rem no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5L8 10.5L12 6.5' stroke='%239e6b25' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.branch-switcher-menu{
  inset: calc(100% + .3rem) 0 auto 0 !important;
  transform: none !important;
  width: 100%;
  min-width: 100%;
  margin: 0;
  padding: var(--space-2xs);
  border: 1px solid var(--overlay-accent-28);
  border-radius: var(--control-border-radius);
  background: var(--overlay-white-99);
  box-shadow: 0 16px 28px var(--overlay-navy-12);
  overflow: hidden;
}
.branch-switcher-item{
  border-radius: var(--radius-sm);
  color: var(--navy-900);
  font-weight: var(--font-weight-medium);
  padding: calc(var(--control-padding-y) - .02rem) var(--control-padding-x);
  font-size: var(--font-size-084);
  line-height: 1.15;
}
.branch-switcher-item:hover,
.branch-switcher-item:focus,
.branch-switcher-item:active{
  background: var(--overlay-shell-92);
  color: var(--navy-950);
}
.branch-switcher-item.active,
.branch-switcher-item.active:hover,
.branch-switcher-item.active:focus,
.branch-switcher-item.active:active{
  background: linear-gradient(180deg, var(--gold-400), var(--color-accent-darker));
  color: var(--navy-950);
}
.public-navbar .branch-switcher-toggle{
  min-width: 228px;
  border-color: var(--overlay-ink-12);
  background-color: var(--color-white);
}

/* Panels / cards */
.card{
  border: 1px solid var(--app-border);
  border-radius: var(--card-border-radius);
  box-shadow: var(--card-shadow);
}
.card .card-title{ letter-spacing: -.01em; }

/* Buttons & inputs */
.btn{
  border-radius: var(--btn-border-radius);
  --bs-btn-padding-y: var(--btn-padding-y);
  --bs-btn-padding-x: var(--btn-padding-x);
  --bs-btn-font-weight: var(--btn-font-weight);
}

.form-control, .form-select{
  border-radius: var(--control-border-radius);
  border-color: var(--app-border);
  padding-top: var(--control-padding-y);
  padding-bottom: var(--control-padding-y);
  min-height: var(--control-min-height);
}
.form-control:focus, .form-select:focus, .form-check-input:focus, .btn:focus{
  border-color: var(--navy-600) !important;
  box-shadow: 0 0 0 .25rem var(--overlay-ink-16) !important;
}

/* Tables */
.table{
  --bs-table-border-color: var(--overlay-ink-08);
}
.table > :not(caption) > * > *{
  padding-top: .85rem;
  padding-bottom: .85rem;
}

/* Footer */
.footer{
  width: 100%;
  margin-top: auto;
  border-top: 1px solid var(--app-border);
  background: var(--overlay-white-70);
  backdrop-filter: blur(10px);
}

/* Auth pages */
.auth-shell{
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
}
.auth-card{
  overflow: hidden;
}
.auth-card .auth-aside{
  background: radial-gradient(1200px circle at 0% 0%, var(--overlay-accent-15), transparent 60%),
              radial-gradient(900px circle at 100% 0%, var(--overlay-navy-50), transparent 55%),
              linear-gradient(180deg, var(--navy-950), var(--navy-900));
  color: var(--navy-200);
}
.auth-card .auth-aside h1,
.auth-card .auth-aside h2,
.auth-card .auth-aside h3,
.auth-card .auth-aside h4,
.auth-card .auth-aside h5,
.auth-card .auth-aside h6{
  color: var(--overlay-white-90);
  text-shadow: 0 1px 2px var(--overlay-black-50);
}
.auth-card .auth-aside .fw-semibold{
  color: var(--overlay-white-90);
}
.auth-card .auth-aside .app-logo{
  filter: drop-shadow(0 1px 2px var(--overlay-black-50));
}
.auth-card .auth-aside small{ color: var(--overlay-muted-blue-75); }

/* Admin shell */
.admin-shell{
  flex: 1 0 auto;
}
.admin-content-wrap{
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.admin-topbar-nav { gap: var(--nav-pill-gap); }
.admin-topbar-link {
  padding: calc(var(--nav-pill-padding-y) + .33rem) calc(var(--nav-pill-padding-x) + .35rem);
  border-radius: var(--control-border-radius);
  font-size: var(--font-size-087);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  text-decoration: none;
  transition: background .18s, color .18s, box-shadow .18s;
}
.admin-topbar-link:hover {
  background: var(--gold-50);
  color: var(--color-accent-dark);
}
.admin-topbar-link.active {
  background: var(--color-accent);
  color: white;
  box-shadow: var(--shadow-gold);
}
.admin-topbar{
  position: sticky;
  top: 0;
  z-index: 1020;
  background: var(--color-white);
  border: 1px solid var(--app-border);
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  padding: 1rem 1.35rem !important;
  box-shadow: none;
  margin-top: calc(var(--admin-col-pad) * -1);
  margin-left: calc(var(--admin-col-pad) * -1);
  margin-right: calc(var(--admin-col-pad) * -1);
  margin-bottom: 1rem;
}
.admin-topbar-actions{
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  gap: .7rem !important;
}
.admin-topbar-actions .branch-switcher{
  flex: 0 0 240px;
  width: 240px;
  min-width: 240px;
}
.admin-topbar-actions .dropdown{
  flex: 0 0 auto;
}
.admin-topbar-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  white-space: nowrap;
  min-width: max-content;
  min-height: 44px;
  padding-inline: 1rem 1.1rem;
  font-size: var(--font-size-087);
  font-weight: 600;
}
.admin-account-toggle{
  min-height: 44px;
  border-radius: 12px;
  padding-inline: .95rem;
  background: var(--overlay-white-95);
  font-size: var(--font-size-087);
  font-weight: 500;
}
.admin-topbar-cta .bi{
  flex: 0 0 auto;
}

/* Keep admin header in one line on tablets/laptops */
@media (min-width: 768px) and (max-width: 1599.98px){
  .admin-topbar{
    flex-wrap: nowrap !important;
    gap: .55rem !important;
    padding: .8rem 1rem !important;
  }

  .admin-topbar > .d-flex.align-items-center.gap-2.flex-wrap{
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap !important;
    gap: .45rem !important;
  }

  .admin-topbar-nav{
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: .2rem !important;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .admin-topbar-nav::-webkit-scrollbar{
    width: 0;
    height: 0;
  }

  .admin-topbar-link{
    flex: 0 0 auto;
    padding: .56rem .72rem;
    font-size: var(--font-size-081r);
  }

  .admin-topbar-actions{
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0;
    flex-wrap: nowrap !important;
    justify-content: flex-end;
    gap: .45rem !important;
  }

  .admin-topbar-actions .branch-switcher{
    flex: 0 1 220px !important;
    width: 220px;
    min-width: 170px;
  }

  .admin-topbar-cta{
    min-height: 40px;
    padding-inline: .75rem .82rem;
    font-size: var(--font-size-082);
  }

  .admin-account-toggle{
    min-height: 40px;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--font-size-082);
  }
}
.admin-page-header{
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: .55rem 0 .3rem;
}
.admin-page-title{
  font-size: var(--font-size-fluid-title-1);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 700;
  color: var(--color-text);
}
.admin-breadcrumb-list{
  --bs-breadcrumb-divider: ">";
  margin: 0;
}
.admin-breadcrumb-list .breadcrumb-item{
  color: var(--color-muted);
  font-size: var(--font-size-078);
  font-weight: 500;
}
.admin-breadcrumb-list .breadcrumb-item a{
  color: var(--navy-600);
  text-decoration: none;
}
.admin-breadcrumb-list .breadcrumb-item a:hover{
  color: var(--color-text);
  text-decoration: underline;
}
.admin-breadcrumb-list .breadcrumb-item.active{
  color: var(--color-text);
  font-weight: 600;
}
.admin-sidebar{
  background:
    radial-gradient(circle at top right, var(--overlay-accent-15), transparent 28%),
    linear-gradient(180deg, var(--navy-950), var(--navy-900));
  color: var(--navy-200);
  border-radius: 0;
  border: 0;
  min-height: 100vh;
}
.admin-sidebar .nav-link{
  color: var(--navy-200);
  border-radius: var(--radius-md);
}
.admin-sidebar .nav-link:hover{
  background: var(--navy-800);
  color: var(--color-white);
}
.admin-sidebar .nav-link.active{
  background: var(--color-accent);
  color: var(--navy-950);
  font-weight: 700;
}
.admin-sidebar .nav-section{
  color: var(--overlay-muted-blue-55);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: var(--font-size-072r);
}

@media (max-width: 991.98px){
  .app-navbar .navbar-collapse{
    padding-top: .6rem;
    border-top: 1px solid var(--app-border);
    margin-top: .6rem;
  }
  .app-navbar-branch,
  .branch-switcher-select{
    width: 100%;
    min-width: 0;
  }
  .app-user-pill{
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-topbar-actions{
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }
}

/* Toast UX improvements */
.app-toast-container{
  max-width: min(28rem, calc(100vw - 1.2rem));
}
.app-toast{
  --toast-accent: var(--app-primary);
  border: 1px solid var(--overlay-ink-12) !important;
  border-left: 4px solid var(--toast-accent) !important;
  border-radius: 14px;
  background: var(--overlay-surface-98);
  color: var(--app-text);
  box-shadow: 0 14px 30px var(--overlay-ink-16);
  overflow: hidden;
  min-width: min(26rem, calc(100vw - 1.2rem));
}
.app-toast-success{ --toast-accent: var(--app-success); }
.app-toast-error{ --toast-accent: var(--app-danger); }
.app-toast-inner{
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .7rem .75rem .7rem .8rem;
}
.app-toast-icon{
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--color-white);
  background: var(--toast-accent);
  margin-top: .05rem;
}
.app-toast-content{
  min-width: 0;
  flex: 1 1 auto;
}
.app-toast-title{
  font-size: var(--font-size-074);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--app-muted);
  margin-bottom: .15rem;
  font-weight: 700;
}
.app-toast-message{
  font-size: var(--font-size-098);
  line-height: 1.35;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.app-toast-close{
  margin: .15rem 0 0 .15rem;
  opacity: .68;
  transform: scale(.85);
  flex: 0 0 auto;
}
.app-toast-close:hover,
.app-toast-close:focus{
  opacity: 1;
}
.app-toast-progress{
  height: 3px;
  background: var(--overlay-ink-09);
}
.app-toast-progress::before{
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(1);
  background: var(--toast-accent);
}
.app-toast-progress.is-running::before{
  animation: appToastCountdown var(--toast-time, 4000ms) linear forwards;
}

@keyframes appToastCountdown {
  to { transform: scaleX(0); }
}

@media (max-width: 575.98px){
  .app-toast-container{
    left: 0;
    right: 0;
    max-width: calc(100vw - 1rem);
    margin-left: auto;
    margin-right: auto;
  }
  .app-toast{
    min-width: 0;
    width: calc(100vw - 1rem);
  }
}

/* Admin navigation enhancements */
.admin-layout-row{
  min-height: 100vh;
}
.admin-main-column{
  min-width: 0;
  min-height: 100vh;
  --admin-col-pad: 1rem;
}
@media (min-width: 992px){
  .admin-main-column{
    --admin-col-pad: 1.5rem;
  }
}
.admin-main-content{
  min-width: 0;
}
.admin-footer{
  margin-top: .75rem;
}
.admin-footer-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  white-space: normal;
  overflow-x: hidden;
}
.admin-footer-meta{
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.admin-main-content > .d-flex.justify-content-between.align-items-center.mb-3 h2{
  font-size: var(--font-size-fluid-title-2);
  letter-spacing: -.01em;
  font-weight: 650;
}
.admin-main-content .card .card-text,
.admin-main-content .text-muted{
  line-height: 1.45;
}
.admin-home-grid .card{
  height: 100%;
}
.admin-home-grid .card .card-body{
  display: flex;
  flex-direction: column;
  gap: .4rem;
  height: 100%;
}
.admin-home-grid .card .card-text{
  margin-bottom: .7rem;
}
.admin-home-grid .card .card-body > .btn{
  margin-top: auto;
}
.admin-home-grid .card .card-body > .d-flex.gap-2{
  margin-top: auto;
}
.admin-home-grid .card .d-flex.gap-2{
  flex-wrap: wrap;
  align-items: flex-start;
}
.admin-home-grid .card .btn{
  max-width: 100%;
  white-space: normal;
}
.finance-dashboard-actions .btn{
  white-space: nowrap;
}
.finance-dashboard-actions{
  max-width: 100%;
}

/* Admin table system */
.admin-main-content .table-responsive{
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--app-panel);
}
.admin-main-content .table{
  margin-bottom: 0;
  --bs-table-border-color: var(--color-border);
  --bs-table-hover-bg: var(--gold-50);
}
.admin-main-content .table > :not(caption) > * > *{
  padding: .78rem .72rem;
  vertical-align: middle;
  font-size: var(--font-size-095);
  color: var(--color-text);
}
.admin-main-content .table > thead th{
  background: var(--navy-900) !important;
  color: var(--navy-200) !important;
  font-size: var(--font-size-084);
  font-weight: 600;
  letter-spacing: .02em;
  border-bottom: 0;
}
.admin-main-content .table > tbody > tr:nth-of-type(odd){
  --bs-table-accent-bg: var(--navy-50);
}
.admin-main-content .table.table-striped > tbody > tr:nth-of-type(odd){
  --bs-table-accent-bg: var(--navy-50);
}
.admin-main-content .table.table-hover > tbody > tr:hover{
  --bs-table-accent-bg: var(--gold-50);
  color: var(--color-text);
}
.admin-main-content .table td:last-child,
.admin-main-content .table th:last-child{
  white-space: nowrap;
}
.admin-main-content .table td .btn{
  margin-bottom: .2rem;
}
.admin-main-content .table .badge{
  font-weight: 600;
  letter-spacing: .01em;
}
.admin-sidebar{
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top center, var(--overlay-accent-08), transparent 26%),
    linear-gradient(180deg, var(--color-brand-topbar-start) 0%, var(--color-brand-topbar-mid) 42%, var(--color-brand-topbar-end) 100%);
}
.admin-nav-shell{
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.admin-nav-header{
  padding: .35rem .65rem 1rem;
  border-bottom: 1px solid var(--overlay-white-08);
}
.admin-nav-header-logo{
  display: block;
  width: auto;
  height: 2.5rem;
  object-fit: contain;
}
.admin-nav-body{
  flex: 1 1 auto;
  min-height: 0;
  padding-top: .95rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.admin-nav-body::-webkit-scrollbar{
  width: 0;
  height: 0;
}
.admin-nav-section-label{
  color: var(--overlay-muted-blue-42);
  font-size: var(--font-size-074);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 1rem 1.05rem .7rem;
}
.admin-nav-body > .admin-nav-section-label:first-child{
  margin-top: .1rem;
}
.admin-direct-links{
  display: flex;
  flex-direction: column;
  gap: .28rem;
}
.admin-direct-link{
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--overlay-muted-blue-86);
  text-decoration: none;
  font-size: var(--font-size-094);
  font-weight: 600;
  min-height: 3rem;
  padding: .78rem 1rem;
  border: 1px solid var(--overlay-white-08);
  border-radius: 1.1rem;
  background: var(--overlay-white-02);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.admin-direct-link-subtle{
  background: transparent;
  border-color: transparent;
  color: var(--overlay-muted-blue-78);
  box-shadow: none;
}
.admin-direct-link:hover{
  color: var(--color-white);
  background: var(--overlay-white-05);
  border-color: var(--overlay-white-08);
}
.admin-direct-link.active{
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-accent), var(--gold-300));
  border-color: var(--gold-300);
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}
.admin-direct-link i{
  font-size: var(--font-size-090);
  width: 1.15rem;
  text-align: center;
}
.admin-nav-accordion{
  display: flex;
  flex-direction: column;
  gap: .18rem;
}
.admin-nav-group{
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}
.admin-nav-toggle{
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--overlay-muted-blue-78b);
  padding: .82rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: var(--font-size-094);
  text-align: left;
  min-height: 2.95rem;
  border-radius: 1rem;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.admin-nav-toggle:hover{
  background: var(--overlay-white-04);
  color: var(--color-white);
}
.admin-nav-toggle.is-active{
  background: var(--overlay-white-04);
  color: var(--color-white);
}
.admin-nav-group.is-active{
  border-color: transparent;
}
.admin-nav-chevron{
  transition: transform .2s ease;
  font-size: var(--font-size-080);
  opacity: .3;
}
.admin-nav-toggle.collapsed .admin-nav-chevron{
  transform: rotate(-90deg);
}
.admin-nav-links{
  padding: .08rem .4rem .34rem 1.2rem;
}
.admin-nav-links .nav-link{
  padding: .48rem .72rem;
  font-size: var(--font-size-080);
  border-radius: 10px;
  color: var(--overlay-muted-blue-66);
  transition: background .18s ease, color .18s ease;
}
.admin-nav-links .nav-link:hover{
  background: transparent;
  color: var(--color-white);
}
.admin-nav-links .nav-link.active{
  background: var(--overlay-white-06);
  color: var(--color-white);
  font-weight: 700;
  border: 1px solid var(--overlay-white-06);
}
.admin-nav-danger .admin-nav-toggle{
  color: var(--overlay-danger-text-78);
}
.admin-nav-danger .admin-nav-toggle:hover{
  background: var(--overlay-danger-12);
}
.admin-nav-danger.is-active{
  border-color: var(--overlay-danger-border-35);
}
.admin-nav-danger .nav-link.active{
  background: var(--overlay-danger-24);
  border-color: var(--overlay-danger-border-40);
}
.admin-nav-footer{
  border-top: 1px solid var(--overlay-white-12);
  padding: 1rem .55rem .55rem;
  margin-top: auto !important;
}
.admin-user-card{
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--overlay-white-06);
  border: 1px solid var(--overlay-white-04);
  border-radius: 16px;
  padding: .85rem .9rem;
  margin: 0 0 .9rem;
}
.admin-user-avatar{
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  color: var(--color-white);
  font-weight: 700;
}
.admin-user-info{
  min-width: 0;
}
.admin-user-name{
  color: var(--color-white);
  font-size: var(--font-size-088);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-meta{
  color: var(--overlay-muted-blue-72);
  font-size: var(--font-size-070);
  margin-top: .15rem;
}
.admin-nav-footer-link{
  display: flex;
  align-items: center;
  gap: .72rem;
  min-height: 3.2rem;
  padding: .55rem 0;
  color: var(--overlay-muted-blue-90);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-092);
}
.admin-nav-footer-link:hover{
  color: var(--color-white);
}
.admin-nav-footer-icon{
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 2.2rem;
  border-radius: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  color: var(--color-white);
  box-shadow: 0 8px 18px var(--overlay-accent-22);
}
.admin-nav-footer-icon i{
  font-size: var(--font-size-098);
}
.admin-nav-footer-copy{
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-nav-footer-title{
  color: var(--overlay-muted-blue-94);
  font-size: var(--font-size-092);
  font-weight: 700;
  line-height: 1.15;
}
.admin-nav-footer-subtitle{
  color: var(--overlay-muted-blue-62);
  font-size: var(--font-size-070);
  margin-top: .22rem;
  line-height: 1.2;
}

/* Ensure status badges remain visible on light table rows */
.admin-main-content .table .badge.text-bg-primary{
  background-color: var(--color-accent) !important;
  color: var(--navy-950) !important;
}
.admin-main-content .table .badge.text-bg-warning{
  background-color: var(--color-warning-warm) !important;
  color: var(--navy-950) !important;
}
.admin-main-content .table .badge.text-bg-info {
    background-color: var(--color-warning-warm) !important;
    color: var(--navy-950) !important;
}
.admin-main-content .table .badge.text-bg-success{
  background-color: var(--color-success) !important;
  color: var(--color-white) !important;
}
.admin-main-content .table .badge.text-bg-secondary{
  background-color: var(--navy-600) !important;
  color: var(--color-white) !important;
}
.admin-main-content .table .text-bg-primary{
  background-color: var(--color-accent) !important;
  color: var(--navy-950) !important;
}
.admin-main-content .table .text-bg-warning{
  background-color: var(--color-warning-warm) !important;
  color: var(--navy-950) !important;
}
.admin-main-content .table .text-bg-danger {
    background-color: var(--color-danger) !important;
    color: var(--color-white) !important;
}
.admin-main-content .table .text-bg-success{
  background-color: var(--color-success) !important;
  color: var(--color-white) !important;
}
.admin-main-content .table .text-bg-secondary{
  background-color: var(--navy-600) !important;
  color: var(--color-white) !important;
}
.admin-footer{
  border-radius: 0;
  border: 1px solid var(--app-border);
  border-left: 0;
  border-right: 0;
  background: var(--color-white);
  backdrop-filter: none;
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: calc(var(--admin-col-pad) * -1);
  box-sizing: border-box;
}
.admin-footer .container-fluid{
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}
.admin-footer-copy{
  color: var(--color-text-muted-4);
  font-size: var(--font-size-098);
  font-weight: 500;
  line-height: 1.2;
}
.admin-footer-links{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.admin-footer-links a{
  color: var(--color-accent-dark);
  font-size: var(--font-size-096);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: .12em;
}
.admin-footer-links a:hover{
  color: var(--gold-600);
}
.admin-footer .footer-powered{
  color: var(--color-text-muted-4);
  font-size: var(--font-size-098);
  font-weight: 500;
}
.admin-footer .footer-powered a{
  color: var(--color-accent-dark);
  font-weight: 600;
  text-decoration: none;
}
.admin-footer .footer-powered a:hover{
  color: var(--gold-600);
}

@media (max-width: 767.98px){
  .admin-footer .footer-powered{
    display: inline-block;
    text-align: left;
  }
}

.dashboard-page{
  padding-bottom: .4rem;
  color: var(--color-text-strong);
}
.dashboard-hero{
  margin-bottom: 2rem !important;
}
.dashboard-title{
  font-family: 'DM Sans', Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font-size-fluid-title-3);
  letter-spacing: -.02em;
  color: var(--color-text);
  font-weight: 800;
  line-height: 1.08;
}
.dashboard-hero-meta{
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: .55rem;
}
.dashboard-branch-pill{
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: var(--overlay-accent-08);
  border: 1px solid var(--overlay-accent-28);
  color: var(--color-accent-dark);
  font-size: var(--font-size-088);
  font-weight: 700;
}
.dashboard-live-meta{
  color: var(--color-muted);
  font-size: var(--font-size-088);
  font-weight: 500;
}
.dashboard-subtitle,
.dashboard-date,
.dashboard-metric-label,
.dashboard-metric-meta,
.dashboard-section-title{
  color: var(--color-text-neutral-5);
}
.dashboard-subtitle{
  font-size: var(--font-size-092);
  margin-top: .35rem;
  font-weight: 500;
}
.dashboard-date{
  font-size: var(--font-size-088);
  font-weight: 500;
  white-space: nowrap;
  text-align: right;
}
.dashboard-date strong{
  display: block;
  color: var(--color-text);
  font-size: var(--font-size-100);
  font-weight: 700;
  margin-bottom: .18rem;
}
.dashboard-date span{
  color: var(--color-muted);
}
.dashboard-section-title{
  font-size: var(--font-size-092);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.dashboard-section-heading{
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dashboard-section-rule{
  flex: 1 1 auto;
  height: 1px;
  background: var(--overlay-ink-08);
}
.dashboard-actions .btn{
  border-radius: 14px;
  padding-inline: .95rem;
  font-size: var(--font-size-087);
}
.dashboard-actions .btn-outline-primary,
.dashboard-actions .btn-outline-secondary{
  background: var(--overlay-white-58);
  border-color: var(--overlay-ink-10) !important;
  color: var(--color-text) !important;
}
.dashboard-metric-card{
  border-radius: 18px;
  border-color: var(--overlay-ink-08);
  background: var(--color-white);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px var(--overlay-brand-03);
}
.dashboard-metric-card-accent::before{
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-400), var(--gold-300));
  opacity: .95;
}
.dashboard-metric-card .card-body{
  padding: 1.35rem 1.3rem;
}
.dashboard-metric-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .9rem;
}
.dashboard-metric-label{
  font-size: var(--font-size-074);
  margin-bottom: 0;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--color-text-subtle-2);
}
.dashboard-metric-icon{
  width: 2.2rem;
  height: 2.2rem;
  border-radius: .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay-accent-08);
  color: var(--color-accent-dark);
  font-size: var(--font-size-092);
}
.dashboard-metric-icon-strong{
  background: var(--overlay-white-12);
  color: var(--overlay-white-82);
}
.dashboard-metric-value{
  font-family: 'DM Sans', Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font-size-fluid-title-4);
  line-height: 1;
  color: var(--color-text);
  font-weight: 800;
  letter-spacing: -.02em;
}
.dashboard-metric-meta{
  font-size: var(--font-size-082);
  margin-top: .7rem;
}
.dashboard-metric-note{
  color: var(--color-muted);
  font-size: var(--font-size-082);
  margin-top: .5rem;
}
.dashboard-note-pill{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .24rem .55rem;
  border-radius: 999px;
  background: var(--overlay-ink-06);
  color: var(--color-muted);
  font-size: var(--font-size-082);
  font-weight: 700;
}
.dashboard-note-pill::before{
  content: "";
  width: .35rem;
  height: .12rem;
  border-radius: 999px;
  background: currentColor;
}
.dashboard-note-pill-strong{
  background: var(--overlay-ink-06);
  color: var(--color-muted);
}
.dashboard-note-pill-strong::before{
  background: currentColor;
}
.dashboard-metric-card-highlight{
  background: var(--color-white);
  border-color: var(--overlay-ink-08);
  box-shadow: 0 8px 18px var(--overlay-navy-05);
}
.dashboard-metric-card-highlight .dashboard-metric-value,
.dashboard-metric-card-highlight .dashboard-metric-label{
  color: inherit;
}
.dashboard-metric-card-highlight .dashboard-metric-value{
  color: var(--gold-500);
}
.dashboard-metric-card-highlight .dashboard-metric-note{
  color: var(--color-muted);
}
.dashboard-metric-card-highlight .dashboard-metric-icon{
  background: var(--overlay-accent-08);
  color: var(--color-accent-dark);
}
.dashboard-metric-card-highlight .dashboard-metric-icon-strong{
  background: var(--overlay-accent-08);
  color: var(--color-accent-dark);
}
.dashboard-metric-bar{
  margin-top: 1rem;
  height: .22rem;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--overlay-ink-12), var(--overlay-ink-08));
}
.dashboard-panel-card{
  border-radius: 18px;
  background: var(--color-white);
  border-color: var(--overlay-ink-08);
}
.dashboard-panel-card .card-body{
  padding: 1.25rem 1.25rem 1.15rem;
}
.dashboard-panel-card .card-title{
  font-size: var(--font-size-102);
  font-weight: 600;
  color: var(--color-text);
}
.dashboard-chip-btn{
  border-radius: 12px;
  padding-inline: .75rem;
  font-size: var(--font-size-078);
  font-weight: 600;
}
.dashboard-ordered-list{
  padding-left: 1.2rem;
}
.dashboard-ordered-list li{
  margin-bottom: .45rem;
  color: var(--color-text-strong);
}
.dashboard-insight-list{
  list-style: none;
  padding-left: 0;
}
.dashboard-insight-list li{
  padding: .42rem 0;
  border-bottom: 1px dashed var(--overlay-slate-35);
  color: var(--color-text-neutral-6);
}
.dashboard-insight-list li:last-child{
  border-bottom: 0;
}
.dashboard-mix-card .card-body{
  padding: 1.45rem 1.45rem 1.2rem;
}
.dashboard-mix-chart-wrap{
  max-width: 260px;
  margin: 0 auto;
}
.dashboard-mix-legend{
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.dashboard-mix-legend-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.dashboard-mix-legend-name{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--color-text-strong);
  font-weight: 600;
}
.dashboard-mix-legend-pct{
  color: var(--color-text-strong);
  font-weight: 700;
}
.dashboard-mix-dot{
  width: .62rem;
  height: .62rem;
  border-radius: 999px;
  display: inline-block;
}
.dashboard-mix-dot-0{ background: var(--color-status-accent-dot); }
.dashboard-mix-dot-1{ background: var(--color-info-light); }
.dashboard-mix-dot-2{ background: var(--color-success-light); }

@media (max-width: 991.98px){
  .admin-layout-row{
    min-height: auto;
  }
  .admin-sidebar{
    height: 100%;
    min-height: 100%;
    max-height: none;
    border-radius: 0;
    overflow: hidden;
  }
  .admin-nav-shell{
    min-height: 100%;
  }
  .admin-content-wrap{
    max-width: 100%;
    min-height: 100%;
  }
  .admin-topbar{ border-radius: 0; }
  .admin-topbar-actions{
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }
  .admin-topbar-actions .branch-switcher{
    flex-basis: 100%;
    min-width: 0;
  }
  .admin-footer-row{
    justify-content: flex-start;
  }
  .dashboard-date{
    white-space: normal;
    text-align: left;
  }
}

/* Order Create – receipt-style bill */
.order-bill-card {
  border: 2px dashed var(--app-border);
  box-shadow: var(--app-shadow-sm);
}
.order-bill-card .card-header {
  background: linear-gradient(135deg, var(--navy-50) 0%, var(--navy-100) 100%);
  border-bottom: 1px solid var(--app-border);
}
.order-bill-totals {
  background: var(--navy-50);
  font-variant-numeric: tabular-nums;
}
.order-bill-totals .fw-bold { color: var(--color-accent); }
.discount-btn.active { font-weight: 600; }

/* Order editor shared primitives (Phase 5) */
.order-workspace {
  display: grid;
  gap: var(--space-sm-plus);
  margin-bottom: var(--space-md);
}
.order-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  border-bottom: 1px solid var(--bs-border-color);
  padding: .8rem var(--space-md);
  background: linear-gradient(180deg, var(--overlay-surface-98), var(--overlay-shell-90));
}
.order-pane-scroll {
  min-height: 0;
  overflow: auto;
  padding: var(--space-sm-plus);
}
.menu-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
}
.menu-tabs .nav-link {
  white-space: nowrap;
  font-weight: var(--font-weight-semibold);
}
.menu-item-col { padding: var(--space-3xs); }
.menu-item-card {
  cursor: pointer;
  border: 1px solid var(--color-border-alt);
  border-radius: var(--radius-soft);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  height: 100%;
  overflow: hidden;
}
.menu-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--overlay-ink-08);
}
.menu-empty-state {
  border: 1px dashed var(--color-border-subtle);
  border-radius: var(--radius-soft);
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-muted-3);
}
.menu-items-index .menu-item-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xxs) .65rem;
}
.menu-items-index .menu-item-stat {
  border: 1px solid var(--color-border);
  border-radius: var(--btn-border-radius);
  padding: var(--space-xxs) .55rem;
}
.menu-items-index .menu-item-stat-label {
  display: block;
  font-size: var(--font-size-076);
  color: var(--color-muted);
}
.menu-items-index .menu-item-stat-value {
  display: block;
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  font-size: var(--font-size-095);
}
.menu-items-index .menu-item-badges,
.menu-items-index .menu-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
}
.menu-items-index .menu-items-empty,
.menu-empty-state {
  border: 1px dashed var(--color-border-subtle);
  text-align: center;
}
.order-summary-table td,
.order-summary-table th { vertical-align: middle; }
.order-bill-footer {
  border-top: 1px solid var(--bs-border-color);
  background: var(--color-white);
  position: sticky;
  bottom: 0;
  z-index: 3;
}
.report-card {
  border-radius: var(--card-border-radius);
}
.report-card .card-body {
  display: flex;
  flex-direction: column;
  min-height: 150px;
}
.report-card .card-title {
  margin-bottom: .4rem;
}
.report-card .card-text {
  margin-bottom: var(--space-md);
}
.menu-toolbar,
.menu-top-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.menu-toolbar { gap: var(--space-xs); }
.toolbar-select-wrap { min-width: 190px; }
.action-state-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.action-state-check {
  color: var(--color-success);
  margin-left: .15rem;
}
.out-of-stock-panel {
  border: 1px solid var(--color-danger-border);
  border-radius: var(--radius-soft);
  background: var(--color-warning-surface);
  padding: var(--space-sm-plus) var(--space-md);
}
.discount-badge {
  font-size: var(--font-size-078);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-pill);
  padding: var(--space-2xs) .6rem;
}
.kds-inventory-count-badge,
.out-of-stock-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  border-radius: var(--radius-pill);
}
.kds-inventory-count-badge {
  min-width: 1.4rem;
}
.out-of-stock-count-badge {
  min-width: 1.5rem;
  padding: .22rem var(--space-xxs);
}

/* ── Landing Page: dark banner + light content ── */
body.landing-page {
  background: var(--navy-50);
  color: var(--color-text);
  overflow-x: hidden;
}
body.landing-page .app-content.landing-content {
  flex: 1;
  padding: 0;
  max-width: 100%;
}
body.landing-page .footer.landing-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-muted);
}
body.landing-page .footer.landing-footer a { color: var(--color-text); }
body.landing-page .footer.landing-footer a:hover { color: var(--color-accent); }

/* Public navbar — light theme (used for landing, login, register) */
body.landing-page header { position: sticky; top: 0; z-index: 100; }
.app-navbar.navbar-dark {
  background: var(--navy-950) !important;
  border-bottom: 1px solid var(--overlay-white-06);
  min-height: 68px;
}
.app-navbar.navbar-dark .nav-link {
  color: var(--navy-200) !important;
  opacity: 1;
  font-size: var(--font-size-087);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
}
.app-navbar.navbar-dark .nav-link:hover {
  color: var(--color-white) !important;
  background: var(--overlay-white-08);
}
.app-navbar.navbar-dark .navbar-toggler {
  border-color: var(--overlay-white-20);
  color: var(--navy-200);
}
.app-navbar.navbar-dark .navbar-toggler-icon { filter: invert(1); }

/* Hero section — Design System */
.landing-hero {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 64px 1rem 74px;
  background:
    radial-gradient(1200px 540px at 92% 16%, var(--overlay-accent-16) 0%, var(--overlay-accent-0) 66%),
    radial-gradient(850px 520px at 88% 90%, var(--overlay-indigo-30) 0%, var(--overlay-indigo-0) 72%),
    linear-gradient(122deg, var(--color-brand-hero-start) 0%, var(--color-brand-hero-mid) 52%, var(--color-brand-hero-end) 100%);
  overflow: hidden;
}
.landing-hero::after {
  content: "";
  position: absolute;
  inset: -4% -4% -8% 36%;
  z-index: 0;
  pointer-events: none;
  background-image: url('/HeroSectionImg.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 58% 52%;
  opacity: .77;
  filter: saturate(1.1) contrast(1.04) brightness(.94);
  -webkit-mask-image: linear-gradient(108deg, transparent 0%, var(--overlay-black-16) 14%, var(--overlay-black-82) 38%, var(--overlay-black-96) 100%);
  mask-image: linear-gradient(108deg, transparent 0%, var(--overlay-black-16) 14%, var(--overlay-black-82) 38%, var(--overlay-black-96) 100%);
}
.landing-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 72% 82% at 82% 56%, var(--overlay-accent-20) 0%, transparent 66%),
    linear-gradient(90deg, var(--overlay-black-92) 0%, var(--overlay-black-82) 30%, var(--overlay-navy-50) 54%, var(--overlay-ink-07) 79%, var(--overlay-ink-16) 100%);
  pointer-events: none;
}
.landing-hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1.05fr);
  align-items: center;
  gap: clamp(1.5rem, 3.6vw, 3.25rem);
}
.landing-hero-content {
  max-width: 620px;
}
.landing-hero-visual {
  width: 100%;
  min-height: 420px;
}
.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--overlay-accent-15);
  border: 1px solid var(--overlay-accent-30);
  color: var(--gold-300);
  font-size: var(--font-size-075);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.landing-title {
  font-family: 'Playfair Display', serif;
  font-size: var(--font-size-fluid-hero-3);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.01em;
  color: var(--color-white);
  margin-bottom: 14px;
}
.landing-title .text-accent {
  color: var(--gold-400);
  font-style: normal;
}
.landing-lead {
  font-size: var(--font-size-fluid-hero-4);
  font-weight: 400;
  line-height: 1.55;
  color: var(--navy-200);
  margin-bottom: 30px;
  max-width: 510px;
}
.landing-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.landing-ctas .btn-primary,
.landing-ctas .btn-accent {
  background: var(--gold-400) !important;
  border-color: var(--gold-400) !important;
  color: white !important;
  font-weight: 600;
  box-shadow: 0 2px 8px var(--overlay-accent-35);
}
.landing-ctas .btn-primary:hover,
.landing-ctas .btn-accent:hover {
  background: var(--gold-300) !important;
  border-color: var(--gold-300) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--overlay-accent-45);
}
.landing-ctas .btn-outline-light {
  background: var(--overlay-white-10);
  border: 1.5px solid var(--overlay-white-20);
  color: var(--color-white);
  backdrop-filter: blur(8px);
}
.landing-ctas .btn-outline-light:hover {
  background: var(--overlay-white-20);
  border-color: var(--overlay-white-40);
  color: var(--color-white);
  transform: translateY(-1px);
}
@media (max-width: 1199.98px) {
  .landing-hero {
    min-height: 580px;
    padding-top: 58px;
  }
  .landing-hero::after {
    inset: -4% -12% -6% 42%;
    opacity: .64;
  }
  .landing-hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
    gap: 1.5rem;
  }
}
@media (max-width: 991.98px) {
  .landing-hero {
    padding-top: 52px;
    padding-bottom: 52px;
    min-height: 540px;
  }
  .landing-hero::after {
    inset: 22% -26% -16% 18%;
    opacity: .34;
    filter: saturate(1.02) contrast(1.02) brightness(.82);
    -webkit-mask-image: linear-gradient(180deg, var(--overlay-black-50) 0%, var(--overlay-black-90) 45%, var(--overlay-black-92) 100%);
    mask-image: linear-gradient(180deg, var(--overlay-black-50) 0%, var(--overlay-black-90) 45%, var(--overlay-black-92) 100%);
  }
  .landing-hero-layout {
    grid-template-columns: 1fr;
  }
  .landing-hero-content {
    max-width: 100%;
    text-align: left;
  }
  .landing-lead {
    max-width: 100%;
  }
  .landing-hero-visual {
    display: none;
  }
}
@media (max-width: 575.98px) {
  .landing-hero {
    min-height: auto;
    padding: 42px 1rem 48px;
  }
  .landing-hero::after {
    inset: 30% -38% -22% 6%;
    opacity: .28;
  }
  .landing-title {
    font-size: var(--font-size-fluid-hero-2);
  }
}

/* Landing sections */
.landing-hero-sm { min-height: 200px; padding: 3rem 0; }
.landing-hero-sm .landing-hero-content { max-width: 100%; }

.landing-section {
  padding: 56px 0 64px;
  margin-bottom: 0;
}
.landing-section-label {
  font-size: var(--font-size-069);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-500);
  margin-bottom: 8px;
}
.landing-section-title {
  font-family: 'Playfair Display', serif;
  font-size: var(--font-size-175);
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 4px;
}
.landing-section-lead {
  color: var(--text-muted);
  font-size: var(--font-size-093);
  margin-bottom: 32px;
  max-width: 560px;
}
.landing-section-lead.text-center { margin-left: auto; margin-right: auto; }

/* Features grid — Design System cards */
.landing-features { background: var(--color-surface); }
.landing-feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
  transition: box-shadow .2s, transform .2s;
  box-shadow: var(--shadow-sm);
}
.landing-feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.landing-feature-card .card-accent-bar {
  height: 4px;
}
.landing-feature-card .bar-navy { background: var(--navy-900); }
.landing-feature-card .bar-gold { background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); }
.landing-feature-card .bar-dual { background: linear-gradient(90deg, var(--navy-900) 50%, var(--gold-400) 50%); }
.landing-feature-card .card-body {
  padding: 20px 24px;
}
.landing-feature-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: var(--font-size-112);
}
.landing-feature-icon.icon-navy { background: var(--navy-50); color: var(--navy-700); }
.landing-feature-icon.icon-gold { background: var(--gold-100); color: var(--gold-600); }
.landing-feature-icon.app-brand-mark { color: var(--navy-950) !important; }
.landing-feature-title {
  font-size: var(--font-size-093);
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
}
.landing-feature-desc {
  font-size: var(--font-size-081);
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* About section — light theme */
.landing-about { background: var(--color-white); border-top: 1px solid var(--color-border); }
.landing-about-text {
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.landing-about-visual {
  background: linear-gradient(135deg, var(--gold-50), var(--navy-50));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
}
.landing-about-visual-inner {
  font-size: var(--font-size-300);
  color: var(--color-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.landing-about-visual-inner span { font-size: var(--font-size-100); color: var(--color-muted); }

/* About page content — light theme */
.landing-about-content { background: var(--navy-50); }
.landing-about-block {
  margin-bottom: 2rem;
}
.landing-about-block h2.landing-section-title {
  font-family: 'Playfair Display', serif;
  font-size: var(--font-size-175);
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: .75rem;
}
.landing-about-block p {
  color: var(--color-text);
  line-height: 1.7;
}
.landing-about-list {
  color: var(--color-text);
  line-height: 1.8;
  padding-left: 1.25rem;
}
.landing-about-list li { margin-bottom: .5rem; }

/* CTA section — light theme */
.landing-cta { background: var(--gold-50); border-top: 1px solid var(--color-border); }

/* Contact section — light theme */
.landing-contact { background: var(--navy-50); }
.landing-contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.landing-contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: border-color .2s;
  box-shadow: var(--shadow-sm);
}
.landing-contact-card:hover { border-color: var(--overlay-accent-40); box-shadow: var(--shadow-md); }
.landing-contact-card-wide { grid-column: 1 / -1; }
.landing-contact-icon {
  font-size: var(--font-size-200);
  color: var(--color-accent);
  margin-bottom: .75rem;
}
.landing-contact-card h3 {
  font-size: var(--font-size-100);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: .5rem;
}
.landing-contact-card a {
  color: var(--color-accent);
  text-decoration: none;
}
.landing-contact-card a:hover { color: var(--color-accent-hover); }

/* Page container — Design System */
.landing-page-content { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

/* Footer — Design System */
body.landing-page .footer.landing-footer {
  background: var(--navy-900) !important;
  color: var(--navy-200);
  border-top: none;
}
body.landing-page .footer.landing-footer a { color: var(--navy-200); }
body.landing-page .footer.landing-footer a:hover,
body.landing-page .footer.landing-footer .footer-powered a { color: var(--gold-400); }
body.landing-page .footer.landing-footer .footer-powered a:hover { color: var(--gold-300); }

/* Footer powered by */
.footer-powered { font-size: var(--font-size-090); }
.footer-powered a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}
.footer-powered a:hover { color: var(--color-accent-hover); }
body.landing-page .footer-powered { color: var(--navy-300); }


/* Orders workspace */
.orders-workspace {
  position: relative;
}
.orders-page-topbar h2 {
  font-size: var(--font-size-fluid-title-5);
  letter-spacing: -.03em;
}
.orders-page-topbar p {
  max-width: 42rem;
}
.orders-summary-strip {
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--overlay-white-92), var(--overlay-shell-92));
  box-shadow: var(--shadow-sm);
  padding: .8rem;
}
.orders-summary-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: .75rem;
  margin-bottom: 0;
}
.orders-summary-strip .collapse.show {
  margin-top: .75rem;
}
.orders-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .7rem;
  overflow: visible;
  padding-bottom: 0;
}
.orders-summary-card {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  padding: .72rem .82rem;
  border-radius: 14px;
  border: 1px solid var(--app-border);
  background: linear-gradient(180deg, var(--overlay-white-98), var(--overlay-shell-94b));
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.orders-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.orders-summary-card.is-active {
  border-color: var(--color-accent);
  box-shadow: 0 10px 24px var(--overlay-accent-18);
}
.orders-summary-card.is-open { border-top: 4px solid var(--color-accent); }
.orders-summary-card.is-kitchen { border-top: 4px solid var(--color-warning-strong); }
.orders-summary-card.is-served { border-top: 4px solid var(--color-success); }
.orders-summary-card.is-paid { border-top: 4px solid var(--navy-700); }
.orders-summary-card.is-cancelled { border-top: 4px solid var(--color-danger); }
.orders-summary-eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: var(--font-size-072r);
  color: var(--color-muted);
  font-weight: 700;
}
.orders-summary-count {
  font-size: var(--font-size-fluid-title-6);
  font-weight: 700;
  line-height: 1;
  margin: .28rem 0;
}
.orders-summary-meta {
  color: var(--color-muted);
  font-size: var(--font-size-077);
}
.orders-filter-card {
  position: static;
  box-shadow: var(--shadow-sm);
}
.orders-filter-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.orders-filter-card .collapse.show {
  margin-top: .75rem;
}
.orders-filter-shell {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.orders-filter-primary {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) auto;
  gap: .75rem;
  align-items: end;
}
.orders-filter-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: .75rem .9rem;
}
.orders-filter-field {
  grid-column: span 2;
}
.orders-filter-search {
  grid-column: span 1;
}
.orders-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  justify-content: flex-end;
}
.orders-filter-grid-advanced {
  padding-top: .65rem;
  border-top: 1px solid var(--app-border);
}
.orders-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.orders-toolbar-label {
  font-size: var(--font-size-078);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--color-muted);
}
.orders-active-bar {
  padding: .55rem .75rem;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--overlay-white-90);
}
.orders-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--navy-50);
  color: var(--navy-800);
  border: 1px solid var(--navy-100);
  border-radius: 999px;
  padding: .35rem .7rem;
  font-size: var(--font-size-082);
  font-weight: 600;
}
.orders-filter-pill.is-muted {
  color: var(--color-muted);
}
.orders-table .btn {
  min-width: 4.25rem;
}
.orders-workspace .table-responsive {
  overflow: visible;
}
.orders-workspace .card {
  overflow: visible;
}
.orders-row-actions {
  max-width: none;
  white-space: nowrap;
}
.orders-row-menu {
  min-width: 12rem;
  z-index: 1100;
}
.orders-row-menu-form {
  margin: 0;
}
.orders-row-menu-form .dropdown-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
}
.orders-empty-state {
  border-style: dashed;
}
.orders-empty-icon {
  width: 4.2rem;
  height: 4.2rem;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold-50);
  color: var(--gold-600);
  font-size: var(--font-size-170);
}
.orders-pagination .btn.disabled {
  pointer-events: none;
  opacity: .5;
}
.orders-kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}
.orders-kanban-column {
  min-height: 30rem;
  max-height: calc(100vh - 250px);
  border: 1px solid var(--app-border);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--overlay-white-98), var(--overlay-shell-95));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.orders-kanban-column.is-open { box-shadow: inset 0 4px 0 var(--color-accent); }
.orders-kanban-column.is-kitchen { box-shadow: inset 0 4px 0 var(--color-warning-strong); }
.orders-kanban-column.is-served { box-shadow: inset 0 4px 0 var(--color-success); }
.orders-kanban-column.is-paid { box-shadow: inset 0 4px 0 var(--navy-700); }
.orders-kanban-column.is-cancelled { box-shadow: inset 0 4px 0 var(--color-danger); }
.orders-kanban-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: .75rem;
  border-bottom: 1px solid var(--app-border);
  background: linear-gradient(180deg, var(--overlay-white-98), var(--overlay-shell-95));
  position: sticky;
  top: 0;
  z-index: 3;
}
.orders-kanban-title {
  font-weight: 700;
  letter-spacing: -.02em;
}
.orders-kanban-subtitle {
  font-size: var(--font-size-082);
  color: var(--color-muted);
}
.orders-kanban-dropzone {
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}
.orders-kanban-dropzone.is-over {
  background: var(--overlay-accent-08);
}
.orders-kanban-empty {
  border: 1px dashed var(--app-border);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  color: var(--color-muted);
  background: var(--overlay-white-70);
}
.orders-kanban-card {
  border: 1px solid var(--overlay-ink-08);
  border-radius: 18px;
  background: var(--color-white);
  padding: 1rem;
  box-shadow: 0 14px 30px var(--overlay-ink-07);
  cursor: grab;
}
.orders-kanban-card-head {
  margin-bottom: .3rem;
}
.orders-kanban-card[draggable="false"] {
  cursor: default;
  opacity: .88;
}
.orders-kanban-card.is-dragging {
  opacity: .55;
}
.orders-kanban-card.is-saving {
  opacity: .7;
  pointer-events: none;
}
.orders-order-number {
  display: inline-block;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.02em;
}
.orders-kanban-hover-time {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  transition: opacity .18s ease, max-height .18s ease, margin-top .18s ease;
}
.orders-kanban-card:hover .orders-kanban-hover-time,
.orders-kanban-card:focus-within .orders-kanban-hover-time {
  opacity: 1;
  max-height: 24px;
  margin-top: .28rem;
}
@media (max-width: 991.98px) {
  .orders-kanban-column {
    max-height: none;
  }
  .orders-kanban-header {
    position: static;
  }
  .orders-kanban-dropzone {
    overflow-y: visible;
  }
}
.orders-kanban-meta {
  color: var(--color-muted);
  font-size: var(--font-size-084);
  margin-top: .2rem;
}
.orders-kanban-items {
  margin-top: .7rem;
  font-size: var(--font-size-093r);
  color: var(--color-text);
}
.orders-kanban-finance {
  margin-top: .55rem;
  font-size: var(--font-size-087r);
}

/* KDS workspace */
.kds-workspace {
  position: relative;
}
.kds-refresh-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem .8rem;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  background: var(--overlay-white-92);
  font-size: var(--font-size-084);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}
.kds-refresh-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 .25rem var(--overlay-success-focus);
}
.kds-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(180px, .7fr));
  gap: .9rem 1rem;
  align-items: end;
}
.kds-filter-cell {
  min-width: 0;
}
.kds-filter-cell-search {
  grid-column: span 2;
}
.kds-filter-cell-actions {
  grid-column: span 2;
}
.kds-summary-card {
  min-width: 0;
}
.kds-filter-actions {
  justify-content: flex-start;
}
.kds-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .8rem;
}
.kds-board-shell {
  border: 1px solid var(--app-border);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--overlay-shell-96b), var(--overlay-shell-96b));
  padding: .9rem;
  height: calc(100vh - 23rem);
  min-height: 34rem;
  overflow: hidden;
}
.kds-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;
  padding-bottom: .4rem;
}
.kds-column {
  border: 1px solid var(--app-border);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--overlay-white-98), var(--overlay-shell-95));
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.kds-column.is-pending { box-shadow: inset 0 4px 0 var(--color-accent); }
.kds-column.is-mixed,
.kds-column.is-inprogress { box-shadow: inset 0 4px 0 var(--color-warning-strong); }
.kds-column.is-ready { box-shadow: inset 0 4px 0 var(--color-success); }
.kds-column.is-served { box-shadow: inset 0 4px 0 var(--navy-700); }
.kds-column-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: start;
  border-bottom: 1px solid var(--app-border);
}
.kds-column-subtitle {
  margin-top: .25rem;
  font-size: var(--font-size-082);
  color: var(--color-muted);
}
.kds-column-body {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: .9rem;
  min-height: 0;
  overflow-y: auto;
}
.kds-column-body.is-over {
  background: var(--overlay-ink-04);
}
.kds-ticket-card {
  border: 1px solid var(--overlay-ink-08);
  border-radius: 18px;
  background: var(--color-white);
  padding: 1rem;
  box-shadow: 0 14px 30px var(--overlay-ink-07);
  cursor: grab;
}
.kds-ticket-card.is-dragging {
  opacity: .55;
  transform: rotate(1deg);
  cursor: grabbing;
}
.kds-ticket-card.is-saving {
  opacity: .7;
  pointer-events: none;
}
.kds-ticket-card.is-fresh {
  border-color: var(--overlay-blue-26);
}
.kds-ticket-card.is-stale {
  border-color: var(--overlay-danger-26);
  box-shadow: 0 16px 32px var(--overlay-danger-09);
}
.kds-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: start;
}
.kds-ticket-subtitle {
  margin-top: .2rem;
  font-size: var(--font-size-086);
  color: var(--color-muted);
}
.kds-ticket-age {
  margin-top: .45rem;
  font-size: var(--font-size-080);
  font-weight: 700;
  color: var(--color-muted);
}
.kds-ticket-age.is-fresh {
  color: var(--color-info);
}
.kds-ticket-age.is-stale {
  color: var(--color-danger);
}
.kds-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: .8rem;
  font-size: var(--font-size-084);
  color: var(--color-muted);
}
.kds-ticket-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .85rem;
}
.kds-ticket-summary {
  margin-top: .8rem;
  font-size: var(--font-size-092);
  color: var(--color-text);
}
.kds-line-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-top: .95rem;
}
.kds-line-row {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: start;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  padding: .78rem;
  background: var(--overlay-surface-82);
}
.kds-line-row.status-pending {
  background: var(--overlay-info-soft-3);
}
.kds-line-row.status-inprogress {
  background: var(--overlay-warning-soft);
}
.kds-line-row.status-ready {
  background: var(--overlay-success-soft);
}
.kds-line-main {
  min-width: 0;
}
.kds-line-item {
  font-weight: 600;
  color: var(--color-text);
}
.kds-line-qty {
  margin-top: .15rem;
  font-size: var(--font-size-082);
  color: var(--color-muted);
}
.kds-line-side {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: .55rem;
}
.kds-ticket-drag-hint {
  margin-top: .8rem;
  font-size: var(--font-size-078);
  color: var(--color-muted);
}
.kds-line-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: .45rem;
}
.kds-table .btn {
  min-width: 4.6rem;
}
.kds-table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: .45rem;
}
@media (max-width: 1199.98px) {
  .orders-filter-strip-head {
    align-items: start;
    flex-direction: column;
  }
  .orders-filter-primary {
    grid-template-columns: 1fr 1fr;
  }
  .kds-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .orders-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .kds-filter-cell-search,
  .kds-filter-cell-actions {
    grid-column: span 2;
  }
  .orders-filter-field,
  .orders-filter-search {
    grid-column: span 3;
  }
  .orders-summary-strip-head {
    align-items: start;
    flex-direction: column;
  }
  .kds-board-shell {
    height: calc(100vh - 24rem);
  }
}
@media (max-width: 767.98px) {
  .orders-filter-primary {
    grid-template-columns: 1fr;
  }
  .kds-filter-grid {
    grid-template-columns: 1fr;
  }
  .orders-filter-actions {
    justify-content: stretch;
  }
  .orders-filter-actions .btn,
  .orders-filter-actions .btn-group {
    width: 100%;
  }
  .kds-refresh-pill,
  .kds-ticket-head,
  .kds-line-row,
  .kds-line-side {
    flex-direction: column;
    align-items: stretch;
  }
  .kds-filter-cell-search,
  .kds-filter-cell-actions {
    grid-column: span 1;
  }
  .kds-line-actions {
    justify-content: stretch;
  }
  .kds-line-actions .btn {
    width: 100%;
  }
  .kds-table-actions {
    justify-content: stretch;
  }
  .kds-table-actions .btn {
    width: 100%;
  }
  .orders-filter-field,
  .orders-filter-search {
    grid-column: span 6;
  }
  .orders-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .kds-board-shell {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .kds-board {
    height: auto;
  }
}
@media (max-width: 575.98px) {
  .orders-filter-field,
  .orders-filter-search {
    grid-column: span 12;
  }
  .orders-summary-grid {
    grid-auto-columns: minmax(150px, 75vw);
  }
  .kds-board {
    grid-auto-columns: minmax(280px, 88vw);
  }
  .kds-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* Thermal print shared styles */
.thermal-print-root {
  color: var(--color-text-neutral-7);
}
.thermal-sheet {
  margin: 0 auto;
  background: var(--color-white);
  border: 1px dashed var(--color-border-neutral);
  border-radius: 8px;
  padding: .7rem;
  box-shadow: none;
}
.thermal-header {
  text-align: center;
  border-bottom: 1px dashed var(--color-border-dashed);
  padding-bottom: .45rem;
  margin-bottom: .45rem;
}
.thermal-title {
  font-weight: 700;
  letter-spacing: .04em;
}
.thermal-subtitle {
  font-size: var(--font-size-082);
  color: var(--color-text-neutral-8);
}
.thermal-meta-row {
  display: flex;
  justify-content: space-between;
  gap: .45rem;
  margin-bottom: .2rem;
  font-size: var(--font-size-084);
}
.thermal-items {
  width: 100%;
  border-collapse: collapse;
  margin-top: .45rem;
}
.thermal-items th,
.thermal-items td {
  padding: .18rem 0;
  font-size: var(--font-size-083);
  vertical-align: top;
}
.thermal-items thead th {
  border-bottom: 1px dashed var(--color-border-dashed);
  font-weight: 600;
}
.thermal-items tfoot td {
  border-top: 1px dashed var(--color-border-dashed);
  padding-top: .3rem;
}
.thermal-items .amount {
  text-align: right;
  white-space: nowrap;
}
.thermal-note {
  border-top: 1px dashed var(--color-border-dashed);
  margin-top: .45rem;
  padding-top: .4rem;
  font-size: var(--font-size-080);
}
.thermal-help {
  font-size: var(--font-size-084);
  color: var(--color-muted);
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .thermal-print-root,
  .thermal-print-root * {
    visibility: visible !important;
  }

  .thermal-print-root {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--color-black) !important;
  }

  .thermal-sheet {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .thermal-paper-58 .thermal-sheet {
    width: 58mm !important;
    max-width: 58mm !important;
  }

  .thermal-paper-80 .thermal-sheet {
    width: 80mm !important;
    max-width: 80mm !important;
  }

  .no-print {
    display: none !important;
  }

  @page {
    margin: 0;
  }
}

/* Table Status V2 */
.ts-page {
    --ts-navy: var(--color-brand-deep-1);
    --ts-navy-mid: var(--color-brand-deep-2);
    --ts-gold: var(--color-accent-deep);
    --ts-gold-light: var(--color-status-warning-strong);
    --ts-bg: var(--color-status-warning-soft);
    --ts-card-bg: var(--color-white);
    --ts-border: var(--overlay-brand-10);
    --ts-muted: var(--color-text-subtle-2);
    --ts-success-bg: var(--color-status-success-bg);
    --ts-success-text: var(--color-status-success-text);
    --ts-seated-bg: var(--color-status-seated-bg);
    --ts-seated-text: var(--color-status-seated-text);
    --ts-order-bg: var(--color-warning-surface);
    --ts-order-text: var(--color-warning-deep);
    --ts-kitchen-bg: var(--color-warning-soft);
    --ts-kitchen-text: var(--color-status-kitchen-text);
    --ts-served-bg: var(--color-status-served-bg);
    --ts-served-text: var(--color-status-served-text);
    --ts-bill-bg: var(--color-danger-soft-surface);
    --ts-bill-text: var(--color-danger-deep);
    --ts-paying-bg: var(--color-warning-soft-2);
    --ts-paying-text: var(--color-warning-muted);
    background: var(--ts-bg);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    font-family: "DM Sans", "Segoe UI", Tahoma, sans-serif;
    font-size: var(--font-size-087);
    line-height: 1.35;
}

.ts-topbar {
    min-height: 58px;
    background: var(--ts-navy);
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
}

.ts-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 8px;
}

.ts-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(145deg, var(--color-accent-deep), var(--color-border-warm));
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.ts-brand-text {
    font-size: var(--font-size-093);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.ts-brand-text span {
    color: var(--ts-gold);
}

.ts-title {
    font-size: var(--font-size-087);
    font-weight: 600;
    color: var(--overlay-surface-95);
    line-height: 1.1;
}

.ts-topbar-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ts-time {
    font-size: var(--font-size-075);
    color: var(--overlay-surface-62);
}

.ts-btn {
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 600;
    font-size: var(--font-size-075);
    padding: 7px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ts-btn.ts-btn-primary {
    background: var(--ts-gold);
    color: var(--color-white);
}

.ts-btn.ts-btn-primary:hover {
    background: var(--ts-gold-light);
    transform: translateY(-1px);
}

.ts-btn.ts-btn-subtle {
    color: var(--color-white);
    background: var(--overlay-surface-08);
    border-color: var(--overlay-surface-15);
}

.ts-btn.ts-btn-subtle:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ts-statusbar {
    background: var(--color-white);
    border-bottom: 1px solid var(--ts-border);
    padding: 10px 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.ts-chip {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: var(--font-size-069);
    font-weight: 600;
    transition: all 0.15s ease;
}

.ts-chip::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    background: currentColor;
}

.ts-chip[data-tone="available"] { background: var(--ts-success-bg); color: var(--ts-success-text); }
.ts-chip[data-tone="seated"] { background: var(--ts-seated-bg); color: var(--ts-seated-text); }
.ts-chip[data-tone="ordering"] { background: var(--ts-order-bg); color: var(--ts-order-text); }
.ts-chip[data-tone="kitchen"] { background: var(--ts-kitchen-bg); color: var(--ts-kitchen-text); }
.ts-chip[data-tone="served"] { background: var(--ts-served-bg); color: var(--ts-served-text); }
.ts-chip[data-tone="bill"] { background: var(--ts-bill-bg); color: var(--ts-bill-text); }
.ts-chip[data-tone="paying"] { background: var(--ts-paying-bg); color: var(--ts-paying-text); }

.ts-chip.active {
    border-color: currentColor;
}

.ts-kpi {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0;
    border-left: 1px solid var(--ts-border);
}

.ts-kpi-item {
    padding: 0 14px;
    min-width: 88px;
    text-align: center;
    border-right: 1px solid var(--ts-border);
}

.ts-kpi-num {
    font-size: var(--font-size-112);
    line-height: 1.1;
    font-weight: 700;
    color: var(--ts-navy);
}

.ts-kpi-free { color: var(--ts-success-text); }
.ts-kpi-occ { color: var(--ts-kitchen-text); }
.ts-kpi-attn { color: var(--ts-bill-text); }

.ts-kpi-label {
    font-size: var(--font-size-062);
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--color-text-subtle-2);
}

.ts-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    min-height: 640px;
}

.ts-floor-wrap {
    padding: 18px;
}

.ts-floor {
    position: relative;
    min-height: calc(100vh - 275px);
    max-height: calc(100vh - 235px);
    border: 1px solid var(--ts-border);
    border-radius: 16px;
    background:
        linear-gradient(var(--overlay-brand-04) 1px, transparent 1px),
        linear-gradient(90deg, var(--overlay-brand-04) 1px, transparent 1px),
        var(--color-white);
    background-size: 40px 40px, 40px 40px, auto;
    overflow: auto;
}

.ts-floor-label {
    position: sticky;
    top: 8px;
    left: 14px;
    font-size: var(--font-size-069);
    letter-spacing: 0.11em;
    color: var(--overlay-brand-18);
    text-transform: uppercase;
    font-weight: 700;
    margin: 14px 0 0 14px;
    z-index: 2;
}

.ts-card {
    position: absolute;
    width: 125px;
    min-height: 94px;
    border: 2px solid var(--color-border-grid);
    border-radius: 12px;
    padding: 8px 10px 7px;
    background: var(--color-white);
    user-select: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.is-edit-mode .ts-card {
    cursor: grab;
}

.ts-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px var(--overlay-deep-12);
}

.ts-card.is-dragging {
    cursor: grabbing;
    box-shadow: 0 16px 30px var(--overlay-deep-20);
    transform: scale(1.03);
    z-index: 100;
}

.ts-card.is-muted {
    opacity: 0.2;
}

.ts-card.is-selected {
    outline: 3px solid var(--overlay-accent-focus);
}

.ts-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.ts-card-title {
    font-size: var(--font-size-093);
    line-height: 1;
    font-weight: 700;
    color: var(--ts-navy);
}

.ts-card-cap {
    color: var(--color-text-subtle);
    font-size: var(--font-size-062);
}

.ts-card-status {
    margin-top: 4px;
    font-size: var(--font-size-059);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}

.ts-card-meta {
    margin-top: 5px;
    color: var(--color-text-muted-5);
    font-size: var(--font-size-062);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-card-age {
    margin-top: 1px;
    font-size: var(--font-size-062);
    color: var(--color-text-subtle);
}

.ts-card-age.warn { color: var(--ts-kitchen-text); font-weight: 700; }
.ts-card-age.urgent { color: var(--ts-bill-text); font-weight: 700; }

.ts-card.status-available { border-color: var(--ts-success-text); background: var(--ts-success-bg); }
.ts-card.status-seated { border-color: var(--ts-seated-text); background: var(--ts-seated-bg); }
.ts-card.status-ordering { border-color: var(--ts-order-text); background: var(--ts-order-bg); }
.ts-card.status-in_kitchen { border-color: var(--ts-kitchen-text); background: var(--ts-kitchen-bg); }
.ts-card.status-partly_served { border-color: var(--color-warning-deep); background: var(--color-danger-soft-panel); }
.ts-card.status-fully_served { border-color: var(--ts-served-text); background: var(--ts-served-bg); }
.ts-card.status-bill_requested { border-color: var(--ts-bill-text); background: var(--ts-bill-bg); }
.ts-card.status-paying { border-color: var(--ts-paying-text); background: var(--ts-paying-bg); }

.ts-card.status-available .ts-card-status { color: var(--ts-success-text); }
.ts-card.status-seated .ts-card-status { color: var(--ts-seated-text); }
.ts-card.status-ordering .ts-card-status { color: var(--ts-order-text); }
.ts-card.status-in_kitchen .ts-card-status { color: var(--ts-kitchen-text); }
.ts-card.status-partly_served .ts-card-status { color: var(--color-warning-deep); }
.ts-card.status-fully_served .ts-card-status { color: var(--ts-served-text); }
.ts-card.status-bill_requested .ts-card-status { color: var(--ts-bill-text); }
.ts-card.status-paying .ts-card-status { color: var(--ts-paying-text); }

.ts-floor-feature {
    position: absolute;
    border: 1px dashed var(--color-border-panel);
    background: var(--overlay-brand-03);
    color: var(--color-text-subtle-3);
    border-radius: 10px;
    font-size: var(--font-size-062);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.ts-floor-feature.dynamic {
    pointer-events: auto;
    cursor: pointer;
}

.is-edit-mode .ts-floor-feature.dynamic {
    cursor: grab;
}

.ts-floor-feature.dynamic.is-dragging {
    cursor: grabbing;
}

.ts-floor-feature-label {
    pointer-events: none;
}

.ts-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    right: 4px;
    bottom: 4px;
    border-radius: 2px;
    background: var(--overlay-navy-35);
    opacity: 0;
    cursor: nwse-resize;
}

.is-edit-mode .ts-card .ts-resize-handle,
.is-edit-mode .ts-floor-feature.dynamic .ts-resize-handle {
    opacity: 1;
}

.ts-panel {
    background: var(--color-white);
    border-left: 1px solid var(--ts-border);
    display: flex;
    flex-direction: column;
    min-height: 640px;
}

.ts-panel-head {
    border-bottom: 1px solid var(--ts-border);
    padding: 16px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ts-panel-head h3 {
    font-size: var(--font-size-087);
    font-weight: 700;
    color: var(--ts-navy);
}

.ts-panel-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 10px;
    background: var(--color-surface-subtle);
    color: var(--color-text-subtle-4);
    font-size: var(--font-size-112);
    line-height: 0;
}

.ts-panel-body {
    padding: 16px 20px 24px;
    overflow: auto;
}

.ts-panel-empty {
    color: var(--color-text-subtle-5);
    border: 1px dashed var(--color-border-cool);
    border-radius: 12px;
    padding: 18px;
    background: var(--color-surface-alt);
}

.ts-panel-title {
    font-size: var(--font-size-325);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ts-navy);
    margin-bottom: 8px;
}

.ts-panel-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: var(--font-size-069);
    font-weight: 700;
}

.ts-panel-status.status-available { background: var(--ts-success-bg); color: var(--ts-success-text); }
.ts-panel-status.status-seated { background: var(--ts-seated-bg); color: var(--ts-seated-text); }
.ts-panel-status.status-ordering { background: var(--ts-order-bg); color: var(--ts-order-text); }
.ts-panel-status.status-in_kitchen { background: var(--ts-kitchen-bg); color: var(--ts-kitchen-text); }
.ts-panel-status.status-partly_served { background: var(--color-danger-soft-panel); color: var(--color-warning-deep); }
.ts-panel-status.status-fully_served { background: var(--ts-served-bg); color: var(--ts-served-text); }
.ts-panel-status.status-bill_requested { background: var(--ts-bill-bg); color: var(--ts-bill-text); }
.ts-panel-status.status-paying { background: var(--ts-paying-bg); color: var(--ts-paying-text); }

.ts-panel-section {
    margin-bottom: 18px;
}

.ts-panel-label {
    margin-bottom: 8px;
    font-size: var(--font-size-062);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--color-text-subtle);
    font-weight: 700;
}

.ts-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-table);
    font-size: var(--font-size-081);
}

.ts-info-row span {
    color: var(--color-text-subtle);
}

.ts-info-row strong {
    color: var(--ts-navy);
    font-weight: 700;
}

.ts-info-row strong.warn {
    color: var(--ts-kitchen-text);
}

.ts-info-row strong.danger {
    color: var(--ts-bill-text);
}

.ts-panel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.ts-panel-btn {
    border: 1px solid var(--color-border-danger-soft);
    background: var(--color-white);
    color: var(--ts-bill-text);
    border-radius: 12px;
    padding: 10px 10px;
    font-size: var(--font-size-072);
    font-weight: 600;
    text-align: center;
    transition: all 0.15s ease;
}

.ts-panel-btn:hover {
    background: var(--color-danger-shell);
}

.ts-panel-btn.primary {
    background: var(--ts-gold);
    color: var(--color-white);
    border-color: var(--ts-gold);
    grid-column: 1 / -1;
}

.ts-panel-btn.primary:hover {
    background: var(--ts-gold-light);
}

.ts-panel-btn.danger {
    grid-column: 1 / -1;
}

.ts-edit-dock {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px;
    background: var(--ts-navy);
    color: var(--color-white);
    box-shadow: 0 12px 30px var(--overlay-deep-28);
    padding: 12px 14px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 40;
}

.ts-edit-dock.visible {
    display: flex;
}

.ts-edit-label {
    color: var(--overlay-surface-65);
    font-weight: 600;
    margin-right: 4px;
    font-size: var(--font-size-075);
}

.ts-meta {
    display: flex;
    justify-content: flex-end;
    color: var(--color-text-muted-5);
    font-size: var(--font-size-087);
    padding: 0 18px 10px;
}

@media (max-width: 1199px) {
    .ts-layout {
        grid-template-columns: 1fr;
    }

    .ts-panel {
        border-left: 0;
        border-top: 1px solid var(--ts-border);
        min-height: auto;
    }

    .ts-floor {
        min-height: 520px;
        max-height: 65vh;
    }
}

@media (max-width: 768px) {
    .ts-topbar {
        flex-wrap: wrap;
        padding: 10px;
        gap: 8px;
    }

    .ts-title {
        width: 100%;
        order: 3;
    }

    .ts-topbar-meta {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }

    .ts-statusbar {
        padding: 10px;
    }

    .ts-kpi {
        width: 100%;
        margin-left: 0;
        border-left: 0;
        border-top: 1px solid var(--ts-border);
        margin-top: 6px;
        padding-top: 8px;
    }

    .ts-kpi-item {
        min-width: 25%;
        padding: 0 6px;
    }

    .ts-kpi-num {
        font-size: var(--font-size-125);
    }

    .ts-floor-wrap {
        padding: 10px;
    }

    .ts-card {
        width: 112px;
        padding: 8px;
        min-height: 84px;
    }

    .ts-card-title {
        font-size: var(--font-size-087);
    }

    .ts-card-status {
        font-size: var(--font-size-056);
    }

    .ts-panel-head h3 {
        font-size: var(--font-size-087);
    }

    .ts-panel-title {
        font-size: var(--font-size-175);
    }

    .ts-panel-btn {
        font-size: var(--font-size-075);
        padding: 9px 8px;
    }

    .ts-edit-dock {
        width: calc(100% - 14px);
        left: 7px;
        right: 7px;
        transform: none;
        justify-content: space-between;
        gap: 8px;
    }
}






