/* ==========================================================================
   base.css
   Shared, project-wide styles for the Girvi (Pawn Shop) Management System.
   Loaded on every page BEFORE the page-specific stylesheet in css/pages/,
   so any page can safely override a rule declared here (e.g. a page that
   needs the 48pt icon variant simply redeclares .material-symbols-outlined
   in its own css/pages/<page>.css).
   ========================================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Material Symbols default rendering (most pages use the 24pt outline icon). */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.icon-fill {
  font-variation-settings: 'FILL' 1;
}

/* Shared "royal gold" scrollbar used across the dashboard, ledger, and
   report screens. */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 10px;
}

/* Common shadow utilities reused (with the same values) across several
   cards/panels in the original Stitch export. */
.card-shadow,
.ambient-shadow,
.shadow-ambient {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.interactive-shadow:hover,
.shadow-interactive:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

/* Print utility used by slip/legal-notice style pages. */
@media print {
  .no-print {
    display: none !important;
  }
}

/* ==========================================================================
   Unified brand header component (see pages/*.html <header>/<nav>).
   Every page links its brand/logo back to master_icon_dashboard.html; this
   block keeps that element legible from small phones up to desktop without
   needing to touch each page's own Tailwind config.
   ========================================================================== */
.app-brand {
  text-decoration: none;
  min-width: 0; /* allow the text below to truncate inside flex parents */
}

.app-brand-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.app-brand-icon svg {
  width: 1em;
  height: 1em;
  display: block;
}

.app-brand-text {
  font-size: 24px;
  line-height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 62vw;
}

/* Widened + enlarged on mobile 2026-09-14 (reported: shop name felt "too
   small" on phones, undermining the "this is our own app" feel that
   matters a lot to a shopkeeper) — the mobile header only ever has 3
   icons after it (Quick Add, Notifications, hamburger; search/language/
   user-badge/settings/guide/logout are all .app-nav-desktop-only), so
   there's real room to give the name much more space than the old
   42-52vw ever used. */
@media (max-width: 767px) {
  .app-brand-text {
    font-size: 18px;
    line-height: 23px;
    max-width: 68vw;
  }
  .app-brand-icon {
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .app-brand-text {
    font-size: 16px;
    line-height: 20px;
    max-width: 64vw;
  }
  .app-brand-icon {
    font-size: 22px;
  }
}

/* ==========================================================================
   Responsive safety net
   Applies across every page regardless of that page's own Tailwind config,
   so nothing overflows or breaks layout on phones/tablets even where a
   screen was originally designed desktop-first.
   ========================================================================== */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/* Any data table not already wrapped gets horizontal scroll instead of
   squeezing/breaking the layout on narrow screens. */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  max-width: 100%;
}

/* ==========================================================================
   Shared mobile bottom nav — one real, linked, Hindi-first bar reused on
   every page that shows a bottom nav (previously each page had its own
   unlinked <button> version with a different item set and English-only
   7-8px labels; this is now a single <nav> of real <a> links).
   ========================================================================== */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: center;
  min-height: 64px;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  border-top: 1px solid #d0c5af;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.app-bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  padding: 6px 4px;
  border-radius: 14px;
  color: #4d4635;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-bottom-nav-link .material-symbols-outlined {
  font-size: 24px;
}

.app-bottom-nav-label {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.app-bottom-nav-link.is-active {
  background: #d4af37;
  color: #ffffff;
}

.app-bottom-nav-link:not(.is-active):hover {
  background: #f0eded;
}

/* Pages using the bottom nav need bottom padding so content isn't hidden
   behind the fixed bar; apply to <body> alongside the nav markup. */
.has-bottom-nav {
  padding-bottom: 80px;
}

/* ==========================================================================
   Shared confirmation dialog — pure CSS checkbox-toggle (same technique as
   the mobile hamburger menu in nav.css), used before any irreversible
   action (release a pledge, close the day's books, delete an entry) so a
   first-time user always sees a plain-language restatement of what is
   about to happen before it happens.
   ========================================================================== */
.confirm-modal-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.confirm-modal-backdrop {
  display: none;
}

.confirm-modal {
  display: none;
}

.confirm-modal-toggle:checked ~ .confirm-modal-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(28, 27, 27, 0.55);
  z-index: 90;
}

.confirm-modal-toggle:checked ~ .confirm-modal {
  display: flex;
}

.confirm-modal {
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: fixed;
  z-index: 91;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 420px);
  max-height: 85vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 24px 24px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.confirm-modal-icon {
  font-size: 44px;
  color: #d4af37;
  margin-bottom: 8px;
}

.confirm-modal-title {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1c1b1b;
  margin-bottom: 12px;
}

.confirm-modal-body {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1c1b1b;
  margin-bottom: 12px;
}

.confirm-modal-note {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #ba1a1a;
  background: #ffdad6;
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 20px;
}

.confirm-modal-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  width: 100%;
}

.confirm-modal-btn-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 14px;
  border: 2px solid #7f7663;
  color: #4d4635;
  font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}

.confirm-modal-btn-cancel:hover {
  background: #f0eded;
}

.confirm-modal-btn-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  border-radius: 14px;
  background: #2e7d32;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.confirm-modal-btn-confirm:hover {
  background: #1b5e20;
}


