* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Arial, "Noto Sans";
  line-height: 1.6;
  height: 100vh;
  overflow: hidden;
}

html,
body {
  overflow: hidden;
}

/* ---------- Login wrapper ---------- */
.login-container {
  /* theme tokens (scoped) */
  --primary: 215 20% 55%; /* ≈ #64748b */
  --secondary: 217 33% 17%; /* ≈ #0f172a */
  --bg: 210 40% 96%;
  --card: 0 0% 100%;
  --text: 222 47% 11%;
  --muted: 215 20% 55%;
  --danger: 350 75% 55%;
  --ring: hsl(var(--primary) / 0.28);

  position: relative;
  min-height: 100dvh;

  /* grid split on wide screens, single column on mobile */
  display: grid;
  grid-template-columns: 52% 48%;
  background: hsl(var(--bg));
  color: hsl(var(--text));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Arial, "Noto Sans";
  overflow: hidden;
}

/* Left brand panel */
.login-container::before {
  content: "";
  position: absolute;
  z-index: 0;
  /* match the “left column” width visually */
  inset: 0 48% 0 0;
  background: repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.06) 0 14px,
      rgba(255, 255, 255, 0) 14px 28px
    ),
    linear-gradient(
      135deg,
      hsl(var(--secondary)),
      hsl(var(--secondary) / 0.9),
      hsl(var(--secondary))
    );
}

/* Left panel headline (no HTML needed) */
.login-container::after {
  content: "Welcome to Alphapak\A\AModern accounting for fast-moving teams.";
  white-space: pre-wrap;
  position: absolute;
  z-index: 0;
  left: clamp(32px, 5vw, 56px);
  bottom: clamp(64px, 6vh, 64px);
  color: #eef2f7;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  line-height: 1.1;
  font-weight: 800;

  /* never overflow and scale nicely */
  max-width: calc(52vw - 96px);
  font-size: clamp(22px, 3.2vw, 30px);
  pointer-events: none;
}

/* ---------- Card (right column) ---------- */
.login-card {
  grid-column: 2; /* sit in the right grid column */
  z-index: 1; /* above left panel */
  width: min(560px, 70%);
  align-self: center; /* vertical center */
  justify-self: center; /* horizontal center */
  padding: 4rem 1rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--muted) / 0.25);
  border-radius: 12px;
  box-shadow: 0 8px 24px hsl(var(--secondary) / 0.14),
    0 1px 3px hsl(var(--secondary) / 0.08);
  overflow: hidden;
}

/* Header */
.login-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 8px;
}
.login-logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(
    135deg,
    hsl(var(--secondary)),
    hsl(var(--primary))
  );
  box-shadow: 0 4px 10px hsl(var(--secondary) / 0.25);
}
.login-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* Form */
.login-form {
  padding: 12px 20px 20px;
}
.login-container .form-group {
  margin-top: 14px;
}
.login-container .form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--text) / 0.75);
}

/* Inputs */
.login-container .form-input {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid hsl(var(--muted) / 0.35);
  background: hsl(var(--card));
  color: hsl(var(--text));
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s ease;
}
.login-container .form-input::placeholder {
  color: hsl(var(--text) / 0.45);
}
.login-container .form-input:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px var(--ring);
}

/* Password toggle */
.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-container .form-input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  width: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid hsl(var(--muted) / 0.35);
  background: hsl(var(--card));
  color: hsl(var(--text) / 0.6);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.password-toggle:hover {
  background: hsl(var(--primary) / 0.08);
  color: hsl(var(--text));
  border-color: hsl(var(--primary) / 0.6);
}

/* Alerts (scoped) */
.login-container .alert {
  margin-top: 14px;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.login-container .alert-danger,
.login-container .alert.alert-danger {
  background: hsl(var(--danger) / 0.1);
  color: hsl(var(--danger));
  border: 1px solid hsl(var(--danger) / 0.25);
}

/* Buttons (scoped) */
.login-container .form-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}
.login-container .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.04s, filter 0.2s, box-shadow 0.2s;
}
.login-container .btn:active {
  transform: translateY(1px);
}
.login-container .btn-primary,
.login-container .btn.btn-primary {
  background: hsl(var(--primary));
  color: #fff;
  box-shadow: 0 6px 14px hsl(var(--primary) / 0.28);
}
.login-container .btn-primary:hover {
  filter: brightness(1.05);
}

/* ---------- Responsive breakpoints ---------- */
/* Large tablets: shrink left panel a bit */
@media (max-width: 1200px) {
  .login-container {
    grid-template-columns: 48% 52%;
  }
  .login-container::before {
    inset: 0 52% 0 0;
  }
  .login-container::after {
    max-width: calc(48vw - 72px);
  }
}

