/*
 * ═══════════════════════════════════════════════════════════════════════════
 * MFUMO WA STOO - main.css  (design system: tokens, base, hero, buttons)
 * ───────────────────────────────────────────────────────────────────────────
 * Same design system as the Digital Cards Portal (keep in sync).
 *   1. Design tokens - colours, fonts, radii, shadows   7.  Buttons (all variants)
 *   2. Base reset & typography                           7A. Empty state
 *   3. Utilities / helpers                               8.  Badges / status pills
 *   4. Page hero + breadcrumbs                           9.  Inline alerts
 *   5. Section titles                                    14. Welcome card
 *   15. Global responsive (hero, buttons, sections)      18. Page hero background
 *   19. Extra utilities (replace the old style="" attributes)
 * Navbar / footer / scroll-top -> layout.css. Cards, menus, modals, toasts,
 * charts -> dashboard.css. Forms -> forms.css. Tables -> tables.css.
 *
 * Load order (partials/portal/head.blade.php, partials/auth/head.blade.php):
 *   Bootstrap -> icons -> AOS -> main.css -> layout.css -> dashboard.css -> pwa.css
 *   -> forms.css (every portal page) -> tables.css (pages with tables)
 *   -> auth.css (login / register / reset) or welcome.css (welcome page).
 * No page carries its own <style> block or style="" attribute any more -
 * page-specific rules live in the matching file under a 'PAGE:' heading.
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   1. DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Typography */
  --font-sans: "Inter", "Roboto", system-ui, -apple-system, sans-serif;
  --font-display: "Poppins", "Inter", system-ui, sans-serif;

  /* Brand - sky blue (the default theme).
     A customer installation changes these in ONE file: public/assets/css/themes/<name>.css,
     chosen with APP_THEME in .env (config/theme.php). Pages never repeat brand hex values -
     they use the tokens below, rgba(var(--brand-rgb), a) for tints, and var(--brand-text)
     when the brand colour is used as text or an icon on a light surface. */
  --brand-rgb: 80, 197, 255;
  --brand: #50c5ff;
  --brand-dark: #36bafc;
  --brand-deeper: #0369a1;
  /* PHASE 3: brand-soft/brand-ring/brand-hover previously mixed in the
     older #0ea5e9 blue family instead of the current #50c5ff brand -
     corrected so every focus ring / soft tint matches the live brand.
     No call sites changed; they all read these tokens so the fix applies
     everywhere automatically. */
  --brand-soft: rgba(var(--brand-rgb), 0.07);
  --brand-ring: rgba(var(--brand-rgb), 0.2);
  --brand-hover: #16a6e6;
  /* was --dc-nav-blue-dark in navbar.css - a darker, more saturated hover
     shade tuned for the dark navbar; kept distinct from --brand-dark
     (used on light surfaces) rather than merged into it. */
  /* brand as text / icon on light surfaces (a light brand colour sets a darker shade here) */
  --brand-text: var(--brand);
  --brand-text-hover: var(--brand-dark);
  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-200: #bae6fd;

  /* Neutrals - cool slate */
  --n-0: #ffffff;
  --n-50: #f8fafc;
  --n-100: #f1f5f9;
  --n-150: #eaf0f6;
  --n-200: #e2e8f0;
  --n-300: #cbd5e1;
  --n-400: #94a3b8;
  --n-500: #64748b;
  --n-600: #475569;
  --n-700: #334155;
  --n-800: #1e293b;
  --n-900: #0f172a;
  --n-950: #070e1a;

  /* Semantic colors */
  --green-50: #ecfdf5;
  --green: #10b981;
  --green-dark: #059669;
  --green-text: #065f46;

  --amber-50: #fffbeb;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-text: #92400e;

  --red-50: #fef2f2;
  --red: #ef4444;
  --red-dark: #dc2626;
  --red-text: #991b1b;

  --violet-50: #f5f3ff;
  --violet: #8b5cf6;
  --violet-dark: #7c3aed;
  --violet-text: #5b21b6;

  /* Navigation (dark surfaces: navbar, offcanvas, auth side panel, preloader)
     PHASE 3: centralized here from navbar.css's own :root - navbar.css,
     auth.css and any other dark-panel UI now consume these instead of
     redefining the same values locally. */
  --nav-bg: #0c1630;
  --nav-bg-secondary: #111827;
  --nav-text: rgba(255, 255, 255, 0.86);
  --nav-muted: rgba(255, 255, 255, 0.56);
  --nav-card: rgba(255, 255, 255, 0.06);

  /* Footer (dark surface, same family as Navigation above)
     PHASE 4: centralized here from components/footer.blade.php's own
     embedded <style> block. Mapping from the old --boq-footer-* names:
       --boq-footer-bg          -> var(--nav-bg)          (identical value, #0c1630)
       --boq-footer-accent      -> var(--brand)            (identical value, #50c5ff)
       --boq-footer-accent-hover -> var(--brand-dark)      (identical value, #36bafc)
       --boq-footer-white       -> var(--text-inv)         (identical value, #ffffff)
       --boq-footer-input-text  -> var(--nav-bg)           (identical value, #0c1630)
     The remaining four are kept as their own tokens below - each is a
     translucency/tint tuned specifically for the footer and does not
     match any existing global token closely enough to reuse without
     changing its appearance. */
  --footer-text: rgba(255, 255, 255, 0.82);
  --footer-soft: rgba(255, 255, 255, 0.72);
  --footer-muted: rgba(255, 255, 255, 0.66);
  --footer-border: rgba(255, 255, 255, 0.08);
  --footer-card: rgba(255, 255, 255, 0.045);
  --footer-error: #ff8f8f;
  --footer-success: #7ee2b8;

  /* Surfaces */
  --bg: #f1f5f9;
  --bg-page: #f1f5f9;
  --surface: #ffffff;
  --surface-1: #f8fafc;
  --surface-2: #f1f5f9;

  /* Borders */
  --border: #e2e8f0;
  --border-md: #cbd5e1;
  --border-focus: var(--brand);

  /* Text */
  --text: #334155;
  --text-head: #0f172a;
  --text-muted: #64748b;
  /* PHASE 4 a11y fix: was #94a3b8 (2.56:1 on white / 2.45:1 on --n-50 -
     fails WCAG AA). Inspected every usage first (id-cell values,
     detail-item/detail-view-item field labels, delete-modal-card labels,
     table-date-sub, stat-card captions, the .u-faint utility, plus
     decorative uses: form-field icons, input placeholders, select arrows).
     Several carry real information (ID numbers, field labels, secondary
     dates) at small sizes that don't qualify for the WCAG large-text
     exception, so this token needed to clear 4.5:1 outright rather than
     get a second "meaningful-text" token - that would have meant a near
     match to --text-muted (#64748b, 4.76:1) anyway, since AA leaves very
     little room below it at these font sizes. New value keeps --text-faint
     visibly a step lighter than --text-muted while passing 4.72:1 on white
     and 4.51:1 on --n-50 (used by delete-modal-card). Decorative icons and
     placeholders inherit the same darker tone; that's a minor, harmless
     legibility gain there, not a hierarchy change - none of them compete
     with heading/label text for attention. */
  --text-faint: #667585;
  --text-inv: #ffffff;

  /* Elevation */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.07), 0 3px 6px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 16px 40px rgba(15, 23, 42, 0.08), 0 6px 12px rgba(15, 23, 42, 0.04);

  /* Radius */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 24px;
  --r-pill: 9999px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.12s var(--ease);
  --t-base: 0.2s var(--ease);
  --t-slow: 0.35s var(--ease);

  /* Backward-compatible aliases (older blades / vendor themes) */
  --default-font: var(--font-sans);
  --heading-font: var(--font-display);
  --background-color: var(--bg);
  --surface-color: var(--surface);
  --default-color: var(--text);
  --heading-color: var(--text-head);
  --accent-color: var(--brand);
  --accent-hover: var(--brand-dark);
  --accent-soft: var(--brand-soft);
  --border-color: var(--border);
  --contrast-color: var(--text-inv);
  --box-shadow-md: var(--shadow-md);

  scroll-behavior: smooth;
}

