:root{
  --primary:#0066cc;
  --primary-dark:#0052a3;
  --primary-light:#e6f2ff;
  --bg:#fafbfc;
  --card:#ffffff;
  --text:#2c3e50;
  --text-light:#5a6c7d;
  --muted:#8492a6;
  --line:#e1e8ed;
  --success:#10b981;
  --danger:#ef4444;
  --warning:#f59e0b;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.05);
  --radius: 8px;
}

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body{
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color:var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Sticky Footer Layout */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 16px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.site-footer p {
  margin: 0;
}

.container{
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Navigation */
.navbar{
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand{
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-link{
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav-link:hover{
  color: var(--primary);
  background: var(--primary-light);
}

/* Cards */
.card{
  max-width: 100%;
  width: 1400px;
  margin: 40px auto;
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

/* Typography */
h1{
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.5px;
}

h2{
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

h3{
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

p{
  margin-bottom: 16px;
}

.muted{ 
  color: var(--muted);
  font-size: 14px;
}

.tiny{ 
  font-size: 13px;
  color: var(--text-light);
}

/* Forms */
.form{
  margin-top: 24px;
  display: grid;
  gap: 20px;
}

label{
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
}

input, textarea, select{
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

input[type="checkbox"] {
  width: auto;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

input:focus, textarea:focus, select:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

input::placeholder, textarea::placeholder{
  color: var(--muted);
}

textarea{
  resize: vertical;
  min-height: 100px;
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,102,204,0.2);
}

.btn .material-symbols-outlined {
  font-size: 20px;
}

.btn:hover{
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,102,204,0.3);
}


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

.btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn.secondary{
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--line);
  box-shadow: none;
}

.btn.secondary:hover{
  background: var(--card);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.btn.danger{
  background: white;
  color: var(--danger);
  border: 2px solid var(--danger);
  box-shadow: none;
}

.btn.danger:hover{
  background: var(--danger);
  color: white;
}

/* Validation */
.validation{
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  font-size: 14px;
  margin-bottom: 16px;
}

.field-error{
  color: var(--danger);
  font-size: 13px;
  margin-top: 4px;
  display: block;
}

/* Info Box */
.info{
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.info > div{
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.info > div:last-child{
  border-bottom: none;
}

.info strong{
  color: var(--text);
  font-weight: 600;
  display: inline-block;
  min-width: 140px;
}

/* Tables */
.table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th, .table td{
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.table thead th{
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr{
  transition: background 0.15s ease;
}

.table tbody tr:hover{
  background: var(--bg);
}

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

.table tr.cancelled{
  opacity: 0.5;
  text-decoration: line-through;
}

/* Layout Utilities */
.row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.inline{
  display: flex;
  gap: 12px;
  align-items: center;
}

.right{ 
  text-align: right;
}

.ms-auto{
  margin-left: auto;
}

.mt-5{
  margin-top: 3rem;
}

.mb-4{
  margin-bottom: 2rem;
}

.py-3{
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Toast/Success Messages */
.toast{
  padding: 14px 20px;
  border-radius: var(--radius);
  border: 1px solid #a7f3d0;
  background: #d1fae5;
  color: #065f46;
  font-weight: 600;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast::before{
  content: "?";
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-weight: bold;
  font-size: 16px;
}


/* Bootstrap Override for better integration */
.navbar-expand-lg{
  padding: 16px 0;
}

.navbar-toggler{
  border: none;
  padding: 8px;
}

.navbar-toggler:focus{
  box-shadow: none;
}

.navbar-light .navbar-toggler-icon{
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(44, 62, 80, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.text-muted{
  color: var(--text-light) !important;
  margin-right: 12px;
  font-size: 14px;
}

.text-center{
  text-align: center;
}

/* Material Icons */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
  vertical-align: middle;
}

.material-symbols-outlined.small {
  font-size: 18px;
}

.material-symbols-outlined.large {
  font-size: 32px;
}

.material-symbols-outlined.success {
  color: var(--success);
}

.material-symbols-outlined.danger {
  color: var(--danger);
}

.material-symbols-outlined.primary {
  color: var(--primary);
}


/* Tab Button Styles */
.tab-button {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-button:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* Time Slot Picker Styles */
.timeslot-picker {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.timeslot-header h3 {
  margin-bottom: 4px;
}

.timeslot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.timeslot {
  position: relative;
  padding: 16px 12px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--card);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-weight: 500;
}

.timeslot:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.timeslot.available {
  border-color: var(--success);
  background: #f0fdf4;
}

.timeslot.available:hover {
  background: #dcfce7;
  border-color: var(--success);
}

.timeslot.available.adjacent {
  border-color: var(--primary);
  background: #e6f2ff;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.timeslot.available.adjacent:hover {
  background: #cce5ff;
}

.timeslot.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,102,204,0.3);
}

.timeslot.unavailable {
  background: #f5f5f5;
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.timeslot-time {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeslot-duration {
  font-size: 12px;
  opacity: 0.8;
}

.timeslot.selected .timeslot-duration {
  opacity: 1;
}

.timeslot-status {
  position: absolute;
  top: 4px;
  right: 4px;
  color: var(--danger);
}

.timeslot-status .material-symbols-outlined {
  font-size: 16px;
}

.timeslot-order {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(255, 255, 255, 0.3);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.timeslot-legend {
  display: flex;
  gap: 24px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  margin-top: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.legend-box {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid var(--line);
}

.legend-box.available {
  background: #f0fdf4;
  border-color: var(--success);
}

.legend-box.selected {
  background: var(--primary);
  border-color: var(--primary);
}

.legend-box.unavailable {
  background: #f5f5f5;
  border-color: var(--line);
  opacity: 0.6;
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

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

.modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
}

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

/* Calendar Styles */
.calendar-container {
  margin-top: 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.calendar-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.calendar-header .btn {
  padding: 8px 16px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day-header {
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  padding: 12px 8px;
  background: var(--bg);
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-day {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.calendar-day:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.calendar-day.today {
  background: var(--primary-light);
  border-color: var(--primary);
  font-weight: 600;
}

.calendar-day.other-month {
  opacity: 0.4;
  background: var(--bg);
}

.calendar-day.has-appointments {
  border-color: var(--success);
  background: #f0fdf4;
}

.calendar-day.has-appointments:hover {
  background: #dcfce7;
}

.day-number {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
}

.appointment-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Vertical Tabs Layout */
.admin-layout {
  display: flex;
  gap: 0;
  min-height: 500px;
}

.vertical-tabs {
  flex: 0 0 220px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 0;
  margin: -40px;
  margin-right: 0;
  padding-top: 40px;
}

.vertical-tabs .tab-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border-right: none;
  border-top: none;
  border-bottom: none;
  width: 100%;
  text-align: left;
}

.vertical-tabs .tab-item:hover {
  background: var(--card);
  color: var(--primary);
  border-left-color: var(--primary-light);
}

.vertical-tabs .tab-item.active {
  background: var(--card);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}

.vertical-tabs .tab-item .icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.vertical-tabs .tab-item .material-symbols-outlined {
  font-size: 20px;
}


.tab-content {
  flex: 1;
  padding: 0 40px;
  animation: fadeIn 0.3s ease;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Authentication Prompt Page Styles */
.auth-options {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.auth-option {
  flex: 1;
  min-width: 250px;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  background: var(--bg);
  transition: all 0.2s ease;
}

.auth-option:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.auth-option h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--text);
}

.auth-option p {
  margin-bottom: 1rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--muted);
  min-width: 40px;
}

.skip-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

@media (max-width: 768px) {
  .auth-options {
    flex-direction: column;
  }
  
  .auth-divider {
    writing-mode: horizontal-tb;
    padding: 1rem 0;
  }
}

footer{
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .card{
    margin: 20px;
    padding: 24px;
  }
  
  h1{
    font-size: 28px;
  }
  
  .table th, .table td{
    padding: 12px 8px;
    font-size: 14px;
  }
  
  .btn{
    padding: 10px 20px;
    font-size: 14px;
  }

  .admin-layout {
    flex-direction: column;
  }

  .vertical-tabs {
    flex: none;
    margin: -24px;
    margin-bottom: 24px;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
    display: flex;
    overflow-x: auto;
  }

  .vertical-tabs .tab-item {
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    padding: 12px 20px;
  }

  .vertical-tabs .tab-item:hover {
    border-left-color: transparent;
    border-bottom-color: var(--primary-light);
  }

  .vertical-tabs .tab-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
  }

  .tab-content {
    padding: 0;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    padding: 4px;
  }

  .day-number {
    font-size: 14px;
  }

  .appointment-badge {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .calendar-day-header {
    font-size: 12px;
    padding: 8px 4px;
  }

  .calendar-header h2 {
    font-size: 20px;
  }

  .modal-content {
    max-width: 100%;
    max-height: 95vh;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .timeslot-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }

  .timeslot {
    padding: 12px 8px;
  }

  .timeslot-time {
    font-size: 16px;
  }

  .timeslot-legend {
    flex-direction: column;
    gap: 12px;
  }
}

/* Smooth page transitions */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  animation: fadeIn 0.3s ease;
}