/* Tablets & below: single-column and center the card */
@media (max-width: 900px) {
  .login-container {
    grid-template-columns: 1fr;
    place-items: center;
    padding: 24px 16px;
    background: repeating-linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.06) 0 14px,
        rgba(255, 255, 255, 0) 14px 28px
      ),
      linear-gradient(
        135deg,
        hsl(var(--secondary)),
        hsl(var(--secondary) / 0.9),
        hsl(var(--secondary))
      );
  }
  .login-container::before,
  .login-container::after {
    display: none;
  }
  .login-card {
    grid-column: 1;
    width: min(520px, 96%);
    margin: 0;
    padding: 3rem 0.5rem;
  }
}

@media (max-width: 500px) {
  .login-card {
    grid-column: 1;
    width: min(520px, 96%);
    margin: 0;
    padding: 3rem 0;
  }
}

/* ===== LAYOUT COMPONENTS ===== */
.sidebar {
  width: 250px;
  height: 100vh;
  background-color: #1e293b /* slate-800 */;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.sidebar.collapsed {
  width: 80px;
}

.sidebar-logo {
  padding: 1rem;
  border-bottom: 1px solid #334155; /* slate-700 */
  text-align: center;
  flex-shrink: 0;
}

.sidebar-logo a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.sidebar-logo i {
  color: #94a3b8; /* slate-400 */
  font-size: 1.8rem;
}

.sidebar-menu-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.sidebar-menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: #334155; /* slate-700 */
  border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: #64748b; /* slate-500 */
  border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: #94a3b8; /* slate-400 */
}

.menu-section {
  border-bottom: 1px solid #334155; /* slate-700 */
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
}

.menu-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  color: #e2e8f0; /* slate-200 */
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

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

.menu-item:hover {
  background-color: #334155; /* slate-700 */
  color: white;
}

.menu-item-active {
  background-color: #475569; /* slate-600 */
  color: white;
}

.menu-item i {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.menu-dropdown {
  position: relative;
  margin-bottom: 0.25rem;
}

.dropdown-button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: none;
  color: #e2e8f0; /* slate-200 */
  text-align: left;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.dropdown-button:hover {
  background-color: #334155; /* slate-700 */
  color: white;
}

.dropdown-button i:last-child {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.dropdown-button.active i:last-child {
  transform: rotate(180deg);
}

.dropdown-content {
  display: none;
  margin-left: 1.5rem;
  margin-top: 0.25rem;
}

.dropdown-content.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 0.75rem;
  color: #e2e8f0; /* slate-200 */
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  margin-bottom: 0.125rem;
}

.dropdown-item:hover {
  background-color: #334155; /* slate-700 */
  color: white;
}

.user-section {
  padding: 1rem;
  border-top: 1px solid #334155; /* slate-700 */
  background-color: #1e293b; /* slate-800 */
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  background-color: #475569; /* slate-600 */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.user-details p:first-child {
  color: white;
  font-size: 0.875rem;
}

.user-details p:last-child {
  color: #94a3b8; /* slate-400 */
  font-size: 0.75rem;
}

.user-actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.main-content {
  margin-left: 250px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.main-content.expanded {
  margin-left: 80px;
}

.header {
  background-color: white;
  border-bottom: 1px solid #e2e8f0; /* slate-200 */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.5rem;
  flex-shrink: 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #334155; /* slate-700 */
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.action-button {
  padding: 0.5rem;
  border: none;
  background: none;
  color: #64748b; /* slate-500 */
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-button:hover {
  background-color: #f1f5f9; /* slate-100 */
  color: #334155; /* slate-700 */
}

.content {
  flex: 1;
  /* padding: 1.5rem; */
  overflow-y: auto;
}

/* ===== ACTION BUTTON STYLES ===== */
.action-buttons {
  display: flex;
  gap: 0.1rem;
  justify-content: center;
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 6px;
  background: #f8fafc; /* slate-50 */
  color: #64748b; /* slate-500 */
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.table-action.edit {
  background: #e2e8f0; /* slate-200 */
  color: #334155; /* slate-700 */
}

.table-action.edit:hover {
  background: #cbd5e1; /* slate-300 */
  color: #1e293b; /* slate-800 */
}

.table-action.delete {
  background: #fee2e2;
  color: #dc2626;
}

.table-action.delete:hover {
  background: #fecaca;
  color: #b91c1c;
}

.table-action.ledger {
  background: #f0fdf4;
  color: #16a34a;
}

.table-action.ledger:hover {
  background: #dcfce7;
  color: #15803d;
}

/* Tooltip styles for better UX */
.table-action {
  position: relative;
}

.table-action::after {
  content: attr(title);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b; /* slate-800 */
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
}

.table-action:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: -35px;
}

/* Responsive action buttons */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    gap: 0.25rem;
  }

  .table-action {
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
  }
}
/* ===== FORM COMPONENTS ===== */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b; /* slate-800 */
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e2e8f0; /* slate-200 */
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group p{
  padding-bottom: 1rem ;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #334155; /* slate-700 */
  font-size: 0.9rem;
}

.form-label.required::after {
  content: " *";
  color: #dc2626;
}

.form-input-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;    
}

.form-input,
.form-select,
.form-textarea,
.form-date {
  width: 100%;
  padding: 0.7rem;
  border: 2px solid #e2e8f0; /* slate-200 */
  border-radius: 8px;
  font-size: .8rem;
  transition: all 0.2s ease;
  background: white;
  color: #334155; /* slate-700 */
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-date:focus {
  outline: none;
  border-color: #64748b; /* slate-500 */
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.15); /* slate-500 @ 15% */
}

.form-input.error,
.form-select.error,
.form-textarea.error,
.form-date.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-error {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  border-radius: 12px;
  font-size: 0.92rem;   
}

.form-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #f1f5f9; /* slate-100 */
}