/* ═══════════════════════════════════════════════════════════════
   2. BASE RESET & TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  /* readable base - steps down on small phones */
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--brand-text);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--brand-text-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--text-head);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 0;
}

p {
  margin-top: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

section,
.section {
  padding: 52px 0;
  background: var(--bg);
  overflow: clip;
}

/* ═══════════════════════════════════════════════════════════════
   3. UTILITIES / HELPERS  (portal-specific; Bootstrap covers the rest)
   ═══════════════════════════════════════════════════════════════ */
.surface-card {
  /* generic elevated white panel */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
}

.u-muted {
  color: var(--text-muted) !important;
}

.u-faint {
  color: var(--text-faint) !important;
}

.u-head {
  color: var(--text-head) !important;
}

.u-nowrap {
  white-space: nowrap;
}

.u-break {
  overflow-wrap: break-word;
  word-break: normal;
}

.u-hide {
  display: none !important;
}

.u-full {
  width: 100% !important;
}

.sr-only {
  /* accessible visually-hidden */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Icon size scale - formalizes the sizes already in use across the portal.
   Apply only where it replaces repeated arbitrary sizing; most icons are
   already sized correctly by their surrounding component and need no class. */
.icon-xs {
  font-size: 0.75rem;
}

.icon-sm {
  font-size: 0.875rem;
}

.icon-md {
  font-size: 1rem;
}

.icon-lg {
  font-size: 1.25rem;
}

.icon-xl {
  font-size: 1.75rem;
}

.icon-2xl {
  font-size: 2.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   4. PAGE HERO + BREADCRUMBS  (.page-header / legacy .web-panel-hero)
   ═══════════════════════════════════════════════════════════════ */
.page-header,
.web-panel-hero {
  position: relative;
  min-height: 300px;
  padding: 96px 24px 56px;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  isolation: isolate;
}

/* dark gradient overlay */
.page-header::before,
.web-panel-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    110deg,
    rgba(var(--nav-deep-rgb, 7, 14, 26), 0.96) 0%,
    rgba(var(--nav-mid-rgb, 14, 27, 52), 0.88) 38%,
    rgba(var(--nav-mid-rgb, 14, 27, 52), 0.72) 100%
  );
}

/* accent glow top-right */
.page-header::after,
.web-panel-hero::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--brand-alt-rgb, 14, 165, 233), 0.22) 0%, rgba(var(--brand-alt-rgb, 14, 165, 233), 0) 70%);
  z-index: 1;
  pointer-events: none;
}

