/* ==========================================================================
   LAPORAN PALMUR - MODERN EXECUTIVE & EYE-CATCHING STYLESHEET
   Features:
   - Modern Glassmorphism & Atmospheric Depth
   - Polished Typography (Plus Jakarta Sans & Tabular JetBrains Mono)
   - Dynamic Dark / Light Themes
   - Floating Micro-interactions & Smooth Transitions
   - Sticky Header & Sticky Product Columns for Spreadsheet Comfort
   ========================================================================== */

:root {
  /* --- Light Theme Palette --- */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --bg-gradient: radial-gradient(circle at 10% 10%, #e0f2fe 0%, #f0f7ff 35%, #f8fafc 100%);
  --bg-body: #f1f5f9;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(226, 232, 240, 0.85);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #94a3b8;

  /* Brand Accents */
  --brand-primary: #005baa;
  --brand-secondary: #0284c7;
  --brand-gradient: linear-gradient(135deg, #005baa 0%, #0284c7 60%, #38bdf8 100%);
  --brand-glow: rgba(2, 132, 199, 0.25);

  /* Status & Action Accents */
  --color-green: #059669;
  --color-green-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --color-green-bg: #ecfdf5;
  --color-green-border: #a7f3d0;
  --color-green-text: #065f46;

  --color-orange: #ea580c;
  --color-orange-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  --color-orange-bg: #fff7ed;
  --color-orange-border: #fed7aa;
  --color-orange-text: #9a3412;

  --color-amber: #d97706;
  --color-amber-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --color-amber-bg: #fefce8;
  --color-amber-border: #fef08a;
  --color-amber-text: #854d0e;

  --color-red: #e11d48;
  --color-red-gradient: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  --color-red-bg: #fff1f2;
  --color-red-border: #fecdd3;

  /* Table Specific Styles */
  --table-border: #e2e8f0;
  --table-bg: #ffffff;
  --table-row-hover: #f0f9ff;
  --cell-input-bg: #f8fafc;
  --cell-input-border: #cbd5e1;
  --cell-input-focus: #0284c7;
  --shift1-bg: rgba(240, 249, 255, 0.6);
  --shift2-bg: rgba(254, 243, 199, 0.35);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-glass: 0 8px 32px 0 rgba(15, 23, 42, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Theme Palette --- */
html.dark {
  --bg-gradient: radial-gradient(circle at 10% 10%, #0c1a2d 0%, #090e17 40%, #05070a 100%);
  --bg-body: #090e17;
  --card-bg: rgba(15, 23, 42, 0.88);
  --card-border: rgba(51, 65, 85, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --brand-primary: #0284c7;
  --brand-secondary: #38bdf8;
  --brand-gradient: linear-gradient(135deg, #0284c7 0%, #0ea5e9 60%, #38bdf8 100%);
  --brand-glow: rgba(56, 189, 248, 0.28);

  --color-green-bg: rgba(6, 78, 59, 0.35);
  --color-green-border: rgba(16, 185, 129, 0.4);
  --color-green-text: #34d399;

  --color-orange-bg: rgba(124, 45, 18, 0.35);
  --color-orange-border: rgba(249, 115, 22, 0.4);
  --color-orange-text: #fb923c;

  --color-amber-bg: rgba(113, 63, 18, 0.35);
  --color-amber-border: rgba(245, 158, 11, 0.4);
  --color-amber-text: #fcd34d;

  --color-red-bg: rgba(136, 19, 55, 0.35);
  --color-red-border: rgba(244, 63, 94, 0.4);

  --table-border: #334155;
  --table-bg: #0f172a;
  --table-row-hover: #1e293b;
  --cell-input-bg: #1e293b;
  --cell-input-border: #475569;
  --cell-input-focus: #38bdf8;
  --shift1-bg: rgba(14, 165, 233, 0.08);
  --shift2-bg: rgba(245, 158, 11, 0.08);

  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--bg-body);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   HEADER & TOPBAR (MODERN GLASSMORPHISM)
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  box-shadow: var(--shadow-glass);
  padding: 10px 16px;
  transition: var(--transition);
}

.header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #005baa, #00a1e0, #ffc700, #dc3545, #005baa);
  background-size: 300% 100%;
  animation: shimmerBorder 8s linear infinite;
}

@keyframes shimmerBorder {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 1600px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.title-area {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.app-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 2px 10px var(--brand-glow);
}

.app-title::before {
  content: '⚡';
  font-size: 18px;
  -webkit-text-fill-color: initial;
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.7));
  animation: pulseIcon 2.5s ease-in-out infinite;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.brand-logo-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: #000000;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.15);
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-logo:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.5);
}

/* Theme Toggle Button */
.brand-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

html.dark .theme-toggle-btn {
  background: rgba(30, 41, 59, 0.9);
}

.theme-toggle-btn:hover {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 12px var(--brand-glow);
  transform: translateY(-1px);
}

/* ==========================================================================
   DROPDOWN MENU
   ========================================================================== */
.menuDropdown {
  position: relative;
  display: inline-flex;
}

.dropdownContent {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 210px;
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 99999;
  animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownIn {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.menuDropdown.open .dropdownContent {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdownContent a {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  color: var(--text-main) !important;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dropdownContent a:hover {
  background: var(--brand-primary);
  color: #fff !important;
  padding-left: 15px;
}

/* ==========================================================================
   TOP ACTIONS (STORE SELECTOR & CONTROL BAR)
   ========================================================================== */
.top-actions {
  display: grid;
  grid-template-columns: 140px minmax(260px, 340px) repeat(4, minmax(90px, 1fr));
  gap: 8px;
  align-items: center;
  width: 100%;
}

.store-box {
  background: linear-gradient(135deg, rgba(0, 91, 170, 0.08) 0%, rgba(2, 132, 199, 0.12) 100%) !important;
  border: 1px solid rgba(2, 132, 199, 0.3) !important;
  border-radius: var(--radius-md) !important;
  padding: 4px 8px !important;
  cursor: pointer;
  transition: var(--transition);
}

.store-box:hover {
  border-color: var(--brand-secondary) !important;
  box-shadow: 0 0 10px var(--brand-glow);
  transform: translateY(-1px);
}

.store-box label,
.month-box label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.store-box input {
  width: 100% !important;
  height: 26px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--brand-primary) !important;
  font-family: var(--font-mono);
  font-size: 13px !important;
  font-weight: 900 !important;
  text-align: center !important;
  letter-spacing: 1px;
  cursor: pointer;
  outline: none;
}

html.dark .store-box input {
  color: #38bdf8 !important;
}

.month-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 4px 8px;
  box-shadow: var(--shadow-sm);
}

.month-box select {
  height: 26px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.month-box select:focus {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 2px var(--brand-glow);
}

/* Action Buttons */
.btn {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:hover::after {
  opacity: 1;
}

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

.btn-green {
  background: var(--color-green-gradient);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-blue {
  background: var(--brand-gradient);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-red {
  background: var(--color-red-gradient);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

/* ==========================================================================
   SUMMARY METRIC CARDS (EXECUTIVE DASHBOARD)
   ========================================================================== */
.summary {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 10px !important;
  margin-top: 10px;
  width: 100%;
}

.summary-box {
  background: var(--card-bg) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 8px 12px !important;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.summary-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
}

.summary-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-secondary) !important;
}

.summary-box label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.summary-box strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  text-align: left !important;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

/* Total Shift Ini Highlight */
.summary-box.target {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(56, 189, 248, 0.04) 100%) !important;
}

.summary-box.target strong {
  color: var(--brand-primary);
}

html.dark .summary-box.target strong {
  color: #38bdf8;
}

/* ACH TOTAL Card Special Glow */
.summary-box:last-child strong {
  color: var(--color-green);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

/* History buttons inside Summary */
.history-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.history-btn {
  flex: 1;
  height: 28px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  color: var(--text-main);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.history-btn:hover:not(:disabled) {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px var(--brand-glow);
}

.history-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   PRODUCT TOOLBAR & QUICK SEARCH
   ========================================================================== */
.product-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 8px;
  max-width: 1600px;
  margin: 0 auto;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.toolbar-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.product-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  width: min(280px, 100%);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.product-search-box:focus-within {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 2px var(--brand-glow);
}

.product-search-box input {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 11px;
  width: 100%;
}

.product-search-box input::placeholder {
  color: var(--text-subtle);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-btn {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.add-product-btn {
  background: var(--color-green-gradient);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
}

.add-product-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.clear-product-btn {
  background: var(--color-red-gradient);
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.2);
}

.clear-product-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

/* ==========================================================================
   PALMUR SPREADSHEET TABLE
   ========================================================================== */
.table-wrapper {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto 20px;
  padding: 0 16px;
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

#palmurTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--table-bg);
  border: 1px solid var(--table-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Table Header Styles */
#palmurTable th, 
#palmurTable td {
  border-right: 1px solid var(--table-border);
  border-bottom: 1px solid var(--table-border);
  padding: 4px 6px;
  text-align: center;
  font-size: 11px;
  white-space: nowrap;
  color: var(--text-main);
  transition: background 0.15s ease;
}

/* Banner Bulan */
#palmurTable .palmur-month {
  background: linear-gradient(135deg, rgba(0, 91, 170, 0.08) 0%, rgba(2, 132, 199, 0.04) 100%) !important;
  color: var(--brand-primary) !important;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 10px 8px;
  border-bottom: 2px solid var(--brand-secondary);
}

html.dark #palmurTable .palmur-month {
  color: #38bdf8 !important;
}

/* Section Header (Monitoring Paling Murah) */
#palmurTable .palmur-green {
  background: var(--color-green-gradient) !important;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 7px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Date Header */
#palmurTable .palmur-orange {
  background: var(--color-orange-gradient) !important;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 4px;
}

/* Yellow Product Headers */
#palmurTable .palmur-yellow {
  background: var(--color-amber-gradient) !important;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 4px;
}

/* Shift Header (1 & 2 Alternating Columns) */
#palmurShiftHeader th:nth-child(odd) {
  background: #3b82f6 !important;
  color: #fff;
  font-weight: 900;
}

#palmurShiftHeader th:nth-child(even) {
  background: #0284c7 !important;
  color: #fff;
  font-weight: 900;
}

/* Clear Column Helper Buttons */
.column-clear {
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.column-clear:hover {
  filter: brightness(1.1);
}

.clear-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  font-size: 10px;
  margin-left: 3px;
  color: #fff;
  transition: var(--transition);
}

.column-clear:hover .clear-hint {
  background: var(--color-red);
  transform: scale(1.2);
}

/* Sticky Headers & Columns for Easy Scrolling */
#palmurTable thead th {
  position: sticky;
  top: 0;
  z-index: 25;
}

#palmurTable .palmur-plu {
  position: sticky;
  left: 0;
  z-index: 10;
  background: var(--color-amber-bg) !important;
  min-width: 90px;
}

#palmurTable .palmur-name {
  position: sticky;
  left: 90px;
  z-index: 10;
  background: var(--color-amber-bg) !important;
  min-width: 150px;
  text-align: left !important;
}

#palmurTable tbody tr:hover td {
  background: var(--table-row-hover);
}

#palmurTable tbody tr:hover td.palmur-plu,
#palmurTable tbody tr:hover td.palmur-name {
  background: var(--color-amber-border) !important;
}

