/* Design Tokens (Premium Light Mode) */
:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-nav: #ffffff;
  --bg-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --text-main: #1e293b; 
  --text-muted: #64748b;
  --text-hint: #94a3b8;
  
  --primary: #1b4376; 
  --primary-hover: #11325c;
  --secondary: #d87617;
  --secondary-hover: #c2650f;
  --navy: #1b4376;
  
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --error-bg: #fee2e2;
  --error-text: #991b1b;

  --blue-soft: #eff6ff;
  --blue-text: #1e40af;
  --teal-soft: #f0fdfa;
  --teal-text: #0f766e;
  --amber-soft: #fef3c7;
  --amber-text: #92400e;
  --coral-soft: #fff1f2;
  --coral-text: #9f1239;
  --purple-soft: #f5f3ff;
  --purple-text: #5b21b6;
}

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

body { 
  font-family: 'Plus Jakarta Sans', sans-serif; 
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) fixed; 
  color: #1e293b; 
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
}

/* Force All Form Inputs to have visible dark text */
input, select, textarea, option {
  color: #000000 !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

input::placeholder, textarea::placeholder {
  color: #475569 !important; /* Darker placeholder for better contrast */
}

.white-section {
  background: transparent !important;
  color: #1e293b !important;
  height: calc(100vh - 120px); /* Fixed height so it fits on screen */
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0 !important;
  border-radius: 0;
}

.white-section .table-wrap {
  flex: 1;
  min-height: 0;
  max-height: none !important;
  height: 100%;
}

.hero-card {
  background: #ffffff !important;
  border-radius: 24px;
  padding: 4rem 3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  color: #111827 !important;
  max-width: 800px;
  text-align: center;
}

.dark-theme-bg {
  background: linear-gradient(135deg, #1b4376 0%, #111827 100%) !important;
  min-height: calc(100vh - 48px);
  color: white !important;
}

/* Navigation */
.nav { 
  display: flex; 
  align-items: center; 
  gap: 1rem; 
  padding: 0.5rem 1.5rem; 
  background: #d87617; 
  color: white;
  border-bottom: 2px solid rgba(0,0,0,0.1); 
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand { font-size: 15px; font-weight: 700; cursor: pointer; color: white; display: flex; align-items: center; gap: 8px; }

.nav-links { display: flex; gap: 0.3rem; flex: 1; }

.nav-link { 
  font-size: 13px; 
  color: rgba(255,255,255,0.85); 
  padding: 6px 12px; 
  border-radius: 8px; 
  cursor: pointer; 
  border: none; 
  background: none; 
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link.active { background: rgba(255,255,255,0.2); color: white; font-weight: 700; }
.nav-link:hover { background: rgba(255,255,255,0.1); color: white; }

.user-profile {
  color: white;
}

.user-profile a {
  color: white !important;
}

.user-profile button {
  background: rgba(255,255,255,0.2) !important;
  border: none !important;
  color: white !important;
}

.user-badge { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  font-size: 13px; 
  color: var(--text-muted); 
  cursor: pointer; 
}

.avatar { 
  width: 32px; 
  height: 32px; 
  border-radius: 50%; 
  background: var(--blue-soft); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 12px; 
  font-weight: 600; 
  color: var(--blue-text); 
}

/* Layout Containers */
.container { 
  max-width: 1400px; /* Slightly wider but not full screen */
  margin: 0 auto; 
  padding: 2rem; 
}

.section { display: none; }
.section.active { display: block; }

/* Dashboard Styles */
.hero { 
  padding: 2.5rem 0; 
  margin-bottom: 2rem; 
  border-bottom: 1px solid var(--border-color);
}
.hero h1 { 
  font-size: 28px; 
  font-weight: 800; 
  color: var(--primary); 
  margin-bottom: 8px; 
  letter-spacing: -0.02em;
}
.hero p { 
  color: var(--text-muted); 
  font-size: 15px; 
  max-width: 700px;
  line-height: 1.6;
}

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

.stat-card { 
  background: var(--bg-card); 
  padding: 1.25rem; 
  border-radius: 12px; 
  border: 1px solid var(--border-color);
}

.stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.02em; }
.stat-value { font-size: 24px; font-weight: 600; }

.tiles-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 20px; 
  margin-bottom: 32px;
}

.tile { 
  background: white; 
  padding: 24px; 
  border-radius: 20px; 
  text-align: center; 
  cursor: pointer; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  color: #1e293b;
}

.tile:hover { 
  border-color: var(--primary); 
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(216, 118, 23, 0.15);
}

.tile-icon { 
  width: 60px; 
  height: 60px; 
  border-radius: 14px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  margin: 0 auto 16px; 
  font-size: 24px;
}

.tile-title { font-weight: 600; margin-bottom: 4px; }
.tile-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* Form Styles */
.card { 
  background: var(--bg-card); 
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color); 
  border-radius: 12px; 
  padding: 1.5rem; 
  margin-bottom: 1.25rem; 
  color: #111827; /* Dark text for visibility on white background */
}
.card-header { margin-bottom: 1.25rem; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

@media (max-width: 800px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.field input, .field select, .field textarea { 
  padding: 10px 12px; 
  border: 1px solid var(--border-color); 
  border-radius: 8px; 
  font-size: 13px; 
  font-family: inherit; 
  outline: none; 
  min-height: 40px;
}

.price-wrap { display: flex; align-items: center; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.price-wrap span { padding: 10px 12px; background: var(--bg-hover); border-right: 1px solid var(--border-color); }
.price-wrap input { border: none; flex: 1; }

.btn { 
  padding: 10px 20px; 
  border-radius: 8px; 
  font-size: 13px; 
  font-weight: 500; 
  cursor: pointer; 
  border: 1px solid var(--border-color); 
  background: var(--bg-card); 
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary { background: var(--primary); color: white; border: none; }
.btn-cancel { background: #800000 !important; color: white !important; border: none !important; }

/* Table Styles */
.table-wrap { 
  background: white; 
  border: none; 
  border-radius: 24px; /* MATCHING IMAGE */
  max-height: calc(100vh - 260px);
  min-height: 300px;
  overflow-y: auto;
  overflow-x: auto; 
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Custom Scrollbars for Table Containers */
.table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
table { width: 100%; border-collapse: collapse; }
/* Integrated headers */
th:first-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }
th:last-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }

th { 
  text-align: left; 
  padding: 20px; 
  font-size: 12px; 
  font-weight: 800; 
  color: #1b4376 !important; 
  text-transform: uppercase; 
  letter-spacing: 0.08em;
  background: #f1f5f9; 
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}
td { 
  padding: 16px 20px; 
  vertical-align: middle; 
  font-size: 14px; 
  color: #1b4376; /* UNIFIED DEEP NAVY */
  font-weight: 500;
}
tr:hover { background: #f8fafc; }

.badge { padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-warning { background: #fffbeb; color: #92400e; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { 
  background: #ffffff; 
  backdrop-filter: blur(20px);
  border: 1px solid #e2e8f0;
  padding: 2rem; 
  border-radius: 24px; 
  width: 95%; 
  max-width: 950px; 
  overflow-y: auto; 
  max-height: 90vh; 
  color: #111827;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1rem;
}
.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.close-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}
.close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.modal-content input, .modal-content select, .modal-content textarea {
  color: #111827 !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
}

.modal-content input::placeholder, .modal-content textarea::placeholder {
  color: #94a3b8 !important;
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.dot-red { background: #ef4444; }
.dot-orange { background: #f59e0b; }
.dot-green { background: #10b981; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
.dot-blinking { animation: blink 1s infinite; }
.form-white {
  background: white !important;
  color: #111827 !important;
  backdrop-filter: none !important;
}

.form-white label {
  color: #64748b !important;
}

.form-white input, .form-white select, .form-white textarea {
  background: #f8fafc !important;
  color: #111827 !important;
  border-color: #e2e8f0 !important;
}

.form-white .card-title {
  color: #64748b !important;
}

.hidden { display: none !important; }

.is-logged-out .nav, .is-logged-out main { display: none; }

/* Filter Chips */


/* Unified Filter Panel System */
.filter-panel {
  background: white;
  padding: 24px 32px;
  border-radius: 24px 24px 0 0; 
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 0; 
  width: 100%;
  border: none;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  flex-wrap: nowrap;
  overflow-x: auto;
}

.filter-panel label {
  color: #1b4376 !important; /* Deep Navy Labels */
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}

.filter-panel input, .filter-panel select {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #1b4376 !important; /* Navy text in inputs */
  font-weight: 700;
  height: 40px; /* Larger inputs */
}

.filter-panel input:focus, .filter-panel select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(216, 118, 23, 0.1);
}

/* Input consistency in panels */
.filter-panel input, .filter-panel select {
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  color: #000000 !important;
  font-weight: 600;
}

.filter-panel input::placeholder {
  color: #475569 !important;
}

.dark-theme-bg .table-wrap {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme-bg td {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark-theme-bg th {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
}

.filter-group {
  display: flex;
  flex-direction: column; /* Label above input */
  gap: 4px;
  flex-shrink: 0;
}

.filter-group label {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.filter-panel select, .filter-panel input {
  height: 32px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  padding: 0 8px;
  min-width: 130px;
}

.filter-panel .search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.filter-panel .search-box input {
  padding-left: 12px !important;
  width: 100%;
}

/* Merge with table wrap */
.table-wrap {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-top: 1px solid var(--border-color) !important;
}

@media (max-width: 768px) {
  .filter-panel {
    gap: 10px;
    padding: 8px;
  }
}

/* Login Screen Styles */
#login-screen {
  position: fixed;
  inset: 0;
  width: 100%; 
  height: 100vh;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.login-card {
  background: white;
  padding: 3rem 2.5rem;
  border-radius: 32px;
  border: 1px solid #e2e8f0;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.login-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.5rem;
}

.login-card .field input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  color: #111827; /* Dark text for visibility */
  transition: all 0.2s;
}

.login-card label {
  color: #64748b;
}

.login-card .field input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.05);
}

.login-header {
  margin-bottom: 2.5rem;
}

.login-header p {
  color: #64748b;
  font-size: 13px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    user-select: none;
    justify-content: center;
}

.login-remember input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Global Input & Select Styles */
input[type="text"], 
input[type="date"], 
input[type="number"],
input[type="password"],
select, 
textarea {
  font-family: inherit;
  font-size: 14px;
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  outline: none;
  transition: all 0.2s;
  width: 100%;
}

.card input, .card select, .card textarea {
  color: #111827;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.card input::placeholder {
  color: #94a3b8;
}

select {
  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='currentColor' stroke-width='2' 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 12px center;
  background-size: 14px;
  padding-right: 36px !important;
  cursor: pointer;
}

input:focus, select:focus, textarea:focus {
  border-color: #1b4376;
  box-shadow: 0 0 0 3px rgba(27, 67, 118, 0.1);
}

/* Toast Notifications */
.toast {
  background: white;
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: #111827; /* Dark text for toast */
  animation: slideUp 0.3s ease-out forwards;
  min-width: 300px;
  border-left: 5px solid var(--primary);
}

.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ef4444; }

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* SETTINGS SIDEBAR LAYOUT */
.settings-container {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-top: 2rem;
}

.settings-sidebar {
  width: 280px;
  background: white;
  padding: 24px;
  border-radius: 24px;
  position: sticky;
  top: 100px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.sidebar-group {
  margin-bottom: 24px;
}

.sidebar-group:last-child {
  margin-bottom: 0;
}

.sidebar-label {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  padding-left: 12px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.sidebar-link i {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.sidebar-link:hover {
  background: #f8fafc;
  color: var(--primary);
}

.sidebar-link.active {
  background: #fff7ed;
  color: var(--primary);
}

.sidebar-link.active i {
  opacity: 1;
}

.settings-content {
  flex: 1;
  min-width: 0;
}

.settings-pane {
  animation: fadeInSettings 0.3s ease;
}

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

.btn-icon:hover {
  background-color: #f1f5f9 !important;
}

/* Admin / Settings White Page Layout */
#section-settings {
  background: #f8fafc !important;
  color: #111827 !important;
  border-radius: 24px;
  padding: 30px;
  height: calc(100vh - 120px);
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
#section-settings.active {
  display: flex;
}

#section-settings .hero {
  flex-shrink: 0;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 16px;
  padding-top: 0;
}

#section-settings .hero h1 {
  color: #1b4376;
  font-size: 24px;
}

#section-settings .hero p {
  color: #64748b;
}

#section-settings .settings-container {
  flex: 1;
  min-height: 0;
  margin-top: 0;
  display: flex;
  gap: 32px;
  overflow: hidden; /* Container fixed, children scroll */
}

#section-settings .settings-sidebar {
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: none;
  position: static; /* Override sticky */
  height: 100%;
  overflow-y: auto;
}

#section-settings .settings-content {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding-right: 16px; /* Space for scrollbar */
}

/* Fix Cards inside Settings */
#section-settings .card {
  background: white !important;
  border: 1px solid #e2e8f0 !important;
  color: #111827 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

#section-settings .card h3 {
  color: #1b4376;
}

#section-settings .field label {
  color: #64748b;
  font-weight: 700;
}

#section-settings .card p {
  color: #475569;
}

/* Ensure dark elements inside settings have white text */
#section-settings .stat-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#section-settings .stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#section-settings .stat-card .stat-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.05em;
  margin-top: 8px;
}