.page-header .container,
.web-panel-hero .container {
  position: relative;
  z-index: 2;
  max-width: 860px;
  width: 100%;
}

.hero-badge,
.web-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  margin-bottom: 20px;
  border-radius: var(--r-pill);
  background: rgba(var(--brand-alt-rgb, 14, 165, 233), 0.14);
  border: 1px solid rgba(var(--brand-alt-rgb, 14, 165, 233), 0.28);
  color: var(--brand-200);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.hero-badge i,
.web-hero-badge i {
  color: var(--brand);
}

.page-header h1,
.web-panel-hero h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.page-header > .container > p,
.web-panel-hero > .container > p {
  max-width: 680px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.925rem;
  line-height: 1.75;
}

/* Breadcrumbs */
.page-header .breadcrumbs,
.web-panel-hero .breadcrumbs {
  margin-top: 24px;
}

.page-header .breadcrumbs ol,
.web-panel-hero .breadcrumbs ol {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.page-header .breadcrumbs li,
.web-panel-hero .breadcrumbs li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.page-header .breadcrumbs li a,
.web-panel-hero .breadcrumbs li a {
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--t-fast);
}

.page-header .breadcrumbs li a:hover,
.web-panel-hero .breadcrumbs li a:hover {
  color: var(--brand);
}

.page-header .breadcrumbs li:last-child,
.web-panel-hero .breadcrumbs li:last-child {
  color: var(--brand);
  font-weight: 700;
}

.page-header .breadcrumbs li + li::before,
.web-panel-hero .breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
}

