@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #111111;
  --ink-soft: #5F5F5F;
  --paper: #F7F7F5;
  --card: #FFFFFF;
  --line: #E2E2DE;
  --line-strong: #C9C9C2;

  --teal: #2C6FBB;
  --teal-dark: #1F5590;

  --amber: #D4A72C;
  --amber-bg: #FFF8E1;

  --red: #C62828;
  --red-bg: #FDECEC;

  --radius: 6px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'IBM Plex Mono', monospace; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: 0.95rem; }
a { color: inherit; }
.hidden { display: none !important; }

.btn {
  border: 1px solid #1F5590;
  background: #1F5590;
  color: var(--paper);
  border-radius: var(--radius);
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.08s ease, opacity 0.15s ease;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.secondary:hover { background: rgba(0,0,0,0.03); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.small { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

.field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; }
.field label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); font-weight: 600;
}
.field input, .field select {
  padding: 0.55rem 0.7rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,111,94,0.15);
}

.login-card .field input {
  background: transparent; border: none; border-bottom: 1px solid var(--line-strong);
  border-radius: 0; padding: 0.55rem 0.2rem;
}
.login-card .field input:focus {
  outline: none; border-bottom: 2px solid var(--teal); box-shadow: none;
}

.error-msg {
  background: var(--red-bg); color: var(--red); border: 1px solid var(--red);
  padding: 0.6rem 0.8rem; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 0.8rem;
}
.success-msg {
  background: #E4F0EA; color: var(--teal-dark); border: 1px solid var(--teal);
  padding: 0.6rem 0.8rem; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 0.8rem;
}

/* ---------- Login screen ---------- */
#login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem;
  background:
    repeating-linear-gradient(180deg, transparent, transparent 27px, var(--line) 28px),
    var(--paper);
}
.login-card {
  width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 2.2rem 2rem 2rem; box-shadow: 0 12px 30px rgba(28, 43, 36, 0.10);
  position: relative;
}
.login-card::before {
  content: ''; position: absolute; top: -1px; left: 24px; right: 24px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--teal) 0 10px, transparent 10px 16px);
  border-radius: 0 0 3px 3px;
}
.login-brand-eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal-dark); margin: 0 0 0.3rem;
}
.login-card h1 { font-size: 1.5rem; margin: 0 0 0.2rem; letter-spacing: -0.01em; }
.login-card .sub { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 1.6rem; }
.login-card form { margin-top: 0.4rem; }
.login-card .btn { width: 100%; margin-top: 0.4rem; padding: 0.7rem; }
.login-hint {
  margin-top: 1.4rem; font-size: 0.75rem; color: var(--ink-soft);
  border-top: 1px dashed var(--line-strong); padding-top: 0.9rem;
}
.login-hint code {
  background: var(--paper); padding: 0.1rem 0.35rem; border-radius: 3px;
  font-family: 'IBM Plex Mono', monospace;
}

/* ---------- App shell ---------- */
#app-screen { display: none; min-height: 100vh; grid-template-columns: 240px 1fr; }
#app-screen.active { display: grid; }