#section-settings .stat-card .stat-label {
  color: #64748b !important;
}

#section-settings .stats-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
}

#section-settings .btn-primary, 
#section-settings .btn-secondary,
#section-settings .btn-cancel {
  color: white !important;
}

/* If there's no .btn-secondary defined yet, let's define it */
.btn-secondary {
  background: #1e293b;
  color: white !important;
  border: none;
}
.btn-secondary:hover {
  background: #0f172a;
}



/* CALENDAR STYLES */
.calendar-wrapper {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.calendar-header div {
  padding: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
}

.calendar-day {
  min-height: 120px;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px;
  background: #ffffff;
  transition: background 0.2s;
}

.calendar-day.other-month {
  background: #f8fafc;
  color: #cbd5e1;
}

.calendar-day:hover {
  background: #f1f5f9;
}

.calendar-date {
  font-weight: 700;
  font-size: 14px;
  color: #475569;
  margin-bottom: 8px;
  display: inline-block;
  width: 24px;
  height: 24px;
  text-align: center;
  line-height: 24px;
  border-radius: 50%;
}

.calendar-day.today .calendar-date {
  background: #3b82f6;
  color: white;
}

.calendar-event {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calendar-event.pending {
  background: #eff6ff;
  color: #2563eb;
  border-left: 3px solid #3b82f6;
}

.calendar-event.completed {
  background: #f0fdf4;
  color: #16a34a;
  border-left: 3px solid #22c55e;
}

.calendar-event:hover {
  opacity: 0.9;
}

/* FORCE NATIVE PICKER TO OPEN ON CLICK */
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    background: transparent;
}
input[type="time"], input[type="date"] {
    position: relative;
}

/* GOOGLE CALENDAR REDESIGN */
#section-calendar {
    padding: 0 !important;
    height: calc(100vh - 57px);
    overflow: hidden;
    display: none !important;
    max-width: 100% !important;
    background: #fff !important;
}
#section-calendar.active {
    display: flex !important;
}

