/* Using Inter font as per request for modern typography, similar to SF Pro */

body {
  font-family: "Inter", sans-serif;
  /* Initial dark gradient background, will be toggled by JS */
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0; /* Light text for dark background */
  transition: background-color 0.5s ease, color 0.5s ease; /* Smooth transition for theme change */
}

/* Light theme styles */
body.light-theme {
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
  color: #334155; /* Dark text for light background */
}

/* General Input Styles - Modern & Polished */
.table-cell-input,
.category-name-input,
.formatted-number-input,
/* Removed #clientName, #bankLimit from here as they are now handled differently or moved */
.category-setting-input,
#email,
#password,
#phone-number,
#verification-code,
#new-password,
#confirm-password,
#business-type,
#vat-frequency,
#vat-payment-day,
#has-exempt-income,
#settings-openingBalance, /* NEW */
#settings-bankLimit /* NEW */
{
  width: 100%; /* Ensure inputs take full width of their container */
  padding: 12px 16px; /* Increased padding for better touch targets */
  border: 1px solid #475569; /* Darker border for dark theme */
  border-radius: 8px; /* Rounded corners */
  text-align: center;
  background-color: #334155; /* Dark background for inputs */
  color: #e2e8f0; /* Light text color */
  transition: all 0.3s ease-in-out; /* Smooth transitions for focus and hover */
  font-size: 15px !important;
  font-weight: 500 !important;
  font-family: "Inter", sans-serif !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); /* Subtle inner shadow */
}

/* Light theme input styles */
body.light-theme .table-cell-input,
body.light-theme .category-name-input,
body.light-theme .formatted-number-input,
/* Removed #clientName, #bankLimit from here */
body.light-theme .category-setting-input,
body.light-theme #email,
body.light-theme #password,
body.light-theme #phone-number,
body.light-theme #verification-code,
body.light-theme #new-password,
body.light-theme #confirm-password,
body.light-theme #business-type,
body.light-theme #vat-frequency,
body.light-theme #vat-payment-day,
body.light-theme #has-exempt-income,
body.light-theme #settings-openingBalance, /* NEW */
body.light-theme #settings-bankLimit /* NEW */
{
  border-color: #cbd5e1;
  background-color: #f8fafc;
  color: #334155;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-name-input {
  text-align: right;
  padding-right: 0.75rem;
  width: 100%;
}
.category-cell-static {
  font-weight: 600 !important;
  text-align: right;
  padding: 12px 16px;
  border: 1px solid #475569;
  border-radius: 8px;
  width: 100%;
  display: block;
  background-color: #334155;
  box-sizing: border-box;
  color: #e2e8f0;
}

body.light-theme .category-cell-static {
  border-color: #cbd5e1;
  background-color: #f1f5f9;
  color: #334155;
}

/* Specific input adjustments */
#settings-openingBalance, /* NEW */
#settings-bankLimit, /* NEW */
.formatted-number-input {
  direction: ltr; /* Ensure numbers are LTR */
}
#settings-openingBalance { /* NEW */
  text-align: center;
}

#clientName { /* Kept clientName as a direct input on main page */
  width: 100%;
  padding: 18px;
  font-weight: 600;
}

/* Focus states with subtle glow */
#clientName:focus,
.table-cell-input:focus,
.category-name-input:focus,
#settings-openingBalance:focus, /* NEW */
#settings-bankLimit:focus, /* NEW */
.category-setting-input:focus,
#email:focus,
#password:focus,
#phone-number:focus,
#verification-code:focus,
#new-password:focus,
#confirm-password:focus,
#business-type:focus,
#vat-frequency:focus,
#vat-payment-day:focus,
#has-exempt-income:focus {
  outline: none;
  border-color: #3b82f6; /* Blue border */
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3), inset 0 1px 3px rgba(0, 0, 0, 0.2); /* Blue glow + inner shadow */
  transform: scale(1.01); /* Subtle zoom effect */
}