/* centered page-title hero */
.page-title.page-header,
.page-title.web-panel-hero,
.page-title.page-header > .container,
.page-title.web-panel-hero > .container {
  text-align: center;
}

.page-title.page-header > .container > p,
.page-title.web-panel-hero > .container > p {
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   5. SECTION TITLE  (.section-title)
   ═══════════════════════════════════════════════════════════════ */
.section-title {
  margin-bottom: 28px;
}

.section-title h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-text);
}

.section-title h2::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--brand);
  opacity: 0.4;
}

.section-title p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text-head);
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════
   7. BUTTONS  (one system, many aliases)
   ───────────────────────────────────────────────────────────────
   Canonical:  .btn-primary  .btn-secondary  .btn-danger  .btn-light
               .btn-success  .btn-warning  .btn-info  .btn-ghost  (Phase 3)
   Form alias: .form-btn + .form-btn-primary / -light / -secondary / -danger
               / -success / -warning / -info / -ghost  (Phase 3)
   Legacy:     .btn-1 (primary) .btn-2 .btn-3 (secondary) .action-btn
   ═══════════════════════════════════════════════════════════════ */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-light,
.btn-success,
.btn-warning,
.btn-info,
.btn-ghost,
.btn-full,
.btn-1,
.btn-2,
.btn-3,
.action-btn,
.btn-pill,
.schedule-action-btn,
.form-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.862rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-base);
  position: relative;
}

.form-btn:hover,
.form-btn:focus,
.btn-primary:focus,
.btn-secondary:focus {
  text-decoration: none;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-success:disabled,
.btn-warning:disabled,
.btn-info:disabled,
.btn-ghost:disabled,
.form-btn:disabled,
.form-btn.disabled,
.btn-1:disabled,
.btn-2:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Primary
   PHASE 4 accessibility fix: white text on the #50c5ff brand fill measured
   1.95:1 (fails WCAG AA). Brand stays #50c5ff - only the text color changes,
   to --text-head (the same dark-navy token already used for headings),
   which reaches 9.16:1 on the default fill and 8.15:1 on the hover fill. */
.btn-primary,
.btn-1,
.form-btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-head);
  box-shadow: 0 2px 8px rgba(var(--brand-alt-rgb, 14, 165, 233), 0.2);
}

.btn-primary:hover,
.btn-1:hover,
.form-btn-primary:hover,
.btn-primary:focus,
.form-btn-primary:focus {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--text-head);
  box-shadow: 0 4px 14px rgba(var(--brand-alt-rgb, 14, 165, 233), 0.28);
  transform: translateY(-1px);
}

/* Secondary / light */
.btn-secondary,
.btn-2,
.btn-3,
.btn-light,
.schedule-action-btn,
.form-btn-light,
.form-btn-secondary {
  background: var(--surface);
  border-color: var(--border-md);
  color: var(--text-head);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover,
.btn-2:hover,
.btn-3:hover,
.btn-light:hover,
.schedule-action-btn:hover,
.form-btn-light:hover,
.form-btn-secondary:hover,
.form-btn-light:focus,
.form-btn-secondary:focus {
  background: var(--n-50);
  border-color: var(--brand-ring);
  color: var(--brand-text-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* Danger */
.btn-danger,
.form-btn-danger {
  background: var(--red);
  border-color: var(--red-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.18);
}

.btn-danger:hover,
.form-btn-danger:hover,
.btn-danger:focus,
.form-btn-danger:focus {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-full,
.btn-3 {
  width: 100%;
}

.btn-pill {
  border-radius: var(--r-pill);
}

/* Compact row-action buttons */
.action-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
  background: var(--brand-soft);
  border-color: rgba(var(--brand-alt-rgb, 14, 165, 233), 0.15);
  color: var(--brand-deeper);
  border-radius: var(--r-sm);
  font-weight: 600;
}

.action-btn:hover {
  background: rgba(var(--brand-alt-rgb, 14, 165, 233), 0.12);
  border-color: rgba(var(--brand-alt-rgb, 14, 165, 233), 0.28);
  color: var(--brand-text-hover);
  transform: translateY(-1px);
}

.action-btn--edit,
.action-btn-edit {
  background: rgba(245, 158, 11, 0.07);
  border-color: rgba(245, 158, 11, 0.18);
  color: var(--amber-dark);
}

.action-btn--edit:hover,
.action-btn-edit:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: var(--amber-text);
}

.action-btn--delete,
.button-action-btn-delete,
.btn-danger.btn-pill {
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(239, 68, 68, 0.16);
  color: var(--red-dark);
  box-shadow: none;
}

.action-btn--delete:hover,
.button-action-btn-delete:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.26);
  color: var(--red-text);
  transform: translateY(-1px);
}