.gc-container {
    display: flex;
    height: 100%;
    color: #e8eaed;
    font-family: 'Roboto', 'Plus Jakarta Sans', sans-serif;
}

.gc-sidebar {
    width: 256px;
    padding: 16px 8px 16px 24px;
    border-right: 1px solid #3c4043;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.gc-create-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    color: #3c4043;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    width: max-content;
}

.gc-create-btn:hover {
    box-shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
}

.gc-calendars-list h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #e8eaed;
}

.gc-filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #e8eaed;
    margin-bottom: 8px;
    cursor: pointer;
}

.gc-filter-label input {
    display: none;
}

.gc-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #202124;
}

.gc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
}

.gc-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gc-btn-today {
    background: transparent;
    color: #e8eaed;
    border: 1px solid #5f6368;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
}

.gc-nav-arrows {
    display: flex;
    gap: 4px;
}

.gc-nav-arrows button {
    background: transparent;
    color: #e8eaed;
    border: none;
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gc-nav-arrows button:hover {
    background: rgba(255,255,255,0.04);
}

#gc-date-range {
    font-size: 22px;
    font-weight: 400;
    margin-left: 8px;
}

.gc-view-select {
    background: transparent;
    color: #e8eaed;
    border: 1px solid #5f6368;
    border-radius: 4px;
    padding: 6px 12px;
}