/* Inputs Inside Table */
#palmurTable .palmur-input {
  display: block;
  width: 100%;
  min-width: 2.8ch;
  height: 24px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: var(--transition);
}

#palmurTable .palmur-input:hover {
  border-color: var(--cell-input-border);
  background: var(--cell-input-bg);
}

#palmurTable .palmur-input:focus {
  background: #ffffff !important;
  border-color: var(--brand-secondary) !important;
  box-shadow: 0 0 0 2px var(--brand-glow) !important;
  color: #0f172a !important;
}

/* Product Meta (PLU & Name Edit) */
.plu-cell-edit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.delete-row-btn {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 4px;
  background: rgba(225, 29, 72, 0.15);
  color: var(--color-red);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  transition: var(--transition);
}

.plu-cell-edit:hover .delete-row-btn {
  opacity: 1;
}

.delete-row-btn:hover {
  background: var(--color-red);
  color: #fff;
  transform: scale(1.15);
}

#palmurTable .name-edit {
  text-align: left !important;
  font-family: var(--font-sans);
  font-weight: 800;
  padding-left: 6px;
}

/* Total, Target, & ACH Column Accents */
#palmurTable td.palmur-total {
  background: var(--color-green-bg);
  color: var(--color-green-text);
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 12px;
}

#palmurTable td.palmur-target {
  background: var(--color-green-bg);
}