.sidebar { background: #204A75; color: var(--paper); padding: 1.4rem 1.1rem; display: flex; flex-direction: column; }
.sidebar-brand {
  font-family: 'IBM Plex Mono', monospace; font-size: 1.3rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--paper); margin-bottom: 0.2rem;
}
.sidebar-title { font-size: 0.75rem; font-weight: 500; margin: 0 0 1.1rem; letter-spacing: 0.02em; color: #9CB2A6; }

.shop-tag {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.65rem; border: 1px dashed rgba(255,255,255,0.25);
  border-radius: 3px; font-size: 0.75rem; margin-bottom: 1.6rem;
}
.shop-tag .name { font-weight: 600; }
.shop-tag .cat { color: #9CB2A6; font-size: 0.68rem; }

nav.main-nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
nav.main-nav button {
  text-align: left; background: transparent; border: none; color: #CBD8CF;
  padding: 0.6rem 0.7rem; border-radius: 3px; font-size: 0.88rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.6rem;
}
nav.main-nav button:hover { background: rgba(255,255,255,0.06); color: #fff; }
nav.main-nav button.active { background: var(--teal); color: #fff; }
nav.main-nav .badge {
  margin-left: auto; background: var(--amber); color: #2A1B00; font-size: 0.68rem;
  font-weight: 700; border-radius: 10px; padding: 0.05rem 0.45rem;
}

.sidebar-footer { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.12); }
.who { font-size: 0.82rem; margin-bottom: 0.6rem; }
.who .role-tag {
  display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.06em; text-transform: uppercase; background: rgba(255,255,255,0.1);
  padding: 0.1rem 0.4rem; border-radius: 3px; margin-top: 0.15rem;
}

.main-panel { padding: 1.8rem 2.4rem 3rem; overflow-y: auto; max-height: 100vh; }

.panel-header {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.4rem;
  padding-bottom: 0.9rem; border-bottom: 1px dashed var(--line-strong);
}
.panel-header h2 { margin: 0; font-size: 1.4rem; letter-spacing: -0.01em; }
.panel-header .desc { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.2rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem; margin-bottom: 1.8rem; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; position: relative; }
.stat-card .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); font-weight: 600; }
.stat-card .value { font-family: 'IBM Plex Mono', monospace; font-size: 1.7rem; font-weight: 600; margin-top: 0.3rem; }
.stat-card.alert { border-color: var(--amber); background: var(--amber-bg); }
.stat-card.alert .value { color: #7A4A0F; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1.5rem; }
.card h3 { margin: 0 0 1rem; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th {
  text-align: left; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); border-bottom: 1px solid var(--line-strong); padding: 0.5rem 0.6rem; font-weight: 600;
}
tbody td { padding: 0.6rem 0.6rem; border-bottom: 1px solid var(--line); }
tbody tr:hover { background: rgba(47,111,94,0.04); }
.num { font-family: 'IBM Plex Mono', monospace; text-align: right; }
.empty-row td { text-align: center; color: var(--ink-soft); padding: 1.6rem; font-style: italic; }

.pill { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 10px; font-size: 0.72rem; font-weight: 600; }
.pill.ok { background: #E4F0EA; color: var(--teal-dark); }
.pill.low { background: var(--amber-bg); color: #7A4A0F; }
.pill.off { background: var(--red-bg); color: var(--red); }

.bin-chip {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; border: 1px dashed var(--line-strong);
  border-radius: 3px; padding: 0.1rem 0.45rem; background: var(--paper);
}

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.9rem; align-items: end; }
.filter-row { display: flex; gap: 0.8rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filter-row .field { margin-bottom: 0; min-width: 160px; }

.feed-item { display: flex; gap: 0.8rem; padding: 0.7rem 0; border-bottom: 1px dashed var(--line); font-size: 0.85rem; }
.feed-item:last-child { border-bottom: none; }
.feed-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-top: 0.35rem; flex-shrink: 0; }
.feed-item.low .dot { background: var(--amber); }
.feed-item .meta { color: var(--ink-soft); font-size: 0.75rem; margin-top: 0.15rem; }

.top-actions { display: flex; gap: 0.6rem; align-items: center; }

@media (max-width: 860px) {
  #app-screen.active { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .main-panel { padding: 1.2rem; }
}

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ============================================================
   CHRIS STORE - MULTI DEVICE RESPONSIVE DESIGN
   Phones, tablets, iPads, laptops, desktops and MacBooks
   ============================================================ */

/* Prevent inputs and cards from overflowing */
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* Tables become horizontally scrollable on small screens */
.card {
  overflow-x: auto;
}

.card > h3,
.card > form,
.card > .form-row,
.card > .filter-row {
  min-width: 0;
}

table {
  min-width: 620px;
}

/* Better touch targets */
button,
select,
input,
textarea {
  max-width: 100%;
}

button {
  min-height: 40px;
}

input,
select,
textarea {
  min-height: 40px;
}

/* ---------- Tablets ---------- */
@media (max-width: 1024px) {
  #app-screen {
    grid-template-columns: 210px 1fr;
  }

  .sidebar {
    padding: 1.1rem 0.8rem;
  }

  .main-panel {
    padding: 1.4rem 1.5rem 2.5rem;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-header {
    align-items: flex-start;
    gap: 1rem;
  }
}

/* ---------- Phones and small tablets ---------- */
@media (max-width: 700px) {

  #app-screen.active {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  /* Compact mobile header/sidebar */
  .sidebar {
    width: 100%;
    padding: 0.85rem;
    display: block;
  }

  .sidebar-brand {
    font-size: 1.05rem;
  }

  .sidebar-title {
    font-size: 0.68rem;
    margin-bottom: 0.7rem;
  }

  .shop-tag {
    margin-bottom: 0.8rem;
  }

  /* Navigation becomes horizontal and scrollable */
  nav.main-nav {
    display: flex;
    flex-direction: row;
    gap: 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.35rem;
    flex: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  nav.main-nav button {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
  }

  .sidebar-footer {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
  }

  .who {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .sidebar-footer .btn {
    width: 100% !important;
  }

  .main-panel {
    width: 100%;
    padding: 1rem 0.8rem 2rem;
    overflow-y: visible;
    max-height: none;
  }

  .panel-header {
    display: block;
    margin-bottom: 1rem;
  }

  .panel-header h2 {
    font-size: 1.2rem;
  }

  .panel-header .desc {
    font-size: 0.78rem;
  }

  /* Dashboard cards */
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .stat-card {
    padding: 0.9rem;
  }

  .stat-card .value {
    font-size: 1.45rem;
  }

  /* Forms stack vertically */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .field {
    width: 100%;
  }

  .field input,
  .field select,
  .field textarea {
    width: 100%;
  }

  .filter-row {
    flex-direction: column;
    gap: 0.6rem;
  }

  .filter-row .field {
    width: 100%;
    min-width: 0;
  }

  .filter-row select {
    width: 100%;
  }

  /* Cards */
  .card {
    padding: 0.9rem;
    margin-bottom: 1rem;
  }

  .card h3 {
    font-size: 0.95rem;
  }

  /* Keep tables usable by scrolling */
  .card table {
    min-width: 650px;
  }

  /* Profit selector */
  #dashboard-profit-period {
    min-width: 110px;
    width: auto;
  }

  /* Buttons are easier to tap */
  .btn {
    min-height: 42px;
  }

  .btn.small {
    min-height: 38px;
  }

  /* Recent sales feed */
  .feed-item {
    font-size: 0.8rem;
    gap: 0.6rem;
  }
}

/* ---------- Very small phones ---------- */
@media (max-width: 420px) {

  .sidebar {
    padding: 0.7rem;
  }

  .shop-tag {
    font-size: 0.68rem;
  }

  nav.main-nav button {
    font-size: 0.75rem;
    padding: 0.55rem 0.65rem;
  }

  .main-panel {
    padding: 0.8rem 0.6rem 1.5rem;
  }

  .stat-card .value {
    font-size: 1.3rem;
  }

  .stat-card {
    padding: 0.8rem;
  }

  .card {
    padding: 0.75rem;
  }

  #dashboard-profit-period {
    min-width: 100px;
    font-size: 0.78rem;
  }
}

/* ---------- Landscape phones ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .sidebar {
    padding: 0.6rem 0.8rem;
  }

  .sidebar-footer {
    margin-top: 0.4rem;
  }

  .main-panel {
    padding-top: 0.8rem;
  }
}

/* ---------- Touch devices ---------- */
@media (hover: none) and (pointer: coarse) {
  nav.main-nav button,
  button,
  select,
  input {
    min-height: 44px;
  }

  nav.main-nav {
    -webkit-overflow-scrolling: touch;
  }
}
/* ---------- Sales Summary - compact ---------- */
.sales-summary-compact .stat-grid {
  gap: 0.6rem;
}

.sales-summary-compact .stat-card {
  padding: 0.7rem 0.8rem;
}

.sales-summary-compact .stat-card .label {
  font-size: 0.65rem;
}

.sales-summary-compact .stat-card .value {
  font-size: 1rem;
  margin-top: 0.15rem;
}
/* FORCE COMPACT SALES SUMMARY */
.card.sales-summary-compact .stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0;
}

.card.sales-summary-compact .stat-card {
  padding: 0.55rem 0.7rem;
  min-height: 0;
}

.card.sales-summary-compact .stat-card .label {
  font-size: 0.62rem;
  line-height: 1.2;
}

.card.sales-summary-compact .stat-card .value {
  font-size: 1rem !important;
  line-height: 1.2;
  margin-top: 0.15rem;
}
/* ---------- CHRIS STORE title ---------- */
.system-subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
}

/* ---------- Professional Store Switcher ---------- */
#store-switcher {
  margin: 14px 0 18px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}

