/* ==========================================================================
   MADURAI CREATORS — CORE DESIGN SYSTEM & TOKENS
   Mobile-First (Base: 360px Android & iPhone)
   Inspired by Madurai Temple Textiles (Kumkum Red & Turmeric Accent)
   ========================================================================== */

:root {
  /* ---- Color: brand (Madurai textile kumkum & turmeric) ---- */
  --mc-primary-50:   #FFF1F0;
  --mc-primary-100:  #FFDDDA;
  --mc-primary-200:  #FCA5A5;
  --mc-primary-500:  #C8302A;   /* kumkum red - primary brand action */
  --mc-primary-600:  #A82520;   /* hover */
  --mc-primary-700:  #861C18;   /* pressed / active */
  --mc-accent-50:    #FFFBEB;
  --mc-accent-100:   #FFF3CC;
  --mc-accent-500:   #F2B31B;   /* turmeric gold */
  --mc-accent-700:   #8A6100;

  /* ---- Color: neutrals (Warm jasmine & sandalwood) ---- */
  --mc-bg:           #FFFBF5;   /* warm temple jasmine white */
  --mc-surface:      #FFFFFF;
  --mc-surface-2:    #F7F1E8;   /* warm muted panel surface */
  --mc-border:       #E6DCCB;
  --mc-border-strong:#C9BBA3;
  --mc-text:         #231A14;   /* high contrast 15.8:1 on bg */
  --mc-text-muted:   #5E5247;   /* WCAG AA 7.1:1 on bg */
  --mc-text-invert:  #FFFFFF;

  /* ---- Color: semantic alerts & badges ---- */
  --mc-success-bg:   #E6F4EA; --mc-success-fg: #14532D; --mc-success-bd: #86C79A;
  --mc-warning-bg:   #FFF3CC; --mc-warning-fg: #6B4A00; --mc-warning-bd: #E9C46A;
  --mc-danger-bg:    #FDE8E7; --mc-danger-fg:  #8F1D18; --mc-danger-bd:  #E9928D;
  --mc-info-bg:      #E8F0FE; --mc-info-fg:    #1D3E8A; --mc-info-bd:    #9DB8EE;
  --mc-focus-ring:   #C8302A;

  /* ---- Status chips (Spec-mapped: pending / approved / not_selected) ---- */
  --mc-status-pending-bg:  #FFF3CC; --mc-status-pending-fg:  #6B4A00;
  --mc-status-approved-bg: #E6F4EA; --mc-status-approved-fg: #14532D;
  --mc-status-notsel-bg:   #ECE7DF; --mc-status-notsel-fg:   #4A4036;

  /* ---- Spacing (4px system) ---- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  /* ---- Typography ---- */
  --font-sans: "Inter", "Noto Sans Tamil", system-ui, -apple-system, sans-serif;
  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.875rem;   /* 14px (minimum readable copy) */
  --fs-base: 1rem;     /* 16px (inputs & body) */
  --fs-lg: 1.125rem;   /* 18px */
  --fs-xl: 1.25rem;    /* 20px */
  --fs-2xl: 1.5rem;    /* 24px */
  --fs-3xl: 1.875rem;  /* 30px */

  /* ---- Radius ---- */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* ---- Smooth Shadows with warm tint ---- */
  --sh-1: 0 1px 3px rgba(35, 26, 20, 0.06), 0 1px 2px rgba(35, 26, 20, 0.04);
  --sh-2: 0 4px 12px rgba(35, 26, 20, 0.08), 0 2px 4px rgba(35, 26, 20, 0.04);
  --sh-3: 0 12px 28px rgba(35, 26, 20, 0.12), 0 4px 8px rgba(35, 26, 20, 0.06);
  --sh-glow: 0 0 0 3px rgba(200, 48, 42, 0.18);
  --sh-bar: 0 -4px 16px rgba(35, 26, 20, 0.08);

  /* Touch minimum target size */
  --tap-min: 44px;

  /* Transitions & Animation Easing */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.15);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 220ms;
  --dur-slow: 350ms;
}

/* ==========================================================================
   RESET & FOUNDATIONS
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--mc-bg);
  color: var(--mc-text);
  line-height: 1.5;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   LAYOUT CONTAINERS (Mobile-First)
   ========================================================================== */
.container {
  width: 100%;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sp-4);
  padding-right: var(--sp-4);
}

.container-wide {
  max-width: 1100px;
}

/* ==========================================================================
   HEADER & NAVBAR (Glassmorphic Polish)
   ========================================================================== */