.gc-grid-container {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.gc-week-header {
    display: flex;
    border-bottom: 1px solid #3c4043;
    padding-bottom: 8px;
    position: sticky;
    top: 0;
    background: #202124;
    z-index: 10;
}

.gc-time-col-spacer {
    width: 60px;
    font-size: 10px;
    color: #9aa0a6;
    text-align: right;
    padding-right: 8px;
    align-self: flex-end;
}

.gc-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
}

.gc-day-header {
    text-align: center;
    color: #9aa0a6;
}

.gc-day-name {
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 4px;
}

.gc-day-num {
    font-size: 24px;
    width: 46px;
    height: 46px;
    line-height: 46px;
    margin: 0 auto;
    border-radius: 50%;
}

.gc-day-header.today .gc-day-name {
    color: #8ab4f8;
}

.gc-day-header.today .gc-day-num {
    background: #8ab4f8;
    color: #202124;
}

.gc-week-body {
    display: flex;
    position: relative;
    height: 660px; /* 11 hours * 60px */
}

.gc-time-col {
    width: 60px;
    display: flex;
    flex-direction: column;
}

.gc-time-slot {
    height: 60px;
    position: relative;
}

.gc-time-slot span {
    position: absolute;
    top: -8px;
    right: 8px;
    font-size: 10px;
    color: #9aa0a6;
}