#store-switcher label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .65;
}

#store-selector {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: #18212b;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

#store-selector:hover {
  border-color: rgba(255,255,255,.28);
}

#store-selector:focus {
  border-color: #6b8afd;
  box-shadow: 0 0 0 3px rgba(107,138,253,.15);
}

#store-selector:disabled {
  opacity: .6;
  cursor: wait;
}

/* ---------- Classic Record Sale Design ---------- */
#sale-product-search {
  background: #fff;
  border: 1px solid #b9b9b9;
  border-radius: 3px;
  padding: 0.7rem 0.8rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

#sale-product-search:focus {
  border-color: #777;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}

#sale-products-list tr {
  border-bottom: 1px solid #e2e2e2;
}

#sale-products-list tr:hover {
  background: #fafafa;
}

#sale-products-list td,
#sale-products-list th {
  padding: 0.75rem 0.65rem;
  vertical-align: middle;
}

#sale-products-list th {
  background: #f2f2f2;
  color: #333;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: 1px solid #d5d5d5;
  border-bottom: 1px solid #cfcfcf;
}

#sale-products-list .sale-qty,
#sale-products-list .sale-price {
  border: 1px solid #bdbdbd;
  border-radius: 3px;
  background: #fff;
  padding: 0.5rem;
  font-family: inherit;
}