.btn {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: #475569; /* slate-600 */
  color: white;
}

.btn-primary:hover {
  background: #334155; /* slate-700 */
  transform: translateY(-1px);
}

.btn-secondary {
  background: #64748b; /* slate-500 */
  color: white;
}

.btn-secondary:hover {
  background: #475569; /* slate-600 */
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-outline {
  background: transparent;
  border: 2px solid #e2e8f0; /* slate-200 */
  color: #334155; /* slate-700 */
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
}

.btn-outline:hover {
  background: #f8fafc; /* slate-50 */
  border-color: #cbd5e1; /* slate-300 */
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-sm {
  padding: 0.5rem 1rem !important;
  font-size: 0.8rem !important;
}

.btn-xs {
  padding: 0.25rem 0.5rem !important;
  font-size: 0.7rem !important;
}

/* ===== ENHANCED TABLE COMPONENTS ===== */
.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0; /* slate-200 */
  max-width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

/* Remove the fixed min-width and let table content determine width */
.data-table {
  width: auto; /* Change from 100% to auto */
  min-width: 100%; /* Ensure it takes at least full container width */
  border-collapse: collapse;
  background: white;
  font-size: 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  table-layout: auto; /* Allow columns to size based on content */
}

/* Force table to be wider than container when needed */
.data-table.wide-table {
  width: max-content; /* Force table to be as wide as its content */
  min-width: 100%;
}

/* Table header styles */
.table-header {
  background: linear-gradient(
    135deg,
    #0f172a 0%,
    #334155 100%
  ); /* slate gradient */
  border-bottom: 2px solid #1e293b; /* slate-800 */
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-header th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #ffffff;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.2;
  border-right: 1px solid #334155; /* slate-700 */
}

.table-header th:last-child {
  border-right: none;
}

/* Table cell styles - ensure content doesn't wrap unnecessarily */
.table-cell {
  padding: 0.75rem 1rem;
  color: #334155; /* slate-700 */
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  border-right: 1px solid #f1f5f9; /* slate-100 */
  vertical-align: top;
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px; /* Prevent excessively wide columns */
}

/* Allow specific cells to wrap if needed */
.table-cell.wrap-content {
  white-space: normal;
  word-wrap: break-word;
}

.table-cell:last-child {
  border-right: none;
}

.table-cell.actions {
  white-space: nowrap;
  max-width: 120px; /* Limit actions column width */
}

/* Alternate row colors */
.table-row:nth-child(even) {
  background: #f8fafc; /* slate-50 */
}

.table-row:nth-child(odd) {
  background: #ffffff;
}

.table-row {
  border-bottom: 1px solid #f1f5f9; /* slate-100 */
  transition: background 0.2s ease;
}

.table-row:hover {
  background: #f1f5f9 !important; /* slate-100 */
}

.table-row:last-child {
  border-bottom: none;
}

/* Action buttons */
.table-action {
  padding: 0.4rem;
  border: none;
  background: none;
  color: #64748b; /* slate-500 */
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 0.3rem;
  font-size: 0.7rem;
}

.table-action:hover {
  background: #f1f5f9; /* slate-100 */
  transform: translateY(-1px);
}

.table-action.edit:hover {
  color: #475569; /* slate-600 */
  background: #e2e8f0; /* slate-200 */
}

.table-action.delete:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* Scrollbar styling */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f5f9; /* slate-100 */
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1; /* slate-300 */
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94a3b8; /* slate-400 */
}

/* Visual scroll indicator */
.table-responsive::after {
  content: "← Scroll →";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 5;
}

.table-responsive:hover::after {
  opacity: 1;
}

/* Show scroll indicator only when scrolling is needed */
.table-responsive:not(.has-scroll)::after {
  display: none;
}

/* JavaScript can add this class when scroll width > client width */
.table-responsive.has-scroll::after {
  display: block;
}

/* Responsive design */
@media (max-width: 768px) {
  .table-container {
    border-radius: 6px;
    margin: 0 -1rem;
    width: calc(100% + 2rem);
    box-shadow: none;
    border-left: none;
    border-right: none;
  }

  .data-table {
    font-size: 0.75rem;
  }

  .table-header th {
    padding: 0.6rem 0.8rem;
    font-size: 0.7rem;
  }

  .table-cell {
    padding: 0.6rem 0.8rem;
    max-width: 200px;
  }

  .table-action {
    padding: 0.3rem;
    margin-right: 0.2rem;
  }

  /* Hide scroll indicator on mobile */
  .table-responsive::after {
    display: none;
  }
}

/* Zebra striping */
.table-zebra .table-row:nth-child(even) {
  background: #f8fafc; /* slate-50 */
}

.table-zebra .table-row:nth-child(odd) {
  background: #ffffff;
}

/* ===== CARD COMPONENTS ===== */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f5f9; /* slate-100 */
}

