/* =========================================================================
   Restro (restaurant_DB/customer) -> SolveAll360 shared 3D layer adapter
   Loaded right after shared/solveall-3d.css on index.php (restaurant admin),
   register.php (sign-up) and menu.php (diner QR menu).
   Brand feel is kept: the admin keeps its red sidebar / red accents and the
   diner menu keeps its restaurant logo, pink accents and Outfit font. Only
   depth, canvas, bars and mobile quality are aligned with the shared look.
   Visual only: no ids, JS / React / Alpine hooks or behaviour changed.
   ========================================================================= */

body.sa3d { overflow-x: clip; }          /* decorative glows/blobs never widen the page */
html:has(body.sa3d) { overflow-x: clip; }

/* =========================================================================
   1. RESTAURANT ADMIN (index.php)
   ========================================================================= */
body.sa3d {
  --body-bg: #E9E9EE;
  --topbar-bg: transparent;
  --card-bg: #FFFFFF;
  --border-color: rgba(0, 0, 0, 0.07);
}
body.sa3d .main-container { background: var(--sa-bg, #E9E9EE); }
body.sa3d .content { background: none; }

/* Cards / panels / stat tiles */
body.sa3d .info-card,
body.sa3d .stat-card-custom,
body.sa3d .upload-card,
body.sa3d .reports-header-card,
body.sa3d .timeline-panel,
body.sa3d .modal-overlay-global > div {
  background: var(--sa-card-bg) !important;
  border: 1px solid var(--sa-border) !important;
  box-shadow: var(--sa-card-shadow) !important;
}
body.sa3d .stat-card-custom:hover,
body.sa3d .info-card:hover { box-shadow: var(--sa-card-shadow-hover) !important; }
body.sa3d .stat-card-custom:hover { transform: translateY(-3px); }
body.sa3d .stat-icon-wrapper, body.sa3d .icon-box {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 6px -1px rgba(0, 0, 0, .12);
}
body.sa3d .modal-overlay-global > div { border-radius: 18px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }

/* Buttons: keep the red brand gradient, add the raised 3D recipe */
body.sa3d .btn-primary,
body.sa3d .btn-submit {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 8px -2px rgba(185, 28, 28, .45) !important;
  border: 1px solid rgba(153, 27, 27, .55) !important;
}
body.sa3d .btn-primary:hover, body.sa3d .btn-submit:hover { filter: brightness(1.05); }
body.sa3d .btn-primary:active, body.sa3d .btn-submit:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2) !important; }
body.sa3d .btn-secondary {
  background: var(--sa-btn-bg) !important;
  border: 1px solid rgba(0, 0, 0, .10) !important;
  box-shadow: var(--sa-btn-shadow) !important;
}

/* Inputs: recessed */
body.sa3d .main-container .form-control,
body.sa3d .modal-overlay-global .form-control,
body.sa3d .content input[type="text"],
body.sa3d .content input[type="number"],
body.sa3d .content input[type="search"],
body.sa3d .content input[type="date"],
body.sa3d .content select,
body.sa3d .content textarea {
  box-shadow: var(--sa-input-shadow) !important;
}
body.sa3d .main-container .form-control:focus,
body.sa3d .content input:focus, body.sa3d .content select:focus, body.sa3d .content textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .14) !important;
  outline: none !important;
}

/* Tables */
body.sa3d .customers-table th, body.sa3d .orders-table th {
  background: linear-gradient(180deg, #FAFAFC 0%, #F2F2F7 100%);
}
body.sa3d .table-responsive-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* Sidebar: keep the red brand gradient, add 3D edge + raised active key */
body.sa3d .sidebar.open {
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08), 8px 0 28px -14px rgba(76, 5, 25, .55);
}
body.sa3d .sidebar .nav-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .12) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 4px 10px -4px rgba(0, 0, 0, .45) !important;
  color: #fff !important;
}
body.sa3d .sidebar .user-avatar { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px -8px rgba(0, 0, 0, .5); }