#sale-products-list .sale-qty:focus,
#sale-products-list .sale-price:focus {
  outline: none;
  border-color: #777;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

#sale-products-list .record-sale-btn {
  border-radius: 3px;
  padding: 0.5rem 0.8rem;
  font-weight: 600;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}

#sale-products-list .record-sale-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

#sale-msg {
  margin-bottom: 1rem;
}

/* ===== CHRIS STORE - CLASSIC RECORD SALE ===== */
.card:has(#sale-product-search) {
  background: #fdfdfd;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.card:has(#sale-product-search) h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #222;
  border-bottom: 1px solid #d6d6d6;
  padding-bottom: .8rem;
}

.card:has(#sale-product-search) #sale-product-search {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  background: #fff;
  border: 1px solid #aaa;
  border-radius: 3px;
  color: #222;
}

.card:has(#sale-product-search) #sale-product-search::placeholder {
  color: #888;
}

.card:has(#sale-product-search) table {
  border: 1px solid #ccc;
  background: #fff;
}

.card:has(#sale-product-search) #sale-products-list th {
  background: #eeeeee;
  color: #222;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 12px 10px;
}

.card:has(#sale-product-search) #sale-products-list td {
  padding: 11px 10px;
  border-bottom: 1px solid #ddd;
  color: #333;
}

.card:has(#sale-product-search) #sale-products-list tr:hover {
  background: #f7f7f7;
}