.navbar {
  height: 58px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mc-border);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--dur-base) ease;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand-logo {
  font-weight: 800;
  font-size: var(--fs-lg);
  color: var(--mc-primary-500);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  letter-spacing: -0.2px;
  transition: transform var(--dur-fast) ease;
}
.brand-logo:active {
  transform: scale(0.97);
}

.brand-icon-sparkle {
  font-size: 1.35rem;
  display: inline-block;
  animation: mc-float 3s ease-in-out infinite;
}

@keyframes mc-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Burger Button */
.burger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: var(--r-md);
  padding: 8px;
  transition: background-color var(--dur-fast) ease;
}
.burger-btn:hover {
  background-color: var(--mc-surface-2);
}
.burger-btn:active {
  transform: scale(0.92);
}
.burger-btn span {
  display: block;
  width: 22px;
  height: 2.5px;
  background-color: var(--mc-text);
  border-radius: 2px;
  transition: all var(--dur-base) ease;
}

/* ==========================================================================
   SLIDE-OUT DRAWER MENU
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 26, 20, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base) ease, visibility var(--dur-base) ease;
}
.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: var(--mc-surface);
  box-shadow: -4px 0 28px rgba(35, 26, 20, 0.16);
  z-index: 200;
  transition: right 0.28s var(--ease-smooth);
  display: flex;
  flex-direction: column;
  padding: var(--sp-5);
  overflow-y: auto;
}
.drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--mc-border);
}
.drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--mc-text-muted);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  transition: background-color var(--dur-fast) ease;
}
.drawer-close:hover {
  background-color: var(--mc-surface-2);
}

.drawer-profile-card {
  background: var(--mc-primary-50);
  border: 1px solid var(--mc-primary-100);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.drawer-profile-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-1);
}

/* Avatar Progress Ring in Burger Drawer & Header */
.avatar-ring-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-ring-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}
.avatar-ring-bg {
  stroke: var(--mc-border);
  stroke-width: 3.5;
  fill: none;
}
.avatar-ring-bar {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.avatar-ring-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 999px;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.drawer-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.drawer-menu-item a, .drawer-menu-item button {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: 12px 14px;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--mc-text);
  text-decoration: none;
  border-radius: var(--r-md);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
  text-align: left;
}
.drawer-menu-item a:hover, .drawer-menu-item button:hover {
  background: var(--mc-surface-2);
}
.drawer-menu-item a.active {
  background: var(--mc-primary-50);
  color: var(--mc-primary-500);
}

/* ==========================================================================
   TABS FOR DASHBOARD
   ========================================================================== */
.tab-nav {
  display: flex;
  background: var(--mc-surface-2);
  padding: 4px;
  border-radius: var(--r-lg);
  gap: 4px;
  margin-bottom: var(--sp-5);
  border: 1px solid var(--mc-border);
}
.tab-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--mc-text-muted);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast) ease;
  min-height: 40px;
}
.tab-btn:hover {
  color: var(--mc-text);
}
.tab-btn.active {
  background: var(--mc-surface);
  color: var(--mc-primary-500);
  box-shadow: var(--sh-1);
}

/* ==========================================================================
   STATS COUNTER GRID
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.stat-card {
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-2);
  text-align: center;
  box-shadow: var(--sh-1);
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}
.stat-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--mc-primary-500);
  line-height: 1.2;
}
.stat-label {
  font-size: 11px;
  color: var(--mc-text-muted);
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   BUTTONS (Full Accessibility & Micro-Interactions)
   ========================================================================== */
.btn, .mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--tap-min);
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 700;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, transform 0.06s ease, box-shadow var(--dur-fast) ease;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.btn:active, .mc-btn:active {
  transform: scale(0.97);
}
.btn:focus-visible, .mc-btn:focus-visible {
  outline: 2px solid var(--mc-focus-ring);
  outline-offset: 2px;
}

.btn-primary, .mc-btn-primary {
  background-color: var(--mc-primary-500);
  color: var(--mc-text-invert);
  box-shadow: 0 2px 8px rgba(200, 48, 42, 0.25);
}
.btn-primary:hover, .mc-btn-primary:hover {
  background-color: var(--mc-primary-600);
  box-shadow: 0 4px 12px rgba(200, 48, 42, 0.35);
}
.btn-primary:active, .mc-btn-primary:active {
  background-color: var(--mc-primary-700);
}