#palmurTable td.palmur-target .target-input {
  color: var(--color-green-text);
  font-weight: 900;
}

#palmurTable td.palmur-ach {
  background: var(--color-amber-bg);
  color: var(--color-amber-text);
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 11.5px;
}

/* Footer Grand Total Row */
#palmurTable tfoot th,
#palmurTable tfoot td {
  background: var(--color-green-gradient) !important;
  color: #ffffff !important;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  padding: 8px 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#palmurTable tfoot th {
  font-family: var(--font-sans);
  letter-spacing: 0.8px;
}

/* ==========================================================================
   MODALS (FROSTED GLASS & ENHANCED FOCUS)
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.hidden {
  display: none;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  width: min(400px, 95%);
  padding: 26px 24px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: modalScaleUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { transform: scale(0.92) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.store-modal {
  text-align: center;
}

.welcome-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: #000000;
  padding: 4px;
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.welcome-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.welcome-title {
  font-size: 20px;
  font-weight: 900;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.welcome-line {
  width: 48px;
  height: 3px;
  margin: 6px auto 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-secondary);
}

.welcome-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.input-label {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.modal-box input {
  width: 100%;
  height: 46px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 4px;
  text-transform: uppercase;
  outline: none;
  transition: var(--transition);
}

.modal-box input:focus {
  border-color: var(--brand-secondary);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--brand-glow);
}

.main-start-btn {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 91, 170, 0.3);
}

.main-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 91, 170, 0.4);
}

.welcome-footer {
  margin-top: 14px;
  font-size: 10px;
  color: var(--text-subtle);
  font-weight: 600;
}

/* Modal Lengkapi Toko */
#completeStoreModal .modal-box {
  border-top: 4px solid var(--brand-primary);
}

