/*
 * ═══════════════════════════════════════════════════════════════════════════
 * DIGITAL CARDS PORTAL — GLOBAL DESIGN SYSTEM
 * styles.css · LOAD ON EVERY PAGE (first stylesheet after Bootstrap)
 * ───────────────────────────────────────────────────────────────────────────
 * Everything shared by the whole portal lives here:
 *   1.  Design tokens (:root)          8.  Badges / status pills
 *   2.  Base reset & typography        9.  Alerts (inline)
 *   3.  Utilities / helpers           10.  Dropdown & action menus
 *   4.  Page hero + breadcrumbs       11.  Modals (all variants)
 *   5.  Section titles                12.  Summary / filter cards
 *   6.  Cards & stat cards            13.  Scroll-to-top
 *   7.  Buttons (all variants)        14.  Welcome page
 *   15. Global responsive
 * table.css and form.css NEVER redefine anything in this file — they only add
 * table-only / form-only rules on top of these globals.
 * ═══════════════════════════════════════════════════════════════════════════
 */

@charset "UTF-8";

/* ═══════════════════════════════════════════════════════════════
   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 */
  --brand: #50c5ff;
  --brand-dark: #36bafc;
  --brand-deeper: #0369a1;
  --brand-soft: rgba(14, 165, 233, 0.07);
  --brand-ring: rgba(14, 165, 233, 0.20);
  --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;

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

  /* Borders */
  --border: #e2e8f0;
  --border-md: #cbd5e1;
  --border-focus: #0ea5e9;

  /* Text */
  --text: #334155;
  --text-head: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --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(.16, 1, .3, 1);
  --t-fast: .12s var(--ease);
  --t-base: .2s var(--ease);
  --t-slow: .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-decoration: none;
  transition: color var(--t-fast);
}

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

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: anywhere; 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;
}

/* ═══════════════════════════════════════════════════════════════
   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(7, 14, 26, .96) 0%,
      rgba(14, 27, 52, .88) 38%,
      rgba(14, 27, 52, .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(14, 165, 233, .22) 0%, rgba(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(14, 165, 233, .14);
  border: 1px solid rgba(14, 165, 233, .28);
  color: #bae6fd;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .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, .78);
  font-size: .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: .8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .55);
}

.page-header .breadcrumbs li a,
.web-panel-hero .breadcrumbs li a {
  color: rgba(255, 255, 255, .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, .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: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-title h2::after {
  content: "";
  display: inline-block;
  width: 32px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--brand);
  opacity: .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;
}

/* ═══════════════════════════════════════════════════════════════
   6. STAT CARDS  (.stat-card / legacy .web-top-card)
   ═══════════════════════════════════════════════════════════════ */
.stat-card,
.web-top-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
  overflow: hidden;
}

.stat-card::before,
.web-top-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 3px;
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  background: linear-gradient(90deg, var(--brand), transparent);
  opacity: 0;
  transition: opacity var(--t-base);
}

.stat-card:hover,
.web-top-card:hover {
  border-color: var(--brand-ring);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--brand-soft);
  transform: translateY(-2px);
}

.stat-card:hover::before,
.web-top-card:hover::before {
  opacity: 1;
}

.stat-card--danger,
.web-top-card-danger-soft {
  border-color: rgba(239, 68, 68, .18);
}

.stat-card--danger::before,
.web-top-card-danger-soft::before {
  background: linear-gradient(90deg, var(--red), transparent);
}

.stat-card-icon,
.web-top-card-icon,
.web-table-title-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: var(--r-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 1.15rem;
  border: 1px solid var(--brand-200);
}

.stat-card-icon--success,
.web-top-card-success {
  background: var(--green-50);
  color: var(--green);
  border-color: rgba(16, 185, 129, .2);
}

.stat-card-icon--danger,
.web-top-card-danger {
  background: var(--red-50);
  color: var(--red);
  border-color: rgba(239, 68, 68, .2);
}

.stat-card-body,
.web-top-card-content {
  flex: 1 1 auto;
  min-width: 0;
}

.stat-card-body h4,
.web-top-card-content h4 {
  margin: 0 0 4px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-card-value,
.web-top-card-value {
  margin-bottom: 6px;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-head);
  line-height: 1;
}

.stat-card-body p,
.web-top-card-content p {
  margin: 0;
  font-size: .8rem;
  line-height: 1.55;
  color: var(--text-faint);
}