/* Brand lockup in the red sidebar: [mark] SolveAll360 [RESTRO] -> main site */
body.sa3d .sa3d-restro-brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; font-size: 21px; line-height: 1; white-space: nowrap;
}
body.sa3d .sa3d-restro-brand:hover { text-decoration: none; opacity: .95; }
body.sa3d .sa3d-restro-mark {
  flex: 0 0 34px; width: 34px; height: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, .12) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 10px -3px rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .18);
}
body.sa3d .sa3d-restro-brand .sa3d-brand-tag { background: rgba(255, 255, 255, .16); color: #fff; }
body.sa3d .sidebar-logo .logo-sub { margin-top: 8px; padding-left: 43px; }
@media (min-width: 1025px) {
  body.sa3d .sidebar.collapsed .logo-text.sa3d-restro-brand { display: flex !important; justify-content: center; }
  body.sa3d .sidebar.collapsed .sa3d-restro-name,
  body.sa3d .sidebar.collapsed .sa3d-restro-brand .sa3d-brand-tag { display: none !important; }
}

/* Top bar: floating greyish 3D bar */
body.sa3d .topbar {
  position: sticky; top: 10px;
  margin: 10px 16px 0;
  height: 60px;
  padding: 0 10px 0 18px;
  background: var(--sa-bar-bg) !important;
  border: 1px solid rgba(0, 0, 0, .35) !important;
  border-radius: 999px;
  box-shadow: var(--sa-bar-shadow) !important;
}
body.sa3d .topbar .topbar-title { color: #fff !important; }
body.sa3d .topbar .collapse-toggle-btn {
  color: rgba(255, 255, 255, .85); width: 40px; height: 40px; border-radius: 999px;
  background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35);
}
body.sa3d .topbar .collapse-toggle-btn:hover { color: #fff; background: rgba(0, 0, 0, .38); }
/* the date-range filter becomes the raised white key */
body.sa3d .topbar .topbar-date-filter {
  background: linear-gradient(180deg, #FFFFFF 0%, #ECECF0 100%) !important;
  border: 1px solid rgba(255, 255, 255, .6) !important;
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(0, 0, 0, .35) !important;
}
@media (max-width: 1024px) {
  body.sa3d .topbar .mobile-toggle {
    color: #fff !important; border-radius: 999px !important;
    background: rgba(0, 0, 0, .28) !important; border: 1px solid rgba(255, 255, 255, .08) !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35);
  }
}
@media (max-width: 768px) {
  body.sa3d .topbar {
    position: relative !important; top: 0; margin: 8px 10px 0;   /* tall stacked bar: scroll away instead of covering the screen */
    border-radius: 20px !important;
    padding: 10px !important; gap: 10px !important;
  }
  body.sa3d .topbar .topbar-date-filter { border-radius: 14px !important; padding: 8px 10px !important; }
  body.sa3d .topbar .topbar-date-filter > div:nth-child(2) { flex: 1 1 auto; min-width: 0; justify-content: space-between; }
  body.sa3d .topbar .topbar-date-filter input[type="date"] { min-height: 36px; flex: 1 1 0; max-width: none !important; min-width: 0; }
  body.sa3d .topbar .topbar-date-filter select { min-height: 40px; width: 100%; font-size: 14px !important; }
  body.sa3d .content { padding: 14px 12px !important; }
}

/* =========================================================================
   2. SIGN-UP PAGE (register.php)
   ========================================================================= */
body.sa3d .ambient-glow { max-width: 100vw; }
body.sa3d:has(> .ambient-glow) {   /* register.php only (admin keeps its red --primary) */
  --primary: #007AFF;
  --primary-hover: #0066D6;
  --input-focus: rgba(0, 122, 255, .16);
  --bg: #E9E9EE;
}
body.sa3d > header {
  background: transparent !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  padding: 12px 16px !important;
}
body.sa3d > header .header-container.sa3d-bar {
  padding: 8px 8px 8px 12px;
  min-height: 58px;
}
body.sa3d > header .sa3d-brand-tag { background: rgba(255, 255, 255, .14); color: #fff; }
body.sa3d > header .btn-nav-login {
  background: linear-gradient(180deg, #FFFFFF 0%, #ECECF0 100%) !important; color: #1D1D1F !important;
  border: 0 !important; border-radius: 999px !important; min-height: 40px;
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(0, 0, 0, .35) !important;
}
body.sa3d > header .btn-nav-login:hover { transform: none; filter: brightness(1.03); }
body.sa3d .register-container,
body.sa3d .mockup-3d-card,
body.sa3d .testimonial-card {
  background: var(--sa-card-bg) !important;
  border: 1px solid var(--sa-border) !important;
  box-shadow: var(--sa-card-shadow) !important;
}
body.sa3d .register-container { border-radius: var(--sa-radius-card); }
body.sa3d .btn-register {
  background: var(--sa-btn-primary-bg) !important; color: #fff !important;
  border: 1px solid #0066D6 !important; box-shadow: var(--sa-btn-primary-shadow) !important;
}
body.sa3d .btn-register:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2) !important; }
body.sa3d .input-wrapper input {
  box-shadow: var(--sa-input-shadow) !important; border-color: rgba(60, 60, 67, .18);
}
body.sa3d .input-wrapper input:focus { border-color: #007AFF !important; box-shadow: 0 0 0 4px rgba(0, 122, 255, .16) !important; }
body.sa3d .plan-pill { box-shadow: var(--sa-btn-shadow); }
body.sa3d .plan-pill.active { box-shadow: var(--sa-btn-primary-shadow); }
/* greyish 3D footer */
body.sa3d footer.premium-footer {
  background: linear-gradient(180deg, #3A3A3F 0%, #232327 100%) !important;
  border-top: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .7) !important;
}
body.sa3d footer.premium-footer .footer-brand-logo,
body.sa3d footer.premium-footer .footer-col h4 { color: #fff !important; }
body.sa3d footer.premium-footer .footer-brand-desc,
body.sa3d footer.premium-footer .footer-link-item span,
body.sa3d footer.premium-footer .footer-link-item a,
body.sa3d footer.premium-footer .footer-copy-text,
body.sa3d footer.premium-footer .footer-legal-links span { color: rgba(255, 255, 255, .62) !important; }
body.sa3d footer.premium-footer .footer-grid,
body.sa3d footer.premium-footer .footer-bottom-bar { border-color: rgba(255, 255, 255, .1) !important; }
body.sa3d footer.premium-footer .footer-social-link {
  background: rgba(255, 255, 255, .08) !important; border-color: rgba(255, 255, 255, .12) !important; color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
@media (max-width: 768px) {
  body.sa3d > header { padding: 8px 10px !important; }
  body.sa3d > header .header-container.sa3d-bar { border-radius: 20px !important; min-height: 54px; }
  body.sa3d > header .sa3d-brand { gap: 7px; min-width: 0; }
  body.sa3d > header .sa3d-brand-name { font-size: 14px; }
  body.sa3d > header .btn-nav-login { padding: 0 14px !important; font-size: 13px !important; white-space: nowrap; }
}
@media (max-width: 360px) {
  body.sa3d > header .sa3d-brand-tag { display: none; }
}

/* =========================================================================
   3. DINER QR MENU (menu.php) — restaurant brand kept, depth + mobile only
   ========================================================================= */
body.sa3d[x-data] { font-family: 'Outfit', var(--sa-font); }
body.sa3d[x-data] h1, body.sa3d[x-data] h2, body.sa3d[x-data] h3 { font-family: 'Outfit', var(--sa-font-display); letter-spacing: -0.01em; }
body.sa3d[x-data] .glass {
  background: var(--sa-card-bg) !important;
  border: 1px solid rgba(0, 0, 0, .07) !important;
  box-shadow: var(--sa-card-shadow) !important;
}
body.sa3d[x-data] .accent-gradient {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -6px rgba(236, 72, 153, .55) !important;
}
body.sa3d[x-data] .accent-gradient:active { box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2) !important; }
body.sa3d[x-data] input:not([type="checkbox"]):not([type="radio"]),
body.sa3d[x-data] select,
body.sa3d[x-data] textarea { box-shadow: var(--sa-input-shadow); }
/* floating, fully rounded header card */
body.sa3d[x-data] .main-content > header.glass {
  margin: 8px 10px 0;
  top: 8px;
  border-radius: 20px !important;
}
@media (min-width: 768px) {
  body.sa3d[x-data] .main-content > header.glass { margin: 12px 16px 0; top: 12px; border-radius: 24px !important; }
}
/* tap targets: header icon buttons were 32px on phones */
@media (max-width: 767px) {
  body.sa3d[x-data] header .w-8.h-8 { width: 40px; height: 40px; border-radius: 12px; }
  body.sa3d[x-data] header button.ml-auto { min-height: 32px; padding: 4px 10px; }
}
/* shared mobile rule gives every button min-height 40px; tiny inline chips must keep their size */
@media (max-width: 768px) {
  body.sa3d[x-data] button.text-\[8px\], body.sa3d[x-data] button.text-\[9px\] { min-height: 32px; }
}

/* Admin sidebar edge shadow only when visible (desktop) */
@media (min-width: 1025px) {
  body.sa3d .sidebar { box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08), 8px 0 28px -14px rgba(76, 5, 25, .55); }
}
/* login brand tagline asked for Inter, which is not loaded (fell back to serif) */
body.sa3d .login-wrapper .brand-tag { font-family: "Inter", var(--sa-font); }