.card:has(#sale-product-search) .sale-qty,
.card:has(#sale-product-search) .sale-price {
  height: 36px;
  box-sizing: border-box;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: #fff;
  color: #222;
}

.card:has(#sale-product-search) .record-sale-btn {
  background: #333;
  border: 1px solid #222;
  border-radius: 3px;
  color: #fff;
  font-weight: 600;
  padding: 8px 13px;
  box-shadow: none;
}

.card:has(#sale-product-search) .record-sale-btn:hover {
  background: #555;
  opacity: 1;
}

.card:has(#sale-product-search) .record-sale-btn:active {
  transform: translateY(1px);
}

/* ---------- CHRIS STORE modern login ---------- */
#login-screen {
  background:
    radial-gradient(circle at 20% 20%, rgba(32, 74, 117, 0.18), transparent 32%),
    radial-gradient(circle at 80% 80%, rgba(20, 184, 166, 0.14), transparent 30%),
    linear-gradient(135deg, #eef4f8 0%, #f8fafc 50%, #e9f1f5 100%);
  position: relative;
  overflow: hidden;
}

#login-screen::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(32, 74, 117, 0.10);
  top: -180px;
  right: -120px;
}

#login-screen::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(20, 184, 166, 0.10);
  bottom: -140px;
  left: -100px;
}

.login-card {
  max-width: 410px;
  padding: 2.8rem 2.5rem 2.4rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 25px 60px rgba(32, 74, 117, 0.16),
    0 4px 14px rgba(28, 43, 36, 0.06);
  backdrop-filter: blur(14px);
  z-index: 1;
}

.login-card::before {
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #204A75, #14b8a6, #204A75);
  border-radius: 18px 18px 0 0;
}

.login-brand-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #204A75;
  background: #e8f1f8;
  padding: 0.42rem 0.7rem;
  border-radius: 7px;
  margin-bottom: 0.8rem;
}

.login-card h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #172b3a;
  letter-spacing: -0.035em;
  margin-bottom: 0.35rem;
}

.login-card .sub {
  color: #64748b;
  font-size: 0.88rem;
  margin-bottom: 2rem;
}

.login-card .field {
  margin-bottom: 1.2rem;
}

.login-card .field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.45rem;
}

.login-card .field input {
  width: 100%;
  box-sizing: border-box;
  background: #f8fafc;
  border: 1px solid #d7e0e7;
  border-radius: 10px;
  padding: 0.78rem 0.9rem;
  color: #172b3a;
  transition: 0.2s ease;
}

.login-card .field input:hover {
  border-color: #aebdca;
}

.login-card .field input:focus {
  outline: none;
  border: 1px solid #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
  background: #fff;
}

.login-card .btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #204A75, #28608f);
  color: white;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(32, 74, 117, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.login-card .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 24px rgba(32, 74, 117, 0.28);
}

.login-card .btn:active {
  transform: translateY(0);
}

.login-hint {
  border-top: 1px solid #e5eaf0;
  margin-top: 1.7rem;
  padding-top: 1rem;
}

/* ---------- CHRIS STORE classic interior ---------- */
#app-screen {
  background: #f4f1e8;
}

.sidebar {
  background: #17324d;
  border-right: 1px solid #0f2538;
}

.sidebar-brand {
  letter-spacing: 0.08em;
}

.main {
  background: #f4f1e8;
}

.topbar {
  background: #fffdf7;
  border-bottom: 1px solid #cfc8b8;
}

.content {
  background: #f4f1e8;
}

.card,
.panel,
.stat-card {
  background: #fffdf7;
  border: 1px solid #cfc8b8;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(45, 42, 35, 0.06);
}

.card h2,
.card h3,
.panel h2,
.panel h3 {
  color: #17324d;
  letter-spacing: 0;
}

table {
  background: #fffdf7;
  border: 1px solid #cfc8b8;
  border-radius: 3px;
  overflow: hidden;
}

thead {
  background: #e9e3d5;
}