/* ═══════════════════════════════════════════════════════════════
   7. BUTTONS  (one system, many aliases)
   ───────────────────────────────────────────────────────────────
   Canonical:  .btn-primary  .btn-secondary  .btn-danger  .btn-light
   Form alias: .form-btn + .form-btn-primary / -light / -secondary / -danger
   Legacy:     .btn-1 (primary) .btn-2 .btn-3 (secondary) .action-btn
   ═══════════════════════════════════════════════════════════════ */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-light,
.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: .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,
.form-btn:disabled,
.form-btn.disabled,
.btn-1:disabled,
.btn-2:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Primary */
.btn-primary,
.btn-1,
.form-btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, .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: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, .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-dark);
  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, .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, .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: .8rem;
  background: var(--brand-soft);
  border-color: rgba(14, 165, 233, .15);
  color: var(--brand-deeper);
  border-radius: var(--r-sm);
  font-weight: 600;
}

.action-btn:hover {
  background: rgba(14, 165, 233, .12);
  border-color: rgba(14, 165, 233, .28);
  color: var(--brand-dark);
  transform: translateY(-1px);
}

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

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

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

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

.action-btn--view {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, .2);
}

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

/* 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, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: portalSpin .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);
  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: .838rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-base);
  box-shadow: 0 2px 8px rgba(239, 68, 68, .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, .28);
}

/* ═══════════════════════════════════════════════════════════════
   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: .72rem;
  font-weight: 700;
  letter-spacing: .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: .8rem;
}

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

/* success / active */
.status-success,
.web-status-active,
.badge--success,
.status-published {
  background: var(--green-50);
  border-color: rgba(16, 185, 129, .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, .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, .22);
  color: var(--red-text);
}

/* info */
.status-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #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, .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: .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, .22); color: var(--green-text); }
.inline-alert--danger  { background: var(--red-50);   border-color: rgba(239, 68, 68, .22);  color: var(--red-text); }
.inline-alert--warning { background: var(--amber-50); border-color: rgba(245, 158, 11, .22); color: var(--amber-text); }
.inline-alert--info    { background: var(--brand-50); border-color: var(--brand-ring);       color: var(--brand-deeper); }

/* ═══════════════════════════════════════════════════════════════
   10. DROPDOWN & FLOATING ACTION MENUS
   ═══════════════════════════════════════════════════════════════ */
.portal-dropdown-menu {
  z-index: 9999;
  min-width: 220px;
  padding: .5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.portal-dropdown-menu .dropdown-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem .85rem;
  border-radius: var(--r-md);
  color: var(--text-head);
  font-size: .86rem;
  font-weight: 600;
}

.portal-dropdown-menu .dropdown-item i {
  width: 18px;
  text-align: center;
  color: var(--text-muted);
}

.portal-dropdown-menu .dropdown-item:hover {
  background: var(--n-100);
  color: var(--text-head);
}

.portal-dropdown-menu .dropdown-item:hover i {
  color: var(--brand);
}

.portal-dropdown-menu .dropdown-item.text-danger:hover {
  background: var(--red-50);
  color: #b91c1c !important;
}

.portal-dropdown-menu .dropdown-item.text-danger:hover i {
  color: var(--red-dark);
}

.portal-dropdown-menu .dropdown-divider {
  margin: .45rem 0;
}

/* let dropdowns overflow their table card */
.web-table-card,
.portal-table-inner {
  overflow: visible;
}

/* JS-positioned floating menu (fixed to viewport) */
.floating-action-menu {
  position: fixed;
  z-index: 999999;
  display: none;
  width: 220px;
  padding: 8px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: 0 22px 55px rgba(15, 23, 42, .22);
  border: 1px solid var(--border);
}

.floating-action-menu.show {
  display: grid;
  gap: 6px;
}

.floating-action-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-head);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.floating-action-item i { color: var(--brand); }

.floating-action-item:hover {
  background: var(--brand-50);
  color: var(--brand-deeper);
}

.floating-action-danger,
.floating-action-danger i { color: var(--red-dark); }

.floating-action-danger:hover {
  background: var(--red-50);
  color: var(--red-dark);
}

/* ═══════════════════════════════════════════════════════════════
   11. MODALS  (global — used on both table & form pages)
   ───────────────────────────────────────────────────────────────
   A. Portal action modal   .portal-modal (SMS / WhatsApp / preview)
   B. Detail / view modal   .detail-modal / .supplier-view-modal
   C. Delete modal          .delete-modal / .supplier-delete-* / .portal-delete-*
   ═══════════════════════════════════════════════════════════════ */

