﻿:root {
  --navy: #101828;
  --purple: #287D9B;
  --purple2: #348ea9;
  --surface: #fff;
  --muted: #667085;
  --bg: #f6f7fb;
  --border: #e7e9f0;
  --success: #12b76a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--navy);
}
a {
  text-decoration: none;
  color: inherit;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
}
.auth-art {
  padding: 64px;
  background: linear-gradient(145deg, #0d2530, #1b586e 60%, #287D9B);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* =========================================================
   SIDEBAR RESTAURANT LOGO
   ========================================================= */

/* =========================================================
   SIDEBAR BRAND / RESTAURANT LOGO
   ========================================================= */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-wrap {
  width: 70px;
  height: 58px;
  flex: 0 0 70px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
}

/* Uploaded restaurant logo */
.brand-logo {
  display: block;

  width: 100%;
  height: 100%;

  padding: 0!important;

  object-fit: contain;
  object-position: center;

  background: transparent !important;

  border: 0 !important;
  border-radius: 0 !important;

  box-shadow: none !important;
}

/* R fallback - shown only when restaurant logo is missing */
.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;

  display: grid;
  place-items: center;

  color: #ffffff;

  background: linear-gradient(135deg, #287D9B, #389ebf);

  border-radius: 15px;

  font-size: 18px;
  font-weight: 900;
}

/* RestaurantOS text */
.brand-name {
  color: #ffffff;

  font-size: 20px;
  font-weight: 800;

  white-space: nowrap;
}
.auth-copy h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
  margin: 0 0 22px;
  max-width: 680px;
}
.auth-copy p {
  font-size: 18px;
  line-height: 1.7;
  color: #e0f1f7;
  max-width: 620px;
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff17;
  border: 1px solid #ffffff2c;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 32px;
}
.card {
  width: min(100%);
  padding: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 20px 60px #10182812;
}
.card h2 {
  font-size: 30px;
  margin: 0 0 8px;
}
.muted {
  color: var(--muted);
}
.field {
  margin-top: 20px;
}
.field label {
  display: block;
  font-weight: 650;
  margin-bottom: 8px;
}
.input {
  width: 100%;
  height: 50px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}
.input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(40, 125, 155, 0.15);
}
.btn {
  border: 0;
  border-radius: 12px;
  height: 50px;
  padding: 0 20px;
  font-weight: 750;
  cursor: pointer;
}
.btn-primary {
  width: 100%;
  margin-top: 24px;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color: #fff;
}
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin: 16px 0;
}
.alert-danger {
  background: #fff1f0;
  color: #b42318;
}
.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #111827;
  color: #fff;
  padding: 26px 18px;
}
.nav {
  margin-top: 32px;
  display: grid;
  gap: 6px;
}
.nav a {
  padding: 12px 14px;
  border-radius: 10px;
  color: #cbd5e1;
}
.nav a:hover,
.nav a.active {
  background: #ffffff14;
  color: #fff;
}
.main {
  padding: 28px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  width:77%;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e5f3f7;
  color: #175266;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  /* width: 77%; */
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}
.stat strong {
  font-size: 28px;
  display: block;
  margin-top: 10px;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-top: 20px;
  /* width:77%; */
}
.role-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 13px;
  font-weight: 700;
}
@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-art {
    display: none;
  }
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .main {
    padding: 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 26px;
  }
}

.top-actions,
.toolbar,
.row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.toolbar {
  justify-content: space-between;
  margin: 14px 0;
}
.row-actions form {
  margin: 0;
}
.small {
  font-size: 13px;
}
.alert-success {
  background: #eaf9f4;
  color: #087454;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.status {
  padding: 5px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
}
.status.on {
  background: #e7f8f1;
  color: #087454;
}
.status.off {
  background: #fff0f1;
  color: #a8293b;
}
.form-panel {
  max-width: 860px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.span-2 {
  grid-column: span 2;
}
.check-grid,
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.check small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.role-list {
  display: grid;
  gap: 18px;
}
.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--bg);
}
.narrow {
  width: min(440px, 100%);
}
.text-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--purple);
  font-weight: 700;
}
.report-filters {
  margin-top: 0;
}
.report-filters .field {
  margin-top: 0;
}
.filter-action {
  display: flex;
  align-items: flex-end;
}
.filter-action .btn {
  width: 100%;
  margin: 0;
}
.report-kpis {
  margin-top: 20px;
}
.report-kpis .stat strong {
  font-size: 24px;
}
.export-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  background: #e5f3f7;
  color: #175266;
}
.panel h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
@media (max-width: 1100px) {
  .report-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .form-grid,
  .permission-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .top-actions {
    flex-wrap: wrap;
  }
}
.shell {
  grid-template-columns: 280px 1fr;
}
.sidebar {
  overflow-y: auto;
}
.nav {
  gap: 4px;
}
.nav a {
  padding: 10px 14px;
}
.nav a.nav-sub {
  padding-left: 30px;
  font-size: 13px;
  color: #aeb9ca;
}
.nav-section {
  display: block;
  padding: 16px 14px 5px;
  color: #77849a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-section:first-child {
  padding-top: 2px;
}

