/* =====================================================================================
   BeUNIQ POS design layer (docs/BeUNIQ-POS-UI-Design.pdf): app shell, sidebar, top bar,
   page headers, cards and the sign-in panel. Colour tokens live in dineflow.css (:root).
   Loaded after dineflow.css.
   ===================================================================================== */

/* ---- Shell: fixed dark sidebar on laptops and desktops ---- */
.df-shell { min-height: 100vh; }
.df-main { min-width: 0; }
@media (min-width: 992px) { .df-main { margin-left: 248px; } }
@media print { .df-main { margin-left: 0 !important; } }

.df-sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: 248px; z-index: 1030;
  flex-direction: column; overflow: hidden; padding: 1.5rem .9rem 1rem;
  background: var(--df-aubergine); color: var(--df-on-dark);
}
.df-sidebar-drawer { display: flex; position: relative; width: 100%; height: 100%; }
.df-drawer-close { position: absolute; top: 1.1rem; right: 1rem; z-index: 1; }
.df-sidebar-brand { padding: 0 .55rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.df-sidebar-outlet {
  display: flex; align-items: flex-start; gap: .55rem; margin-top: 1rem; padding: .6rem .7rem;
  border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: .88rem; line-height: 1.3; min-width: 0;
}
.df-sidebar-outlet > .ti { margin-top: .1rem; flex-shrink: 0; }
.df-sidebar-outlet-text { display: flex; flex-direction: column; min-width: 0; }
.df-sidebar-outlet-name { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.df-sidebar-city { margin-top: .15rem; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--df-on-dark-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Only the links scroll: the logo stays on top and the person and sign-out stay at the bottom. */
.df-sidebar-nav {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-top: .25rem; margin-right: -.5rem; padding-right: .5rem;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.df-sidebar-label { padding: 1.1rem .75rem .45rem; font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--df-on-dark-muted); }
.df-side-link {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 2px; padding: .6rem .75rem;
  border-radius: 10px; color: #D9D2E6; font-size: .92rem; text-decoration: none;
}
.df-side-link .ti { font-size: 1.15rem; }
.df-side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.df-side-link.active { background: var(--df-gold); color: var(--df-aubergine); font-weight: 600; }
.df-side-link:focus-visible, .df-side-icon:focus-visible { outline: 2px solid var(--df-gold); outline-offset: 2px; }
.df-sidebar-foot { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.df-sidebar-note { display: flex; gap: .6rem; align-items: flex-start; padding: 0 .55rem .75rem; color: #C3B9D6; font-size: .8rem; line-height: 1.35; }
.df-sidebar-note small { color: var(--df-on-dark-muted); }
.df-sidebar-user { display: flex; align-items: center; gap: .6rem; padding: .5rem; border-radius: 12px; background: rgba(255, 255, 255, .06); min-width: 0; }
.df-sidebar-role { font-size: .75rem; color: var(--df-on-dark-muted); }
.df-avatar {
  width: 36px; height: 36px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #3B3253; color: var(--df-gold); font-weight: 700; font-size: .85rem;
}
.df-side-icon {
  width: 32px; height: 32px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: #CFC6DF;
}
.df-side-icon:hover { background: rgba(255, 255, 255, .09); color: #fff; }

/* ---- Top bar: breadcrumb, live status, date, quick actions ---- */
.df-topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .5rem;
  min-height: 60px; padding: .5rem 1.75rem; background: var(--tblr-bg-surface); border-bottom: 1px solid var(--df-line);
}
@media (max-width: 991.98px) { .df-topbar { padding: .4rem .75rem; } }
.df-crumbs { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tblr-secondary); white-space: nowrap; }
.df-crumb-current { color: var(--tblr-body-color); font-weight: 600; letter-spacing: .02em; text-transform: none; font-size: .85rem; }
.df-status { align-items: center; gap: .4rem; margin-right: .75rem; font-size: .8rem; color: #2F7A4F; white-space: nowrap; }
.df-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #3E9A63; }
.df-status:has(.df-status-off) { color: var(--tblr-danger); }
.df-status-dot.df-status-off { background: var(--tblr-danger); }
[data-bs-theme="dark"] .df-status { color: #74C69D; }
.df-topbar-date { margin-right: .5rem; font-size: .8rem; color: var(--tblr-secondary); white-space: nowrap; }
.df-main .page-body { margin-top: 1.75rem; }
@media (max-width: 767.98px) { .df-main .page-body { margin-top: 1rem; } }

/* ---- Page headers: big confident titles, quiet subtitles ---- */
.page-header .page-title { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.page-header .text-secondary { font-size: .95rem; }
.page-pretitle, .df-eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.page-pretitle { color: var(--df-purple); }
[data-bs-theme="dark"] .page-pretitle { color: var(--tblr-primary); }
@media (max-width: 767.98px) { .page-header .page-title { font-size: 1.45rem; } }

/* ---- Surfaces: soft rounded cards on a warm page ---- */
.card { border-radius: 14px; border-color: var(--df-line); box-shadow: 0 1px 2px rgba(40, 34, 57, .04); }
.card > .card-header:first-child { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.card-header, .card-footer { border-color: var(--df-line); }
.card-title { font-weight: 700; }
.card-table thead th, .table thead th { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8A7FA0; }
:root:not([data-bs-theme="dark"]) .card-table thead th { background: #FAF9F7; }
.btn { border-radius: 10px; }
.btn-lg { border-radius: 12px; }
.form-control, .form-select { border-radius: 10px; }
:root:not([data-bs-theme="dark"]) .form-control, :root:not([data-bs-theme="dark"]) .form-select { border-color: #DDD6E5; }
.form-control:focus, .form-select:focus { border-color: var(--tblr-primary); box-shadow: 0 0 0 .2rem rgba(var(--tblr-primary-rgb), .18); }
.badge { border-radius: 7px; }
.nav-tabs .nav-link.active { color: var(--tblr-primary); }
.dropdown-menu { border-radius: 12px; }

/* ---- Brand: the restaurant's logo, or DineFlow's ---- */
.df-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--df-aubergine); line-height: 1; white-space: nowrap; }
[data-bs-theme="dark"] .df-brand, .df-brand.df-brand-on-dark { color: #fff; }
.df-brand-word { font-weight: 400; letter-spacing: -.01em; }
.df-brand-word strong { font-weight: 800; }
.df-brand-mark { flex-shrink: 0; width: 32px; height: 32px; }
.df-brand-sm .df-brand-mark { width: 26px; height: 26px; }
.df-brand-sm .df-brand-word { font-size: 1.1rem; }
.df-brand-md .df-brand-word { font-size: 1.45rem; }
.df-brand-lg .df-brand-mark { width: 46px; height: 46px; }
.df-brand-lg .df-brand-word { font-size: 2.25rem; }
.df-brand-img { display: block; max-width: 100%; object-fit: contain; }
img.df-brand-sm { max-height: 32px; max-width: 140px; }
img.df-brand-md { max-height: 56px; max-width: 190px; }
img.df-brand-lg { max-height: 88px; max-width: 280px; }
/* Logos are usually made for light backgrounds: on aubergine they sit on a soft white plate so they never vanish. */
.df-sidebar img.df-brand-img, .df-auth-brand img.df-brand-img, .df-kds img.df-brand-img,
.df-logo-preview-dark img.df-brand-img { background: var(--df-soft); padding: 6px 10px; border-radius: 10px; }

/* ---- Sign-in: brand panel beside the form ---- */
.df-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); background: var(--df-soft); }
[data-bs-theme="dark"] .df-auth { background: var(--tblr-body-bg); }
.df-auth-brand {
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: 3.5rem clamp(2rem, 5vw, 4.5rem); background: var(--df-aubergine); color: #fff;
}
.df-auth-place { margin-top: .9rem; color: var(--df-on-dark-muted); }
.df-text-lilac { color: #C7B8E6; }
.df-auth-headline { margin: 1rem 0 1.5rem; font-size: clamp(2.4rem, 4.2vw, 3.7rem); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; color: #fff; }
.df-serif-accent { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; color: var(--df-gold); }
.df-auth-sub { color: #C9BEDC; font-size: 1.15rem; line-height: 1.6; margin: 0; }
.df-auth-foot { align-items: center; gap: .6rem; color: #C9BEDC; font-size: .9rem; }
.df-dot-gold { width: 8px; height: 8px; border-radius: 50%; background: var(--df-gold); flex-shrink: 0; }
.df-auth-main { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.df-auth-form { width: 100%; max-width: 460px; }
.df-auth-form > .card { border: 0; background: transparent; box-shadow: none; }
.df-auth-form > .card > .card-body { padding: 0; }
@media (max-width: 991.98px) {
  .df-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .df-auth-brand { flex-direction: row; align-items: center; justify-content: flex-start; padding: 1.1rem 1.25rem; gap: 1rem; }
  .df-auth-brand .df-brand-lg .df-brand-mark { width: 34px; height: 34px; }
  .df-auth-brand .df-brand-lg .df-brand-word { font-size: 1.6rem; }
  .df-auth-brand img.df-brand-lg { max-height: 52px; }
  .df-auth-place { margin-top: .35rem; }
  .df-auth-main { align-items: flex-start; padding: 1.75rem 1rem 2.5rem; }
}

/* ---- Settings: logo preview on the dark sidebar and on a light page ---- */
.df-logo-preview { display: flex; align-items: center; justify-content: center; min-height: 96px; padding: 1rem; border-radius: 12px; border: 1px dashed var(--df-line); background: var(--df-soft); }
.df-logo-preview-dark { background: var(--df-aubergine); border-color: var(--df-aubergine); }
[data-bs-theme="dark"] .df-logo-preview:not(.df-logo-preview-dark) { background: #fff; }
[data-bs-theme="dark"] .df-logo-preview:not(.df-logo-preview-dark) .df-brand { color: var(--df-aubergine); }

/* ---- Platform console bar ---- */
.df-platform-bar { background: var(--df-aubergine) !important; }