#completeStoreModal h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-primary);
  text-align: center;
}

#completeStoreModal p {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

#completeStoreModal label {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 10px 0 4px;
}

#completeStoreModal input {
  height: 38px;
  font-size: 13px;
  letter-spacing: 0;
  text-align: left;
  font-family: var(--font-sans);
  padding: 6px 12px;
}

#completeStoreModal button {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

#completeStoreModal .modal-cancel {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  margin-top: 6px;
}

#completeStoreModal .modal-cancel:hover {
  background: rgba(148, 163, 184, 0.25);
  color: var(--text-main);
}

/* ==========================================================================
   TOAST / STATUS NOTIFICATION
   ========================================================================== */
.status {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  padding: 16px;
  text-align: center;
  font-size: 10.5px;
  color: var(--text-muted);
}

.file-info {
  margin-bottom: 4px;
}

.file-info b {
  color: var(--brand-primary);
  font-family: var(--font-mono);
}

.copyright {
  color: var(--text-subtle);
  font-size: 10px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
  .top-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  
  .store-box { grid-column: 1 / 2; }
  .month-box { grid-column: 2 / 3; }
  
  .top-actions .btn {
    grid-column: span 1;
  }

  .summary {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .header {
    padding: 8px 10px;
  }

  .app-title {
    font-size: 17px;
  }

  .bot-credit {
    font-size: 9.5px;
  }

  .summary {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .summary-box:last-child {
    grid-column: span 2;
  }

  .product-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .toolbar-left, .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .product-search-box {
    width: 100%;
  }

  #palmurTable .palmur-name {
    min-width: 120px;
  }
}