.card-header .d-flex {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100%;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b; /* slate-800 */
}

.card-header .btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.card-header .btn-primary {
  background: #475569; /* slate-600 */
  color: white;
}

.card-header .btn-primary:hover {
  background: #334155; /* slate-700 */
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3); /* slate-600 glow */
}

/* Icon spacing in button */
.me-2 {
  margin-right: 0.5rem !important;
}

/* Badge styles */
.badge {
  padding: 0.25rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  display: inline-block;
}

.bg-success {
  background: #10b981 !important;
  color: white;
}
.bg-warning {
  background: #f59e0b !important;
  color: white;
}
.bg-secondary {
  background: #64748b !important;
  color: white;
} /* slate-500 */
.bg-primary {
  background: #475569 !important;
  color: white;
} /* slate-600 */
.bg-info {
  background: #06b6d4 !important;
  color: white;
}

/* Text colors */
.text-success {
  color: #10b981 !important;
}
.text-danger {
  color: #ef4444 !important;
}
.text-primary {
  color: #475569 !important;
} /* slate-600 */
.text-muted {
  color: #64748b !important;
  font-size: 0.85rem;
} /* slate-500 */

/* Responsive design for card header */
@media (max-width: 768px) {
  .card-header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }

  .card-header .btn {
    align-self: flex-end;
  }

  .card-title {
    font-size: 1.25rem;
  }
}
/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 1rem;
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #e2e8f0; /* slate-200 */
  background: white;
  color: #64748b; /* slate-500 */
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover {
  background: #475569; /* slate-600 */
  color: white;
  border-color: #475569;
}

.pagination-btn.active {
  background: #475569; /* slate-600 */
  color: white;
  border-color: #475569;
}

.pagination-info {
  color: #64748b; /* slate-500 */
  font-size: 0.9rem;
}