th {
  color: #17324d;
  font-weight: 700;
  border-bottom: 2px solid #b9b09f;
}

td {
  border-bottom: 1px solid #e2ddd2;
}

tbody tr:hover {
  background: #f5f0e5;
}

.btn {
  border-radius: 4px;
  box-shadow: none;
}

.btn.primary,
.btn:not(.secondary) {
  background: #17324d;
  border-color: #17324d;
}

.btn.primary:hover,
.btn:not(.secondary):hover {
  background: #244b6d;
}

input,
select,
textarea {
  border-radius: 3px;
  border: 1px solid #bdb5a5;
  background: #fffdf7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #17324d;
  box-shadow: 0 0 0 2px rgba(23, 50, 77, 0.10);
}

.stat-card .label {
  color: #756f63;
}

.stat-card .value {
  color: #17324d;
}

.badge {
  border-radius: 3px;
}

.section-title {
  color: #17324d;
  border-bottom: 2px solid #b9b09f;
}

.daily-closing-row {
  background: #eee8dc;
  border-top: 2px solid #b9b09f;
}


/* ---------- CHRIS STORE premium classic interior ---------- */

#app-screen {
  background: #eeeae1;
  color: #263238;
}

.sidebar {
  background: linear-gradient(180deg, #142f49 0%, #193b59 100%);
  border-right: 1px solid #0c2235;
  padding: 1.6rem 1.15rem;
  box-shadow: 4px 0 18px rgba(20, 35, 45, 0.10);
}

.sidebar-brand {
  font-size: 1.35rem;
  letter-spacing: 0.11em;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.sidebar-title {
  margin-top: 0.7rem;
  color: #b9c7d2;
  letter-spacing: 0.04em;
}

.sidebar nav,
.sidebar .nav {
  margin-top: 1rem;
}

.sidebar a,
.sidebar button {
  border-radius: 4px;
  transition: background 0.18s ease, padding-left 0.18s ease;
}

.sidebar a:hover,
.sidebar button:hover {
  padding-left: 1.3rem;
}

.sidebar a.active,
.sidebar button.active {
  background: rgba(255,255,255,0.12);
  border-left: 3px solid #d6b36a;
}

.main {
  background: #eeeae1;
}

.topbar {
  min-height: 66px;
  background: #fffdf8;
  border-bottom: 1px solid #d2ccbf;
  box-shadow: 0 2px 8px rgba(35, 38, 34, 0.05);
}

.topbar h1,
.topbar h2 {
  color: #17324d;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.content {
  padding: 1.8rem;
  background:
    linear-gradient(rgba(255,255,255,0.18), rgba(255,255,255,0.18)),
    #eeeae1;
}

/* Premium classic cards */
.card,
.panel,
.stat-card {
  background: #fffdf8;
  border: 1px solid #d1c9ba;
  border-radius: 5px;
  box-shadow:
    0 3px 10px rgba(42, 39, 32, 0.06),
    0 1px 2px rgba(42, 39, 32, 0.04);
}

.card,
.panel {
  padding: 1.25rem;
}

.card h2,
.card h3,
.panel h2,
.panel h3 {
  color: #17324d;
  font-weight: 700;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #ded7ca;
}

/* Statistics */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #b28a45;
}

.stat-card .label {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.7rem;
  font-weight: 700;
  color: #756f63;
}

.stat-card .value {
  font-size: 1.65rem;
  color: #17324d;
  font-weight: 800;
}

/* Classic ledger tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fffdf8;
  border: 1px solid #cfc7b8;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 7px rgba(40, 38, 31, 0.05);
}

thead {
  background: #e5dfd2;
}

thead th {
  color: #17324d;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.85rem 0.75rem;
  border-bottom: 2px solid #b9ae9c;
}

tbody td {
  padding: 0.78rem 0.75rem;
  border-bottom: 1px solid #e3ddd2;
  color: #39444a;
}

tbody tr:nth-child(even) {
  background: #fbf8f1;
}

tbody tr:hover {
  background: #f2ecdf;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Forms */
.field label {
  color: #344452;
  font-weight: 700;
  font-size: 0.78rem;
}

input,
select,
textarea {
  border: 1px solid #bdb4a4;
  border-radius: 4px;
  background: #fffdf8;
  color: #263238;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #938876;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #365d7d;
  box-shadow: 0 0 0 3px rgba(54, 93, 125, 0.10);
}

/* Classic buttons */
.btn {
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary,
.btn:not(.secondary) {
  background: #17324d;
  border-color: #17324d;
  box-shadow: 0 2px 5px rgba(23, 50, 77, 0.16);
}

.btn.primary:hover,
.btn:not(.secondary):hover {
  background: #234c6d;
}

.btn.secondary {
  background: #fffdf8;
  color: #344452;
  border: 1px solid #aaa08e;
}

.btn.secondary:hover {
  background: #eee8dc;
}

/* Page headings */
.page-title,
.section-title {
  color: #17324d;
  font-weight: 800;
}

.section-title {
  padding-bottom: 0.65rem;
  border-bottom: 2px solid #b9ae9c;
}

/* Status badges */
.badge {
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Daily closing / totals */
.daily-closing-row {
  background: #e7e0d3 !important;
  border-top: 2px solid #a99d89;
  font-weight: 700;
}

.daily-closing-row strong {
  color: #17324d;
}

/* Empty states */
.empty-row td {
  color: #81796d;
  font-style: italic;
  padding: 2rem;
}

/* Subtle separators */
hr {
  border: 0;
  border-top: 1px solid #d5cec0;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: #e7e2d8;
}

::-webkit-scrollbar-thumb {
  background: #a9a093;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #82786b;
}

/* ---------- Login entrance animation ---------- */
@keyframes loginCardEnter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(18px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes loginFromLeft {
  from {
    opacity: 0;
    transform: translateX(-55px) rotate(-3deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
}

@keyframes loginFromRight {
  from {
    opacity: 0;
    transform: translateX(55px) rotate(3deg);
  }
  to {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
}

@keyframes loginFromBottom {
  from {
    opacity: 0;
    transform: translateY(45px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  animation: loginCardEnter 0.7s ease-out both;
}

.login-brand-eyebrow {
  animation: loginFromLeft 0.65s 0.15s ease-out both;
}

.login-card h1 {
  animation: loginFromRight 0.65s 0.25s ease-out both;
}

.login-card .sub {
  animation: loginFromBottom 0.65s 0.35s ease-out both;
}

.login-card .field:nth-of-type(1) {
  animation: loginFromLeft 0.65s 0.45s ease-out both;
}

.login-card .field:nth-of-type(2) {
  animation: loginFromRight 0.65s 0.55s ease-out both;
}

.login-card .btn {
  animation: loginFromBottom 0.65s 0.7s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .login-card,
  .login-brand-eyebrow,
  .login-card h1,
  .login-card .sub,
  .login-card .field,
  .login-card .btn {
    animation: none;
  }
}


nav.main-nav #nav-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  min-width: 19px;
  padding: 0 !important;
  margin-left: auto;
  background: #d60000 !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

nav.main-nav #nav-badge.hidden {
  display: none !important;
}
/* ============================================================
   CHRIS STORE — PROFESSIONAL SHOPPING CART
   Scoped only to the Shopping Cart page
   ============================================================ */

#shopping-cart-content {
  color: #17324d;
}

#shopping-cart-content > div:first-child {
  background: #ffffff;
  border: 1px solid #d9e0e6;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(23, 50, 77, 0.07);
}

#shopping-cart-content table {
  margin: 0;
  border: 0;
  min-width: 720px;
}

#shopping-cart-content thead th {
  background: #f3f6f8;
  color: #52616f;
  padding: 13px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #d9e0e6;
}

#shopping-cart-content tbody td {
  padding: 14px;
  border-bottom: 1px solid #edf0f2;
  vertical-align: middle;
}

#shopping-cart-content tbody tr:last-child td {
  border-bottom: 0;
}

#shopping-cart-content tbody tr:hover {
  background: #fafcfd;
}

#shopping-cart-content input,
#shopping-cart-content select {
  border: 1px solid #cbd5dc;
  border-radius: 6px;
  background: #ffffff;
  color: #17324d;
  min-height: 40px;
  padding: 8px 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#shopping-cart-content input:focus,
#shopping-cart-content select:focus {
  outline: none;
  border-color: #2c6fbb;
  box-shadow: 0 0 0 3px rgba(44, 111, 187, 0.12);
}