/* Fixed sidebar and sticky top header */
:root {
  --sidebar-width: 280px;
  --topbar-offset: 0px;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow-x: hidden;
}

.shell {
  display: block;
  min-height: 100vh;
}

/* Sidebar remains fixed */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  height: 100vh;
  z-index: 1000;
  overflow: hidden;
  background: #111827;
}

/* Brand remains at top of sidebar */
.sidebar .brand {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #111827;
}

/*
 * Only sidebar navigation scrolls internally when
 * there are more menu links than screen height.
 */
.sidebar .nav {
  height: calc(100vh - 85px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 30px;
  scrollbar-width: thin;
}

/* Main page starts after sidebar */
.main {
  width: auto;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

/* Header remains visible while content scrolls */
.topbar {
  position: sticky;
  top: var(--topbar-offset);
  z-index: 900;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

/* Optional sidebar scrollbar styling */
.sidebar .nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar .nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar .nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
}

/* Mobile layout */
@media (max-width: 900px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .sidebar .nav {
    height: auto;
    overflow: visible;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    top: 0;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo,
.brand-mark {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 18px;
}

.brand-logo {
  display: block;
  padding: 5px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: #ffffff;
  object-fit: contain;
  border-radius:30px!Important;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.topbar-eyebrow {
  margin: 0;
}

.topbar h1 {
  margin: 4px 0;
}

.top-user-information {
  text-align: left;
}

.topbar-profile-image {
  display: block;
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  padding: 3px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  object-fit: cover;
}

@media (max-width: 900px) {
  .brand-logo,
  .brand-mark {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .brand-name {
    font-size: 20px;
  }

  .topbar-profile-image {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 14px;
  }
}

/* =========================================================
   GLOBAL UI DENSITY — 80%
   Makes all pages that load app.css render at roughly the
   same density as browser zoom set to 80%, including legacy
   components that still use hard-coded px values.
   ========================================================= */



/* =========================================================
   GLOBAL UI DENSITY — 80% ON DESKTOP
   Keeps admin/client pages at the same compact visual density
   as the POS screen while preserving normal mobile sizing.
   ========================================================= */

:root {
  --ui-scale: 0.80;
  --ui-scale-inverse: 1.25;
  --scaled-vh: 125vh;
}

html {
  font-size: 100%;
}

@media (min-width: 901px) {
  body {
    zoom: var(--ui-scale);
    width: calc(100% / var(--ui-scale));
    min-height: var(--scaled-vh);
    overflow-x: hidden;
  }

  .auth-page,
  .center-page,
  .shell,
  .pos-page {
    min-height: var(--scaled-vh);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: auto;
    width: var(--sidebar-width);
    height: var(--scaled-vh);
    min-height: var(--scaled-vh);
    overflow: hidden;
  }

  .sidebar .nav {
    height: calc(var(--scaled-vh) - 85px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 30px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .sidebar .nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .main {
    min-height: var(--scaled-vh);
  }
}

/* Tablet/mobile must remain at a true 100% size. */
@media (max-width: 900px) {
  body {
    zoom: 1;
    width: 100%;
    min-height: 100vh;
  }

  .auth-page,
  .center-page,
  .shell,
  .pos-page {
    min-height: 100vh;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .sidebar .nav {
    height: auto;
    max-height: none;
    overflow: visible;
  }
}

/* =========================================================
   HIDE SIDEBAR SCROLLBAR
   Keep sidebar scrolling enabled but hide scrollbar
   ========================================================= */

.sidebar .nav {
  overflow-y: auto;
  overflow-x: hidden;

  /* Firefox */
  scrollbar-width: none !important;

  /* IE / old Edge */
  -ms-overflow-style: none;
}

/* Chrome, Edge, Safari */
.sidebar .nav::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.sidebar .nav::-webkit-scrollbar-track {
  display: none !important;
  background: transparent !important;
}

.sidebar .nav::-webkit-scrollbar-thumb {
  display: none !important;
  background: transparent !important;
}

.sidebar .nav {
  height: calc(100vh - 85px);

  overflow-y: auto;
  overflow-x: hidden;

  padding-bottom: 30px;

  scrollbar-width: thin;
}

@media (min-width: 901px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: var(--sidebar-width);

    height: 100vh;
    min-height: 100vh;

    overflow: hidden;
  }

  .sidebar .nav {
    height: calc(100vh - 85px);

    overflow-y: auto;
    overflow-x: hidden;

    padding-bottom: 30px;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .sidebar .nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}

/* =========================================================
   ADD TERMINAL BUTTON
   ========================================================= */

.terminal-add-btn {
    display: inline-flex;

    width: auto;
    min-width: 132px;
    height: 44px;

    flex: 0 0 auto;

    align-items: center;
    justify-content: center;

    padding: 0 18px;
    margin: 0;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #287D9B,
            #348ea9
        );

    border: 0;
    border-radius: 11px;

    font-size: 15px;
    font-weight: 800;
    line-height: 1;

    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        0 7px 16px
        rgba(40, 125, 155, 0.20);

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

.terminal-add-btn:hover {
    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 10px 20px
        rgba(40, 125, 155, 0.27);
}

.terminal-add-btn:active {
    transform: translateY(0);
}


/* =========================================================
   TOOLBAR ALIGNMENT
   ========================================================= */

.toolbar {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin: 18px 0 22px;
}

.toolbar .muted {
    margin: 0;

    font-size: 16px;
    line-height: 1.5;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .terminal-add-btn {
        width: 100%;
    }
}


/* =========================================================
   TOP-ACTIONS BAR (topbar right side)
   ========================================================= */

.top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-user-information {
    text-align: right;
    line-height: 1.3;
}

/* =========================================================
   ADMIN NOTIFICATION BELL
   ========================================================= */

.notif-bell-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notif-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: #fff;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    color: var(--navy);
}

.notif-bell-btn:hover {
    background: #eef7fa;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(40, 125, 155, 0.15);
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f04438;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
    pointer-events: none;
    animation: badge-pop .25s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes badge-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.notif-badge.hidden { display: none; }

/* Dropdown panel */
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(16,24,40,.13);
    z-index: 9999;
    overflow: hidden;
    flex-direction: column;
    animation: notif-slide-in .18s ease both;
}

@keyframes notif-slide-in {
    from { opacity: 0; transform: translateY(-8px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-dropdown.open { display: flex; }

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.notif-dropdown-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.notif-mark-all-btn {
    font-size: 12px;
    color: var(--purple);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
    transition: background .12s;
}

.notif-mark-all-btn:hover { background: #eef7fa; }

.notif-list {
    overflow-y: auto;
    flex: 1;
    padding: 6px 0;
}

.notif-empty {
    padding: 36px 18px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.notif-empty span { display: block; font-size: 28px; margin-bottom: 8px; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f2f4f7;
    cursor: pointer;
    transition: background .12s;
    text-decoration: none;
    color: inherit;
}

.notif-item:last-child { border-bottom: none; }

.notif-item:hover { background: #f9f9fd; }

.notif-item.unread { background: #eef7fa; }
.notif-item.unread:hover { background: #e4f2f6; }

.notif-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.notif-item-icon.client_onboarded    { background: #e9f8f0; }
.notif-item-icon.subscription_created { background: #eff4ff; }
.notif-item-icon.subscription_updated { background: #fff6ed; }
.notif-item-icon.client_activated     { background: #d4f7e7; }
.notif-item-icon.client_suspended     { background: #fff1f0; }

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-message {
    font-size: 12px;
    color: var(--muted);
    margin: 0 0 2px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-time {
    font-size: 11px;
    color: #a0a8b8;
}

.notif-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--purple);
    flex-shrink: 0;
    margin-top: 5px;
}

.notif-dropdown-footer {
    border-top: 1px solid var(--border);
    padding: 10px 18px;
    flex-shrink: 0;
}

.notif-dropdown-footer a {
    font-size: 12px;
    color: var(--purple);
    font-weight: 600;
}

/* Bell ring animation when new badge appears */
@keyframes bell-ring {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(12deg); }
    30%  { transform: rotate(-10deg); }
    45%  { transform: rotate(8deg); }
    60%  { transform: rotate(-6deg); }
    75%  { transform: rotate(3deg); }
    100% { transform: rotate(0deg); }
}

.notif-bell-btn.ring {
    animation: bell-ring .5s ease both;
}
/* =========================================================
   ADMIN FORM PAGES — NORMAL 100% SIZE
   Keeps Add Client / edit forms visually consistent with the
   Platform Administration dashboard and Clients listing.
   ========================================================= */

/* Main form panel */
.main .form-panel {
  width: 100%;
  max-width: none;
  padding: 34px 38px;
}

/* Form page section heading */
.main .form-panel h2 {
  margin: 8px 0 8px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--navy);
}

/* Description below the section heading */
.main .form-panel > .muted,
.main .form-panel .toolbar .muted {
  font-size: 16px;
  line-height: 1.55;
}

/* Two-column form spacing */
.main .form-panel .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 20px;
}

.main .form-panel .field {
  margin-top: 0;
}

/* Labels */
.main .form-panel .field label {
  margin-bottom: 9px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 750;
  color: var(--navy);
}

/* Inputs / selects / textareas */
.main .form-panel .input,
.main .form-panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.main .form-panel select,
.main .form-panel textarea {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.4;
}

.main .form-panel textarea {
  min-height: 120px;
  padding-top: 14px;
  padding-bottom: 14px;
  resize: vertical;
}

.main .form-panel input::placeholder,
.main .form-panel textarea::placeholder {
  color: #98a2b3;
  opacity: 1;
}

.main .form-panel .input:focus,
.main .form-panel input:focus,
.main .form-panel select:focus,
.main .form-panel textarea:focus {
  border-color: var(--purple);
  outline: none;
  box-shadow: 0 0 0 4px rgba(40, 125, 155, 0.12);
}

/* Form buttons */
.main .form-panel .btn {
  min-height: 48px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 750;
}

/* Top page heading consistency */
.main > .topbar h1,
.topbar h1 {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 800;
}

.topbar-eyebrow {
  font-size: 16px;
  line-height: 1.4;
}

/* Sidebar text should remain readable at the same visual scale */
.sidebar .nav > a:not(.nav-sub) {
  font-size: 16px;
}

.sidebar .nav-section {
  font-size: 12px;
}

/* Responsive form layout */
@media (max-width: 900px) {
  .main .form-panel {
    padding: 26px 22px;
  }

  .main .form-panel .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .main .form-panel h2 {
    font-size: 26px;
  }

  .topbar h1 {
    font-size: 28px;
  }
}
#profileMenu .profile-dropdown-profile-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

#profileMenu .profile-dropdown-profile-link:hover {
    color: #287D9B;
    background: #eef7fa;
    border-radius: 8px;
}




/* =========================================================
   FINAL DESKTOP SCREEN-FIT OVERRIDE
   Keep this block at the END of app.css so older duplicate
   sidebar rules above cannot cancel the 80% desktop density.
   ========================================================= */
@media (min-width: 901px) {
  html {
    font-size: 100%;
  }

  body {
    zoom: 0.80 !important;
    width: 125% !important;
    min-height: 125vh !important;
    overflow-x: hidden !important;
  }

  .shell,
  .auth-page,
  .center-page,
  .pos-page,
  .main {
    min-height: 125vh !important;
  }

  .sidebar {
    height: 125vh !important;
    min-height: 125vh !important;
    bottom: auto !important;
  }

  .sidebar .nav {
    height: calc(125vh - 85px) !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .sidebar .nav::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}

@media (max-width: 900px) {
  body {
    zoom: 1 !important;
    width: 100% !important;
    min-height: 100vh !important;
  }

  .shell,
  .auth-page,
  .center-page,
  .pos-page,
  .main {
    min-height: 100vh !important;
  }
}

/* ======================================================================
   GLOBAL RESPONSIVE UI STANDARD — 2026-09-24
   This final block intentionally normalises typography and spacing across
   admin, client, manager, cashier, POS, billing and QR screens.
   ====================================================================== */

:root {
  --ui-heading-size: 22px;
  --ui-subheading-size: 18px;
  --ui-body-size: 16px;
  --ui-page-padding: 16px;
  --ui-section-gap: 12px;
  --ui-card-padding: 16px;
  --ui-control-height: 40px;
  --ui-radius: 12px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-size: var(--ui-body-size);
  line-height: 1.45;
}

/* Main headings */
body h1,
body .page-title,
body .topbar h1,
body .auth-copy h1,
body .track-card h1 {
  font-size: var(--ui-heading-size) !important;
  line-height: 1.2 !important;
}

/* Section and card subheadings */
body h2,
body h3,
body h4,
body h5,
body h6,
body .section-title,
body .panel-title,
body .card-title {
  font-size: var(--ui-subheading-size) !important;
  line-height: 1.25 !important;
}

/* Normal readable text */
body p,
body .description,
body .lead,
body .helper-text {
  font-size: var(--ui-body-size) !important;
  line-height: 1.45 !important;
}

/* Compact shared page spacing */
body .main {
  padding: var(--ui-page-padding) !important;
}

body .topbar {
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: var(--ui-section-gap) !important;
  padding: 5px;
    border-radius: 12px;

}

body :where(.panel, .card, .stat) {
  padding: var(--ui-card-padding) !important;
}

body :where(.panel, .card, .stat, .toolbar, .form-grid, .grid) {
  gap: var(--ui-section-gap);
}

body :where(.panel, .card, .stat) {
  margin-top: var(--ui-section-gap);
  border-radius: var(--ui-radius);
}

body :where(.toolbar, .receipt-actions) {
  margin-top: var(--ui-section-gap) !important;
  margin-bottom: var(--ui-section-gap) !important;
}

body :where(.field) {
  margin-top: 12px;
}

body :where(.field label) {
  margin-bottom: 6px;
}

/* Compact common controls while preserving page-specific widths. */
body :where(.input, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
  max-width: 100%;
  font-size: 16px;
}

body :where(.input, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select) {
  min-height: var(--ui-control-height);
}

body :where(.btn, button) {
  font-size: 16px;
}

body .btn {
  min-height: var(--ui-control-height);
  height: auto;
  padding: 8px 14px;
}

/* Prevent wide tables and grids from widening the complete screen. */
body :where(.main, .panel, .card, .grid, .form-grid, .billing-columns, .table-wrap) {
  min-width: 0;
  max-width: 100%;
}

body .table-wrap {
  display: block;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

body :where(table) th,
body :where(table) td {
  padding: 9px 10px;
}

/* One controlled 80% desktop screen density for every application page. */
@media screen and (min-width: 901px) {
  body {
    zoom: .80 !important;
    width: 125% !important;
    min-height: 125vh !important;
  }

  body :where(.shell, .auth-page, .center-page, .pos-page, .main) {
    min-height: 125vh !important;
  }

  body .sidebar {
    height: 125vh !important;
    min-height: 125vh !important;
  }

  body .sidebar .nav {
    height: calc(125vh - 85px) !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

/* Tablet and mobile use the real viewport and remain fully responsive. */
@media screen and (max-width: 900px) {
  :root {
    --ui-page-padding: 14px;
    --ui-card-padding: 14px;
    --ui-section-gap: 10px;
  }

  body {
    zoom: 1 !important;
    width: 100% !important;
    min-height: 100vh !important;
  }

  body :where(.shell, .auth-page, .center-page, .pos-page, .main) {
    min-height: 100vh !important;
  }

  body :where(.topbar, .toolbar, .top-actions, .receipt-actions) {
    max-width: 100%;
    flex-wrap: wrap;
  }

  body :where(.form-grid, .billing-columns) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .span-2 {
    grid-column: auto !important;
  }
}

@media screen and (max-width: 560px) {
  :root {
    --ui-page-padding: 12px;
    --ui-card-padding: 12px;
    --ui-control-height: 42px;
  }

  body :where(.top-actions, .toolbar, .receipt-actions) {
    align-items: stretch;
  }

  body :where(.top-actions, .toolbar) > * {
    max-width: 100%;
  }
}

/* Printing must never inherit browser-style screen scaling. */
@media print {
  body {
    zoom: 1 !important;
    width: 100% !important;
    min-height: auto !important;
  }
}


/* Slate sidebar complements the light page and teal primary actions. */
.sidebar {
    background: linear-gradient(180deg, #182536 0%, #223449 100%);
    color: #f1f5f9;
    border-right: 1px solid #314357;
}

.sidebar .nav a {
    color: #d4deea;
    transition: background-color .15s ease, color .15s ease;
}

.sidebar .brand-name {
    color: #f8fafc;
}

.sidebar .nav-section {
    color: #a6b7cb;
}

.sidebar .nav a.nav-sub {
    color: #bdcddd;
}

.sidebar .nav a:hover {
    background: #30465d;
    color: #ffffff;
}

.sidebar .nav a.active {
    background: #e3f0f5;
    color: #175266;
    font-weight: 700;
    box-shadow: inset 3px 0 0 #348ea9;
}

.sidebar .nav a:focus-visible {
    outline: 2px solid #92d0e5;
    outline-offset: 2px;
}

.sidebar .brand {
    background: transparent;
}

/* Compact portal action buttons — 2026-11-12.
   Page-specific colors and permission/disabled behavior remain defined by each page. */
body:not(.login-page) :is(
  button[type="submit"], input[type="submit"], input[type="button"],
  .btn, .button, button[class*="-btn"], a[class*="-btn"],
  button[class*="-button"], a[class*="-button"]
):not(:is(
  .profile-trigger, .notification-trigger, .sidebar-toggle, .menu-toggle,
  .password-toggle, .btn-close, [data-compact-exempt],
  [role="switch"], [role="tab"], .pos-item, .menu-item, .keypad-key
)) {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 36px !important;
  padding: 7px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  border-radius: 7px !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-align: center !important;
  vertical-align: middle;
}
body :is(
  .client-subscription-actions, .client-form-actions, .clients-action-group,
  .rb-client-row-actions, .subscription-form-actions, .form-actions,
  .modal-footer, .client-delete-actions
) {
  gap: 8px !important;
  flex-wrap: wrap !important;
}
@media (pointer: coarse), (max-width: 640px) {
body:not(.login-page) :is(
  button[type="submit"], input[type="submit"], input[type="button"],
  .btn, .button, button[class*="-btn"], a[class*="-btn"],
  button[class*="-button"], a[class*="-button"]
):not(:is(
  .profile-trigger, .notification-trigger, .sidebar-toggle, .menu-toggle,
  .password-toggle, .btn-close, [data-compact-exempt],
  [role="switch"], [role="tab"], .pos-item, .menu-item, .keypad-key
)) {
    min-height: 44px !important;
    padding: 9px 12px !important;
  }
}

/* RestroBills shared page-action color system (2026-11-16).
   Keep secondary navigation neutral and primary actions teal, consistently
   on Purchasing and other pages using the shared .page-actions pattern. */
:root { --rb-action-primary: #287D9B; --rb-action-primary-hover: #20647d; }
body .page-actions :is(a,button).btn:not(.btn-primary):not(.danger):not(.danger-solid) {
  color: #344054 !important;
  background: #fff !important;
  background-image: none !important;
  border: 1px solid #d0d5dd !important;
  box-shadow: none !important;
}
body .page-actions :is(a,button).btn:not(.btn-primary):not(.danger):not(.danger-solid):hover {
  color: var(--rb-action-primary) !important;
  background: #eef7fa !important;
  border-color: var(--rb-action-primary) !important;
}
body .page-actions :is(a,button).btn-primary {
  color: #fff !important;
  background: var(--rb-action-primary) !important;
  background-image: none !important;
  border: 1px solid var(--rb-action-primary) !important;
  box-shadow: none !important;
}
body .page-actions :is(a,button).btn-primary:hover {
  background: var(--rb-action-primary-hover) !important;
  border-color: var(--rb-action-primary-hover) !important;
}
body .page-actions :is(a,button).btn:focus-visible {
  outline: 3px solid rgba(40,125,155,.3);
  outline-offset: 2px;
}
