/* Dopetzcom Admin — readable type (loaded last so it wins over page CSS) */

html,
body,
.app,
main,
.nav-page-workspace,
#navPageContent,
.workspace-page-content {
  font-size: 14px;
  line-height: 1.45;
}

.sidebar nav a,
.sidebar .nav-link {
  font-size: 13px !important;
  line-height: 1.3 !important;
  min-height: 40px !important;
  height: auto !important;
  padding: 8px 10px !important;
}
.sidebar nav label,
.nav-group label,
.sidebar .nav-section-title {
  font-size: 11px !important;
  letter-spacing: 0.6px !important;
}
.brand strong { font-size: 18px !important; }
.brand small { font-size: 12px !important; }
.support-title { font-size: 13px !important; }
.support p,
.support button { font-size: 12px !important; }

h1,
.dz-page-head h1,
.page-workspace-head h2,
.section-title {
  font-size: 26px !important;
}
h2 { font-size: 18px !important; }
h3,
.dz-section-title { font-size: 16px !important; }

p,
td,
th,
label,
.form-label,
li,
.dz-row,
.orders td,
.orders th {
  font-size: 13px !important;
}
small,
.dz-eyebrow,
.plat-eyebrow,
.session-lock-hint,
.checkin-hint {
  font-size: 12px !important;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
button,
.btn,
.form-input,
.form-select {
  font-size: 13px !important;
}

.header-tool,
.header-tool span { font-size: 12px !important; }
.user strong { font-size: 13px !important; }
.user small { font-size: 11px !important; }
.search input { font-size: 13px !important; }
.region-label,
.overview-title { font-size: 11px !important; }
.region-selector { font-size: 13px !important; }
.overview-item b { font-size: 12px !important; }
.overview-item em { font-size: 13px !important; }

.hero h1 { font-size: 28px !important; }
.hero p,
.dz-page-head p { font-size: 14px !important; }
.stats section small { font-size: clamp(8px, 0.9vw, 12px) !important; }
.stats strong { font-size: clamp(11px, 1.2vw, 18px) !important; }
.stats em { font-size: clamp(8px, 0.8vw, 12px) !important; }
.orders td small,
.customer-meta small { font-size: 12px !important; }
.customer-meta strong { font-size: 13px !important; }

.dz-metric span { font-size: 13px !important; }
.dz-metric strong { font-size: 26px !important; }
.dz-metric small { font-size: 12px !important; }
.dz-modal-panel h2 { font-size: 22px !important; }
.dz-modal-subtitle,
.dz-attention-item small { font-size: 13px !important; }
.dz-attention-item b { font-size: 14px !important; }

.plat-head h1,
.plat-hero h2 { font-size: 24px !important; }
.plat-metric strong { font-size: 22px !important; }
.plat-metric span,
.plat-metric small { font-size: 12px !important; }

.studio-section label,
.section-title small { font-size: 12px !important; }
.studio-section input,
.studio-section select,
.studio-section textarea { font-size: 13px !important; }
.section-title strong { font-size: 14px !important; }

.alert-chip,
.create-button,
.primary-btn,
.secondary-btn,
.workspace-back,
.dz-back {
  font-size: 13px !important;
}

.material-icons {
  font-size: 20px;
}
.sidebar .nav-link .material-icons,
.sidebar .icon {
  width: 18px;
  height: 18px;
}

:root {
  --sidebar-width: 260px;
  --dz-orange: #f59207;
}

.sidebar-overlay {
  display: none;
}

.app > .sidebar {
  background: linear-gradient(180deg, #fff 0%, #faf8ff 100%);
  box-shadow: 8px 0 24px rgba(40, 24, 80, 0.04);
}
.topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid #eceaf3;
}
.hero,
.attention-panel,
.ai-assistant,
.orders,
.side-block,
.shipping {
  border-radius: 16px;
}
.hero {
  background: linear-gradient(135deg, #fff8ef 0%, #fff 42%, #f6f1ff 100%);
}
.logo,
.brand-mark {
  background: linear-gradient(145deg, #7b36f3, #4d21c9) !important;
}
.sidebar .nav-link.active,
.sidebar nav a.active {
  background: linear-gradient(90deg, #f59207, #ffb03a) !important;
  box-shadow: 0 8px 18px rgba(245, 146, 7, 0.22) !important;
}

/* Phone, iPad, split-view: overlay drawer so content is never crushed */
@media (max-width: 1100px) {
  .mobile-menu {
    display: grid !important;
    place-items: center;
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    background: #fff7eb !important;
    color: #c46c00 !important;
    flex: 0 0 auto;
  }
  .app,
  body.nav-page-open > .app,
  body.nav-page-open .app {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 100vh !important;
    height: 100dvh !important;
  }
  .app > .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    grid-column: 1 !important;
    width: min(300px, 88vw) !important;
    min-width: 0 !important;
    max-width: 300px !important;
    height: 100dvh !important;
    transform: translateX(-105%) !important;
    transition: transform 0.22s ease !important;
    z-index: 5000 !important;
    box-shadow: 16px 0 50px rgba(20, 12, 40, 0.22) !important;
    padding: 18px 14px !important;
  }
  .app > .sidebar.open {
    transform: translateX(0) !important;
  }
  .app > main {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 4500;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(16, 12, 28, 0.46);
    backdrop-filter: blur(4px);
    cursor: pointer;
  }
  .sidebar-overlay.open,
  body.nav-drawer-open .sidebar-overlay {
    display: block;
  }
  .topbar {
    padding: 0 12px !important;
    gap: 8px !important;
    height: 58px !important;
    min-height: 58px !important;
  }
  .search {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 40px !important;
  }
  .search kbd,
  .header-tool span,
  .user div:nth-child(2),
  .user > .chevron {
    display: none !important;
  }
  .header-command-tools {
    gap: 4px !important;
    margin-right: 0 !important;
  }
  .hero {
    display: block !important;
    min-height: 0 !important;
    padding: 18px 14px 8px !important;
    margin: 10px 12px 0 !important;
  }
  .hero h1 {
    font-size: 22px !important;
  }
  .stats {
    grid-template-columns: 1fr 1fr !important;
    margin-top: 18px !important;
    gap: 10px !important;
  }
  .top-illustration {
    width: 100% !important;
    flex: none !important;
    height: 180px !important;
    margin-top: 12px;
  }
  .dashboard-grid,
  .lower-grid {
    grid-template-columns: 1fr !important;
    padding: 0 12px !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
  }
  .orders,
  .right-column {
    padding: 16px 0 !important;
    border-right: 0 !important;
  }
  .orders table {
    min-width: 560px;
  }
  .shipping {
    margin: 12px !important;
    height: auto !important;
    min-height: 200px;
    flex-direction: column;
  }
  .shipping-text {
    width: 100% !important;
    padding: 18px !important;
  }
  .command-strip,
  .attention-panel,
  .ai-assistant,
  .ai-response {
    margin-left: 12px !important;
    margin-right: 12px !important;
  }
  .command-alerts {
    display: none !important;
  }
  .app > main.page-mode > #navPageWorkspace,
  .app > main > #navPageWorkspace.open,
  .nav-page-workspace.open {
    padding: 16px 14px 48px !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
  .dz-product-type-metrics,
  .attention-items,
  .pos-grid,
  .workspace-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: 1fr 1fr !important;
  }
  .stats > div {
    border-right: 0 !important;
    padding-right: 0 !important;
  }
  .top-right .header-tool.ai-tool,
  .chat-button {
    display: none !important;
  }
  .hero h1 {
    font-size: 20px !important;
  }
}

/* iPad landscape / large tablet: keep drawer, more breathing room */
@media (min-width: 768px) and (max-width: 1100px) {
  .app > .sidebar {
    width: min(320px, 42vw) !important;
    max-width: 320px !important;
  }
  .hero h1 {
    font-size: 26px !important;
  }
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* MacBook / desktop: full two-column shell */
@media (min-width: 1101px) {
  .mobile-menu {
    display: none !important;
  }
  .app > .sidebar {
    transform: none !important;
    position: relative !important;
  }
  .sidebar-overlay {
    display: none !important;
  }
  .hero {
    margin: 0;
  }
}

body.dark .app > .sidebar {
  background: linear-gradient(180deg, #151520 0%, #12121a 100%);
}
body.dark .topbar {
  background: rgba(21, 21, 32, 0.92);
  border-bottom-color: #2a2a38;
}
body.dark .hero {
  background: linear-gradient(135deg, #22180c 0%, #151520 50%, #1a1628 100%);
}

/* Vertical scroll on every main dashboard (phone, iPad, Mac) */
html,
body {
  height: 100%;
  max-height: 100dvh;
}
.app {
  height: 100% !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
}
.app > main {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.app > main > .topbar {
  position: sticky !important;
  top: 0 !important;
  flex: 0 0 auto !important;
  z-index: 80 !important;
}
.app > main > .hero,
.app > main > .dashboard-grid,
.app > main > .shipping,
.app > main > .command-strip,
.app > main > .attention-panel,
.app > main > .ai-assistant,
.app > main > .ai-response,
.app > main > .lower-grid {
  flex: 0 0 auto;
}
.app > main.page-mode {
  overflow: hidden !important;
}
.app > main.page-mode > #navPageWorkspace,
.app > main > #navPageWorkspace.open,
.nav-page-workspace.open {
  position: relative !important;
  inset: auto !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-bottom: 48px !important;
}
#navPageContent,
.workspace-page-content,
.dz-page,
.plat-page,
.pos-page {
  min-height: 0;
  overflow: visible;
  padding-bottom: 32px;
}
.dashboard-grid,
.orders,
.right-column,
.lower-grid,
.command-strip {
  max-width: 100%;
}
.orders,
.orders table,
.dashboard-grid table,
.dz-pt-table-scroll,
.cart-data-table-wrap,
.cartdata-v62-table-wrap,
.foodorders-v64-table-wrap,
.orders-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.app > main > .hero,
.app > main > .dashboard-grid,
.app > main > .shipping {
  padding-bottom: 8px;
}
.app > main:not(.page-mode) {
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* Home dashboard: 4 stat cards scale with the device */
.hero .stats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(6px, 1.2vw, 20px) !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.hero .stats > div {
  min-width: 0 !important;
  max-width: 100%;
  display: flex !important;
  align-items: flex-start !important;
  gap: clamp(6px, 1vw, 10px) !important;
  padding-right: clamp(4px, 1vw, 16px) !important;
}
.hero .stats i {
  width: clamp(22px, 3.2vw, 38px) !important;
  height: clamp(22px, 3.2vw, 38px) !important;
  flex: 0 0 clamp(22px, 3.2vw, 38px) !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  font-size: clamp(11px, 1.55vw, 16px) !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}
.hero .stats i .icon,
.hero .stats i svg {
  width: clamp(11px, 1.5vw, 18px) !important;
  height: clamp(11px, 1.5vw, 18px) !important;
  max-width: 55% !important;
  max-height: 55% !important;
}
.hero .stats section {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden;
}
.hero .stats section small {
  font-size: clamp(8px, 0.82vw, 11px) !important;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.hero .stats strong,
.hero .stats #statOrders,
.hero .stats #statSales,
.hero .stats #statCustomers,
.hero .stats #statProfit {
  font-size: clamp(11px, 1.15vw, 18px) !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100%;
  display: block;
}
.hero .stats em,
.hero .stats em span {
  font-size: clamp(8px, 0.75vw, 11px) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

@media (max-width: 1100px) {
  .hero .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .hero .stats i {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    font-size: 13px !important;
  }
  .hero .stats i .icon,
  .hero .stats i svg {
    width: 14px !important;
    height: 14px !important;
  }
  .hero .stats strong,
  .hero .stats #statOrders,
  .hero .stats #statSales,
  .hero .stats #statCustomers,
  .hero .stats #statProfit {
    font-size: 13px !important;
  }
}

@media (max-width: 640px) {
  .hero .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 14px !important;
  }
  .hero .stats > div {
    padding-right: 0 !important;
    gap: 8px !important;
  }
  .hero .stats i {
    width: 24px !important;
    height: 24px !important;
    flex-basis: 24px !important;
    font-size: 11px !important;
  }
  .hero .stats i .icon,
  .hero .stats i svg {
    width: 12px !important;
    height: 12px !important;
  }
  .hero .stats section small {
    font-size: 8px !important;
  }
  .hero .stats strong,
  .hero .stats #statOrders,
  .hero .stats #statSales,
  .hero .stats #statCustomers,
  .hero .stats #statProfit {
    font-size: 12px !important;
  }
  .hero .stats em,
  .hero .stats em span {
    font-size: 8px !important;
  }
}