#shopping-cart-content label {
  display: block;
  margin-bottom: 6px;
  color: #52616f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#shopping-sale-date,
#shopping-sold-by {
  min-height: 42px;
}

#shopping-cart-content #shopping-record-sale {
  min-height: 46px;
  border-radius: 7px;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(23, 50, 77, 0.14);
}

#shopping-cart-content #shopping-back-sale {
  min-height: 42px;
  border-radius: 7px;
}

@media (max-width: 700px) {
  #shopping-cart-content > div:first-child {
    border-radius: 7px;
  }

  #shopping-cart-content table {
    min-width: 680px;
  }

  #shopping-cart-content tbody td,
  #shopping-cart-content thead th {
    padding: 10px;
  }
}


/* ============================================================
   CHRIS STORE — MODERN SHOPPING CART
   Design only — scoped to Shopping Cart
   ============================================================ */

#shopping-cart-content {
  color: #172b3a;
}

/* Cart product area */
#shopping-cart-content > div:first-child {
  background: #fff;
  border: 1px solid #e7ebef;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 35, 55, 0.08);
}

/* Table */
#shopping-cart-content table {
  margin: 0;
  border: 0;
  min-width: 720px;
}

#shopping-cart-content thead th {
  background: #f8fafc;
  color: #64748b;
  padding: 15px 16px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #e8edf2;
}

