/* ==========================================================================
   STYLE.CSS - Consolidated and Simplified
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Ultra-Premium Lightweight Apple Mesh Theme Variables (Default) */
  --bg-mac: radial-gradient(at 0% 0%, rgba(199, 210, 254, 0.6) 0px, transparent 50%),
            radial-gradient(at 100% 0%, rgba(251, 207, 232, 0.6) 0px, transparent 50%),
            radial-gradient(at 100% 100%, rgba(186, 230, 253, 0.6) 0px, transparent 50%),
            radial-gradient(at 0% 100%, rgba(221, 214, 254, 0.6) 0px, transparent 50%),
            radial-gradient(at 50% 50%, rgba(254, 249, 195, 0.4) 0px, transparent 50%);
  --bg-base: #f1f5f9;

  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  --glass-blur: 16px;

  --bg: #f1f5f9;
  --fg: #0f172a;
  --muted: #475569;
  --card: rgba(255, 255, 255, 0.78);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --border: rgba(255, 255, 255, 0.8);
  --btn-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --btn-info: #0284c7;
  --btn-danger: #ef4444;
  --btn-secondary: #64748b;
  --radius: 16px;
  --shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);

  --input-bg: rgba(255, 255, 255, 0.75);
  --input-border: rgba(203, 213, 225, 0.8);
  --input-focus: #2563eb;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.2);
}

@keyframes macFlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* ==========================================================================
   Base Elements & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
}

/* ==========================================================================
   GLOBAL RESET & BASE STYLES
   ========================================================================== */
html, body, body.theme-apple {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--fg);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: transparent;
  text-rendering: optimizeSpeed;
}

/* Font and Icon Rendering Fix for Windows / All Browsers */
svg, i, .feather, [data-feather] {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  shape-rendering: geometricPrecision;
  transform: rotate(0.01deg);
  will-change: transform;
}

img.profile {
  display: block;
  margin: 10px auto 5px;
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 15%;
}

.success {
  color: green;
  text-align: center;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
}

h2, h3, h4, h5 {
  margin-bottom: 2px;
  color: #3F51B5;
}
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 13px; }
h5 { font-size: 10px; }

/* ==========================================================================
   Layout Containers & Grid
   ========================================================================== */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 8px;
}

.card, .form-card {
  background: var(--card);
  margin: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.row {
  display: grid;
  gap: 12px;
  margin: auto;
}
.row.foto {
  gap: 5px;
}
.row.cols-2 {
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.row.cols-3 {
  grid-template-columns: repeat(3, minmax(0,1fr));
}

@media(max-width:700px) {
  .row.cols-2, .row.cols-3 {
    grid-template-columns: 1fr;
  }
}

.profile-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ddd;
  transition: 0.25s ease;
}
.profile-thumb:hover {
  transform: scale(1.12);
  border-color: #4a90e2;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.4);
}

.profile-name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-top: 1px;
  transition: 0.25s ease;
}
.profile-name:hover {
  color: #4a90e2;
}

/* ==========================================================================
   Navbar & Navigation Links
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  margin: 10px 10px 0px 10px;
  backdrop-filter: blur(8px);
  z-index: 20;
}

.nav .inner {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.navbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  width: 100%;
  transition: all 0.3s ease;
}
.nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo-img {
  width: auto;
  height: 28px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.nav-logo-img:hover {
  transform: scale(1.08);
}
.nav-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
}
.nav-links li a,
.nav-links li span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Outfit', 'Inter', sans-serif;
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: #475569;
  cursor: pointer;
}
.nav-links li a:hover,
.nav-links li span:hover,
.nav-links li:hover > a,
.nav-links li:hover > span {
  background: rgba(79, 70, 229, 0.08);
  color: #4f46e5;
}
.nav-links li a.active {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}
.nav-links .logout {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25);
  border-radius: 10px;
}
.nav-links .logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(239, 68, 68, 0.35);
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  color: #333;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.nav-tema {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 17px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.nav-tema:hover {
  transform: scale(1.1) rotate(15deg);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.15);
}

body.dark .nav-tema {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

body.dark .nav-toggle {
  background: #2a2a2a;
  border-color: #444;
  color: #fff;
}

@media (max-width: 1000px) {
  .nav-top {
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
  }

  .nav-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
    position: relative;
    z-index: 100000;
  }

  .nav-actions {
    order: 1;
    gap: 8px;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 10px;
    left: auto;
    width: auto;
    max-width: calc(100% - 20px);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 4px;
    padding: 12px 10px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    display: none;
    border: 1px solid #e5e7eb;
    animation: fadeInMenu 0.25s ease;
    margin-top: 0;
    z-index: 99999;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a,
  .nav-links li span {
    width: 100%;
    padding: 12px 14px;
    text-align: left;
    border-radius: 10px;
  }

  .nav-links li a:hover,
  .nav-links li span:hover {
    background: #f2f2f2;
  }

  .nav-links .submenu {
    position: static;
    width: 100%;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }

  .nav-links .submenu li a {
    padding-left: 26px;
    width: 100%;
  }
}

@keyframes fadeInMenu {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu {
  display: flex;
  justify-content: space-around;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu .menu-item:hover .submenu {
  display: block;
}
.menu-item {
  position: relative;
}
.menu-item span, .menu-item > a {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  transition: 0.2s;
}
.menu-item span:hover {
  background: #efefef;
}

.submenu {
  list-style: none;
  display: none;
  position: absolute;
  top: 40px;
  left: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  min-width: 165px;
  padding: 6px 0;
  z-index: 1000;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Submenu menu terakhir: rata kanan agar tidak terpotong */
.menu-item:last-of-type .submenu {
  left: auto;
  right: 0;
}
.submenu li a {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  text-decoration: none;
  border-radius: 10px;
  transition: 0.2s ease;
}

/* ==========================================================================
   Forms, Inputs, & Toggles
   ========================================================================== */
form label, .form-group label, .form-label, .sejajar label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.input, select, textarea, input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="email"], input[type="search"], input[type="file"] {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  box-sizing: border-box;
  font-size: 13px;
  font-family: 'Outfit', 'Inter', sans-serif;
  background: var(--input-bg);
  color: var(--fg);
  transition: all 0.3s ease;
}

.input:focus, select:focus, textarea:focus, input[type="text"]:focus, input[type="number"]:focus, input[type="date"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="search"]:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background: rgba(255, 255, 255, 0.85);
}

.input[type="date"] {
  padding: 8px 12px;
  width: auto !important;
}

.form-group {
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.sejajar {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  gap: 10px;
  flex-wrap: wrap;
}
.sejajar label {
  width: 180px;
  min-width: 140px;
  margin: 0;
  font-size: 13px;
}
.sejajar input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.sejajar .btn {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 30px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.3s;
}
.slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}
.toggle-switch input:checked + .slider {
  background-color: #4CAF50;
}
.toggle-switch input:checked + .slider::before {
  transform: translateX(24px);
}
.status-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 40px;
}
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.7;
}
.toggle-password:hover {
  opacity: 1;
}

