/* --- Google Fonts & Variables --- */
:root {
  /* Color Palette (CashBee Inspired) */
  --bg-app: #FFFFF3;            /* Honey Off-white / Cream */
  --bg-card: #FFFFFF;           /* Pure White */
  --color-primary: #FFB000;      /* Bee Yellow / Amber Gold */
  --color-primary-hover: #E09B00;
  --color-primary-light: #FFF9E6;
  --color-accent: #FFD900;       /* Bright Electric Yellow */
  --color-text-dark: #2B1213;     /* Deep Cocoa / Charcoal Dark */
  --color-text-muted: #501F21;    /* Deep Mahogany / Dark Maroon */
  --color-text-light: #8E7B7B;    /* Warm Gray / Dusty Rose */
  --color-border: #E8E5D5;        /* Light Cream Border */
  --color-border-hover: #D5D1C1;
  --color-border-focus: #FFB000;
  --color-error: #D9383A;         /* Velvet Red */
  --color-error-light: #FDF2F2;
  --color-success: #2A8C57;       /* Meadow Green */
  --color-success-light: #EEF7F2;

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Border Radii & Effects */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(43, 18, 19, 0.03);
  --shadow-md: 0 8px 24px rgba(43, 18, 19, 0.05);
  --shadow-lg: 0 16px 40px rgba(43, 18, 19, 0.08);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--color-text-dark);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text-dark);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--color-primary);
}

/* --- Auth / Login Screen --- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 10% 20%, #FFFDF5 0%, var(--bg-app) 90%);
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

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

.login-logo {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.login-card h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.login-card label {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  gap: 0.4rem;
}

.login-card input {
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #FCFCF6;
  outline: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.login-card input:focus {
  border-color: var(--color-border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(255, 176, 0, 0.15);
}

.login-card .btn-primary {
  margin-top: 0.8rem;
  padding: 0.9rem;
}

.login-status {
  margin-top: 1rem;
  font-size: 0.88rem;
  min-height: 1.2em;
}

/* --- Layout Structure --- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background: var(--bg-card);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  position: fixed;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  margin-bottom: 2.5rem;
}

.sidebar-brand .logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text-dark);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  background: var(--bg-app);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  border: 1px solid var(--color-border);
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px dashed var(--color-primary);
}

.user-meta {
  overflow: hidden;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-dark);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-badge {
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.sidebar-nav .tab-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-nav .tab-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-text-dark);
}

.sidebar-nav .tab-btn.active {
  background: var(--color-primary);
  color: var(--color-text-dark);
  box-shadow: 0 4px 12px rgba(255, 176, 0, 0.2);
}

.sidebar-nav .tab-icon {
  font-size: 1.1rem;
}

.sidebar-footer {
  margin-top: auto;
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #FCFCF6;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--color-error-light);
  color: var(--color-error);
  border-color: rgba(217, 56, 58, 0.2);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  padding: 2.5rem;
  margin-left: 280px;
  max-width: 1200px;
  width: calc(100% - 280px);
}

.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --- Cards & UI Containers --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-text-dark);
  border-bottom: 2px solid var(--color-primary-light);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* --- Forms & Controls --- */
form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

input, select {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #FCFCF6;
  outline: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

input:focus, select:focus {
  border-color: var(--color-border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(255, 176, 0, 0.15);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232B1213' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem !important;
  cursor: pointer;
}

/* Custom File Upload Zone */
.file-upload-zone {
  position: relative;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #FCFCF6;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.file-upload-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.file-upload-zone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon-fa {
  font-size: 2.2rem;
  margin-bottom: 0.2rem;
  color: var(--color-primary);
  transition: var(--transition);
}

.file-upload-zone:hover .upload-icon-fa {
  transform: translateY(-2px);
  color: var(--color-primary-hover);
}

.upload-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-dark);
}

.upload-subtext {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.file-upload-zone.has-file {
  border-style: solid;
  border-color: var(--color-success);
  background: var(--color-success-light);
}

.file-upload-zone.has-file .upload-icon-fa {
  color: var(--color-success);
}

.file-upload-zone.has-file .upload-text {
  color: var(--color-success);
  word-break: break-all;
}

.file-clear-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.file-clear-btn:hover {
  color: var(--color-error, #c0392b);
}

/* Designer Fixed View */
.designer-fixed {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.designer-fixed label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.designer-fixed-box {
  padding: 0.75rem 0.9rem;
  background: var(--color-primary-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--color-text-dark);
}

/* --- Searchable GEO Picker --- */
.geo-picker {
  position: relative;
  width: 100%;
}

.geo-picker-input {
  width: 100%;
}

.geo-picker.open .geo-picker-input {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 176, 0, 0.15);
}

.geo-picker-list {
  position: absolute;
  z-index: 200;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.2s ease-out;
}

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

.geo-picker-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-dark);
  transition: var(--transition);
}

.geo-picker-option .flag {
  font-size: 1.15rem;
}