/* ===== FORM FILTER ROW STYLES ===== */
.form-row.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.form-col.d-flex {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.form-col .btn {
  white-space: nowrap;
  flex: 1;
  min-width: auto;
}

.form-col .btn-outline {
  background: transparent;
  border: 2px solid #e2e8f0; /* slate-200 */
  color: #64748b; /* slate-500 */
  padding: 0.75rem;
}

.form-col .btn-outline:hover {
  background: #f8fafc; /* slate-50 */
  border-color: #cbd5e1; /* slate-300 */
  color: #334155; /* slate-700 */
}

/* Ensure buttons are properly sized */
.form-col .btn {
  height: fit-content;
}

/* Responsive design for filter row */
@media (max-width: 1200px) {
  .form-row.cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .form-row.cols-5 {
    grid-template-columns: 1fr;
  }

  .form-col.d-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .form-col .btn {
    width: 100%;
  }
}

/* Specific styling for filter form */
.filter-form .form-col {
  margin-bottom: 0;
}

/* Ensure proper vertical alignment */
.align-items-end {
  align-items: flex-end;
}

/* Button icon spacing */
.btn i {
  margin-right: 0.5rem;
}

.btn-outline i {
  margin-right: 0;
}
/* ===== UTILITY CLASSES ===== */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-left {
  text-align: left;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-5 {
  margin-bottom: 1.25rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-5 {
  margin-top: 1.25rem;
}
.mt-6 {
  margin-top: 1.5rem;
}

.p-0 {
  padding: 0;
}
.p-1 {
  padding: 0.25rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 0.75rem;
}
.p-4 {
  padding: 1rem;
}
.p-5 {
  padding: 1.25rem;
}
.p-6 {
  padding: 1.5rem;
}

.hidden {
  display: none;
}
.block {
  display: block;
}
.flex {
  display: flex;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .sidebar {
    width: 80px;
  }

  .main-content {
    margin-left: 80px;
  }

  .sidebar-text {
    display: none;
  }

  .menu-item span,
  .dropdown-button span {
    display: none;
  }

  .dropdown-content {
    margin-left: 0;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #1e293b; /* slate-800 */
    min-width: 200px;
    border-radius: 0.5rem;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }

  .dropdown-item {
    padding: 0.75rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .table-container {
    overflow-x: auto;
  }

  .data-table {
    min-width: 600px;
  }
}

/* ===== SPECIFIC COMPONENT STYLES ===== */
.calendar-picker {
  position: relative;
}

.calendar-input {
  cursor: pointer;
}

.search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-input {
  padding-left: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  background-size: 1rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-inactive {
  background: #fee2e2;
  color: #991b1b;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

/* ===== PRINT STYLES ===== */
@media print {
  .sidebar,
  .header-actions,
  .table-action {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
  }

  .content {
    padding: 0;
  }
}

/* ===== GRID SYSTEM FOR FORM CONTROLS ===== */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Specific column layouts */
.form-row.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.form-row.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive columns */
@media (max-width: 1024px) {
  .form-row.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .form-row,
  .form-row.cols-2,
  .form-row.cols-3,
  .form-row.cols-4 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Form column item */
.form-col {
  display: flex;
  flex-direction: column;
}

/* Optional: If you want Bootstrap-like column classes */
.col-md-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  /* padding: 0 0.75rem; */
}

.col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
  /* padding: 0 0.75rem; */
}

.col-md-3 {
  flex: 0 0 25%;
  max-width: 25%;
  /* padding: 0 0.75rem; */
}

/* Flexbox row alternative */
.flex-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
  margin-bottom: 1.5rem;
}

.flex-row > .form-col {
  padding: 0 0.75rem;
  flex: 1;
  min-width: 250px;
  margin-bottom: 1rem;
}

/* Specific flexbox column sizes */
.flex-row .col-md-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}

.flex-row .col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

.flex-row .col-md-3 {
  flex: 0 0 25%;
  max-width: 25%;
}

/* Responsive for flexbox */
@media (max-width: 768px) {
  .flex-row {
    margin: 0;
  }

  .flex-row > .form-col,
  .flex-row .col-md-3,
  .flex-row .col-md-4,
  .flex-row .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0;
  }
}

/* Spacing utilities for rows */
.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

/* ===== FLEXBOX UTILITIES ===== */
.d-flex {
  display: flex !important;
}

.justify-content-start {
  justify-content: flex-start !important;
}

.justify-content-end {
  justify-content: flex-end !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.justify-content-around {
  justify-content: space-around !important;
}

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

.align-items-end {
  align-items: flex-end !important;
}

.align-items-center {
  align-items: center !important;
}

.align-items-stretch {
  align-items: stretch !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-nowrap {
  flex-wrap: nowrap !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-row {
  flex-direction: row !important;
}

/* Gap utilities */
.gap-0 {
  gap: 0 !important;
}
.gap-1 {
  gap: 0.25rem !important;
}
.gap-2 {
  gap: 0.5rem !important;
}
.gap-3 {
  gap: 0.75rem !important;
}
.gap-4 {
  gap: 1rem !important;
}
.gap-5 {
  gap: 1.25rem !important;
}

/* Margin utilities */
.mt-0 {
  margin-top: 0 !important;
}
.mt-1 {
  margin-top: 0.25rem !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.mt-3 {
  margin-top: 0.75rem !important;
}
.mt-4 {
  margin-top: 1rem !important;
}
.mt-5 {
  margin-top: 1.25rem !important;
}
.mt-6 {
  margin-top: 1.5rem !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 0.75rem !important;
}
.mb-4 {
  margin-bottom: 1rem !important;
}
.mb-5 {
  margin-bottom: 1.25rem !important;
}
.mb-6 {
  margin-bottom: 1.5rem !important;
}

/* Responsive flex utilities */
@media (max-width: 768px) {
  .flex-md-column {
    flex-direction: column !important;
  }

  .flex-md-row {
    flex-direction: row !important;
  }

  .justify-content-md-end {
    justify-content: flex-end !important;
  }

  .justify-content-md-center {
    justify-content: center !important;
  }
}

/* ===== PAGINATION STYLES ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.page-item {
  display: inline-block;
  margin: 0;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 2px solid #e2e8f0; /* slate-200 */
  background: white;
  color: #64748b; /* slate-500 */
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.page-link:hover {
  border-color: #475569; /* slate-600 */
  color: #475569; /* slate-600 */
  background: #f8fafc; /* slate-50 */
  transform: translateY(-1px);
}

.page-item.active .page-link {
  background: #475569; /* slate-600 */
  border-color: #475569; /* slate-600 */
  color: white;
  font-weight: 600;
}

.page-item.active .page-link:hover {
  background: #334155; /* slate-700 */
  border-color: #334155;
  transform: none;
}

.page-item.disabled .page-link {
  background: #f8fafc; /* slate-50 */
  border-color: #e2e8f0; /* slate-200 */
  color: #9ca3af;
  cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
  transform: none;
  border-color: #e2e8f0; /* slate-200 */
  color: #9ca3af;
}

/* Responsive pagination */
@media (max-width: 768px) {
  .pagination {
    gap: 0.25rem;
  }

  .page-link {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.8rem;
  }

  /* Hide text on small screens, show only icons if needed */
  .page-link:not(.active) {
    font-size: 0; /* Hide text */
  }

  .page-link:not(.active)::before {
    font-size: 0.8rem;
    font-weight: 600;
  }

  .page-link[href*="page=1"]::before {
    content: "«";
  }

  .page-link[href*="previous"]::before {
    content: "‹";
  }

  .page-link[href*="next"]::before {
    content: "›";
  }

  .page-link[href*="page="]:last-child::before {
    content: "»";
  }
}

/* Alternative: Keep text but make it shorter on mobile */
@media (max-width: 480px) {
  .page-link {
    font-size: 0.7rem;
    padding: 0 0.4rem;
    min-width: 1.8rem;
    height: 1.8rem;
  }
}

/* Pagination info text style */
.page-info {
  text-align: center;
  color: #64748b; /* slate-500 */
  font-size: 0.9rem;
  margin: 1rem 0;
}

/* If you want to add icons */
.page-link.with-icon {
  gap: 0.5rem;
}

.page-link .icon {
  font-size: 0.8rem;
}

/* Optional: Different colors for different actions */
.page-link[href*="page=1"],
.page-link[href*="page="]:last-child {
  background: #f8fafc; /* slate-50 */
  font-weight: 600;
}

.page-link[href*="page=1"]:hover,
.page-link[href*="page="]:last-child:hover {
  background: #e2e8f0; /* slate-200 */
}

/* Icon spacing in pagination */
.ms-1 {
  margin-left: 0.25rem !important;
}

.me-1 {
  margin-right: 0.25rem !important;
}

.page-link .icon {
  font-size: 0.8rem;
}

/* Hide text on mobile for icon version */
@media (max-width: 768px) {
  .page-link span {
    display: none;
  }

  .page-link {
    min-width: 2.5rem;
  }

  .page-link .icon {
    font-size: 1rem;
    margin: 0;
  }
}

/* ===== PURCHASE ORDER SPECIFIC STYLES ===== */

/* Section titles */
.section-title {
  color: #334155; /* slate-700 */
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0; /* slate-200 */
}

.card-section-title {
  color: #334155; /* slate-700 */
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

/* Info groups */
.info-group {
  background: #f8fafc; /* slate-50 */
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0; /* slate-200 */
}

.info-group p {
  margin: 0.5rem 0;
  color: #64748b; /* slate-500 */
}

.info-group strong {
  color: #334155; /* slate-700 */
  min-width: 120px;
  display: inline-block;
}

/* Status badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

.status-draft {
  background: #f3f4f6;
  color: #6b7280;
}
.status-approved {
  background: #dcfce7;
  color: #166534;
}
.status-completed {
  background: #dbeafe;
  color: #1e40af;
}
.status-cancelled {
  background: #fee2e2;
  color: #dc2626;
}
.status-pending {
  background: #fef3c7;
  color: #92400e;
}

/* Return sections */
.return-section {
  background: #fffbeb;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #fef3c7;
  margin-bottom: 1rem;
}

.return-title {
  color: #92400e;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.return-notes {
  color: #78350f;
  font-style: italic;
}

/* Financial summary */
.financial-summary {
  text-align: right;
  padding: 1rem;
  background: #f8fafc; /* slate-50 */
  border-radius: 8px;
  border: 1px solid #e2e8f0; /* slate-200 */
}

.summary-item {
  font-size: 1.1rem;
  color: #334155; /* slate-700 */
  margin: 0.5rem 0;
}

.net-payable {
  margin: 1rem 0 0 0;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  border: 2px solid #bbf7d0;
}

/* ===== LEDGER SPECIFIC STYLES ===== */
.ledger-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0; /* slate-200 */
  border-radius: 8px;
  background: white;
  margin-top: 1rem;
}

.ledger-responsive {
  width: 100%;
  min-width: 1200px; /* Minimum width for all columns */
  overflow-x: auto;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
}

.ledger-header {
  background: linear-gradient(135deg, #0f172a 0%, #0f172a 100%); /* slate-900 */
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.ledger-header th {
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid #e2e8f0; /* slate-200 */
  white-space: nowrap;
}

.ledger-header .text-end {
  text-align: right;
}

.ledger-row {
  border-bottom: 1px solid #f1f5f9; /* slate-100 */
}

.ledger-row.even {
  background: #ffffff;
}

.ledger-row.odd {
  background: #f8fafc; /* slate-50 */
}

.ledger-row:hover {
  background: #f1f5f9 !important; /* slate-100 */
}

.ledger-cell {
  padding: 0.4rem 0.75rem;
  border-right: 1px solid #f1f5f9; /* slate-100 */
  white-space: nowrap;
  vertical-align: top;
}

.ledger-cell:last-child {
  border-right: none;
}

.ledger-cell.text-end {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Product detail rows */
.ledger-row.product-detail {
  background: #f1f5f9 !important; /* slate-100 */
  font-size: 0.7rem;
  color: #64748b; /* slate-500 */
}

.ledger-row.product-detail:hover {
  background: #e2e8f0 !important; /* slate-200 */
}

.ledger-row.product-detail .ledger-cell {
  border-top: 1px dashed #e2e8f0; /* slate-200 */
}

/* Footer styles */
.ledger-footer {
  background: linear-gradient(
    135deg,
    #f8fafc 0%,
    #e2e8f0 100%
  ); /* slate-50 → slate-200 */
  border-top: 2px solid #cbd5e1; /* slate-300 */
  font-weight: 600;
}

.ledger-footer .ledger-cell {
  padding: 0.6rem 0.75rem;
  color: #334155; /* slate-700 */
  border-right: 1px solid #e2e8f0; /* slate-200 */
}

.ledger-footer .ledger-cell:last-child {
  border-right: none;
}

/* Number formatting */
.ledger-cell {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Column widths */
.ledger-table th:nth-child(1), /* Date */
.ledger-table td:nth-child(1) {
  width: 80px;
  min-width: 80px;
}

.ledger-table th:nth-child(2), /* Reference */
.ledger-table td:nth-child(2) {
  width: 100px;
  min-width: 100px;
}

.ledger-table th:nth-child(3), /* Description */
.ledger-table td:nth-child(3) {
  width: auto; /* Changed from fixed width */
  min-width: 200px; /* Minimum width */
  max-width: none; /* Remove max-width limit */
  white-space: normal; /* Allow text to wrap */
  overflow: visible; /* Show all content */
  text-overflow: clip; /* Remove ellipsis */
  word-wrap: break-word; /* Break long words */
}

/* Optional: Add some padding for better readability */
.ledger-table td:nth-child(3) {
  padding-right: 1rem;
}

/* Ensure the table still scrolls horizontally */
.ledger-responsive {
  min-width: 1400px; /* Slightly increased to accommodate longer descriptions */
}

.ledger-table th:nth-child(4), /* Quantity */
.ledger-table th:nth-child(5), /* Price */
.ledger-table th:nth-child(6), /* Total Qty Price */
.ledger-table th:nth-child(10), /* Rate */
.ledger-table td:nth-child(4),
.ledger-table td:nth-child(5),
.ledger-table td:nth-child(6),
.ledger-table td:nth-child(10) {
  width: 80px;
  min-width: 80px;
}

.ledger-table th:nth-child(7), /* Debit */
.ledger-table th:nth-child(8), /* Credit */
.ledger-table th:nth-child(9), /* Balance */
.ledger-table th:nth-child(11), /* Foreign Debit */
.ledger-table th:nth-child(12), /* Foreign Credit */
.ledger-table th:nth-child(13), /* Foreign Balance */
.ledger-table td:nth-child(7),
.ledger-table td:nth-child(8),
.ledger-table td:nth-child(9),
.ledger-table td:nth-child(11),
.ledger-table td:nth-child(12),
.ledger-table td:nth-child(13) {
  width: 100px;
  min-width: 100px;
}

/* Scrollbar styling */
.ledger-responsive::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.ledger-responsive::-webkit-scrollbar-track {
  background: #f1f5f9; /* slate-100 */
  border-radius: 4px;
}

.ledger-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1; /* slate-300 */
  border-radius: 4px;
}

.ledger-responsive::-webkit-scrollbar-thumb:hover {
  background: #94a3b8; /* slate-400 */
}

/* Responsive design */
@media (max-width: 768px) {
  .ledger-container {
    border-radius: 4px;
    margin: 0 -1rem;
    width: calc(100% + 2rem);
  }

  .card-header .d-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start !important;
  }

  .card-header form {
    width: 100%;
  }

  .card-header .d-flex.gap-2 {
    flex-wrap: wrap;
  }
}

/* Print styles */
@media print {
  .ledger-container {
    overflow: visible !important;
    width: 100% !important;
  }

  .ledger-responsive {
    overflow: visible !important;
    width: 100% !important;
  }

  .ledger-table {
    font-size: 0.7rem;
  }
}

/* ===== ALERT SYSTEM ===== */
.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  margin: 1rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
}

/* Success Alert (Positive Balance) */
.alert-success {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.alert-success::before {
  content: "\f058"; /* check-circle */
}

/* Danger Alert (Negative Balance) */
.alert-danger {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.alert-danger::before {
  content: "\f057"; /* times-circle */
}

/* Secondary Alert (Zero Balance) */
.alert-secondary {
  background-color: #f1f5f9; /* slate-100 */
  border-color: #cbd5e1; /* slate-300 */
  color: #334155; /* slate-700 */
}

.alert-secondary::before {
  content: "\f05a"; /* info-circle */
}

/* Warning Alert (Optional) */
.alert-warning {
  background-color: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.alert-warning::before {
  content: "\f071"; /* exclamation-triangle */
}

/* Info Alert (Optional) */
.alert-info {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.alert-info::before {
  content: "\f05a"; /* info-circle */
}

/* Alert with close button */
.alert-dismissible {
  position: relative;
  padding-right: 3rem;
}

.alert-dismissible .close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.alert-dismissible .close:hover {
  opacity: 1;
}

/* Alert variations */
.alert-solid.alert-success {
  background-color: #22c55e;
  color: white;
  border: none;
}

.alert-solid.alert-danger {
  background-color: #ef4444;
  color: white;
  border: none;
}

.alert-solid.alert-secondary {
  background-color: #64748b; /* slate-500 */
  color: white;
  border: none;
}

.alert-outline.alert-success {
  background-color: transparent;
  border: 2px solid #22c55e;
  color: #166534;
}

.alert-outline.alert-danger {
  background-color: transparent;
  border: 2px solid #ef4444;
  color: #dc2626;
}

.alert-outline.alert-secondary {
  background-color: transparent;
  border: 2px solid #64748b; /* slate-500 */
  color: #334155; /* slate-700 */
}

/* Alert sizes */
.alert-sm {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
}

.alert-sm::before {
  font-size: 1rem;
  width: 1.25rem;
}

.alert-lg {
  padding: 1.25rem 2rem;
  font-size: 1rem;
}

.alert-lg::before {
  font-size: 1.25rem;
  width: 1.75rem;
}

/* Alert with action buttons */
.alert-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.alert-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-actions {
  display: flex;
  gap: 0.5rem;
}

/* Responsive alerts */
@media (max-width: 768px) {
  .alert {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .alert::before {
    align-self: flex-start;
  }

  .alert-with-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .alert-actions {
    align-self: stretch;
    justify-content: flex-end;
  }
}

/* Animation for alert appearance */
@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert {
  animation: alertSlideIn 0.3s ease;
}

/* Margin utilities */
.mt-4 {
  margin-top: 1.5rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-2 {
  margin-top: 0.5rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

/* Alert styles for login */

/* Responsive design */
@media (max-width: 480px) {
  .form-input {
    padding: 0.65rem;
  }

  /* .btn-login {
        padding: 0.875rem;
    } */
}

/* Animation for login form */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== JOB DASHBOARD SPECIFIC STYLES ===== */

.dashboard {
  padding: 0 1.5rem;
}

/* Container spacing */
.container {
  max-width: 1200px;
  padding: 0 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
  }

  .form-row.cols-3 {
    grid-template-columns: 1fr;
  }

  .card-header {
    padding: 0.875rem 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .btn-outline {
    padding: 0.875rem;
    font-size: 0.9rem;
  }

  .btn-outline i {
    font-size: 1rem;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .table-header th {
    padding: 0.75rem;
    font-size: 0.75rem;
  }

  .table-cell {
    padding: 0.75rem;
  }
}

/* Section headers */
h2.card-title {
  font-size: 1.5rem;
  color: #1e293b; /* slate-800 */
  /* margin-bottom: 1rem; */
}

/* Table container scroll for mobile */
@media (max-width: 480px) {
  .table-container {
    margin: 0 -1rem;
    width: calc(100% + 2rem);
  }
}

/* ===== Dashboard tiles ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 0 0 1rem;
}
.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
}
.stat-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.12);
}
.stat-value {
  font-weight: 800;
  color: #0f172a;
}
.stat-label {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 2px;
}
.tile-blue {
  background: #0ea5e9;
}
.tile-purple {
  background: #7c3aed;
}
.tile-green {
  background: #10b981;
}
.tile-red {
  background: #ef4444;
}
.section-rule {
  height: 1px;
  margin: 14px 0 18px;
  background: linear-gradient(
    90deg,
    rgba(2, 6, 23, 0.08),
    rgba(2, 6, 23, 0),
    rgba(2, 6, 23, 0.08)
  );
}

/* ===== Cards to “pill” headers ===== */
.card {
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
  width: 100%;
}
.card-header {
  background: transparent !important;
  border-bottom: none;
  padding-top: 18px !important;
}
.card-header .card-title {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  background: #eaf1ff;
  border: 1px solid #cfe0ff;
  color: #1f2937 !important;
  margin: 0;
}
.card-body hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 0.75rem 0 1rem;
}

/* ===== “Top Accounts” light table header (only where applied) ===== */
.table-header-soft {
  background: #fff !important;
  border-bottom: 1px solid #e5e7eb !important;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table-header-soft th {
  color: #64748b !important;
  border-right: 0 !important;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  background: #fff !important;
}

/* responsive for tiles */
@media (max-width: 1100px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Icon colors (kept as-is for semantic variety) */
.fa-box {
  color: #3b82f6;
}
.fa-file-contract {
  color: #8b5cf6;
}
.fa-file-export {
  color: #06b6d4;
}
.fa-truck {
  color: #f59e0b;
}
.fa-timeline {
  color: #10b981;
}
.fa-file {
  color: #ef4444;
}
.fa-file-alt {
  color: #8b5cf6;
}
.fa-book {
  color: #06b6d4;
}
.fa-chart-bar {
  color: #f59e0b;
}
.fa-shopping-cart {
  color: #3b82f6;
}