.gc-day-cols {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
    border-left: 1px solid #3c4043;
}

.gc-day-col {
    border-right: 1px solid #3c4043;
    position: relative;
}

.gc-grid-cell {
    height: 60px;
    border-bottom: 1px solid #3c4043;
}

.gc-event-pill {
    position: absolute;
    left: 2px;
    right: 6px;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #202124;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    z-index: 5;
    border: 1px solid rgba(255,255,255,0.2);
}

.gc-event-pill:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 6;
}

.gc-event-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-event-time {
    font-size: 10px;
    opacity: 0.8;
}

/* Mini Calendar */
.gc-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.gc-mini-nav button {
    background: transparent;
    color: #e8eaed;
    border: none;
    cursor: pointer;
}

.gc-mini-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    font-size: 12px;
}

.gc-mini-days div {
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    margin: auto;
    cursor: pointer;
}

.gc-mini-day:hover {
    background: rgba(255,255,255,0.04);
}

.gc-mini-day.selected-week {
    background: rgba(138, 180, 248, 0.2);
    color: #8ab4f8;
}

.gc-mini-day.today {
    background: #8ab4f8;
    color: #202124;
}

/* GC Modal */
.gc-modal-content {
    background: #303134;
    border-radius: 8px;
    width: 450px;
    color: #e8eaed;
    box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14);
}