.geo-picker-option .code {
  color: var(--color-text-light);
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: auto;
  background: var(--bg-app);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.geo-picker-option:hover,
.geo-picker-option.active {
  background: var(--color-primary-light);
}

.geo-picker-empty {
  padding: 0.8rem 0.9rem;
  color: var(--color-text-light);
  font-size: 0.88rem;
  text-align: center;
}

/* --- Filter Bar --- */
.filters {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.8rem;
  background: var(--bg-app);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  align-items: center;
  border: 1px solid var(--color-border);
}

.filter-col {
  flex: 1 1 200px;
  min-width: 150px;
}

.filter-col select,
.filter-col input {
  width: 100%;
}

.date-col {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 290px;
}

.date-col input[type="date"] {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem 0.5rem;
}

.date-separator {
  color: var(--color-text-light);
  font-weight: 500;
}

.filter-actions {
  display: flex;
  gap: 0.6rem;
}

/* --- Buttons --- */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--color-text-dark);
  border: 1px solid rgba(43, 18, 19, 0.05);
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 10px rgba(255, 176, 0, 0.15);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(255, 176, 0, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #E8E5D5;
  color: var(--color-text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-filter {
  background: var(--color-text-dark);
  color: var(--bg-app);
  border: none;
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-filter:hover {
  background: var(--color-text-muted);
}

.btn-reset {
  background: var(--bg-card);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  padding: 0.75rem 1.2rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

.btn-primary-sm {
  background: var(--color-primary);
  color: var(--color-text-dark);
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary-sm:hover {
  background: var(--color-accent);
}

.btn-primary-sm:disabled {
  background: #EAEAE2;
  color: var(--color-text-light);
  cursor: not-allowed;
}

/* --- Tables & Data Grids --- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

th {
  background: #FCFCF6;
  color: var(--color-text-light);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-dark);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #FFFDF8;
}

/* Status Messages */
#upload-status, #user-form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  display: none;
}

#upload-status:not(:empty), #user-form-status:not(:empty) {
  display: block;
}

.error, .success {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-sizing: border-box;
}

.error {
  color: var(--color-error);
  background-color: var(--color-error-light);
  border: 1px solid rgba(217, 56, 58, 0.15);
}

.error::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f071";
  color: var(--color-error);
  font-size: 1rem;
  flex-shrink: 0;
}

.success {
  color: var(--color-success);
  background-color: var(--color-success-light);
  border: 1px solid rgba(42, 140, 87, 0.15);
}

.success::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f058";
  color: var(--color-success);
  font-size: 1rem;
  flex-shrink: 0;
}

.error:empty, .success:empty {
  display: none !important;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.badge-static {
  background: #EAEAE2;
  color: var(--color-text-muted);
}

.badge-video {
  background: var(--color-primary-light);
  color: #B27B00;
}

/* Drive Icon Button */
.btn-drive-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #FCFCF6;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-drive-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.btn-drive-icon:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 176, 0, 0.15);
}

/* Inline Edit Controls in Tables */
.table-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #FCFCF6;
}

.table-input:focus {
  border-color: var(--color-primary);
  background: var(--bg-card);
}

.table-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* --- Modals --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(43, 18, 19, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  position: relative;
  animation: modalSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.3rem;
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-text-light);
  cursor: pointer;
  transition: var(--transition);
  padding: 0 0.2rem;
}

.modal-close:hover {
  color: var(--color-text-dark);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

#edit-user-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  display: none;
}

#edit-user-status:not(:empty) {
  display: block;
}

/* --- Media Queries / Responsive Adaptation --- */

/* Responsive Layout (Desktop Sidebar vs Mobile Header) */
@media (max-width: 1023px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    gap: 0.8rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 
      "brand profile footer"
      "nav nav nav";
    align-items: center;
  }

  .sidebar-brand {
    grid-area: brand;
    margin-bottom: 0;
  }

  .sidebar-brand .logo {
    font-size: 1.5rem;
  }

  .user-profile {
    grid-area: profile;
    margin-left: auto;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border: none;
    gap: 0.5rem;
    max-width: 150px;
    overflow: hidden;
  }

  .user-profile .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .user-profile .user-badge {
    display: none;
  }

  .user-profile .user-name {
    font-size: 0.85rem;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-nav {
    grid-area: nav;
    flex-direction: row;
    width: 100%;
    margin-top: 0.5rem;
    border-top: 1px solid var(--color-border);
    padding-top: 0.8rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .sidebar-nav .tab-btn {
    flex: 1 0 auto;
    justify-content: center;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }

  .sidebar-footer {
    display: block;
    grid-area: footer;
    margin-top: 0;
  }

  .sidebar-footer .btn-logout {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  @media (max-width: 480px) {
    .sidebar-footer .btn-logout {
      width: 40px;
      height: 40px;
      padding: 0;
      border-radius: 50%;
      font-size: 0; /* Hide text */
    }
    .sidebar-footer .btn-logout i {
      font-size: 1.2rem;
      margin-right: 0;
    }
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1.5rem 1rem;
  }
}

/* Responsive Tables (Table to Card Transformation) */
@media (max-width: 767px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .filter-col {
    flex: none;
    width: 100%;
  }

  .date-col {
    width: 100%;
  }

  .filter-actions {
    justify-content: stretch;
    gap: 0.6rem;
  }

  .filter-actions button {
    flex: 1;
  }

  /* Table Cards */
  .table-container {
    border: none;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none; /* Hide header labels */
  }

  tr {
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-sm);
  }

  tr:hover td {
    background: transparent;
  }

  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--color-border);
  }

  td:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0.5rem;
  }

  td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--color-text-muted);
    font-family: var(--font-display);
    font-size: 0.85rem;
    text-align: left;
    margin-right: 1.5rem;
  }

  /* User table mobile input resizing */
  td input.table-input {
    width: 65%;
    text-align: right;
  }

  td .table-checkbox {
    margin-left: auto;
  }
}
