/* ═══════════════════════════════════════════════════════════════
   MOBILE / SMALL SCREEN GLOBAL FIXES
   ═══════════════════════════════════════════════════════════════ */

/* Make all Bootstrap tables horizontally scrollable on small screens */
@media (max-width: 767px) {
  table.table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Disable sidebar slide-in animation on mobile — off-canvas uses CSS transitions */
  .sidebar {
    animation: none !important;
  }
  /* Prevent cards from having excessive horizontal padding */
  .card-body {
    padding: 0.85rem !important;
  }
  /* Make button groups stack on very small screens */
  .btn-group-mobile-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }
  /* Form rows: stack cols on mobile */
  .row.g-3 > [class*="col-md-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Tap target size — all buttons at least 44px tall on touch devices */
@media (hover: none) and (pointer: coarse) {
  .btn { min-height: 44px; }
  .nav-link { min-height: 44px; }
  select.form-select { min-height: 44px; }
  input.form-control { min-height: 44px; }
}

/* ═══════════════════════════════════════════════════════════════
   END MOBILE FIXES
   ═══════════════════════════════════════════════════════════════ */

/* Dark mode: override animation shadows and brightness for fadeIn/fadeInUp/fadeInDown */
[data-theme="dark"] .glass,
[data-theme="dark"] .card,
[data-theme="dark"] .dashboard-title,
[data-theme="dark"] .main-content-wrapper,
[data-theme="dark"] .btn,
[data-theme="dark"] .table,
[data-theme="dark"] .alert-success,
[data-theme="dark"] .alert-danger {
  box-shadow: 0 2px 16px 0 rgba(24,24,27,0.45) !important;
  text-shadow: 0 2px 12px rgba(24,24,27,0.18) !important;
  filter: brightness(0.92) !important;
}
[data-theme="dark"] .glass {
  background: rgba(24,24,27,0.92);
}
[data-theme="dark"] .card {
  background: rgba(36,37,46,0.98) !important;
}
[data-theme="dark"] .dashboard-title {
  color: #a5b4fc;
}
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-success, [data-theme="dark"] .btn-danger {
  background: #232946 !important;
  color: #f3f4f6 !important;
  box-shadow: 0 2px 12px 0 rgba(54,54,64,0.18) !important;
}
[data-theme="dark"] .table {
  background: rgba(36,37,46,0.98);
  color: #f3f4f6;
}

/* ==========================================================================
   RESPONSIVE APP SHELL AND MODULE SURFACES
   ========================================================================== */

* {
  min-width: 0;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.dashboard-title {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.modern-card,
.form-panel,
.report-card,
.hub-action-card,
.acct-tab-card,
.kpi-card {
  max-width: 100%;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.table-responsive table,
table.table {
  min-width: 680px;
}

.receipt-shell,
.accounting-module,
.settings-section,
.modern-form,
.card {
  overflow-wrap: anywhere;
}

@media (max-width: 1199px) {
  .dashboard-title {
    font-size: clamp(1.25rem, 2.4vw, 1.85rem) !important;
  }

  .hub-action-card,
  .acct-tab-card,
  .report-card {
    min-height: auto;
  }
}

@media (max-width: 991px) {
  body {
    overflow-x: hidden;
  }

  .container,
  .container-fluid {
    max-width: 100% !important;
  }

  .top-actions {
    gap: 0.45rem !important;
  }

  .company-switcher {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 45vw;
  }

  .company-switcher .form-select {
    min-width: 0 !important;
    width: 100%;
  }

  .command-panel {
    margin-top: 4rem !important;
    width: calc(100vw - 1rem) !important;
    max-height: calc(100vh - 4.5rem) !important;
    border-radius: 12px !important;
  }

  .command-results {
    max-height: calc(100vh - 11rem) !important;
  }

  .command-item {
    align-items: flex-start !important;
  }
}

@media (max-width: 767px) {
  .main-content-wrapper {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .d-flex.justify-content-between,
  .d-flex.align-items-start.justify-content-between,
  .d-flex.align-items-center.justify-content-between {
    align-items: stretch !important;
  }

  .d-flex.justify-content-between > .d-flex,
  .d-flex.align-items-start.justify-content-between > .d-flex,
  .d-flex.align-items-center.justify-content-between > .d-flex {
    width: 100%;
  }

  .btn,
  .form-control,
  .form-select {
    font-size: 0.92rem;
  }

  .btn {
    white-space: normal;
  }

  .row {
    --bs-gutter-x: 0.85rem;
  }

  .card,
  .modern-card,
  .form-panel,
  .report-card {
    border-radius: 12px !important;
  }

  .card.p-3,
  .modern-card.p-3,
  .form-panel {
    padding: 0.9rem !important;
  }

  .table-responsive {
    border-radius: 10px;
  }

  .table th,
  .table td {
    white-space: nowrap;
  }

  .accounting-module .table th,
  .accounting-module .table td,
  .mod-table th,
  .mod-table td {
    padding: 0.58rem 0.65rem !important;
    font-size: 0.82rem !important;
  }

  .command-search-row {
    padding: 0.72rem 0.8rem !important;
  }

  .command-search-row input {
    font-size: 0.92rem !important;
  }

  .command-item {
    padding: 0.65rem !important;
  }

  .command-icon {
    flex-basis: 34px !important;
    height: 34px !important;
    width: 34px !important;
  }
}

@media (max-width: 575px) {
  .top-actions {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }

  .company-switcher {
    max-width: 38vw;
    padding: 0.22rem 0.35rem !important;
  }

  .company-switcher i {
    display: none;
  }

  .top-icon-btn,
  #mobile-menu-btn,
  .global-search-trigger {
    flex: 0 0 40px;
    height: 40px !important;
    width: 40px !important;
  }

  .user-chip {
    display: none !important;
  }

  .dashboard-title {
    font-size: 1.28rem !important;
  }

  .btn {
    width: 100%;
  }

  .no-print .btn,
  .top-actions .btn,
  .top-actions button,
  .command-close,
  .sidebar button {
    width: auto;
  }

  .d-flex.gap-2,
  .d-flex.gap-3 {
    gap: 0.45rem !important;
  }

  .d-flex.gap-2.flex-wrap > *,
  .d-flex.gap-3.flex-wrap > * {
    flex: 1 1 100%;
  }

  .receipt-meta {
    font-size: 0.82rem !important;
  }

  .items-table {
    min-width: 560px;
  }

  .command-panel {
    margin-top: 3.75rem !important;
  }

  .command-meta {
    padding-left: 0.8rem !important;
    padding-right: 0.8rem !important;
  }
}

@media (max-width: 420px) {
  .company-switcher {
    max-width: 34vw;
  }

  .company-switcher .form-select {
    font-size: 0.72rem !important;
  }

  .main-content-wrapper {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }
}
[data-theme="dark"] .table-hover tbody tr:hover {
  background: #232946;
}
[data-theme="dark"] .alert-success {
  background: linear-gradient(90deg, #232946 0%, #3730a3 100%);
  color: #a7f3d0;
}
[data-theme="dark"] .alert-danger {
  background: linear-gradient(90deg, #232946 0%, #991b1b 100%);
  color: #fecaca;
}
/* Remove default vertical padding from all containers */
.container, .container-fluid {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Animated background for all pages, light and dark mode */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: linear-gradient(270deg, #6366f1, #a7f3d0, #f8fafc, #f472b6, #6366f1);
  background-size: 400% 400%;
  animation: gradientBG 16s ease infinite;
  overflow: hidden;
}

[data-theme="dark"] .animated-bg {
  background: linear-gradient(270deg, #18181b, #3730a3, #232946, #6366f1, #18181b);
}

.animated-bg .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.18;
  filter: blur(2px);
  animation: floatShape 12s ease-in-out infinite alternate;
}
.animated-bg .shape1 { width: 180px; height: 180px; background: #6366f1; top: 8%; left: 10%; animation-delay: 0s; }
.animated-bg .shape2 { width: 120px; height: 120px; background: #f472b6; top: 60%; left: 70%; animation-delay: 2s; }
.animated-bg .shape3 { width: 90px; height: 90px; background: #a7f3d0; top: 30%; left: 80%; animation-delay: 4s; }
.animated-bg .shape4 { width: 140px; height: 140px; background: #3730a3; top: 75%; left: 20%; animation-delay: 6s; }
.animated-bg .shape5 { width: 70px; height: 70px; background: #6366f1; top: 50%; left: 40%; animation-delay: 8s; }

[data-theme="dark"] .animated-bg .shape1 { background: #3730a3; }
[data-theme="dark"] .animated-bg .shape2 { background: #6366f1; }
[data-theme="dark"] .animated-bg .shape3 { background: #232946; }
[data-theme="dark"] .animated-bg .shape4 { background: #18181b; }
[data-theme="dark"] .animated-bg .shape5 { background: #6366f1; }

/* Glass and card backgrounds for dark mode */
.glass {
  background: rgba(255,255,255,0.92);
  /* ...existing code... */
}
[data-theme="dark"] .glass {
  background: rgba(24,24,27,0.92);
  color: #f3f4f6;
}
.card {
  /* ...existing code... */
}
[data-theme="dark"] .card {
  background: rgba(36,37,46,0.98) !important;
  color: #f3f4f6;
}

@keyframes floatShape {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-40px) scale(1.1); }
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body {
  min-height: 100vh;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  color: #232946;
  background: #fff !important;
  background-size: initial !important;
  animation: none !important;
  transition: none !important;
}

@keyframes gradientBG {
  0% {background-position: 0% 50%;}
  25% {background-position: 50% 100%;}
  50% {background-position: 100% 50%;}
  75% {background-position: 50% 0%;}
  100% {background-position: 0% 50%;}
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 220px; /* Must match .main-content-wrapper margin-left and navbar.html */
  background: linear-gradient(135deg, #3730a3 0%, #6366f1 100%);
  color: #fff;
  padding-top: 0;
  z-index: 1000;
  box-shadow: 2px 0 32px 0 rgba(54,102,241,0.12);
  /* Remove top border-radius for flush top */
  border-top-right-radius: 0;
  border-bottom-right-radius: 2.5rem;
  animation: slideInLeft 0.7s cubic-bezier(.77,0,.18,1) 1;
  overflow-x: hidden;
}
@keyframes slideInLeft {
  0% { transform: translateX(-100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.sidebar .sidebar-header {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
  letter-spacing: 2.5px;
  text-shadow: 0 2px 12px rgba(54,48,163,0.18);
  animation: fadeInDown 1s cubic-bezier(.77,0,.18,1) 1;
}
@keyframes fadeInDown {
  0% { transform: translateY(-40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.sidebar .nav-link {
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.8rem;
  border-radius: 1rem;
  padding: 0.85rem 1.4rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, color 0.2s;
  letter-spacing: 0.7px;
  font-size: 1.13rem;
  box-shadow: 0 2px 12px 0 rgba(99,102,241,0.06);
  position: relative;
  overflow: hidden;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover {
  background: rgba(255,255,255,0.22);
  color: #ffe066;
  transform: scale(1.07);
  box-shadow: 0 6px 24px 0 rgba(99,102,241,0.18);
}
.sidebar .nav-link.active::before, .sidebar .nav-link:hover::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: #ffe066;
  border-radius: 5px;
  animation: fadeInBar 0.3s;
}
@keyframes fadeInBar {
  0% { height: 0; }
  100% { height: 100%; }
}
.sidebar .mt-auto .nav-link {
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1.05rem;
  margin-top: 1.5rem;
  padding: 0.7rem 1.2rem;
}
.glass {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.18);
  backdrop-filter: blur(12px);
  border-radius: 2rem;
  border: 1.5px solid rgba(255,255,255,0.35);
  padding: 2.2rem 2.7rem;
  margin-bottom: 2.2rem;
  animation: fadeInUp 0.8s cubic-bezier(.77,0,.18,1) 1;
}
@keyframes fadeInUp {
  0% { transform: translateY(40px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.btn, .form-control, .table {
  border-radius: 1rem !important;
  transition: box-shadow 0.2s, border 0.2s, background 0.2s;
}
.btn-primary, .btn-success, .btn-danger {
  box-shadow: 0 2px 12px 0 rgba(99,102,241,0.10);
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  animation: fadeInUp 0.7s cubic-bezier(.77,0,.18,1) 1;
}
.btn:hover, .btn:focus {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 24px 0 rgba(99,102,241,0.18);
  background: #6366f1 !important;
  color: #fff !important;
}
.modern-animate {
  animation: fadeInUp 0.7s cubic-bezier(.77,0,.18,1) 1;
  transition: box-shadow 0.2s, border 0.2s, background 0.2s, transform 0.2s;
}
.modern-animate:focus {
  box-shadow: 0 0 0 3px #6366f1 !important;
  border-color: #6366f1 !important;
  transform: scale(1.03);
}
.table {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 2px 16px 0 rgba(31, 38, 135, 0.10);
  font-size: 1.04rem;
}
.table thead th {
  background: #6366f1;
  color: #fff;
  border: none;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.table-hover tbody tr:hover {
  background: #e0e7ff;
}
::-webkit-scrollbar {
  width: 8px;
  background: #e0e7ff;
}
::-webkit-scrollbar-thumb {
  background: #6366f1;
  border-radius: 4px;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px #6366f1 !important;
}
.card {
  border-radius: 1.2rem !important;
  box-shadow: 0 2px 16px 0 rgba(99,102,241,0.10);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 32px 0 rgba(99,102,241,0.18);
}
.dashboard-title {
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #3730a3;
  margin-bottom: 0.7rem;
  font-size: 2.1rem;
  text-shadow: 0 2px 12px rgba(99,102,241,0.08);
  animation: fadeInDown 1s cubic-bezier(.77,0,.18,1) 1;
}
.alert-success {
  background: linear-gradient(90deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: none;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.alert-danger {
  background: linear-gradient(90deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: none;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.form-shell {
  max-width: 760px;
  margin: 0 auto;
}

.form-panel {
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(99,102,241,0.16);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(31,38,135,0.10);
  padding: 1.5rem;
}

.form-panel .form-label {
  color: #334155;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.form-panel .form-text {
  color: #64748b;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}

.form-actions .btn {
  min-height: 42px;
}

.modern-form {
  --form-gap: 0.95rem;
}

.modern-form p {
  margin: 0 0 var(--form-gap);
  min-width: 0;
}

.modern-form label,
.modern-field label,
.modern-form .form-label {
  display: block;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  overflow-wrap: anywhere;
}

.modern-form input:not([type="checkbox"]):not([type="radio"]),
.modern-form select,
.modern-form textarea,
.modern-field input:not([type="checkbox"]):not([type="radio"]),
.modern-field select,
.modern-field textarea {
  width: 100%;
  min-height: 42px;
  border-radius: 9px !important;
  font-size: 0.9rem;
}

.modern-form input[type="checkbox"],
.modern-field input[type="checkbox"] {
  margin-right: 0.45rem;
}

.modern-form .helptext,
.modern-field .form-text,
.modern-help {
  display: block;
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.77rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.modern-form ul.errorlist,
.modern-field .text-danger {
  margin-top: 0.3rem;
}

.modern-section-title {
  color: #1e293b;
  font-size: 0.93rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
}

.modern-section-copy {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.45;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}

.modern-card {
  border: 1px solid rgba(99,102,241,0.12);
  border-radius: 10px !important;
  box-shadow: 0 4px 20px rgba(99,102,241,0.07);
}

.modern-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.modern-actions .btn {
  min-height: 42px;
  white-space: normal;
}

form:not(.company-switcher) {
  min-width: 0;
}

.card:has(form:not(.company-switcher)),
.form-panel,
.settings-section {
  background: linear-gradient(135deg, rgba(248,250,252,0.98), rgba(238,242,255,0.94)) !important;
  border: 1px solid rgba(99,102,241,0.14) !important;
  border-radius: 10px !important;
}

.card:has(form:not(.company-switcher)) .card,
.card:has(form:not(.company-switcher)) .settings-section {
  background: rgba(255,255,255,0.58) !important;
}

form:not(.company-switcher) p {
  min-width: 0;
  overflow-wrap: anywhere;
}

form:not(.company-switcher) label,
form:not(.company-switcher) .form-label {
  color: #334155;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  overflow-wrap: anywhere;
}

form:not(.company-switcher) input:not([type="checkbox"]):not([type="radio"]),
form:not(.company-switcher) select,
form:not(.company-switcher) textarea {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  border-radius: 9px !important;
  border-color: rgba(99,102,241,0.22);
  background: rgba(255,255,255,0.76);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

form:not(.company-switcher) textarea {
  min-height: 86px;
}

form:not(.company-switcher) .helptext,
form:not(.company-switcher) .form-text {
  display: block;
  margin-top: 0.28rem;
  color: #64748b;
  font-size: 0.77rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

form:not(.company-switcher) .btn {
  white-space: normal;
  min-height: 42px;
}

.table-responsive {
  border-radius: 9px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.field-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

@media (max-width: 767px) {
  .field-grid,
  .field-grid-3 {
    grid-template-columns: 1fr;
  }
}

.errorlist {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  color: #b91c1c;
  font-size: 0.9rem;
}

[data-theme="dark"] .form-panel {
  background: rgba(24,24,27,0.94);
  border-color: rgba(165,180,252,0.18);
}

[data-theme="dark"] .form-panel .form-label {
  color: #e5e7eb;
}

[data-theme="dark"] .modern-form label,
[data-theme="dark"] .modern-field label,
[data-theme="dark"] .modern-form .form-label,
[data-theme="dark"] .modern-section-title {
  color: #e5e7eb;
}

[data-theme="dark"] .modern-form .helptext,
[data-theme="dark"] .modern-field .form-text,
[data-theme="dark"] .modern-help,
[data-theme="dark"] .modern-section-copy {
  color: #94a3b8;
}

[data-theme="dark"] .card:has(form:not(.company-switcher)),
[data-theme="dark"] .form-panel,
[data-theme="dark"] .settings-section {
  background: linear-gradient(135deg, rgba(24,24,27,0.98), rgba(30,41,59,0.94)) !important;
  border-color: rgba(165,180,252,0.18) !important;
}

[data-theme="dark"] form:not(.company-switcher) label,
[data-theme="dark"] form:not(.company-switcher) .form-label {
  color: #e5e7eb;
}

[data-theme="dark"] form:not(.company-switcher) input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] form:not(.company-switcher) select,
[data-theme="dark"] form:not(.company-switcher) textarea {
  background: rgba(15,23,42,0.78);
  border-color: rgba(165,180,252,0.26);
  color: #e5e7eb;
}

[data-theme="dark"] form:not(.company-switcher) .helptext,
[data-theme="dark"] form:not(.company-switcher) .form-text {
  color: #94a3b8;
}

/* Accounting module */
.accounting-module {
  --acct-ink: #0f172a;
  --acct-muted: #475569;
  --acct-border: rgba(15, 118, 110, 0.18);
  --acct-panel: linear-gradient(135deg, rgba(240,253,250,0.96), rgba(238,242,255,0.94));
  --acct-panel-strong: linear-gradient(135deg, rgba(204,251,241,0.72), rgba(224,231,255,0.84));
  --acct-table: rgba(248,250,252,0.96);
}

.accounting-module .dashboard-title {
  color: #0f766e;
  text-shadow: none;
}

.accounting-module .text-muted,
.accounting-module .modern-section-copy,
.accounting-module .modern-help {
  color: var(--acct-muted) !important;
}

.accounting-module .card,
.accounting-module .modern-card,
.accounting-module .form-panel {
  background: var(--acct-panel) !important;
  border: 1px solid var(--acct-border) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.10) !important;
  color: var(--acct-ink);
}

.accounting-module .acct-stat {
  min-height: 112px;
  position: relative;
  overflow: hidden;
}

.accounting-module .acct-stat::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #14b8a6, #6366f1, #f59e0b);
}

.accounting-module .acct-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.accounting-module .acct-tab-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  min-height: 148px;
  padding: 1.2rem;
  text-decoration: none;
  background: var(--acct-panel-strong) !important;
  border: 1px solid rgba(99,102,241,0.18) !important;
  border-radius: 10px !important;
  color: var(--acct-ink);
  box-shadow: 0 8px 24px rgba(99,102,241,0.11);
}

.accounting-module .acct-tab-card:hover {
  transform: translateY(-2px);
  color: var(--acct-ink);
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.18);
}

.accounting-module .acct-tab-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: 0 0 auto;
  font-size: 1.35rem;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.accounting-module .acct-tab-card:nth-child(2n) .acct-tab-icon {
  background: linear-gradient(135deg, #4f46e5, #818cf8);
}

.accounting-module .acct-tab-card:nth-child(3n) .acct-tab-icon {
  background: linear-gradient(135deg, #b45309, #f59e0b);
}

.accounting-module .acct-tab-card h5 {
  margin: 0 0 0.35rem;
  color: #134e4a;
  font-weight: 850;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.accounting-module .acct-tab-card p {
  color: #475569 !important;
  font-size: 0.84rem;
  line-height: 1.4;
}

.accounting-module .modern-form input:not([type="checkbox"]):not([type="radio"]),
.accounting-module .modern-form select,
.accounting-module .modern-form textarea,
.accounting-module .modern-field input:not([type="checkbox"]):not([type="radio"]),
.accounting-module .modern-field select,
.accounting-module .modern-field textarea,
.accounting-module .form-control,
.accounting-module .form-select {
  background: rgba(255,255,255,0.72) !important;
  border-color: rgba(15,118,110,0.24) !important;
  color: #0f172a !important;
}

.accounting-module .modern-form label,
.accounting-module .modern-field label,
.accounting-module .modern-section-title {
  color: #0f766e !important;
}

.accounting-module .table {
  background: var(--acct-table) !important;
  box-shadow: none;
}

.accounting-module .table thead th {
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
  vertical-align: middle;
}

.accounting-module .table tbody tr {
  background: rgba(255,255,255,0.62);
}

.accounting-module .alert-info {
  background: rgba(20,184,166,0.12);
  border: 1px solid rgba(20,184,166,0.25);
  color: #134e4a;
}

@media (max-width: 900px) {
  .accounting-module .acct-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .accounting-module .acct-card-grid {
    grid-template-columns: 1fr;
  }
  .accounting-module .acct-tab-card {
    min-height: auto;
  }
}

[data-theme="dark"] .accounting-module {
  --acct-ink: #e2e8f0;
  --acct-muted: #a7f3d0;
  --acct-border: rgba(45, 212, 191, 0.24);
  --acct-panel: linear-gradient(135deg, rgba(15,23,42,0.96), rgba(30,41,59,0.94));
  --acct-panel-strong: linear-gradient(135deg, rgba(19,78,74,0.7), rgba(49,46,129,0.66));
  --acct-table: rgba(15,23,42,0.92);
}

[data-theme="dark"] .accounting-module .acct-tab-card h5,
[data-theme="dark"] .accounting-module .modern-form label,
[data-theme="dark"] .accounting-module .modern-field label,
[data-theme="dark"] .accounting-module .modern-section-title {
  color: #ccfbf1 !important;
}

[data-theme="dark"] .accounting-module .acct-tab-card p,
[data-theme="dark"] .accounting-module .text-muted,
[data-theme="dark"] .accounting-module .modern-section-copy,
[data-theme="dark"] .accounting-module .modern-help {
  color: #bae6fd !important;
}

[data-theme="dark"] .accounting-module .modern-form input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] .accounting-module .modern-form select,
[data-theme="dark"] .accounting-module .modern-form textarea,
[data-theme="dark"] .accounting-module .modern-field input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] .accounting-module .modern-field select,
[data-theme="dark"] .accounting-module .modern-field textarea,
[data-theme="dark"] .accounting-module .form-control,
[data-theme="dark"] .accounting-module .form-select {
  background: rgba(15,23,42,0.82) !important;
  border-color: rgba(45,212,191,0.28) !important;
  color: #e2e8f0 !important;
}
