:root {
  --red: #E61E2A;
  --navy: #1A3E54;
  --navy-dark: #122c3d;
  --text: #333;
  --text-muted: #5a6b7d;
  --bg: #fff;
  --bg-soft: #f4f7fb;
  --border: #d8e0ec;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --font-script: "Dancing Script", cursive;
  --shadow: 0 4px 16px rgba(0, 0, 0, .08);
  --radius: 8px;
}

body.dark-theme {
  --text: #e8eaed;
  --text-muted: #98a2b0;
  --bg: #1A202C;
  --bg-soft: #1E2738;
  --border: #4A5568;
  --navy: #e8eaed;
  --shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

body.dark-theme .btn-secondary {
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border);
}

body.dark-theme th {
  background: var(--navy-dark);
  color: var(--text);
}

body.dark-theme .service-card,
body.dark-theme .contact-form,
body.dark-theme .admin-table-card {
  background: var(--bg);
}

body.dark-theme .hero,
body.dark-theme .section-light,
body.dark-theme .site-footer {
  background: var(--bg-soft);
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container {
  width: min(1140px, 92vw);
  margin-inline: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  color: var(--navy);
}

a {
  color: var(--red);
  text-decoration: none;
}

p {
  color: var(--text-muted);
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.top-bar {
  background: var(--navy-dark);
  color: #fff;
  padding: .5rem 0;
  font-size: .9rem;
}

.top-bar a {
  color: #fff;
}

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner,
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
  text-decoration: none;
}

.brand-icon {
  width: 60px;
}

.brand-title {
  font-size: 1.5rem;
}

.brand-sub {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: .7rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--navy);
  font-weight: 600;
}

.hero {
  background: var(--bg-soft);
  padding: 4rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.tagline {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--navy);
}

.hero-image-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  text-transform: uppercase;
  color: var(--red);
  font-size: .8rem;
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery img {
  border-radius: var(--radius);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.site-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.layout-grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-form {
  background: var(--bg-soft);
  padding: 2rem;
  border-radius: var(--radius);
}

.form-row {
  margin-bottom: 1rem;
}

.form-row-checkbox label {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-weight: 400;
  font-size: .85rem;
}

.form-row-checkbox input[type="checkbox"] {
  width: auto;
  margin-top: .2rem;
}

label {
  display: block;
  margin-bottom: .5rem;
  font-size: .9rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.btn {
  display: inline-block;
  padding: .8rem 1.6rem;
  border: none;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}

.btn-secondary {
  background: var(--navy);
  border: 2px solid var(--navy);
}

.btn-nav {
  padding: .6rem 1.2rem;
}

.btn-sm {
  padding: .4rem .8rem;
  font-size: .8rem;
}

.btn-delete {
  background-color: var(--red);
}

/* Admin */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 240px;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform .4s ease-in-out;
  z-index: 2000;
}

.admin-sidebar.is-open {
  transform: translateX(0);
}

.sidebar-header {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.close-sidebar {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  cursor: pointer;
  transition: color .3s;
}

.close-sidebar:hover {
  color: var(--red);
}

.admin-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.admin-sidebar a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--text-muted);
  font-weight: 600;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: var(--bg);
  color: var(--navy);
}

.sidebar-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 2001;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: -1rem;
}

.sidebar-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  margin: 5px 0;
}

.admin-main-content {
  transition: margin-left .4s ease-in-out;
}

.admin-main-content.sidebar-open {
  margin-left: 240px;
}

.admin-container {
  padding: 2rem;
}

.header-left-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-brand {
  flex-grow: 1;
  text-align: center;
}

.admin-header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-input {
  padding: .6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  width: 200px;
}

.admin-table-card {
  background: var(--bg-soft);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 2px solid var(--border);
  width: 100%;
  overflow-x: auto;
}

.admin-table-card h2 {
  margin-top: 0;
}

.bulk-actions-toolbar {
  display: none;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-soft);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .6);
  z-index: 2000;
}

.modal.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg);
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 500px;
  width: 90%;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

#eventForm > *,
#customerForm > * {
  margin-bottom: .75rem;
  display: block;
}

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    padding: 1.25rem;
  }
  .admin-container {
    padding: 1rem;
  }
  .admin-table-card {
    padding: 1rem;
  }
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.view-section {
  display: none;
}