body.light-theme #clientName:focus,
body.light-theme .table-cell-input:focus,
body.light-theme .category-name-input:focus,
body.light-theme #settings-openingBalance:focus, /* NEW */
body.light-theme #settings-bankLimit:focus, /* NEW */
body.light-theme .category-setting-input:focus,
body.light-theme #email:focus,
body.light-theme #password:focus,
body.light-theme #phone-number:focus,
body.light-theme #verification-code:focus,
body.light-theme #new-password:focus,
body.light-theme #confirm-password:focus,
body.light-theme #business-type:focus,
body.light-theme #vat-frequency:focus,
body.light-theme #vat-payment-day:focus,
body.light-theme #has-exempt-income:focus {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Summary Cards */
.summary-card {
  background-color: #1e293b; /* Dark background for cards */
  border-radius: 16px; /* More rounded corners */
  padding: 0; /* Padding handled by inner divs */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08); /* Deeper shadow with subtle border */
  border: none; /* Remove default border */
  overflow: hidden; /* Ensure content stays within rounded corners */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effects */
}

.summary-card:hover {
  transform: translateY(-5px); /* Lift effect on hover */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.light-theme .summary-card {
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

body.light-theme .summary-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
}


.summary-card > div {
  border-bottom: 1px solid #334155; /* Darker dividers */
}
.summary-card > div:last-child {
  border-bottom: none; /* No border on last item */
}

body.light-theme .summary-card > div {
  border-bottom: 1px solid #e2e8f0;
}


/* Text colors for balances */
.total-income, .balance-positive, .text-green-600 {
  color: #34d399; /* Brighter green */
}
.total-expense, .balance-negative, .text-red-600 {
  color: #ef4444; /* Brighter red */
}

body.light-theme .total-income, body.light-theme .balance-positive, body.light-theme .text-green-600 {
  color: #16a34a;
}
body.light-theme .total-expense, body.light-theme .balance-negative, body.light-theme .text-red-600 {
  color: #dc2626;
}

/* Table Styles - Modernized */
.table-container {
  width: 100%;
  height: 70vh;
  overflow: auto;
  position: relative;
  border: 1px solid #334155; /* Darker border */
  border-radius: 16px; /* More rounded */
  background-color: #1e293b; /* Darker table background */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

body.light-theme .table-container {
  border-color: #cbd5e1;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%; /* Ensure table takes full width */
}
td,
th {
  padding: 0.75rem; /* Increased padding */
  white-space: nowrap;
  font-size: 14px !important;
  font-family: "Inter", sans-serif !important;
  border-bottom: 1px solid #334155; /* Darker row dividers */
  color: #e2e8f0; /* Light text */
}

body.light-theme td, body.light-theme th {
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

thead th {
  position: sticky;
  top: 0;
  background-color: #0f172a; /* Even darker header background */
  color: #94a3b8; /* Lighter header text */
  z-index: 2;
  font-weight: 600;
  border-bottom: 2px solid #334155; /* Stronger header border */
  padding: 1rem 0.75rem; /* More padding */
}

body.light-theme thead th {
  background-color: #f1f5f9;
  color: #4a5568;
  border-bottom: 2px solid #cbd5e1;
}

td.category-cell,
th.category-header {
  position: sticky;
  right: 0;
  z-index: 1;
  background-color: #1e293b; /* Match table background */
  border-left: 1px solid #334155;
  min-width: 250px;
}

body.light-theme td.category-cell, body.light-theme th.category-header {
  background-color: #ffffff;
  border-left: 1px solid #e2e8f0;
}

tr:hover td.category-cell {
  background-color: #2d3a4b; /* Subtle hover for category cell */
}

body.light-theme tr:hover td.category-cell {
  background-color: #f7fafc;
}

th.category-header {
  z-index: 3;
}
tr.group-header-row > td:first-child {
  position: sticky;
  right: 0;
  z-index: 9;
  background-color: inherit !important;
  text-align: right !important;
  padding: 1rem 1.5rem;
  border-left: 1px solid #334155;
  font-weight: 800;
  font-size: 16px !important;
  color: #a78bfa; /* Purple for group headers */
}

body.light-theme tr.group-header-row > td:first-child {
  border-left: 1px solid #e2e8f0;
  color: #6d28d9;
}

#table-body tr:nth-child(even):not(.group-header-row):not(.group-summary-row) {
  background-color: #1f2d3e; /* Slightly different row background */
}

body.light-theme #table-body tr:nth-child(even):not(.group-header-row):not(.group-summary-row) {
  background-color: #f8fafc;
}

#table-body tr:not(.group-header-row):not(.group-summary-row):hover {
  background-color: #2d3a4b; /* Subtle hover for rows */
}