.action-btn--view {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-head); /* PHASE 4 a11y fix - was #fff at 1.95:1 */
  box-shadow: 0 2px 8px rgba(var(--brand-alt-rgb, 14, 165, 233), 0.2);
}

.action-btn--view:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--text-head);
}

/* Button loading spinner (used by .form-btn.is-loading) */
.form-btn-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: portalSpin 0.65s linear infinite;
}

.form-btn.is-loading .form-btn-spinner,
.form-btn.loading .form-btn-spinner {
  display: inline-block;
}

@keyframes portalSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Icon-only action trigger (table row "⋮" etc.) */
.portal-action-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--n-600);
  font-size: 1rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--t-base);
  cursor: pointer;
}

.portal-action-btn:hover,
.portal-action-btn:focus {
  background: var(--n-50);
  border-color: var(--border-md);
  color: var(--brand-text);
  transform: translateY(-1px);
}

/* Confirm-delete button (used inside modals) */
.btn-delete-confirm,
.supplier-delete-confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--red-dark);
  background: var(--red);
  color: #fff;
  font-size: 0.838rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-base);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-delete-confirm:hover,
.supplier-delete-confirm:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28);
}

/* ─────────────────────────────────────────────────────────────
   PHASE 3: SUCCESS / WARNING / INFO / GHOST button variants
   ───────────────────────────────────────────────────────────────
   Not used anywhere in the app yet (audited: zero .btn-success /
   .btn-warning / .btn-info / .btn-ghost references in resources/views),
   so adding these is purely additive - no existing page changes. They
   share the same box model (min-height, padding, radius, font) as
   .btn-primary/.btn-secondary/.btn-danger above, so a future action
   that genuinely needs a success/warning/info/ghost treatment already
   has a matching, consistent option instead of reaching for Bootstrap's
   raw .btn-success etc. or inventing a one-off style.
   ───────────────────────────────────────────────────────────────── */