.modern-form {
  padding: 20px;
  border-radius: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media(max-width:700px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  form label {
    font-size: 12px;
  }
}

/* ==========================================================================
   Button System
   ========================================================================== */
.btn {
  margin: 5px;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* Button Sizes */
.btn.primary, .btn.primary_black, .btn.secondary, .btn.danger, .btn.info, .btn.ghost {
  font-size: 13px;
  padding: 10px 14px;
}
.btn.primary2, .btn.primary_black2, .btn.secondary2, .btn.danger2, .btn.info2, .btn.ghost2 {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 15px;
}
.btn-sm {
  font-size: 12px;
  padding: 6px 10px;
}

@media (max-width: 800px) {
  .btn.primary2, .btn.primary_black2, .btn.secondary2, .btn.danger2, .btn.info2, .btn.ghost2 {
    font-size: 10px;
    padding: 5px 8px;
  }
}

/* Button Color Theme Configurations */
.btn.primary, .btn.primary2, .btn-submit, button[type="submit"].btn {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.28);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn.primary:hover, .btn.primary2:hover, .btn-submit:hover, button[type="submit"].btn:hover {
  background: linear-gradient(135deg, #4338ca, #3730a3);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.38);
  transform: translateY(-2px);
}

.btn.primary_black, .btn.primary_black2 {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  color: #fff;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(49, 46, 129, 0.3);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn.primary_black:hover, .btn.primary_black2:hover {
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  box-shadow: 0 6px 20px rgba(49, 46, 129, 0.4);
  transform: translateY(-2px);
}

.btn.secondary, .btn.secondary2 {
  background: #e0e0e0;
  color: #333;
}
.btn.secondary2 {
  color: #555;
}
.btn.secondary:hover, .btn.secondary2:hover {
  background: #546E7A;
  color: #fff;
  box-shadow: 0 3px 8px rgba(96,125,139,.35);
}

.btn.danger, .btn.danger2 {
  background: #E53935;
  color: #fff;
}
.btn.danger:hover, .btn.danger2:hover {
  background: #C62828;
  box-shadow: 0 3px 8px rgba(229,57,53,.35);
}

.btn.info, .btn.info2 {
  background: #17a2b8;
  color: #fff;
}
.btn.info:hover, .btn.info2:hover {
  background: #0d6d7b;
  box-shadow: 0 3px 8px rgba(23,162,184,.35);
}

.btn.ghost, .btn.ghost2 {
  color: #555;
  border: 1px solid #ddd;
}
.btn.ghost { background: #f5f5f5; }
.btn.ghost2 { background: #fff; }
.btn.ghost:hover, .btn.ghost2:hover {
  background: #e0e0e0;
}

/* ==========================================================================
   Table & Grid Styling
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.table {
  font-size: 10px;
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}
table.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}
.table th, .table td {
  padding: 2px 3px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 10px;
}
.table tr:hover {
  background-color: #e9f0ea;
}
.row-utama td {
  font-size: 10px;
  padding-top: 11px !important;
  padding-bottom: 11px !important;
}

@media (min-width: 700px) {
  .table th, .table td {
    font-size: 13px;
  }
}

.table input, .table select, .table textarea {
  font-size: 11px;
  font-family: Inter, system-ui, Arial, sans-serif;
  width: 100%;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}
.table thead th {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
  padding: 9px;
  font-size: 11px;
  text-align: left;
  font-weight: 600;
}
.table th:first-child, .table td:first-child {
  position: sticky;
  left: 0;
  background: var(--card);
  z-index: 10;
  font-weight: bold;
}

.table-dashboard {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}
.table-dashboard thead th {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  position: sticky;
  top: 0;
  z-index: 10;
}
.table-dashboard th, .table-dashboard td {
  padding: 3px;
  border: 0px solid #ddd;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.table-dashboard tr:nth-child(odd) {
  background-color: #f9f9f9;
}
.table-dashboard tr:hover {
  background-color: #daeddd;
}

#myTable tbody tr,
#myTable tbody tr td {
  transition: background 0.1s ease !important;
}

#myTable tbody tr:hover > td,
#myTable tbody tr:hover {
  background: rgba(59, 130, 246, 0.07) !important;
  box-shadow: none !important;
}

@media (max-width: 700px) {
  #myTable2 thead {
    display: none;
  }
  #myTable2 tr {
    display: block;
    margin-bottom: 5px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.2s ease;
  }
  #myTable2 tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
  }
  #myTable2 td {
    display: block;
    padding: 8px 10px;
    border: none;
    font-size: 10px;
  }
  #myTable2 td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 2px;
    font-size: 11px;
  }
  #myTable2 td span {
    font-weight: 500;
    color: #222;
  }
  #myTable2 td:not(:last-child) {
    border-bottom: 1px solid #ffffff;
  }
  #myTable2 td:nth-child(5),
  #myTable2 td:nth-child(6) {
    font-weight: bold;
    color: #0d6efd;
  }
  #myTable2 td:last-child {
    justify-content: flex-end;
    gap: 6px;
  }
  
  .row-utama td {
    font-size: 8px;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
  }
  .row-progress td {
    font-size: 8px;
    background: #fafafa;
  }
  .row-action td {
    background: #f5f5f5;
  }
  .action-cell a {
    display: inline-block;
    margin: 2px 1px;
  }
  .badge {
    font-size: 8px;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
  }
}

/* ==========================================================================
   Badges, Indicators & Approval States
   ========================================================================== */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: .8rem;
  color: var(--muted);
  text-transform: capitalize;
}
.badge.active { background: #43A047; }
.badge.pending { background: #FB8C00; }
.badge.user { background: #c5d533; }
.badge.admin { background: #d02fa5; }
.badge.root { background: #4d0a0eff; }

.badge-approve {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  background: #ddd;
  color: #333;
  margin: 2px;
  cursor: pointer;
  transition: 0.2s ease;
  user-select: none;
  text-decoration: none;
  font-weight: 600;
}
.badge-approve:hover {
  opacity: .85;
}
.badge-approve.active {
  background: #16a34a;
  color: #fff;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  padding: 5px 10px;
  border-radius: 20px;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  line-height: 1;
  white-space: nowrap;
}
.status-badge-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.status-badge.success { background: #16a34a; }
.status-badge.info { background: #0284c7; }
.status-badge.warning { background: #d97706; }
.status-badge.primary { background: #7c3aed; }
.status-badge.danger { background: #dc2626; }

.status-terisi { background: rgba(0, 123, 255, 0.55); }
.status-kosong { background: rgba(40, 167, 69, 0.55); }
.status-progress { background: rgba(255, 193, 7, 0.55); }
.status-other { background: rgba(108, 117, 125, 0.5); }
.status-cekin { background: rgba(40, 167, 69, 0.55); }
.status-cekout { background: rgba(171, 43, 43, 0.5); }

.status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 5px;
}
.badge-filter input {
  display: none;
}
.badge-filter .badge {
  padding: 5px 8px;
  border-radius: 20px;
  font-size: 11px;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid transparent;
}
.badge-filter input:checked + .badge {
  transform: scale(1.05);
  border: 1px solid #000;
}

.status-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px 3px;
  align-items: start;
}
.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 28px;
  text-align: center;
  gap: 5px;
}
.status-item small {
  font-size: 10px;
  font-weight: 200;
  line-height: 1.2;
  color: #555;
  min-height: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.status-item .badge-approve {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  background: #f5f5f5;
  color: #c62828;
  border: 1px solid #ddd;
  padding: 0;
}
.status-item .badge-approve.active {
  background: #4CAF50;
  color: #fff;
  border-color: #4CAF50;
}

@media (max-width: 800px) {
  .status-group { gap: 9px; }
  .status-item { min-width: 35px; }
  .status-item small { font-size: 8px; min-height: 20px; }
  .status-item .badge-approve { width: 20px; height: 20px; font-size: 9px; }
}

.badge.draft { background: #eee; color: #555; }
.badge.proses { background: #fff3cd; color: #856404; }
.badge.approved { background: #d4edda; color: #155724; }
.badge.rejected { background: #f8d7da; color: #721c24; }

/* ==========================================================================
   Financials & Payments
   ========================================================================== */
.rupiah { text-align: left; }

.payment-card {
  border-left: 5px solid #4CAF50;
  background: linear-gradient(135deg, #f8fff9, #ffffff);
}
.payment-status {
  display: flex;
  gap: 15px;
  margin: 10px 0 20px;
}

.payment-wrapper {
  margin: 25px 0;
}
.payment-card-modern {
  padding: 25px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f4f7ff);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}
.card-header h3 {
  margin: 0;
  font-size: 20px;
}
.card-header .sub {
  font-size: 12px;
  color: #777;
}

.input-group {
  display: flex;
  align-items: center;
  border-radius: 10px;
  border: 1px solid #ddd;
  overflow: hidden;
  background: #fff;
}
.prefix {
  padding: 10px 12px;
  background: #f1f3f6;
  font-weight: bold;
  color: #555;
}
.input-group input {
  border: none;
  flex: 1;
  padding: 10px;
  outline: none;
}

.payment-status-modern {
  display: flex;
  gap: 15px;
}
.badge-radio {
  flex: 1;
  cursor: pointer;
}
.badge-radio input {
  display: none;
}
.badge-content {
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid #eee;
  transition: all 0.25s ease;
}
.badge-radio input:checked + .badge-content {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.badge-radio.paid .badge-content {
  background: #e8f5e9;
  color: #1b5e20;
}
.badge-radio.unpaid .badge-content {
  background: #fff8e1;
  color: #b26a00;
}
.badge-radio.paid input:checked + .badge-content {
  border-color: #4CAF50;
  background: #4CAF50;
  color: #fff;
}
.badge-radio.unpaid input:checked + .badge-content {
  border-color: #ff9800;
  background: #ff9800;
  color: #fff;
}
.badge-radio.checkin input:checked + .badge-content {
  border-color: #4CAF50;
  background: #4CAF50;
  color: #fff;
}
.badge-radio.checkout input:checked + .badge-content {
  border-color: #d1a0ae;
  background: #e49fb3;
  color: #fff;
}

.upload-box {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  transition: 0.3s;
}
.upload-box:hover {
  border-color: #4CAF50;
  background: #f1fff4;
}

.badge-option {
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 15px;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.badge-option.unpaid {
  color: #7a4b00;
  background: linear-gradient(135deg, #ffe0b2, #ffcc80);
  border-color: #ffb74d;
}
.badge-option.paid {
  color: #1b5e20;
  background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
  border-color: #81c784;
}
.badge-option input:checked + span {
  color: #fff;
}
.badge-option:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}
.badge-option.unpaid input:checked + span {
  background: linear-gradient(135deg, #fb8c00, #ef6c00);
  padding: 8px 15px;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(255,152,0,0.4);
}
.badge-option.paid input:checked + span {
  background: linear-gradient(135deg, #43a047, #2e7d32);
  padding: 8px 15px;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(76,175,80,0.4);
}

.row-progress { display: table-row; }
.row-action { display: table-row; }
.progress-cell { min-width: 180px; }
.badge2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #fff;
  animation: fadeIn .4s ease;
}
.badge2 .icon { font-size: 13px; }

.mini-bar {
  height: 5px;
  background: #ddd;
  border-radius: 10px;
  margin-top: 4px;
  overflow: hidden;
}
.mini-fill {
  height: 100%;
  background: linear-gradient(90deg,#4caf50,#81c784);
  width: 0;
  transition: width 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .progress-cell { min-width: 120px; }
  .badge2 {
    gap: 3px;
    padding: 2px 5px;
    font-size: 12px;
  }
  .badge2 .icon { font-size: 12px; }
}

.bg-gray { background: #9e9e9e; }
.bg-blue { background: #2196f3; }
.bg-purple { background: #9c27b0; }
.bg-orange { background: #ff9800; }
.bg-yellow { background: #fbc02d; color: #000; }
.bg-teal { background: #009688; }
.bg-green { background: #4caf50; }

.summary-box {
  min-width: 180px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 12px;
  display: flex;
  gap: 20px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.summary-item {
  flex: 1;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background: #fff;
  min-width: 180px;
}
.summary-item small {
  display: block;
  font-size: 13px;
  color: #777;
  margin-bottom: 5px;
}
.summary-item div {
  font-size: 20px;
  font-weight: bold;
}
.summary-item.debit {
  border-left: 5px solid #2e7d32;
}
.summary-item.debit div {
  color: #2e7d32;
}
.summary-item.kredit {
  border-left: 5px solid #c62828;
}
.summary-item.kredit div {
  color: #c62828;
}
.summary-item.saldo {
  border-left: 5px solid #1565c0;
}
.summary-item.saldo div {
  color: #1565c0;
}
.saldo-box {
  margin-top: 10px;
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */
.modal,
.tx-modal,
.em-modal,
.ml-modal,
.ms-modal,
.md-modal,
.mtu-modal,
.msp-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  background: rgba(2, 6, 23, 0.65) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 110000 !important;
  padding: 16px !important;
  overflow: hidden !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  box-sizing: border-box !important;
}

.modal.active,
.modal.show,
.modal[style*="display:block"],
.modal[style*="display: block"],
.modal[style*="display:flex"],
.modal[style*="display: flex"],
.tx-modal.active,
.tx-modal.show,
.tx-modal[style*="display:block"],
.tx-modal[style*="display: block"],
.tx-modal[style*="display:flex"],
.tx-modal[style*="display: flex"],
.em-modal.active,
.em-modal.show,
.em-modal[style*="display:block"],
.em-modal[style*="display: block"],
.em-modal[style*="display:flex"],
.em-modal[style*="display: flex"],
.ml-modal.active,
.ml-modal.show,
.ml-modal[style*="display:block"],
.ml-modal[style*="display: block"],
.ml-modal[style*="display:flex"],
.ml-modal[style*="display: flex"],
.ms-modal.active,
.ms-modal.show,
.ms-modal[style*="display:block"],
.ms-modal[style*="display: block"],
.ms-modal[style*="display:flex"],
.ms-modal[style*="display: flex"],
.md-modal.active,
.md-modal.show,
.md-modal[style*="display:block"],
.md-modal[style*="display: block"],
.md-modal[style*="display:flex"],
.md-modal[style*="display: flex"],
.mtu-modal.active,
.mtu-modal.show,
.mtu-modal[style*="display:block"],
.mtu-modal[style*="display: block"],
.mtu-modal[style*="display:flex"],
.mtu-modal[style*="display: flex"],
.msp-modal.active,
.msp-modal.show,
.msp-modal[style*="display:block"],
.msp-modal[style*="display: block"],
.msp-modal[style*="display:flex"],
.msp-modal[style*="display: flex"] {
  display: flex !important;
}

.modal-content,
.modal-box,
.tx-modal-content,
.em-modal-content,
.ml-modal-content,
.ms-modal-content,
.md-modal-content,
.mtu-modal-content,
.msp-modal-content {
  background: #fff !important;
  box-sizing: border-box !important;
  width: min(100%, 900px) !important;
  max-width: 900px !important;
  min-width: min(320px, 100%) !important;
  border-radius: 16px !important;
  padding: 22px !important;
  max-height: min(100%, calc(100dvh - 32px)) !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.18) !important;
  animation: modalFade .18s ease !important;
  position: relative !important;
  margin: auto !important;
}

.modal-content button {
  position: relative;
  z-index: 5;
}

/* Image preview modal overrides */
img.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  animation: none;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-box.large {
  max-width: 1200px;
}

@media (max-width: 768px) {
  .modal,
  .modal-box,
  .tx-modal,
  .em-modal,
  .ml-modal,
  .ms-modal,
  .md-modal,
  .mtu-modal,
  .msp-modal {
    padding: 16px 12px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-x: hidden !important;
  }
  .modal-content,
  .modal-box,
  .tx-modal-content,
  .em-modal-content,
  .ml-modal-content,
  .ms-modal-content,
  .md-modal-content,
  .mtu-modal-content,
  .msp-modal-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 18px 16px !important;
    margin: auto !important;
    box-sizing: border-box !important;
    max-height: calc(100dvh - 24px) !important;
  }
}

.modal-header, .modal-header-custom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header {
  margin-bottom: 15px;
}
.modal-header-custom {
  margin-bottom: 20px;
}
.modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
}

.thumb-box {
  position: relative;
  display: inline-block;
  margin-top: 5px;
}
.thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
  cursor: pointer;
  transition: 0.2s;
}
.thumb:hover {
  transform: scale(1.05);
}
.thumb-box button {
  position: absolute;
  top: -8px;
  right: -8px;
  background: red;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 12px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px,1fr));
  gap: 10px;
  margin-top: 10px;
}
.preview-item {
  position: relative;
}
.preview-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}
.preview-item button {
  position: absolute;
  top: 5px;
  right: 5px;
  background: red;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

/* ==========================================================================
   Progress Stepper
   ========================================================================== */
.progress-wrapper {
  position: relative;
  margin: 15px 0;
}
.progress-bar {
  position: absolute;
  height: 4px;
  background: #4caf50;
  width: 0%;
  top: 20px;
  left: 0;
  transition: width 0.4s ease;
  z-index: 1;
}
.steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.step {
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.step span {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  background: #ccc;
  color: #fff;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}
.step.active span {
  background: #4caf50;
  transform: scale(1.2);
}
.step small {
  display: block;
  font-size: 12px;
  width: 80px;
}

@media (max-width: 700px) {
  .progress-wrapper {
    margin: 15px 0;
    position: relative;
  }
  .progress-bar {
    position: absolute;
    height: 3px;
    background: #4caf50;
    width: 0%;
    top: 16px;
    left: 0;
    z-index: 1;
    transition: width 0.4s ease;
  }
  .progress-bar.second {
    top: 70px;
    width: 0%;
  }
  .progress-wrapper::before,
  .progress-wrapper::after {
    content: '';
    position: absolute;
    height: 3px;
    background: #ddd;
    width: 100%;
    left: 0;
    z-index: 0;
  }
  .progress-wrapper::before { top: 16px; }
  .progress-wrapper::after { top: 70px; }
  
  .steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 0;
  }
  .step {
    width: 25%;
    text-align: center;
  }
  .step span {
    width: 22px;
    height: 22px;
    line-height: 22px;
    font-size: 10px;
  }
  .step small {
    font-size: 10px;
    display: none;
  }
  .step.active small {
    display: block;
    margin-top: 3px;
  }
  .step.active span {
    transform: scale(1.1);
    background: #4caf50;
    color: #fff;
  }
  .step.done span {
    background: #4caf50;
    color: #fff;
  }
}

.filter-box {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-box .input {
  min-width: 150px;
}
.filter-actions {
  margin-left: auto;
  display: flex;
  gap: 2px;
}

/* ==========================================================================
   Signatures & Drawing
   ========================================================================== */
.signature-pad {
  border: 1px solid #ccc;
  border-radius: 15px;
  background-color: white;
  height: 160px;
  touch-action: none;
}
.signature-pad-modal {
  width: 100% !important;
  max-width: 400px;
  height: 100px !important;
  border: 1px solid #ccc;
  background: #fff;
  display: block;
  touch-action: none;
}
.signature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.signature-box {
  background: #fafafa;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #eee;
}
.divider {
  margin: 20px 0;
  border: none;
  border-top: 1px dashed #ddd;
}

.floating-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f2f2f2;
  box-shadow: 0 -1px 6px rgba(0,0,0,0.1);
  z-index: 999;
  padding: 8px 0;
}
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #1976d2;
  color: white;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 100;
}
.bottom-nav a {
  color: white;
  font-size: 1em;
  text-align: center;
  text-decoration: none;
}

/* ==========================================================================
   Pagination Lists
   ========================================================================== */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.pagination a {
  padding: 5px 10px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #ccc;
  margin: 2px;
  background: #f4f4f4;
  color: #333;
  font-size: 14px;
}
.pagination a:hover {
  background: #ddd;
}
.pagination a.active-page {
  font-weight: bold !important;
  text-decoration: underline !important;
  background: #444;
  color: white !important;
  border-color: #444;
}

.page-btn {
  padding: 8px 12px;
  border-radius: 8px;
  background: #f1f1f1;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
  transition: .2s;
}
.page-btn:hover {
  background: #dcdcdc;
}
.page-btn.active {
  background: #1976d2;
  color: #fff;
}
.last-btn {
  background: #111;
  color: #fff;
}

/* ==========================================================================
   Login Specifics
   ========================================================================== */
.login-card {
  max-width: 420px;
  margin: 40px auto;
  padding: 20px;
}
.login-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}
.login-links .btn {
  text-align: center;
  background: #f8f8f8;
  border: 1px solid #ccc;
}
.login-links .btn:hover {
  background: #e6e6e6;
}

/* ==========================================================================
   Charts & Reports
   ========================================================================== */
.chart-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 10px auto;
  width: 95%;
  max-width: 1400px;
}
.chart-card {
  flex: 1 1 180px;
  background: #fff;
  border-radius: 20px;
  padding: 3px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 400px;
}
.chart-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.filter-form {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  gap: 5px;
}
.filter-form select {
  padding: 3px 5px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.filter-form button {
  padding: 5px 14px;
  background-color: #9d4edd;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.filter-form button:hover {
  background-color: #7b2cbf;
}
.flex-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  align-items: stretch;
}
#toggleChartsBtn {
  background: linear-gradient(45deg, #007bff, #00b4ff);
  color: white;
  padding: 8px 18px;
  border: none;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
}
#toggleChartsBtn:hover {
  background: linear-gradient(45deg, #0062cc, #0090cc);
  transform: scale(1.03);
}
#extraCharts {
  display: none;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  width: 100%;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#extraCharts.show {
  opacity: 1;
  transform: translateY(0);
}
canvas {
  width: 100% !important;
  height: auto !important;
}

/* ==========================================================================
   Quick Navigation App Style
   ========================================================================== */
.quick-btn {
  flex: 0 0 auto;
  width: 110px;
  background: linear-gradient(135deg, #f8f9fb, #e8ecf2);
  border-radius: 16px;
  text-align: center;
  padding: 12px 5px;
  text-decoration: none;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
}
.quick-btn:hover {
  transform: translateY(-4px) scale(1.03);
  background: linear-gradient(145deg, #eaf3ff, #ffffff);
  box-shadow: 0 5px 14px rgba(0,0,0,0.15);
  color: #1a73e8;
}
.quick-btn img {
  width: 50px;
  height: 50px;
  margin-bottom: 6px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}
.quick-btn span {
  font-size: 13px;
  font-weight: 500;
}
.quick-btn .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  stroke-width: 1.8;
  color: #3F51B5;
  transition: color 0.3s;
}

.quick-nav-card {
  position: relative;
  margin: 5px;
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  animation: fadeIn 0.5s ease-in-out;
}
.quick-nav-title {
  text-align: center;
  font-size: 13px;
  margin-bottom: 10px;
  margin-top: 0px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.quick-nav-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 5px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.arrow-btn {
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #ccc;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}
.arrow-btn:hover {
  background: #eee;
  transform: translateY(-50%) scale(1.1);
}
.arrow-btn.left { left: -5px; }
.arrow-btn.right { right: -5px; }

/* ==========================================================================
   Utilities & Extra Widgets
   ========================================================================== */
.kbd {
  font-family: ui-monospace, monospace;
  background: #eee;
  border-radius: 6px;
  padding: 2px 6px;
  border: 1px solid #ddd;
}
.grid-qrs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media print {
  .no-print { display: none; }
  .grid-qrs { grid-template-columns: repeat(4, 1fr); }
  .card { box-shadow: none; border: none; }
}

.marker {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #111;
  color: #fff;
  border-radius: 10px;
  padding: 4px 6px;
  font-size: 12px;
  cursor: grab;
}
.map-wrap {
  position: relative;
  width: 100%;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
}
.map-img {
  max-width: 100%;
  display: block;
}
.tooltip {
  position: absolute;
  background: #111;
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  transform: translate(-50%, -120%);
  pointer-events: none;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}
.tab-btn {
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  font-weight: 600;
}
.tab-btn.active {
  background: var(--primary);
  color: #a98888ff;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ==========================================================================
   Select2 Dark Mode Override
   ========================================================================== */
body.dark .select2-container--default .select2-selection--multiple,
body.dark .select2-container--default .select2-selection--single {
  background-color: #222 !important;
  border-color: #555 !important;
  color: #fff !important;
}
body.dark .select2-container--default .select2-selection__placeholder {
  color: #bbb !important;
}
body.dark .select2-container--default .select2-selection__rendered {
  color: #fff !important;
}
body.dark .select2-dropdown {
  background-color: #222 !important;
  border-color: #555 !important;
}
body.dark .select2-results__option {
  background-color: #222 !important;
  color: #fff !important;
}
body.dark .select2-results__option--highlighted {
  background-color: #333 !important;
  color: #fff !important;
}
body.dark .select2-container--default .select2-selection__choice {
  background-color: #444 !important;
  border-color: #666 !important;
  color: #fff !important;
}

/* ==========================================================================
   Dark Theme Definition
   ========================================================================== */
html.dark,
body.dark {
  --bg: #0b1120;
  --bg-mac-app: radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.25), transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(190, 24, 93, 0.2), transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(29, 78, 216, 0.25), transparent 50%),
                radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.8), transparent 50%);
  --fg: #eaeaea;
  --muted: #999;
  --card: rgba(15, 23, 42, 0.75);
  --accent: #4a90e2;
  --accent-light: #2a2a2a;
  --border: rgba(255, 255, 255, 0.1);
  --btn-primary: #3b82f6;
  --btn-info: #0ea5e9;
  --btn-danger: #ef4444;
  --btn-secondary: #555;
}

body.dark {
  background-color: var(--bg);
  background-image: var(--bg-mac-app);
  background-size: 160% 160%;
  background-attachment: fixed;
  color: var(--fg);
}

html.dark {
  background-color: var(--bg);
}


body.dark .slider {
  background-color: #555;
}
body.dark .toggle-switch input:checked + .slider {
  background-color: #66bb6a;
}

body.dark .navbar {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9)) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: var(--fg) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
body.dark .submenu {
  background: rgba(15, 23, 42, 0.9) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: var(--fg) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}
body.dark .card,
body.dark .mini-card,
body.dark .chart-card,
body.dark .quick-btn {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
body.dark .table th,
body.dark .table td,
body.dark .table-dashboard th,
body.dark .table-dashboard td {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
body.dark .nav-toggle {
  color: #fff;
}
/* Nav links & submenu links: dark mode sleek indigo style */
body.dark .nav-links li a,
body.dark .nav-links li span,
body.dark .submenu li a {
  color: #cbd5e1 !important;
}
/* Hover state */
body.dark .nav-links li a:hover,
body.dark .nav-links li span:hover,
body.dark .nav-links li:hover > a,
body.dark .nav-links li:hover > span,
body.dark .submenu li a:hover {
  background: rgba(99, 102, 241, 0.18) !important;
  color: #818cf8 !important;
}
/* Active state - menu yang sedang dipilih */
body.dark .nav-links li a.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4) !important;
}
/* Submenu active state */
body.dark .submenu li a.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: #ffffff !important;
}
body.dark .table tr:hover,
body.dark .table-dashboard tr:hover {
  background: #222 !important;
}
body.dark .table thead th,
body.dark .table-dashboard thead th {
  background: #222 !important;
}
body.dark input,
body.dark select,
body.dark textarea {
  background: #222 !important;
  color: #fff !important;
  border-color: #444 !important;
}
body.dark .btn {
  background: #222;
  border-color: #444;
  color: #eee;
}
body.dark .btn:hover {
  background: #333;
}
body.dark .profile-thumb {
  border-color: #555 !important;
}
body.dark #myTable tbody tr:hover > td,
body.dark #myTable tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: none !important;
}

body.dark .summary-item {
  background: #1e1e1e;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
}
body.dark .summary-item small {
  color: #aaa;
}

body.dark .signature-box {
  background: #1f1f1f;
}
body.dark .divider {
  border-top: 1px dashed #444;
}

/* Payment Dark Mode Adjustments */
.dark .payment-card {
  background: #1e1e1e;
  border-left: 5px solid #66bb6a;
}
.dark .badge-option {
  border: 1px solid #555;
}
.dark .badge-option.unpaid {
  background: #3a2a00;
  color: #ffcc80;
}
.dark .badge-option.paid {
  background: #1b3a1b;
  color: #a5d6a7;
}
.dark .payment-card-modern {
  background: #1e1e1e;
  border: 1px solid #333;
}
.dark .input-group {
  background: #2a2a2a;
  border: 1px solid #444;
}
.dark .prefix {
  background: #333;
  color: #ccc;
}
.dark .upload-box {
  background: #2a2a2a;
  border: 1px dashed #555;
}

/* ==========================================================================
   Responsive Form & Container Utilities
   ========================================================================== */

/* Flexible form container: max-width on desktop, full-width on mobile */
.form-responsive {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 12px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .form-responsive {
    padding: 0 6px;
  }
}

/* Ensure the main container expands wider on large screens */
.container {
  max-width: 1300px;
}

/* Make .page-card full width inside container */
.page-card {
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   Unified Dark Mode - page-card & modal overrides
   ========================================================================== */
body.dark .page-card {
  background: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

body.dark .bb-card,
body.dark .sf-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark .bb-nocek { color: #7db3f5 !important; }
body.dark .bb-bank,
body.dark .bb-item span { color: #94a3b8 !important; }
body.dark .bb-item { background: #0f172a !important; border-color: #334155 !important; }
body.dark .bb-item strong { color: #f8fafc !important; }

body.dark .sf-card:hover {
  background: #262626 !important;
}

body.dark .modal-content {
  background: #1e1e1e !important;
  color: #eee !important;
  border: 1px solid #333;
}

body.dark .table-modern th {
  background: #1a3a5c !important;
  color: #eee !important;
}

body.dark .table-modern td {
  border-bottom-color: #333 !important;
  color: #ddd !important;
}

body.dark .table-modern tr:hover td {
  background: #252525 !important;
}

body.dark .modern-input {
  background: #222 !important;
  color: #eee !important;
  border-color: #444 !important;
}

body.dark .modern-input::placeholder { color: #888 !important; }

body.dark .btn-primary  { background: #1565c0; color: #fff; }
body.dark .btn-danger   { background: #b71c1c; color: #fff; }
body.dark .btn-success  { background: #1b5e20; color: #fff; }
body.dark .btn-info     { background: #006064; color: #fff; }
body.dark .btn-secondary { background: #444; color: #eee; }

body.dark .pagination-info { color: #aaa; }
body.dark .page-link {
  background: #2a2a2a;
  color: #ccc;
  border-color: #444;
}
body.dark .page-link.active {
  background: #1565c0;
  color: #fff;
  border-color: #1565c0;
}

body.dark .tr-grand-total { background: #252525 !important; }
body.dark .tr-grand-total td { color: #eee !important; border-color: #555 !important; }

/* Dark mode for filter/info boxes */
body.dark [style*="background:#f4f9ff"],
body.dark [style*="background: #f4f9ff"] {
  background: #1a2535 !important;
  border-color: #2a4a6b !important;
  color: #cce4ff !important;
}

/* Dark mode: navbar on authenticated pages */
body.dark .navbar {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9)) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
body.dark .nav-title { color: #f8fafc; }
body.dark .profile-name { color: #cbd5e1; }

/* Dark mode: mobile/desktop nav menu colors */
@media (max-width: 1000px) {
  body.dark .nav-links {
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  }
}
@media (min-width: 1001px) {
  body.dark .nav-links {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
  }

  /* Spacious & Balanced Navbar for Desktop Mode */
  .nav {
    margin: 10px 14px 0px 14px;
  }

  .navbar {
    padding: 10px 20px;
    border-radius: 16px;
  }

  .nav-left {
    gap: 14px;
  }

  .nav-logo-img {
    height: 30px;
  }

  .nav-actions {
    gap: 12px;
  }

  .nav-tema {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .profile-dropdown-wrapper .row.foto {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 10px !important;
  }

  .profile-thumb {
    width: 38px;
    height: 38px;
  }

  .profile-name {
    display: inline-block !important;
    font-size: 13px !important;
    margin-top: 0 !important;
    white-space: nowrap !important;
  }

  .nav-links {
    gap: 6px;
  }

  .nav-links li a,
  .nav-links li span {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 10px;
  }

  .submenu {
    top: 42px;
  }
}

/* Dark mode: thumb-container */
body.dark .thumb-wrapper {
  background: #252525 !important;
  border-color: #444 !important;
}

/* Smooth transitions on all backgrounds */
body, .navbar, .card, .page-card, .modal-content,
.bb-card, .sf-card, .bb-item {
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

/* ==========================================================================
   Fix: Ensure html element also gets dark background (prevents light gaps)
   ========================================================================== */
html {
  background: var(--bg);
  min-height: 100%;
}

body.dark {
  background: #111 !important;
}

/* ==========================================================================
   Dark Mode: Dashboard-Specific Elements
   ========================================================================== */
body.dark .quick-nav-card {
  background: #1e1e1e !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
}

body.dark .quick-nav-title {
  color: #ccc !important;
}

body.dark .quick-btn {
  background: #2a2a2a !important;
  color: #ddd !important;
  border-color: #444 !important;
}

body.dark .quick-btn:hover {
  background: #333 !important;
}

body.dark .chart-card {
  background: #1e1e1e !important;
  border-color: #333 !important;
  color: #eee !important;
}

body.dark .chart-section {
  background: transparent !important;
}

body.dark .arrow-btn {
  background: rgba(40,40,40,0.9) !important;
  border-color: #555 !important;
  color: #eee !important;
}

body.dark .arrow-btn:hover {
  background: #333 !important;
}

body.dark .filter-form select,
body.dark .filter-form input,
body.dark .filter-form button {
  background: #222 !important;
  color: #eee !important;
  border-color: #444 !important;
}

body.dark .filter-form button {
  background: #1565c0 !important;
  color: #fff !important;
}

body.dark #extraCharts {
  background: transparent !important;
}

body.dark canvas {
  filter: brightness(0.9);
}

/* ==========================================================================
   Dark Mode: master_bank.php & master_ttd.php overrides
   ========================================================================== */
body.dark .modern-card {
  background: #1e1e1e !important;
  color: #eee !important;
  border-color: #333 !important;
}

body.dark .bank-item-card {
  background: #1e1e1e !important;
  color: #eee !important;
  border-color: #333 !important;
}

body.dark .form-label {
  color: #ccc !important;
}

body.dark .bank-card-title {
  color: #fff !important;
}

body.dark .bank-card-company {
  color: #aaa !important;
}

body.dark .bank-card-row {
  border-bottom-color: #333 !important;
}

body.dark .bank-card-row span {
  color: #bbb !important;
}

body.dark .bank-card-note {
  background: #252525 !important;
  color: #ccc !important;
}

body.dark .empty-state {
  background: #1e1e1e !important;
  border-color: #444 !important;
  color: #aaa !important;
}

body.dark .company-badge {
  background: #2a2a2a !important;
  color: #ccc !important;
  border-color: #444 !important;
}

body.dark .company-option input:checked + .company-badge {
  background: #1976d2 !important;
  color: #fff !important;
}

body.dark .company-preview {
  background: #252525 !important;
  color: #ccc !important;
  border-color: #444 !important;
}

body.dark .ttd-wrapper {
  background: #1e1e1e !important;
  color: #eee !important;
  border-color: #333 !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3) !important;
}

body.dark .ttd-title {
  color: #fff !important;
}

body.dark .ttd-sub {
  color: #aaa !important;
}

body.dark .ttd-card {
  background: linear-gradient(135deg, #1e1e1e, #252525) !important;
  border-color: #333 !important;
  color: #eee !important;
}

body.dark .ttd-badge {
  background: #1a2535 !important;
  color: #7db3f5 !important;
}

body.dark .form-group label {
  color: #ccc !important;
}

body.dark .ttd-input {
  background: #222 !important;
  color: #eee !important;
  border-color: #444 !important;
}

body.dark .ttd-input:focus {
  border-color: #1976d2 !important;
}

/* ==========================================================================
   3-THEME SYSTEM OVERRIDES (Apple [Default], Light, Dark)
   ========================================================================== */

/* 1. APPLE THEME (High-End macOS Mesh Wallpaper & Frosted Glass) */
html.theme-apple, body.theme-apple {
  background-color: #f1f5f9 !important;
  background-image: radial-gradient(at 0% 0%, rgba(199, 210, 254, 0.6) 0px, transparent 50%),
                    radial-gradient(at 100% 0%, rgba(251, 207, 232, 0.6) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(186, 230, 253, 0.6) 0px, transparent 50%),
                    radial-gradient(at 0% 100%, rgba(221, 214, 254, 0.6) 0px, transparent 50%),
                    radial-gradient(at 50% 50%, rgba(254, 249, 195, 0.4) 0px, transparent 50%) !important;
  background-size: 100% 100% !important;
  background-attachment: scroll !important;
  animation: none !important;
  color: #0f172a !important;
}

/* Apple Theme: Frosted Glass Cards & Containers */
body.theme-apple .card,
body.theme-apple .page-card,
body.theme-apple .modern-card,
body.theme-apple .form-card,
body.theme-apple .tx-search-card,
body.theme-apple .filter-card,
body.theme-apple .search-card,
body.theme-apple .filter-container,
body.theme-apple .modal-content,
body.theme-apple .tx-card-header,
body.theme-apple .journal-card,
body.theme-apple .error-card,
body.theme-apple .login-card,
body.theme-apple .search-filter-wrap,
body.theme-apple .filter-form,
body.theme-apple .modern-form,
body.theme-apple .bank-item-card,
body.theme-apple .lg-card {
  background: rgba(255, 255, 255, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-radius: 18px !important;
  color: #0f172a;
}

body.theme-apple .input,
body.theme-apple .modern-input,
body.theme-apple .search-input,
body.theme-apple select,
body.theme-apple textarea,
body.theme-apple input[type="text"],
body.theme-apple input[type="number"],
body.theme-apple input[type="date"],
body.theme-apple input[type="password"],
body.theme-apple input[type="email"],
body.theme-apple input[type="search"],
body.theme-apple input[type="file"],
body.theme-apple .search-box input,
body.theme-apple .filter-box select {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  color: #1e293b !important;
}

/* 2. LIGHT THEME */
html.theme-light, body.theme-light {
  background-color: #f8fafc !important;
  background-image: none !important;
  animation: none !important;
  color: #1e293b !important;
}

body.theme-light .card,
body.theme-light .page-card,
body.theme-light .modern-card,
body.theme-light .form-card,
body.theme-light .tx-search-card,
body.theme-light .filter-card,
body.theme-light .search-card,
body.theme-light .filter-container,
body.theme-light .modal-content,
body.theme-light .tx-card-header,
body.theme-light .journal-card,
body.theme-light .error-card,
body.theme-light .login-card,
body.theme-light .search-filter-wrap,
body.theme-light .filter-form,
body.theme-light .modern-form,
body.theme-light .bank-item-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #1e293b !important;
}

body.theme-light .navbar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

body.theme-light .input,
body.theme-light .modern-input,
body.theme-light .search-input,
body.theme-light select,
body.theme-light textarea,
body.theme-light input[type="text"],
body.theme-light input[type="number"],
body.theme-light input[type="date"],
body.theme-light input[type="password"],
body.theme-light input[type="email"],
body.theme-light input[type="search"],
body.theme-light input[type="file"],
body.theme-light .search-box input,
body.theme-light .filter-box select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

/* 3. DARK THEME (Ultra Lightweight & High Performance) */
html.dark, html.theme-dark, body.dark, body.theme-dark {
  background-color: #0b0f19 !important;
  background-image: linear-gradient(180deg, #0f172a 0%, #0b0f19 100%) !important;
  background-attachment: scroll !important;
  animation: none !important;
  color: #f8fafc !important;
}

body.dark .card,
body.dark .page-card,
body.dark .modern-card,
body.dark .form-card,
body.dark .tx-search-card,
body.dark .filter-card,
body.dark .search-card,
body.dark .filter-container,
body.dark .modal-content,
body.dark .tx-card-header,
body.dark .journal-card,
body.dark .error-card,
body.dark .login-card,
body.dark .search-filter-wrap,
body.dark .filter-form,
body.dark .modern-form,
body.dark .bank-item-card,
.dark .card,
.dark .page-card,
.dark .modern-card {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #f8fafc !important;
}

body.dark .navbar,
.dark .navbar {
  background: #0f172a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

body.dark .input,
body.dark .modern-input,
body.dark .search-input,
body.dark select,
body.dark textarea,
body.dark input[type="text"],
body.dark input[type="number"],
body.dark input[type="date"],
body.dark input[type="password"],
body.dark input[type="email"],
body.dark input[type="search"],
body.dark input[type="file"],
body.dark .search-box input,
body.dark .filter-box select {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   MODAL FORM THEME STYLING (Apple, Light, Dark)
   ========================================================================== */

/* 1. APPLE THEME (Default) MODALS */
body.theme-apple .modal-content,
body.theme-apple .tx-modal-content,
body.theme-apple .em-modal-content,
body.theme-apple .note-modal-content,
body.theme-apple .ms-modal-content,
body.theme-apple .ms-modal-content-lg,
body.theme-apple .sewa-modal-content,
body.theme-apple .md-modal-content,
body.theme-apple .ml-modal-content,
body.theme-apple .mtu-modal-content,
body.theme-apple .msp-modal-content,
body.theme-apple .ji-modal-box,
body.theme-apple .m-modal-box,
body.theme-apple .sr-modal-content,
body.theme-apple .modal-detail-bank,
body.theme-apple .modal-dialog,
body.theme-apple .modal-card,
body.theme-apple .modal-box,
body.theme-apple .popup-content,
body.theme-apple .popup-box,
body.theme-apple .dialog-content,
body.theme-apple .custom-modal,
body.theme-apple .form-modal,
body.theme-apple .modal-inner,
body.theme-apple [class*="modal-content"],
body.theme-apple [class*="modal-box"] {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(224, 231, 255, 0.88) 35%, rgba(253, 242, 248, 0.88) 70%, rgba(240, 253, 244, 0.90) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
  color: #1e293b !important;
}

body.theme-apple .modal-header,
body.theme-apple .modal-footer,
body.theme-apple .modal-body,
body.theme-apple .tx-modal-header,
body.theme-apple .tx-modal-footer,
body.theme-apple .em-modal-header,
body.theme-apple .em-modal-footer,
body.theme-apple .ms-modal-header,
body.theme-apple .ms-modal-footer,
body.theme-apple .md-modal-header,
body.theme-apple .md-modal-footer,
body.theme-apple .ml-modal-header,
body.theme-apple .ml-modal-footer,
body.theme-apple .mtu-modal-header,
body.theme-apple .mtu-modal-footer,
body.theme-apple .msp-modal-header,
body.theme-apple .msp-modal-footer,
body.theme-apple .ji-modal-header,
body.theme-apple .ji-modal-footer,
body.theme-apple .form-group-modal,
body.theme-apple [class*="modal-header"],
body.theme-apple [class*="modal-footer"] {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  color: #1e293b !important;
}

body.theme-apple .modal-header h2,
body.theme-apple .modal-header h3,
body.theme-apple .modal-header h4,
body.theme-apple .tx-modal-header h4,
body.theme-apple .modal-title,
body.theme-apple .em-modal-header h3,
body.theme-apple [class*="modal-title"],
body.theme-apple [class*="modal-header"] h2,
body.theme-apple [class*="modal-header"] h3,
body.theme-apple [class*="modal-header"] h4 {
  color: #1e293b !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
}

/* 2. LIGHT THEME MODALS */
body.theme-light .modal-content,
body.theme-light .tx-modal-content,
body.theme-light .em-modal-content,
body.theme-light .note-modal-content,
body.theme-light .ms-modal-content,
body.theme-light .ms-modal-content-lg,
body.theme-light .sewa-modal-content,
body.theme-light .modal-dialog,
body.theme-light .modal-card,
body.theme-light .modal-box,
body.theme-light .popup-content,
body.theme-light .popup-box,
body.theme-light .dialog-content,
body.theme-light .custom-modal,
body.theme-light .form-modal,
body.theme-light .modal-inner {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #1e293b !important;
}

body.theme-light .modal-header,
body.theme-light .modal-footer,
body.theme-light .tx-modal-header,
body.theme-light .tx-modal-footer,
body.theme-light .em-modal-header,
body.theme-light .em-modal-footer {
  background: #ffffff !important;
  border-color: #f1f5f9 !important;
  color: #1e293b !important;
}

body.theme-light .modal-header h2,
body.theme-light .modal-header h3,
body.theme-light .modal-header h4,
body.theme-light .tx-modal-header h4,
body.theme-light .modal-title,
body.theme-light .em-modal-header h3 {
  color: #1e293b !important;
}

/* 3. DARK THEME MODALS (Ultra Lightweight) */
body.dark .modal-content,
body.dark .tx-modal-content,
body.dark .em-modal-content,
body.dark .note-modal-content,
body.dark .ms-modal-content,
body.dark .ms-modal-content-lg,
body.dark .sewa-modal-content,
body.dark .modal-dialog,
body.dark .modal-card,
body.dark .modal-box,
body.dark .popup-content,
body.dark .popup-box,
body.dark .dialog-content,
body.dark .custom-modal,
body.dark .form-modal,
body.dark .modal-inner {
  background: #182234 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #f8fafc !important;
}

body.dark .modal-header,
body.dark .modal-footer,
body.dark .tx-modal-header,
body.dark .tx-modal-footer,
body.dark .em-modal-header,
body.dark .em-modal-footer {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

body.dark .modal-header h2,
body.dark .modal-header h3,
body.dark .modal-header h4,
body.dark .tx-modal-header h4,
body.dark .modal-title,
body.dark .em-modal-header h3 {
  color: #f8fafc !important;
}

/* ==========================================================================
   THEME DROPDOWN MENU STYLING
   ========================================================================== */
.theme-dropdown-menu {
  position: fixed !important;
  z-index: 99999999 !important;
  display: none;
  flex-direction: column;
  width: 240px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 8px;
  box-sizing: border-box;
}

body.dark .theme-dropdown-menu,
.dark .theme-dropdown-menu {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  color: #f8fafc;
}

.theme-dropdown-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  padding: 8px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f1f5f9;
}

body.dark .theme-dropdown-header,
.dark .theme-dropdown-header {
  color: #94a3b8;
  border-bottom-color: #334155;
}

.theme-menu-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.theme-menu-item:last-child {
  margin-bottom: 0;
}

body.dark .theme-menu-item,
.dark .theme-menu-item {
  color: #e2e8f0;
}

.theme-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

body.dark .theme-menu-item:hover,
.dark .theme-menu-item:hover {
  background: #334155;
  color: #ffffff;
}

.theme-menu-item.active {
  background: #eef2ff;
  color: #4f46e5;
}

body.dark .theme-menu-item.active,
.dark .theme-menu-item.active {
  background: rgba(79, 70, 229, 0.2);
  color: #818cf8;
}

.theme-item-icon {
  font-size: 18px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.theme-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.theme-item-text small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 4px;
}

.theme-check {
  font-size: 16px;
  font-weight: bold;
  opacity: 0;
  color: #4f46e5;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

body.dark .theme-check {
  color: #818cf8;
}

.theme-menu-item.active .theme-check {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   MEGA SELECTOR: UNIVERSAL APPLE THEME OVERRIDE
   Forces all local modules (Acc.Pay, Receipt, Master, Settings, User) to respect Apple Theme background
   ========================================================================== */

/* Universal Page Wrappers in Acc.Pay & Other Submenus */
body.theme-apple .ca-container,
body.theme-apple .cac-container,
body.theme-apple .tx-wrapper,
body.theme-apple .ju-wrapper,
body.theme-apple .bb-container,
body.theme-apple .kb-container,
body.theme-apple .mb-container,
body.theme-apple .ji-wrapper,
body.theme-apple .sji-wrapper,
body.theme-apple .ttd-wrapper,
body.theme-apple .mu-wrapper,
body.theme-apple .mu-dashboard-container,
body.theme-apple .mc-wrapper,
body.theme-apple .mc-dashboard-container,
body.theme-apple .mk-wrapper,
body.theme-apple .mk-dashboard-container {
    background: transparent !important;
    color: #1e293b !important;
}

/* Universal Card, Form & Search Card Background for Apple Theme */
body.theme-apple .bank-item-card, body.theme-apple .bb-card, body.theme-apple .card, body.theme-apple .chart-card, body.theme-apple .chat-msg-file-card, body.theme-apple .checklist-card, body.theme-apple .dash-card, body.theme-apple .dept-card, body.theme-apple .dokumen-card, body.theme-apple .em-card, body.theme-apple .error-card, body.theme-apple .finance-card, body.theme-apple .ji-card, body.theme-apple .journal-card, body.theme-apple .kpi-card, body.theme-apple .lg-card, body.theme-apple .login-card, body.theme-apple .ls-card, body.theme-apple .m-card, body.theme-apple .mc-doc-card, body.theme-apple .mc-regional-card, body.theme-apple .mc-search-card, body.theme-apple .md-card, body.theme-apple .mk-breakdown-card, body.theme-apple .mk-card, body.theme-apple .mk-search-card, body.theme-apple .ml-card, body.theme-apple .modern-card, body.theme-apple .ms-card, body.theme-apple .msp-card, body.theme-apple .mtu-card, body.theme-apple .mu-breakdown-card, body.theme-apple .mu-card, body.theme-apple .mu-photo-card, body.theme-apple .mu-search-card, body.theme-apple .p-card, body.theme-apple .page-card, body.theme-apple .quick-nav-card, body.theme-apple .rd-subcard, body.theme-apple .sewa-tipe-card, body.theme-apple .sf-card, body.theme-apple .sheet-photo-card, body.theme-apple .sji-card, body.theme-apple .so-card, body.theme-apple .sod-card, body.theme-apple .sr-card, body.theme-apple .ttd-card, body.theme-apple .tx-card, body.theme-apple .tx-search-card, body.theme-apple .unit-info-card, body.theme-apple .ca-card, body.theme-apple .ca-search-form, body.theme-apple .cac-card, body.theme-apple .cac-search-form, body.theme-apple .ju-card, body.theme-apple .ju-search-card, body.theme-apple .bb-search-card, body.theme-apple .kb-search-card, body.theme-apple .mb-card, body.theme-apple .search-box, body.theme-apple .filter-box, body.theme-apple .mu-stat-card-compact, body.theme-apple .mc-stat-card-compact, body.theme-apple .mk-stat-card-compact {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(240, 244, 255, 0.55) 50%, rgba(253, 242, 250, 0.58) 100%) !important;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.78) 0%, rgba(240, 244, 255, 0.55) 50%, rgba(253, 242, 250, 0.58) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.68) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
    color: #1e293b !important;
}

body.theme-apple .mu-stat-card-compact:hover,
body.theme-apple .mc-stat-card-compact:hover,
body.theme-apple .mk-stat-card-compact:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.90) 0%, rgba(235, 242, 255, 0.70) 50%, rgba(253, 240, 250, 0.75) 100%) !important;
    box-shadow: 0 12px 36px rgba(31, 38, 135, 0.14) !important;
}

body.theme-apple .mu-page-title,
body.theme-apple .mu-search-card-row1 h2,
body.theme-apple .mk-page-title,
body.theme-apple .mc-page-title,
body.theme-apple .mu-breakdown-card-title,
body.theme-apple .mk-breakdown-card-title,
body.theme-apple .mc-regional-card-title {
    color: #1e293b !important;
}

body.theme-apple .mu-stat-val-sm,
body.theme-apple .mc-stat-val-sm,
body.theme-apple .mk-stat-val-sm {
    color: #1e293b !important;
}

body.theme-apple .mu-stat-lbl-sm,
body.theme-apple .mc-stat-lbl-sm,
body.theme-apple .mk-stat-lbl-sm {
    color: #475569 !important;
}

body.theme-apple .mu-input,
body.theme-apple .mc-input,
body.theme-apple .mk-input {
    background: rgba(255, 255, 255, 0.78) !important;
    border-color: rgba(209, 213, 219, 0.80) !important;
    color: #1e293b !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* Summary Boxes & Stats Banners (Total hasil filter, TOTAL DEBIT/KREDIT, TOTAL SALDO AWAL) */
body.theme-apple .tx-stats {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82) 0%, rgba(224, 231, 255, 0.70) 35%, rgba(253, 242, 248, 0.70) 70%, rgba(240, 253, 244, 0.75) 100%) !important;
    backdrop-filter: blur(22px) !important;
    -webkit-backdrop-filter: blur(22px) !important;
    border: 1px solid rgba(255, 255, 255, 0.80) !important;
    box-shadow: 0 10px 32px rgba(31, 38, 135, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    color: #1e293b !important;
}
body.theme-apple .tx-stats-label {
    color: #475569 !important;
    opacity: 1 !important;
    font-weight: 700 !important;
}
body.theme-apple .tx-stats-value {
    color: #1e293b !important;
}
body.theme-apple .tx-stats-divider {
    background: rgba(209, 213, 219, 0.60) !important;
}
body.theme-apple .summary-box,
body.theme-apple .saldo-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.70), rgba(240, 244, 255, 0.45)) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.06) !important;
}
body.theme-apple .summary-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(240, 244, 255, 0.65) 100%) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    box-shadow: 0 4px 14px rgba(31, 38, 135, 0.08) !important;
    color: #1e293b !important;
}
body.theme-apple .summary-item small {
    color: #475569 !important;
    font-weight: 600 !important;
}
body.theme-apple .summary-item div {
    color: #1e293b !important;
}

/* Universal Table Wrapper Background */
body.theme-apple table.tx-table, body.theme-apple table.table, body.theme-apple table.checklist-table, body.theme-apple table.detail-table, body.theme-apple table.em-table, body.theme-apple table.info-table, body.theme-apple table.item-table, body.theme-apple table.ji-table, body.theme-apple table.list-table, body.theme-apple table.m-table, body.theme-apple table.main-table, body.theme-apple table.md-table, body.theme-apple table.meta-table, body.theme-apple table.mini-table, body.theme-apple table.mk-table, body.theme-apple table.ml-table, body.theme-apple table.ms-table, body.theme-apple table.msp-table, body.theme-apple table.mtu-table, body.theme-apple table.mu-table, body.theme-apple table.realisasi-table, body.theme-apple table.report-table, body.theme-apple table.sig-table, body.theme-apple table.signature-table, body.theme-apple table.sji-table, body.theme-apple table.so-table, body.theme-apple table.sod-table, body.theme-apple table.sr-table, body.theme-apple table.top-header-table, body.theme-apple table.ttd-table, body.theme-apple table.ca-table, body.theme-apple table.cac-table, body.theme-apple table.ju-table, body.theme-apple table.bb-table, body.theme-apple table.kb-table, body.theme-apple table.mb-table, body.theme-apple table.table-modern {
    background: rgba(255, 255, 255, 0.40) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* Make table headers and rows translucent so the glass effect shows through */
body.theme-apple table th {
    background: rgba(255, 255, 255, 0.75) !important;
    color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.50) !important;
}
body.theme-apple table td {
    background: transparent !important;
    color: #1e293b !important;
    border-color: rgba(209, 213, 219, 0.40) !important;
}
body.theme-apple table tr,
body.theme-apple table tbody tr,
body.theme-apple table td,
body.theme-apple table tbody tr td {
    transition: background 0.1s ease !important;
}

body.theme-apple table tr:hover td,
body.theme-apple table tbody tr:hover td,
body.theme-apple table tbody tr:hover,
body.theme-apple table tr:hover {
    background: rgba(59, 130, 246, 0.14) !important;
    box-shadow: none !important;
}

/* ==========================================================================
   STRONGER BACKGROUND FOR MODALS IN APPLE THEME
   Modals need to be less transparent than normal cards because they sit on top of dark overlays
   ========================================================================== */
body.theme-apple .em-modal-content, 
body.theme-apple .md-modal-content, 
body.theme-apple .ml-modal-content, 
body.theme-apple .modal-content, 
body.theme-apple .ms-modal-content, 
body.theme-apple .ms-modal-content-lg, 
body.theme-apple .msp-modal-content, 
body.theme-apple .mtu-modal-content, 
body.theme-apple .sewa-modal-content, 
body.theme-apple .tx-modal-content,
body.theme-apple .ji-modal-box,
body.theme-apple .m-modal-box,
body.theme-apple .sr-modal-content,
body.theme-apple .modal-detail-bank,
body.theme-apple .modal-dialog,
body.theme-apple .modal-card,
body.theme-apple .modal-box,
body.theme-apple .popup-content,
body.theme-apple .popup-box,
body.theme-apple .dialog-content,
body.theme-apple .custom-modal,
body.theme-apple .form-modal,
body.theme-apple .modal-inner,
body.theme-apple [class*="modal-content"],
body.theme-apple [class*="modal-box"] {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(224, 231, 255, 0.88) 35%, rgba(253, 242, 248, 0.88) 70%, rgba(240, 253, 244, 0.90) 100%) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
    color: #1e293b !important;
}

/* ==========================================================================
   APPLE THEME - NAVBAR & MENU NAVIGATION OVERRIDE
   Applies Apple frosted glass gradient & translucent styling to top navbar
   ========================================================================== */
body.theme-apple .navbar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84) 0%, rgba(235, 242, 255, 0.65) 35%, rgba(253, 242, 250, 0.65) 70%, rgba(240, 253, 244, 0.70) 100%) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(255, 255, 255, 0.80) !important;
  box-shadow: 0 10px 32px rgba(31, 38, 135, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

body.theme-apple .nav-links li a,
body.theme-apple .nav-links li span {
  color: #1e293b !important;
  transition: all 0.2s ease !important;
}

body.theme-apple .nav-links li a:hover,
body.theme-apple .nav-links li span:hover,
body.theme-apple .nav-links li:hover > a,
body.theme-apple .nav-links li:hover > span {
  background: rgba(255, 255, 255, 0.70) !important;
  color: #2563eb !important;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.12) !important;
}

body.theme-apple .nav-links li a.active,
body.theme-apple .nav-links li span.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
}

body.theme-apple .submenu {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(240, 244, 255, 0.85) 50%, rgba(253, 242, 250, 0.88) 100%) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 15px 35px rgba(31, 38, 135, 0.15) !important;
  border-radius: 14px !important;
}

body.theme-apple .submenu li a {
  color: #1e293b !important;
}

body.theme-apple .submenu li a:hover {
  background: rgba(255, 255, 255, 0.75) !important;
  color: #2563eb !important;
}

body.theme-apple .nav-tema,
body.theme-apple .nav-notif,
body.theme-apple .nav-toggle {
  background: rgba(255, 255, 255, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  color: #1e293b !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

body.theme-apple .nav-tema:hover,
body.theme-apple .nav-notif:hover,
body.theme-apple .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.90) !important;
  color: #2563eb !important;
}

@media (max-width: 768px) {
  body.theme-apple .nav-links.show {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94) 0%, rgba(235, 242, 255, 0.88) 50%, rgba(253, 242, 250, 0.90) 100%) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15) !important;
    border-radius: 16px !important;
  }
}

/* ==========================================================================
   APPLE THEME - MOBILE TABLE CARDS
   Overrides all hardcoded white/grey backgrounds on mobile card-style rows
   ========================================================================== */
@media (max-width: 768px) {

    /* Global #myTable2 mobile rows */
    body.theme-apple #myTable2 tr {
        background: linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.50)) !important;
        backdrop-filter: blur(18px) !important;
        -webkit-backdrop-filter: blur(18px) !important;
        border: 1px solid rgba(255,255,255,0.60) !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
    }
    body.theme-apple #myTable2 tr:hover {
        background: linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.68)) !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    }
    body.theme-apple #myTable2 td {
        background: transparent !important;
        border-bottom: 1px solid rgba(255,255,255,0.40) !important;
    }
    body.theme-apple #myTable2 td::before {
        color: #6b7280 !important;
    }
    body.theme-apple #myTable2 td span {
        color: #1e293b !important;
    }

    /* Row variants */
    body.theme-apple .row-progress td {
        background: rgba(255,255,255,0.25) !important;
    }
    body.theme-apple .row-action td {
        background: rgba(255,255,255,0.18) !important;
    }

    /* Module-specific wrappers that use their own table IDs/classes */
    /* ji-wrapper, sji-wrapper, tx-wrapper, mu-wrapper, etc. */
    body.theme-apple [class$="-wrapper"] table tr,
    body.theme-apple [class*="-wrapper"] #myTable2 tr {
        background: linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.50)) !important;
        backdrop-filter: blur(18px) !important;
        -webkit-backdrop-filter: blur(18px) !important;
        border: 1px solid rgba(255,255,255,0.55) !important;
        box-shadow: 0 4px 14px rgba(0,0,0,0.07) !important;
    }
    body.theme-apple [class$="-wrapper"] table tr:hover,
    body.theme-apple [class*="-wrapper"] #myTable2 tr:hover,
    body.theme-apple [class$="-wrapper"] table tbody tr:hover td,
    body.theme-apple [class*="-wrapper"] #myTable2 tbody tr:hover td {
        background: rgba(59, 130, 246, 0.14) !important;
        box-shadow: none !important;
    }
    body.theme-apple [class$="-wrapper"] table td,
    body.theme-apple [class*="-wrapper"] #myTable2 td {
        background: transparent !important;
        border-bottom: 1px solid rgba(255,255,255,0.35) !important;
        color: #1e293b !important;
    }
    body.theme-apple [class$="-wrapper"] table td::before,
    body.theme-apple [class*="-wrapper"] #myTable2 td::before {
        color: #6b7280 !important;
    }

    /* Summary boxes */
    body.theme-apple .summary-box {
        background: linear-gradient(135deg, rgba(255,255,255,0.65), rgba(255,255,255,0.42)) !important;
        backdrop-filter: blur(14px) !important;
        -webkit-backdrop-filter: blur(14px) !important;
        border: 1px solid rgba(255,255,255,0.50) !important;
    }
    body.theme-apple .summary-item {
        background: linear-gradient(135deg, rgba(255,255,255,0.80), rgba(255,255,255,0.58)) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255,255,255,0.55) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06) !important;
    }
}

/* ==========================================================================
   Ambient background glow - Solid background (Global)
   ========================================================================== */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg, #f1f5f9);
    transition: background 0.3s ease;
}

body.dark .glow-bg {
    background: var(--bg, #0f172a);
}

.blob {
    display: none;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(8%, 5%) scale(1.1) rotate(180deg); }
    100% { transform: translate(-5%, 8%) scale(0.95) rotate(360deg); }
}

body.theme-apple .glow-bg {
  background: radial-gradient(circle at 15% 25%, rgba(252, 165, 165, 0.65), transparent 45%),
              radial-gradient(circle at 85% 30%, rgba(167, 139, 250, 0.60), transparent 45%),
              radial-gradient(circle at 50% 75%, rgba(96, 165, 250, 0.55), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(251, 207, 232, 0.55), transparent 45%),
              #f0fdfa !important;
  background-size: 160% 160% !important;
  animation: macFlow 20s ease-in-out infinite alternate !important;
  will-change: background-position !important;
  transform: translateZ(0) !important;
}

body.theme-apple .glow-bg .blob {
  display: block !important;
  opacity: 0.65 !important;
  filter: blur(70px) !important;
  will-change: transform, opacity !important;
  transform: translateZ(0) !important;
}
/* Modern Tabs Navigation Bar (Shared across modules) */
.ms-tabs-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ms-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.ms-tab-btn {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.25s ease;
    scroll-margin: 0 20px;
}

.ms-tab-btn:hover {
    color: var(--text-main);
    background-color: var(--border);
}

.ms-tab-btn.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

@media (max-width: 640px) {
    .ms-tabs-wrapper { 
        padding: 6px; 
        border-radius: 10px;
        padding-right: 24px; 
    }
    .ms-tab-btn { 
        flex: 0 0 auto; 
        min-width: 120px;
        padding: 10px 14px; 
    }
}