.gc-modal-header {
    background: #3c4043;
    padding: 16px 24px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gc-title-input {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #8ab4f8 !important;
    border-radius: 0 !important;
    color: #e8eaed !important;
    font-size: 22px !important;
    padding: 4px 0 !important;
    width: 80% !important;
}

.gc-modal-tabs {
    display: flex;
    padding: 0 24px;
    gap: 16px;
    margin-top: 16px;
}

.gc-tab {
    background: transparent;
    color: #9aa0a6;
    border: none;
    font-size: 14px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
}

.gc-tab.active {
    background: #1a73e8;
    color: #fff;
}

.gc-modal-body {
    padding: 24px;
}

.gc-field-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.gc-icon {
    width: 20px;
    height: 20px;
    color: #9aa0a6;
}

.gc-input {
    background: #202124 !important;
    border: none !important;
    color: #e8eaed !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    flex: 1;
}

.gc-btn-save {
    background: #8ab4f8;
    color: #202124;
    border: none;
    padding: 8px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

/* MODERN SAAS UI STYLES */
.dashboard-hero {
    margin-bottom: 24px;
}
.dashboard-hero h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.dashboard-hero p {
    color: var(--text-muted);
    font-size: 15px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}
.kpi-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}
.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: var(--primary);
}
.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.kpi-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}
.kpi-icon {
    width: 20px;
    height: 20px;
}
.text-primary { color: var(--primary); }
.text-success { color: var(--success-text); }
.text-warning { color: var(--warning-text); }
.text-danger { color: var(--error-text); }

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.02em;
}

/* Update Nav */
.nav {
    background: #FFFFFF !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 12px 24px !important;
}
.nav-brand {
    color: var(--secondary) !important;
}
.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
}
.nav-link:hover {
    background: var(--bg-hover) !important;
    color: var(--secondary) !important;
}
.nav-link.active {
    background: #EFF6FF !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
}
.nav-icon {
    width: 18px;
    height: 18px;
}
.settings-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}
.settings-btn:hover {
    background: var(--bg-hover);
    color: var(--secondary);
}
.logout-btn {
    color: var(--error-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: 0.2s;
}
.logout-btn:hover {
    background: var(--error-bg);
}

/* CRM Header */
.crm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.crm-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 4px;
}
.crm-header p {
    color: var(--text-muted);
}
.crm-search-bar {
    position: relative;
    margin-bottom: 24px;
}
.crm-search-bar .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}
.crm-search-bar input {
    width: 100%;
    height: 48px;
    padding-left: 48px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    font-size: 15px !important;
    background: #FFFFFF !important;
    color: var(--secondary) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.crm-search-bar input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

/* Global Cards */
.card, .tile {
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important;
    border: 1px solid var(--border-color) !important;
    background: #FFFFFF !important;
    transition: 0.2s !important;
}
.tile:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 24px rgba(0,0,0,0.12) !important;
    border-color: var(--primary) !important;
}
.btn-primary {
    background: var(--primary) !important;
    color: #FFFFFF !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-primary:hover {
    background: var(--primary-hover) !important;
}