body.light-theme #table-body tr:not(.group-header-row):not(.group-summary-row):hover {
  background-color: #f0f4f8;
}

/* Group Header Colors */
.header-income { background-color: #10b981; } /* Green */
.header-suppliers { background-color: #f59e0b; } /* Orange */
.header-expense-var { background-color: #ef4444; } /* Red */
.header-loans { background-color: #0ea5e9; } /* Blue */
.header-expense-fixed { background-color: #8b5cf6; } /* Purple */
.header-taxes { background-color: #6366f1; } /* Indigo */
.header-unexpected { background-color: #64748b; } /* Gray */

/* Light Theme Group Header Colors */
body.light-theme .header-income { background-color: #a7f3d0; color: #065f46; }
body.light-theme .header-suppliers { background-color: #fcd34d; color: #92400e; }
body.light-theme .header-expense-var { background-color: #fecaca; color: #b91c1c; }
body.light-theme .header-loans { background-color: #bfdbfe; color: #1d4ed8; }
body.light-theme .header-expense-fixed { background-color: #e9d5ff; color: #6b21a8; }
body.light-theme .header-taxes { background-color: #c7d2fe; color: #4338ca; }
body.light-theme .header-unexpected { background-color: #e2e8f0; color: #475569; }


/* Group Summary Rows */
.group-summary-row {
  background-color: #17253b; /* Darker background for summary */
  font-weight: 700;
  border-top: 2px solid #475569; /* Stronger top border */
}

body.light-theme .group-summary-row {
  background-color: #e0e7ed;
  border-top: 2px solid #94a3b8;
}

/* Table Footer (Balances) */
tfoot tr {
  background-color: #1e293b; /* Match table body background */
  font-weight: 700;
}

body.light-theme tfoot tr {
  background-color: #ffffff;
}

.monthly-sum, .daily-balance, .running-balance {
  text-align: center;
  font-weight: 700;
}

/* Today's column header */
.today-header {
  background-color: #3b82f6 !important; /* Blue for today's header */
  color: white !important;
  border-bottom: 2px solid #2563eb !important;
}

body.light-theme .today-header {
  background-color: #60a5fa !important;
  color: white !important;
  border-bottom: 2px solid #3b82f6 !important;
}

/* Action Buttons */
.action-button {
  padding: 12px 20px;
  border-radius: 10px; /* More rounded */
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

.action-button:hover {
  transform: translateY(-2px); /* Lift effect */
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.action-button i {
  margin-left: 8px; /* Space between icon and text */
}

/* Navigation Buttons (Year/Day) */
.nav-button {
  background-color: #334155; /* Darker gray */
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-button:hover {
  background-color: #475569; /* Lighter gray on hover */
  transform: scale(1.05); /* Subtle zoom */
}

body.light-theme .nav-button {
  background-color: #cbd5e1;
  color: #334155;
}

body.light-theme .nav-button:hover {
  background-color: #a7b7c7;
}

/* Month Tabs */
.month-tab {
  background-color: #334155; /* Darker gray */
  color: #cbd5e1;
  border: 1px solid #475569;
}

.month-tab.active {
  background-color: #3b82f6; /* Blue active tab */
  color: white;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

body.light-theme .month-tab {
  background-color: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

body.light-theme .month-tab.active {
  background-color: #60a5fa;
  color: white;
  border-color: #60a5fa;
  box-shadow: 0 2px 8px rgba(96, 165, 250, 0.3);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Darker overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px); /* Blurred background */
}

.modal-content {
  background-color: #1e293b; /* Darker modal background */
  padding: 30px;
  border-radius: 16px; /* More rounded */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Stronger shadow */
  width: 90%;
  max-width: 500px;
  position: relative;
  border: 1px solid #334155; /* Subtle border */
  animation: fadeIn 0.3s ease-out; /* Fade in animation */
  display: flex; /* Added for flex layout of header/body/footer */
  flex-direction: column; /* Stack children vertically */
  max-height: 90vh; /* Limit height to allow scrolling */
}

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

.modal-header {
    /* Styles for the new header div */
    padding-bottom: 15px; /* Adjust as needed */
    margin-bottom: 15px; /* Space between header and scrollable content */
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 0; /* Removed margin-bottom as it's now in modal-header */
  text-align: center;
  color: #e2e8f0; /* Light text */
}

.modal-body {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
  color: #cbd5e1; /* Lighter text */
}

.modal-body-scrollable {
    flex-grow: 1; /* Allows content to take available space */
    overflow-y: auto; /* Enables vertical scrolling */
    padding-right: 10px; /* Space for scrollbar */
    padding-left: 5px; /* Balance padding */
    margin-right: -10px; /* Counteract padding-right for scrollbar */
}

/* Custom Scrollbar Styles */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #2d3a4b; /* Darker track */
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #475569; /* Gray thumb */
  border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #64748b; /* Lighter gray on hover */
}

/* Light theme scrollbar */
body.light-theme .custom-scrollbar::-webkit-scrollbar-track {
  background: #e2e8f0;
}

body.light-theme .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

body.light-theme .custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #a7b7c7;
}


.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.modal-button {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.modal-button-ok, .modal-button-confirm {
  background-color: #3b82f6; /* Blue */
  color: white;
}
.modal-button-ok:hover, .modal-button-confirm:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.modal-button-cancel {
  background-color: #475569; /* Gray */
  color: #e2e8f0;
}
.modal-button-cancel:hover {
  background-color: #64748b;
  transform: translateY(-1px);
}

/* Toast Notification */
.toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #334155; /* Darker toast background */
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  z-index: 1001;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 17px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: visibility 0s, opacity 0.5s ease-in-out;
  opacity: 0;
}

.toast.show {
  visibility: visible;
  opacity: 1;
}

/* Subscription Banner */
.subscription-banner {
  background-color: #1a202c; /* Dark background */
  color: #e2e8f0;
  padding: 12px 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid #334155;
}

.subscription-banner.trial {
  background-color: #fcd34d; /* Yellow for trial */
  color: #92400e;
  border-color: #fbbf24;
}

.subscription-banner.active {
  background-color: #a7f3d0; /* Green for active */
  color: #065f46;
  border-color: #34d399;
}

/* Support Button (fixed) */
.support-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #3b82f6; /* Blue */
  color: white;
  padding: 12px 20px;
  border-radius: 50px; /* Pill shape */
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  z-index: 999;
}

.support-button:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.support-button.hidden-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Scroll Navigation */
.scroll-nav {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 900;
}

.scroll-nav button {
  background-color: #334155;
  color: #e2e8f0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.scroll-nav button:hover {
  background-color: #475569;
  transform: scale(1.1);
}

body.light-theme .scroll-nav button {
  background-color: #cbd5e1;
  color: #334155;
}

body.light-theme .scroll-nav button:hover {
  background-color: #a7b7c7;
}

/* Print Styles (no-print class) */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: none !important;
    color: black !important;
    font-size: 10pt;
  }
  table {
    width: 100%;
    border-collapse: collapse;
  }
  th, td {
    border: 1px solid #ccc;
    padding: 5px;
    font-size: 9pt;
    color: black !important;
    background-color: white !important;
  }
  thead th {
    background-color: #f2f2f2 !important;
  }
  .category-cell, .category-header {
    background-color: #f9f9f9 !important;
  }
  .group-header-row td:first-child {
    background-color: #e0e0e0 !important;
    color: black !important;
  }
  .summary-card, .modal-overlay, .toast, .scroll-nav, .ai-chat-widget, .support-button, .subscription-banner {
    display: none !important;
  }
  .main-table-container {
    box-shadow: none !important;
    border: none !important;
  }
  .app-container {
    padding: 0 !important;
    margin: 0 !important;
  }
  .table-container {
    height: auto !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* Custom Toggle Switch (for auto-save, auto-alerts) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.dot {
  left: 4px;
  background-color: #94a3b8;
}

input:checked + .block {
  background-color: #3b82f6;
}

input:checked + .block + .dot {
  transform: translateX(24px);
  background-color: #e2e8f0;
}

/* AI Chat Widget */
.ai-chat-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #6366f1; /* Indigo */
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
    cursor: pointer;
}

.ai-chat-button:hover {
    background-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.ai-chat-widget {
    position: fixed;
    bottom: 90px; /* Above the button */
    left: 20px;
    width: 350px;
    height: 500px;
    background-color: #1e293b; /* Dark background */
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 998;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    border: 1px solid #334155;
}

.ai-chat-widget.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background-color: #0f172a; /* Even darker header */
    color: white;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #1e293b; /* Match widget background */
    color: #e2e8f0;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 14px;
}

.chat-message.user {
    align-self: flex-end;
    background-color: #3b82f6; /* Blue for user messages */
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-message.assistant {
    align-self: flex-start;
    background-color: #2d3a4b; /* Darker gray for assistant */
    color: #e2e8f0;
    border-bottom-left-radius: 2px;
}

.chat-form {
    display: flex;
    padding: 15px;
    border-top: 1px solid #334155;
    background-color: #0f172a; /* Match header background */
}

.chat-input {
    flex-grow: 1;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #475569;
    background-color: #334155;
    color: #e2e8f0;
    font-size: 14px;
    margin-right: 10px;
    outline: none;
}

.chat-input::placeholder {
    color: #94a3b8;
}

.chat-send-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    background-color: #2563eb;
}

.chat-send-btn:disabled {
    background-color: #60a5fa;
    cursor: not-allowed;
    opacity: 0.7;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: #2d3a4b;
    padding: 10px 15px;
    border-radius: 12px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
}

/* Fullscreen Table */
.main-table-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 990;
    padding: 1rem; /* Add some padding in fullscreen */
    background-color: #1e293b; /* Ensure background matches app */
    border-radius: 0; /* No rounded corners in fullscreen */
    transition: all 0.3s ease-in-out;
}

.main-table-container.fullscreen .table-container {
    height: calc(100vh - 2rem); /* Adjust height for padding */
    border-radius: 0;
}

body.fullscreen-active {
    overflow: hidden; /* Prevent body scroll when fullscreen */
}

/* Gap Alert Icon */
.gap-alert-icon {
    color: #ef4444; /* Red exclamation mark */
    font-weight: bold;
    margin-left: 5px;
    font-size: 1.2em;
}

/* Mobile View Specific Styles */
.day-selector-header {
    background-color: #0f172a; /* Dark background */
    color: #e2e8f0;
    padding: 1rem;
    border-bottom: 1px solid #334155;
    border-radius: 16px 16px 0 0; /* Rounded top corners */
}

body.light-theme .day-selector-header {
  background-color: #f1f5f9;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
}

.day-selector-header .nav-button {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

/* Mobile view group headers */
#mobile-view-container h3.font-bold {
    background-color: #334155; /* Darker background for mobile group headers */
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    color: #a78bfa; /* Purple for group headers */
}

body.light-theme #mobile-view-container h3.font-bold {
  background-color: #e2e8f0;
  color: #6d28d9;
}

#mobile-view-container .flex.items-center.justify-between.p-2.border-b {
    border-bottom-color: #334155; /* Darker border for mobile items */
}

body.light-theme #mobile-view-container .flex.items-center.justify-between.p-2.border-b {
    border-bottom-color: #e2e8f0;
}

/* Contact Footer */
.contact-footer {
    padding: 2rem;
    text-align: center;
    margin-top: 4rem; /* More space above footer */
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Subscription Expired Modal */
#subscription-modal .modal-content {
    border: 2px solid #ef4444; /* Red border for expired subscription */
}