.btn-success,
.form-btn-success {
  background: var(--green);
  border-color: var(--green-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.btn-success:hover,
.form-btn-success:hover,
.btn-success:focus,
.form-btn-success:focus {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}

.btn-warning,
.form-btn-warning {
  background: var(--amber);
  border-color: var(--amber-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover,
.form-btn-warning:hover,
.btn-warning:focus,
.form-btn-warning:focus {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.28);
}

.btn-info,
.form-btn-info {
  background: var(--brand-deeper);
  border-color: var(--brand-deeper);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--brand-deeper-rgb, 3, 105, 161), 0.2);
}

.btn-info:hover,
.form-btn-info:hover,
.btn-info:focus,
.form-btn-info:focus {
  background: var(--brand-ink-strong, #075985);
  border-color: var(--brand-ink-strong, #075985);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--brand-deeper-rgb, 3, 105, 161), 0.28);
}

/* Ghost / text button - lowest-emphasis action (e.g. an inline "Cancel"
   next to a primary submit). No border or fill until interacted with. */
.btn-ghost,
.form-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  box-shadow: none;
}

.btn-ghost:hover,
.form-btn-ghost:hover,
.btn-ghost:focus,
.form-btn-ghost:focus {
  background: var(--n-100);
  color: var(--text-head);
  box-shadow: none;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   7A. EMPTY STATE  (.empty-state* / legacy .web-table-empty*)
   ───────────────────────────────────────────────────────────────
   EMPTY STATE UNIFORMITY FIX (Sept 2026): this block used to live in
   table.css only. It reads fine there for table pages (Participants,
   SMS Logs, Users, ...) because they all push table.css - but Events
   and Templates only push form.css, and SMS Single/Double push
   neither, so components/empty-state.blade.php rendered completely
   unstyled on those pages (icon/title/description left-aligned with
   no card, border, or centering - only the actions row looked right,
   because that used Bootstrap's own d-flex/justify-content-center
   utility classes, which don't depend on this file at all).
   Moved here - styles.css is loaded globally by layouts/app.blade.php
   on every authenticated page - so the one shared empty-state design
   now actually applies everywhere the component is used, regardless
   of which page-specific stylesheets a given page happens to push.
   Classes are unchanged and still double as aliases of the original
   .web-table-empty* names the SMS Logs reference uses, so SMS Logs
   itself needed no edits.
   ═══════════════════════════════════════════════════════════════ */
.empty-state-row,
.web-table-empty {
  padding: 0 !important;
  border-bottom: 0 !important;
  background: transparent;
}

.empty-state-cell,
.web-table-empty-cell {
  padding: 48px 24px !important;
  border-bottom: 0 !important;
  /* Table cells are white-space: nowrap (table.css), which made the
     description run out of the card on one line. Let it wrap again. */
  white-space: normal !important;
}

.empty-state,
.web-table-empty-state {
  max-width: min(440px, 100%);
  white-space: normal;
  overflow-wrap: break-word;
  margin: 0 auto;
  padding: 40px 28px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-md);
  border-radius: var(--r-2xl);
}

/* Wide modifier - requested for View Event: spans the full width of its
   parent (like .form-card) instead of the standard 440px compact card.
   Opt-in only (components/empty-state.blade.php's `wide` prop) - SMS Logs,
   Participants, Templates and SMS Single/Double keep the default compact
   width above unless a page explicitly asks for this instead. */
.empty-state-wide {
  max-width: none;
}

.empty-state-icon,
.web-table-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: var(--r-xl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-100), var(--brand-50));
  color: var(--brand-text);
  font-size: 1.5rem;
  border: 1px solid var(--brand-200);
}

.empty-state h6,
.web-table-empty-state h6 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-head);
}

.empty-state p,
.web-table-empty-state p {
  margin: 0 0 20px;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Phones & tablets: a table with many columns is wider than the screen, so
   a card centred in the full table width was half off-screen. Centre it in
   the visible part of the scroll box instead, and keep it there while the
   table scrolls sideways. */
@media (max-width: 991.98px) {
  .table-responsive:has(.empty-state-cell, .web-table-empty-cell) {
    container-type: inline-size;
  }

  .table-responsive .empty-state-cell .empty-state,
  .table-responsive .empty-state-cell .web-table-empty-state,
  .table-responsive .web-table-empty-cell .empty-state,
  .table-responsive .web-table-empty-cell .web-table-empty-state {
    position: sticky;
    width: min(440px, calc(100cqw - 32px));
    max-width: none;
    left: calc((100cqw - min(440px, calc(100cqw - 32px))) / 2);
    margin: 0;
    padding: 32px 20px;
  }
}

/* No buttons under the text -> no empty gap at the bottom of the card */
.empty-state p:last-child,
.web-table-empty-state p:last-child {
  margin-bottom: 0;
}

.empty-state-btn,
.web-table-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--r-md);
  background: var(--brand);
  border: 1px solid var(--brand);
  color: var(--text-head); /* PHASE 4 a11y fix - was #fff at 1.95:1 */
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--t-base);
}

.empty-state-btn:hover,
.web-table-empty-btn:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--text-head);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--brand-alt-rgb, 14, 165, 233), 0.25);
}

/* ═══════════════════════════════════════════════════════════════
   8. BADGES / STATUS PILLS  (one base, many aliases)
   ───────────────────────────────────────────────────────────────
   Bases: .status-badge (min-width) · .web-status-badge · .web-role-badge · .badge-pill
   Variants: success / warning / danger / info / neutral / admin
   ═══════════════════════════════════════════════════════════════ */
.status-badge,
.web-status-badge,
.web-role-badge,
.badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-badge i,
.web-status-badge i,
.badge-pill i {
  font-size: 0.8rem;
}