#shopping-cart-content tbody td {
  padding: 16px;
  border-bottom: 1px solid #eef2f5;
  vertical-align: middle;
}

#shopping-cart-content tbody tr {
  transition: background 0.15s ease;
}

#shopping-cart-content tbody tr:hover {
  background: #f8fbfd;
}

#shopping-cart-content tbody tr:last-child td {
  border-bottom: 0;
}

/* Form controls */
#shopping-cart-content input,
#shopping-cart-content select {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #d7dfe6;
  border-radius: 8px;
  background: #fff;
  color: #172b3a;
  font-size: 0.9rem;
  box-sizing: border-box;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

#shopping-cart-content input:hover,
#shopping-cart-content select:hover {
  border-color: #b9c6d1;
}

#shopping-cart-content input:focus,
#shopping-cart-content select:focus {
  outline: none;
  border-color: #2c6fbb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(44, 111, 187, 0.12);
}

/* Labels */
#shopping-cart-content label {
  display: block;
  margin-bottom: 7px;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Sale date + Sold By */
#shopping-sale-date,
#shopping-sold-by {
  min-height: 44px;
}

/* Primary action */
#shopping-cart-content #shopping-record-sale {
  min-height: 48px;
  border: 0;
  border-radius: 9px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 5px 14px rgba(31, 85, 144, 0.20);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

#shopping-cart-content #shopping-record-sale:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 85, 144, 0.25);
}

/* Secondary action */
#shopping-cart-content #shopping-back-sale {
  min-height: 44px;
  border-radius: 9px;
}

/* Mobile */
@media (max-width: 700px) {
  #shopping-cart-content > div:first-child {
    border-radius: 10px;
  }

  #shopping-cart-content table {
    min-width: 680px;
  }

  #shopping-cart-content tbody td,
  #shopping-cart-content thead th {
    padding: 11px 12px;
  }

  #shopping-cart-content input,
  #shopping-cart-content select {
    min-height: 42px;
  }
}