.btn-secondary, .mc-btn-secondary {
  background-color: var(--mc-surface);
  border-color: var(--mc-border-strong);
  color: var(--mc-text);
  box-shadow: var(--sh-1);
}
.btn-secondary:hover, .mc-btn-secondary:hover {
  background-color: var(--mc-surface-2);
  border-color: #B5A58A;
}

.btn-ghost, .mc-btn-ghost {
  background-color: transparent;
  color: var(--mc-primary-500);
}
.btn-ghost:hover, .mc-btn-ghost:hover {
  background-color: var(--mc-primary-50);
}

.btn-danger, .mc-btn-danger {
  background-color: var(--mc-danger-bg);
  border-color: var(--mc-danger-bd);
  color: var(--mc-danger-fg);
}
.btn-danger:hover, .mc-btn-danger:hover {
  background-color: #FCD5D3;
}

.btn-sm, .mc-btn-sm {
  min-height: 38px;
  padding: 6px 12px;
  font-size: var(--fs-sm);
}

.btn-lg, .mc-btn-lg {
  min-height: 48px;
  padding: 12px 22px;
  font-size: var(--fs-base);
}

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

/* ==========================================================================
   INPUTS & FORMS (WCAG Focus Rings & Anti-Zoom >= 16px)
   ========================================================================== */
.form-group {
  margin-bottom: var(--sp-4);
}

.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--mc-text);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 16px; /* Strictly >= 16px to prevent iOS auto-zoom */
  color: var(--mc-text);
  background-color: var(--mc-surface);
  border: 1.5px solid var(--mc-border);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.form-input::placeholder, .form-textarea::placeholder {
  color: #9CA3AF;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--mc-primary-500);
  box-shadow: var(--sh-glow);
  background-color: #FFFFFF;
}
.form-input:disabled, .form-select:disabled {
  background-color: var(--mc-surface-2);
  color: var(--mc-text-muted);
  cursor: not-allowed;
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--mc-text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.form-error {
  font-size: var(--fs-xs);
  color: var(--mc-danger-fg);
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   CARDS (Elevated & Interactive)
   ========================================================================== */
.card, .mc-card {
  background-color: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--sh-1);
  margin-bottom: var(--sp-4);
  transition: box-shadow var(--dur-base) ease, transform var(--dur-base) ease;
}

.mc-card-interactive {
  cursor: pointer;
}
.mc-card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}

.mc-card-pad-normal { padding: var(--sp-4); }
@media (min-width: 768px) {
  .mc-card-pad-normal { padding: var(--sp-5); }
}
.mc-card-pad-sm { padding: var(--sp-3); }
.mc-card-pad-none { padding: 0; }

/* ==========================================================================
   STATUS CHIPS (Text + Icon Always)
   ========================================================================== */
.badge, .mc-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge-pending, .mc-status-pending {
  background-color: var(--mc-status-pending-bg);
  color: var(--mc-status-pending-fg);
  border: 1px solid #FDE68A;
}

.badge-approved, .mc-status-approved {
  background-color: var(--mc-status-approved-bg);
  color: var(--mc-status-approved-fg);
  border: 1px solid #BBF7D0;
}

.badge-not_selected, .mc-status-notsel {
  background-color: var(--mc-status-notsel-bg);
  color: var(--mc-status-notsel-fg);
  border: 1px solid #D6D3D1;
}

.badge-draft {
  background-color: var(--mc-surface-2);
  color: var(--mc-text-muted);
  border: 1px solid var(--mc-border);
}

/* ==========================================================================
   STAT SUMMARY COMPONENT
   ========================================================================== */
.mc-stat {
  background-color: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-2);
  text-align: center;
  box-shadow: var(--sh-1);
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.mc-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}
.mc-stat-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--mc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.mc-stat-value {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--mc-text);
  line-height: 1.2;
}
.mc-stat-primary .mc-stat-value { color: var(--mc-primary-500); }
.mc-stat-success .mc-stat-value { color: var(--mc-success-fg); }
.mc-stat-warning .mc-stat-value { color: var(--mc-warning-fg); }
.mc-stat-info .mc-stat-value    { color: var(--mc-info-fg); }

/* ==========================================================================
   ALERT BANNERS
   ========================================================================== */
.alert {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  line-height: 1.4;
}
.alert-success {
  background-color: var(--mc-success-bg);
  color: var(--mc-success-fg);
  border: 1px solid var(--mc-success-bd);
}
.alert-danger {
  background-color: var(--mc-danger-bg);
  color: var(--mc-danger-fg);
  border: 1px solid var(--mc-danger-bd);
}
.alert-info {
  background-color: var(--mc-info-bg);
  color: var(--mc-info-fg);
  border: 1px solid var(--mc-info-bd);
}