/* .status-badge keeps a comfortable min width for table cells */
.status-badge {
  min-width: 110px;
  min-height: 30px;
}

/* participants/index.blade.php - a <button> styled as a .status-badge
   (e.g. to open the SMS delivery history) needs its default button
   chrome removed. */
.status-badge--btn {
  border: none;
  cursor: pointer;
}

/* success / active */
.status-success,
.web-status-active,
.badge--success,
.status-published {
  background: var(--green-50);
  border-color: rgba(16, 185, 129, 0.22);
  color: var(--green-text);
}

/* warning / inactive / pending / draft */
.status-warning,
.web-status-inactive,
.badge--warning,
.status-draft {
  background: var(--amber-50);
  border-color: rgba(245, 158, 11, 0.22);
  color: var(--amber-text);
}

/* danger / failed / suspended */
.status-danger,
.web-status-suspended,
.web-status-out-of-stock,
.badge--danger,
.status-cancelled {
  background: var(--red-50);
  border-color: rgba(239, 68, 68, 0.22);
  color: var(--red-text);
}

/* info */
.status-info {
  background: var(--brand-wash-2, #eff6ff);
  border-color: var(--brand-line, #bfdbfe);
  color: var(--brand-ink, #1d4ed8);
}

/* neutral / secondary / default */
.status-secondary,
.badge--neutral,
.web-role-user,
.badge--dark,
.status-completed,
.status-default {
  background: var(--n-100);
  border-color: var(--border);
  color: var(--n-600);
}

/* brand / primary */
.badge--primary,
.web-role-panelist {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-deeper);
}

/* admin / violet */
.badge--admin,
.web-role-admin {
  background: var(--violet-50);
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--violet-dark);
}

/* ═══════════════════════════════════════════════════════════════
   9. INLINE ALERTS  (.inline-alert*)  - page-level notices
   Form-scoped alerts (.form-alert) live in form.css but share these colors.
   ═══════════════════════════════════════════════════════════════ */
.inline-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-lg);
  font-size: 0.85rem;
  line-height: 1.6;
  border: 1px solid transparent;
}

.inline-alert i {
  flex-shrink: 0;
  margin-top: 2px;
}

.inline-alert ul {
  padding-left: 16px;
  margin-bottom: 0;
}

.inline-alert--success {
  background: var(--green-50);
  border-color: rgba(16, 185, 129, 0.22);
  color: var(--green-text);
}

.inline-alert--danger {
  background: var(--red-50);
  border-color: rgba(239, 68, 68, 0.22);
  color: var(--red-text);
}

.inline-alert--warning {
  background: var(--amber-50);
  border-color: rgba(245, 158, 11, 0.22);
  color: var(--amber-text);
}

.inline-alert--info {
  background: var(--brand-50);
  border-color: var(--brand-ring);
  color: var(--brand-deeper);
}

/* ═══════════════════════════════════════════════════════════════
   14. WELCOME PAGE  (welcome.blade.php)
   ═══════════════════════════════════════════════════════════════ */
.welcome-page {
  min-height: 100vh;
  padding: 24px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top right, rgba(var(--brand-alt-rgb, 14, 165, 233), 0.2), transparent 32%),
    radial-gradient(circle at bottom left, rgba(var(--brand-alt-rgb, 14, 165, 233), 0.06), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.welcome-card {
  width: 100%;
  max-width: 760px;
  padding: 48px;
  border-radius: var(--r-2xl);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.welcome-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--brand-alt-rgb, 14, 165, 233), 0.16), transparent 70%);
  pointer-events: none;
}

.welcome-content {
  position: relative;
  z-index: 2;
}

.welcome-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 22px;
  padding: 14px;
  border-radius: var(--r-xl);
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--brand-200);
  box-shadow: var(--shadow-md);
}

.welcome-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  margin-bottom: 18px;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  color: var(--brand-deeper);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.welcome-badge i {
  color: var(--brand-text);
}