/* ---- A. Portal action modal ---- */
.portal-modal .modal-dialog { max-width: 840px; margin: 1.25rem auto; }
.portal-modal.portal-modal-wide  .modal-dialog { max-width: 940px; }
.portal-modal.portal-modal-small .modal-dialog { max-width: 640px; }

.portal-modal .modal-content {
  border: 0;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.portal-modal .modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top right, rgba(80, 197, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #f8fbfd 0%, #ffffff 100%);
}

.portal-modal .modal-body   { padding: 28px; }

.portal-modal .modal-footer {
  padding: 20px 28px 28px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fbfdff;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-modal .modal-title {
  margin: 0;
  color: var(--text-head);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.portal-modal-subtitle {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.portal-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 6px 12px;
  margin-bottom: 8px;
  border-radius: var(--r-pill);
  background: rgba(80, 197, 255, 0.12);
  border: 1px solid rgba(80, 197, 255, 0.18);
  color: #1b5878;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portal-info-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-xl);
  background: rgba(80, 197, 255, 0.08);
  border: 1px solid rgba(80, 197, 255, 0.16);
  margin-bottom: 22px;
}

.portal-info-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: var(--r-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(80, 197, 255, 0.14);
  color: var(--brand);
  font-size: 1.1rem;
}

.portal-info-box h6 { margin: 0 0 5px; color: var(--text-head); font-size: 0.96rem; font-weight: 800; }
.portal-info-box p  { margin: 0; color: var(--text); font-size: 0.88rem; line-height: 1.6; }

/* summary grid inside modals (2-col default) */
.portal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}

.portal-summary-card {
  min-width: 0;
  padding: 16px;
  border-radius: var(--r-xl);
  background: #f8fbfd;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.portal-summary-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portal-summary-card strong {
  display: block;
  color: var(--text-head);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}

.portal-preview {
  margin-top: 10px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.10);
  padding: 18px;
  min-height: 190px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.75;
  color: var(--text);
}

.portal-modal .form-btn { min-width: 165px; justify-content: center; }

/* ---- B. Detail / view modal ---- */
.detail-modal .modal-content,
.supplier-view-modal .modal-content {
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-hero-header,
.supplier-view-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--n-50) 0%, var(--brand-50) 100%);
}

.modal-kicker,
.supplier-modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  margin-bottom: 8px;
  border-radius: var(--r-pill);
  background: var(--brand-100);
  border: 1px solid var(--brand-200);
  color: var(--brand-deeper);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.modal-hero-header .modal-title,
.supplier-view-header .modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-head);
  font-family: var(--font-display);
}

.modal-detail-body,
.supplier-view-body { padding: 22px 24px; background: var(--n-50); }

.modal-entity-card,
.supplier-modal-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
}

.modal-entity-icon,
.supplier-modal-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: var(--r-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand);
  border: 1px solid var(--brand-200);
  font-size: 1.2rem;
}

.modal-entity-card h6,
.supplier-modal-summary h6 { margin: 0 0 3px; font-size: .95rem; font-weight: 700; color: var(--text-head); }
.modal-entity-card p,
.supplier-modal-summary p  { margin: 0; font-size: .82rem; color: var(--text-muted); }

.detail-grid,
.supplier-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-item,
.supplier-detail-item {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.detail-item--full,
.supplier-detail-full { grid-column: 1 / -1; }

.detail-item span,
.supplier-detail-item span {
  display: block;
  margin-bottom: 5px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.detail-item strong,
.supplier-detail-item strong {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-head);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.modal-detail-footer,
.supplier-view-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ---- C. Delete modal (.delete-modal / .supplier-delete-* / .portal-delete-*) ---- */
.delete-modal .modal-content,
.supplier-delete-modal .modal-content,
.portal-delete-modal .modal-content {
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.delete-modal-top,
.supplier-delete-top,
.portal-delete-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 0;
  background: var(--surface);
}

.delete-modal-icon,
.supplier-delete-icon,
.portal-delete-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: var(--r-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red-50);
  border: 1px solid rgba(239, 68, 68, .22);
  color: var(--red-dark);
  font-size: 1.1rem;
}

.delete-modal-body,
.supplier-delete-body,
.portal-delete-body { padding: 16px 24px; background: var(--surface); }

.delete-modal-body h5,
.supplier-delete-body h5,
.portal-delete-body h5 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 700; color: var(--text-head); }

.delete-modal-body p,
.supplier-delete-body p,
.portal-delete-body p { margin: 0 0 14px; font-size: .875rem; color: var(--text-muted); }