.view-section.is-active {
  display: block;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--red);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.floating-theme-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.dashboard-primary-cards {
  grid-column: 1 / span 1;
}

.dashboard-secondary-cards {
  display: contents;
}

@media (min-width: 960px) {
  .admin-dashboard-grid {
    grid-template-columns: 2fr 1fr;
  }
  .dashboard-primary-cards {
    grid-column: 1 / span 1;
  }
  .dashboard-secondary-cards {
    grid-column: 2 / span 1;
    display: block;
  }
}

@media (max-width: 768px) {
  .admin-main-content {
    margin-left: 0 !important; /* Override sidebar-open margin */
  }
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
  }
  .admin-sidebar.is-open {
    transform: translateX(0);
    width: 80%;
    max-width: 300px;
  }
  .sidebar-toggle {
    display: block; /* Make sure it's visible */
  }
  .header-brand h1 {
    font-size: 1.2rem;
  }
  .admin-header-controls .btn {
      display: none;
  }
  .admin-header-controls .search-input {
      width: 150px;
  }
}

/* --- FullCalendar Overrides (Integrated into main styles.css) --- */
.fc-daygrid-day-number,
.fc-col-header-cell-cushion,
.fc-list-day-text,
.fc-list-day-alt {
  color: inherit !important;
}
.fc-toolbar-title {
  color: inherit !important;
}
.fc-button {
  background-color: var(--red) !important;
  border-color: var(--red) !important;
  color: #fff !important;
}
.fc-button:hover {
  background-color: var(--navy) !important;
  border-color: var(--navy) !important;
}
.fc-event {
  border-radius: 3px;
  font-size: .85em;
  padding: 2px 4px;
  cursor: pointer;
  color: #fff !important;
}
.fc-event.holiday {
  background-color: var(--navy) !important;
  border-color: var(--navy-dark) !important;
  color: #fff !important;
}
.fc-event.holiday .fc-event-title {
  font-weight: bold;
}
body.dark-theme .fc-toolbar-title,
body.dark-theme .fc-col-header-cell-cushion,
body.dark-theme .fc-daygrid-day-number,
body.dark-theme .fc-list-day-text,
body.dark-theme .fc-list-day-alt {
  color: var(--text) !important;
}
body.dark-theme .fc-daygrid-day {
  background-color: var(--bg);
}
body.dark-theme .fc-daygrid-day.fc-day-today {
  background-color: var(--bg-soft);
}
body.dark-theme .fc-scrollgrid-sync-table {
  background-color: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
body.dark-theme .fc-scrollgrid-sync-table th,
body.dark-theme .fc-scrollgrid-sync-table td {
  border-color: var(--border);
}
.calendar-header-v2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.calendar-header-v2 .header-left,
.calendar-header-v2 .header-right {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.calendar-header-v2 h2 {
  margin: 0;
  font-size: 1.8em;
  color: var(--navy);
}
.calendar-header-v2 .btn {
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: .9em;
  border: none;
}
.contact-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.contact-left-column,
.contact-right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.google-map-embed iframe {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 300px;
}
.faq-details {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
}
.faq-summary {
  font-weight: 600;
  padding: 1rem;
  cursor: pointer;
  color: var(--navy);
  list-style: none;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-answer {
  padding: .5rem 1rem 1rem 1rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .contact-main-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.brand-text {
  display: none;
}
@media (min-width: 768px) {
  .brand-text {
    display: block;
  }
  /* Responsive Admin Layout */
  @media (max-width: 992px) {
    .admin-dashboard-grid {
      grid-template-columns: 1fr;
    }
    .dashboard-secondary-cards {
      display: block;
    }
  }
}

@media (max-width: 768px) {
  .hero-grid,
  .about-layout,
  .layout-grid-2-col {
    grid-template-columns: 1fr;
  }
  .main-nav {
    display: none;
  }
  .top-bar {
    display: none;
  }
}

.dashboard-grid-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

@media (max-width: 900px) {
  .dashboard-grid-layout {
    grid-template-columns: 1fr;
  }
}

.dashboard-sidebar {
  background: var(--bg-soft);
  padding: 1.5rem;
  border-radius: var(--radius);
  height: fit-content;
}

#upcoming-appointments-list {
  list-style: none;
  padding: 0;
}

#upcoming-appointments-list li {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

#upcoming-appointments-list li:last-child {
  border-bottom: none;
}