.welcome-title {
  margin: 0 0 16px;
  color: var(--text-head);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.welcome-text {
  max-width: 620px;
  margin: 0 auto 28px;
  color: var(--text);
  font-size: 0.975rem;
  line-height: 1.8;
}

.welcome-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.welcome-btn {
  min-height: 50px;
  padding: 0 24px;
  border-radius: var(--r-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 0.925rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--t-base);
  border: 1px solid transparent;
}

.welcome-btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--text-head); /* PHASE 4 a11y fix - was #fff at 1.95:1 */
  box-shadow: 0 4px 14px rgba(var(--brand-alt-rgb, 14, 165, 233), 0.26);
}

.welcome-btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--text-head);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--brand-alt-rgb, 14, 165, 233), 0.34);
}

.welcome-btn-light {
  background: var(--surface);
  border-color: var(--border-md);
  color: var(--text-head);
  box-shadow: var(--shadow-xs);
}

.welcome-btn-light:hover {
  border-color: var(--brand-ring);
  color: var(--brand-text-hover);
  background: var(--n-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.welcome-note {
  max-width: 590px;
  margin: 0 auto;
  padding: 13px 16px;
  border-radius: var(--r-lg);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  color: var(--brand-deeper);
  font-size: 0.88rem;
  line-height: 1.65;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

.welcome-note i {
  color: var(--brand-text-hover);
  margin-top: 2px;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════
   15. GLOBAL RESPONSIVE  (hero, sections, buttons, welcome)
   ═══════════════════════════════════════════════════════════════ */
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}

@media (max-width: 991.98px) {
  .page-header,
  .web-panel-hero {
    min-height: 260px;
    padding: 88px 18px 48px;
  }
}

@media (max-width: 767.98px) {
  section,
  .section {
    padding: 40px 0;
  }

  .page-header,
  .web-panel-hero {
    padding: 76px 16px 40px;
    min-height: auto;
  }

  .hero-badge,
  .web-hero-badge {
    font-size: 0.68rem;
  }

  .page-header h1,
  .web-panel-hero h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 575.98px) {
  body {
    font-size: 14.5px;
  }

  .page-header h1,
  .web-panel-hero h1 {
    font-size: 1.4rem;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .btn-light,
  .btn-success,
  .btn-warning,
  .btn-info,
  .btn-ghost,
  .btn-1,
  .btn-2,
  .action-btn,
  .form-btn {
    min-height: 40px;
    font-size: 0.82rem;
  }

  .section-title p {
    font-size: 1.15rem;
  }

  .welcome-page {
    padding: 16px 12px;
  }

  .welcome-card {
    padding: 28px 18px;
    border-radius: var(--r-xl);
  }

  .welcome-logo {
    width: 86px;
    height: 86px;
  }

  .welcome-title {
    font-size: 1.85rem;
  }

  .welcome-text {
    font-size: 0.9rem;
  }

  .welcome-actions {
    flex-direction: column;
    gap: 10px;
  }

  .welcome-btn {
    width: 100%;
    min-height: 46px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   18. PAGE HERO BACKGROUND (shared across admin pages)
   Migrated from an identical inline
   style="background-image:url('{{ asset('assets/img/...webp') }}')"
   repeated on every admin page's hero banner. Same fixed image both
   before and after - only the mechanism moved from inline style to a
   class. Path is relative to this file's own location
   (public/assets/css/styles.css -> public/assets/img/...).
   ═══════════════════════════════════════════════════════════════ */
/* Stock portal copy: Digital Cards references ../img/admin-panel.webp,
   which does not exist there either, so the hero renders as the dark
   gradient only. The image reference is removed here to avoid a 404
   while keeping the exact same look. */
.page-hero-bg,
.page-hero-bg--materials {
  background-image: none;
}


/* ═══════════════════════════════════════════════════════════════
   19. EXTRA UTILITIES  (replace the old style="" attributes)
   ═══════════════════════════════════════════════════════════════ */
.text-brand-deep {
  color: var(--brand-deeper);
}

.cursor-default {
  cursor: default;
}

/* a notice box in the amber "warning" colours (e.g. SMS za oda: SMS switched off) */
.hint-warning,
.web-table-hint.hint-warning {
  background: var(--warning-bg, #fffbeb);
  border-color: #fde68a;
  color: #92400e;
}