/* ==========================================================================
   NATIVE MODALS (Bottom Sheet on Mobile <768px, Centered on Desktop)
   ========================================================================== */
.mc-modal {
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}
.mc-modal::backdrop {
  background: rgba(35, 26, 20, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.mc-modal-box {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--mc-surface);
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  max-height: 90dvh;
  overflow-y: auto;
  padding: var(--sp-5);
  box-shadow: var(--sh-3);
  display: flex;
  flex-direction: column;
  animation: mc-slide-up 0.25s var(--ease-spring);
}
@keyframes mc-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@media (min-width: 768px) {
  .mc-modal-box {
    position: static;
    margin: 10vh auto;
    max-width: 480px;
    border-radius: var(--r-lg);
    animation: mc-pop 0.2s var(--ease-spring);
  }
}
@keyframes mc-pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.mc-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--mc-border);
}
.mc-modal-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--mc-text);
  margin: 0;
}
.mc-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--mc-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r-sm);
  transition: color var(--dur-fast) ease;
}
.mc-modal-close:hover {
  color: var(--mc-text);
}

/* ==========================================================================
   EMPTY STATE COMPONENT
   ========================================================================== */
.mc-empty-state {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  background-color: var(--mc-surface);
  border: 1.5px dashed var(--mc-border-strong);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-4);
}
.mc-empty-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: var(--sp-3);
}
.mc-empty-title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--mc-text);
  margin-bottom: var(--sp-2);
}
.mc-empty-help {
  font-size: var(--fs-sm);
  color: var(--mc-text-muted);
  max-width: 380px;
  margin: 0 auto var(--sp-4) auto;
  line-height: 1.4;
}

/* ==========================================================================
   TABLE / EXCEL SHEET GRID VIEW COMPONENT (Data-Dense Excel Style)
   ========================================================================== */
.mc-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  margin-bottom: var(--sp-4);
}

.mc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  text-align: left;
  white-space: nowrap;
}

.mc-table th {
  background-color: var(--mc-surface-2);
  color: var(--mc-text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--mc-border-strong);
  position: sticky;
  top: 0;
  z-index: 2;
}

.mc-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--mc-border);
  color: var(--mc-text);
  vertical-align: middle;
}

.mc-table tbody tr {
  transition: background-color var(--dur-fast) ease;
}

.mc-table tbody tr:hover {
  background-color: rgba(200, 48, 42, 0.03);
}

.mc-view-switcher {
  display: inline-flex;
  background: var(--mc-surface-2);
  padding: 3px;
  border-radius: var(--r-md);
  border: 1px solid var(--mc-border);
  gap: 2px;
}

.mc-view-btn {
  border: none;
  background: transparent;
  padding: 5px 10px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--mc-text-muted);
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--dur-fast) ease;
}

.mc-view-btn.active {
  background: var(--mc-surface);
  color: var(--mc-primary-500);
  box-shadow: var(--sh-1);
}

/* ==========================================================================
   FLOATING WHATSAPP SHARE WIDGET & SPEED-DIAL / POPOVER
   ========================================================================== */
.mc-fab-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.mc-fab-main-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 16px rgba(18, 140, 126, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
  user-select: none;
}
.mc-fab-main-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(18, 140, 126, 0.5);
}
.mc-fab-main-btn:active {
  transform: scale(0.94);
}
.mc-fab-main-btn svg {
  width: 28px;
  height: 28px;
  transition: transform var(--dur-base) ease;
}
.mc-fab-main-btn.active svg {
  transform: rotate(45deg);
}

.mc-fab-menu {
  display: none;
  flex-direction: column;
  gap: 10px;
  animation: mc-pop 0.2s var(--ease-spring);
  width: 280px;
  max-width: calc(100vw - 40px);
}
.mc-fab-menu.open {
  display: flex;
}

.mc-fab-item {
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  box-shadow: var(--sh-3);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.mc-fab-item:hover {
  transform: translateX(-4px);
  border-color: var(--mc-primary-500);
}
.mc-fab-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.mc-fab-item-title {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--mc-text);
  line-height: 1.2;
}
.mc-fab-item-sub {
  font-size: 11px;
  color: var(--mc-text-muted);
  margin-top: 2px;
}