.delete-modal-card,
.supplier-delete-card {
  margin: 14px 0;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: var(--n-50);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.delete-modal-card span,
.supplier-delete-card span {
  display: block;
  margin-bottom: 4px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.delete-modal-card strong,
.supplier-delete-card strong {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-head);
  overflow-wrap: anywhere;
}

.delete-modal-warning,
.supplier-delete-warning,
.portal-delete-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--red-50);
  border: 1px solid rgba(239, 68, 68, .2);
  color: var(--red-text);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.55;
}

.delete-modal-footer,
.supplier-delete-footer,
.portal-delete-footer {
  padding: 14px 24px 22px;
  border-top: 0;
  background: var(--surface);
}

/* ═══════════════════════════════════════════════════════════════
   12. SUMMARY / FILTER CARDS  (shared notice card)
   ═══════════════════════════════════════════════════════════════ */
.filter-summary-card,
.form-summary-card {
  padding: 12px 16px;
  border-radius: var(--r-xl);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  margin-bottom: 16px;
  font-size: .84rem;
  color: var(--brand-deeper);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   13. SCROLL TO TOP
   ═══════════════════════════════════════════════════════════════ */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  width: 42px;
  height: 42px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
  background: var(--brand);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(14, 165, 233, .35);
  cursor: pointer;
  transition: all var(--t-base);
}

.scroll-top i { font-size: 18px; }

.scroll-top:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(14, 165, 233, .4);
}

.scroll-top.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   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(14, 165, 233, .20), transparent 32%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, .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(14, 165, 233, .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: .73rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

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

.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: -.03em;
}

.welcome-text {
  max-width: 620px;
  margin: 0 auto 28px;
  color: var(--text);
  font-size: .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: .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: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, .26);
}

.welcome-btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, .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-dark);
  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: .88rem;
  line-height: 1.65;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
}

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

/* ═══════════════════════════════════════════════════════════════
   15. GLOBAL RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@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: .68rem; }

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

  .stat-card,
  .web-top-card { padding: 18px; }

  .stat-card-value,
  .web-top-card-value { font-size: 1.55rem; }

  .stat-card-icon,
  .web-top-card-icon,
  .web-table-title-icon { width: 44px; height: 44px; flex: 0 0 44px; }

  /* modals go edge-to-edge on phones */
  .portal-summary { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

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

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

  .stat-card,
  .web-top-card { gap: 14px; border-radius: var(--r-lg); }

  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .btn-light,
  .btn-1,
  .btn-2,
  .action-btn,
  .form-btn { min-height: 40px; font-size: .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: .9rem; }
  .welcome-actions { flex-direction: column; gap: 10px; }
  .welcome-btn { width: 100%; min-height: 46px; }
}

/* ---- Mobile modal fit (portal-modal) ---- */
@media (max-width: 768px) {
  .portal-modal .modal-dialog,
  .portal-modal.portal-modal-wide .modal-dialog,
  .portal-modal.portal-modal-small .modal-dialog {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    margin: 10px auto;
    height: calc(100dvh - 20px);
    display: flex;
    align-items: center;
  }

  .portal-modal .modal-content {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: var(--r-xl);
    display: flex;
    flex-direction: column;
  }

  .portal-modal .modal-header { padding: 15px 16px; flex: 0 0 auto; }
  .portal-modal .modal-title { font-size: 1.02rem; line-height: 1.3; }
  .portal-modal-subtitle { font-size: 0.8rem; line-height: 1.35; margin-top: 4px; }

  .portal-modal .modal-body {
    padding: 15px 16px;
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
  }

  .portal-info-box { padding: 12px; gap: 10px; border-radius: var(--r-lg); margin-bottom: 14px; }
  .portal-info-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; font-size: 0.9rem; }
  .portal-info-box h6 { font-size: 0.84rem; margin-bottom: 3px; }
  .portal-info-box p  { font-size: 0.76rem; line-height: 1.45; }

  .portal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
  .portal-summary-card { padding: 12px; border-radius: 13px; }
  .portal-summary-card strong { font-size: 0.9rem; }

  .portal-preview { min-height: 105px; max-height: 150px; padding: 12px; border-radius: var(--r-lg); font-size: 0.84rem; line-height: 1.55; }

  .portal-modal .modal-footer {
    padding: 12px 16px 14px;
    flex: 0 0 auto;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 9px;
  }

  .portal-modal .form-btn { width: 100%; min-width: unset; min-height: 40px; }
}