/* Light Theme Google Calendar */
#section-calendar {
    background: #FFFFFF !important;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    margin: 24px 0;
    height: calc(100vh - 120px);
}
#section-calendar {
    background: #FFFFFF !important;
    --secondary: #1e293b;
    --border-color: #e2e8f0;
    --text-hint: #94a3b8;
    --text-muted: #64748b;
    --bg-hover: #f1f5f9;
}
.gc-container {
    color: var(--secondary) !important;
}
.gc-sidebar {
    border-right: 1px solid var(--border-color) !important;
    background: #F8FAFC;
}
.gc-create-btn {
    background: var(--primary) !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 4px rgba(29,78,216,0.2) !important;
}
.gc-create-btn:hover {
    background: var(--primary-hover) !important;
}
.gc-calendars-list h3 {
    color: var(--secondary) !important;
    font-weight: 600;
}
.gc-filter-label {
    color: var(--text-muted) !important;
}
.gc-checkbox {
    border-color: var(--text-muted) !important;
    background: #FFF;
}
.gc-btn-today {
    color: var(--secondary) !important;
    border-color: var(--border-color) !important;
}
.gc-nav-arrows button {
    color: var(--text-muted) !important;
}
.gc-nav-arrows button:hover {
    background: var(--bg-hover) !important;
}
.gc-view-select {
    color: var(--secondary) !important;
    border-color: var(--border-color) !important;
}
.gc-week-header {
    background: #FFFFFF !important;
    border-bottom: 1px solid var(--border-color) !important;
}
.gc-time-col-spacer, .gc-day-header {
    color: var(--text-muted) !important;
}
.gc-day-header.today .gc-day-num {
    background: var(--primary) !important;
    color: #FFF !important;
}
.gc-day-header.today .gc-day-name {
    color: var(--primary) !important;
}
.gc-day-cols, .gc-day-col, .gc-grid-cell {
    border-color: var(--border-color) !important;
}
.gc-time-slot span {
    color: var(--text-hint) !important;
}
.gc-mini-nav button {
    color: var(--text-muted) !important;
}
.gc-mini-day:hover {
    background: var(--bg-hover) !important;
}
.gc-mini-day.selected-week {
    background: #EFF6FF !important;
    color: var(--primary) !important;
}
.gc-mini-day.today {
    background: var(--primary) !important;
    color: #FFF !important;
}

/* Calendar Modal (Light Mode) */
.gc-modal-content {
    background: #FFFFFF !important;
    color: var(--secondary) !important;
}
.gc-modal-header {
    background: #F8FAFC !important;
    border-bottom: 1px solid var(--border-color);
}
.gc-title-input {
    color: var(--secondary) !important;
    border-bottom-color: var(--border-color) !important;
}
.gc-title-input:focus {
    border-bottom-color: var(--primary) !important;
}
.gc-tab {
    color: var(--text-muted) !important;
}
.gc-tab.active {
    background: #EFF6FF !important;
    color: var(--primary) !important;
}
.gc-input {
    background: #F8FAFC !important;
    border: 1px solid var(--border-color) !important;
    color: var(--secondary) !important;
}
.gc-input:focus {
    border-color: var(--primary) !important;
}

/* User Profile Dropdown Styles */
.user-profile-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.user-profile-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #333; /* Updated for visibility on light backgrounds */
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.user-profile-trigger:hover {
  background: rgba(0, 0, 0, 0.05); /* Updated hover effect */
}

.user-name-text {
  font-weight: 600;
  font-size: 14px;
}

.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 320px;
  z-index: 1000;
  color: #333;
}

.dropdown-caret {
  position: absolute;
  top: -8px;
  right: 15px;
  width: 14px;
  height: 14px;
  background: white;
  border-top: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
  transform: rotate(45deg);
}

.dropdown-body {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.dropdown-user-info {
  display: flex;
  gap: 16px;
  align-items: center;
}

.dropdown-avatar-box {
  width: 80px;
  height: 80px;
  background: #f59e0b; /* Orange/Yellow background */
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-user-details h4 {
  font-size: 18px;
  color: #333;
  margin-bottom: 2px;
  font-weight: 500;
}

.dropdown-user-details p {
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
}

.dropdown-user-details span {
  font-size: 12px;
  color: #666;
}

.dropdown-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 0 0 4px 4px;
}

.dropdown-btn {
  background: transparent;
  border: none;
  color: #333;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.dropdown-btn:hover {
  background: #f0f0f0;
}

.dropdown-btn-right {
  margin-left: auto;
}
