/* ==========================================================================
   FREE SCHEDULE MAKER - GLOBAL STYLESHEET
   Clean, Accessible, Modern, Responsive Design System (No Emojis)
   ========================================================================== */

:root {
  /* Color Palette - Light Theme */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-muted: #f1f5f9;
  --bg-subtle: #e2e8f0;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-strong: #94a3b8;

  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-focus: rgba(37, 99, 235, 0.25);

  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;

  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;

  --info-bg: #f0f9ff;
  --info-border: #bae6fd;
  --info-text: #075985;

  /* Spacing & Sizing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

  --max-width: 1200px;
  --header-height: 70px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  --bg-primary: #0b1120;
  --bg-surface: #131c31;
  --bg-surface-elevated: #1a243d;
  --bg-muted: #1e293b;
  --bg-subtle: #334155;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --border-subtle: #1e293b;
  --border-medium: #334155;
  --border-strong: #475569;

  --primary-50: #172554;
  --primary-100: #1e3a8a;
  --primary-500: #3b82f6;
  --primary-600: #60a5fa;
  --primary-700: #93c5fd;
  --primary-focus: rgba(96, 165, 250, 0.35);

  --success-bg: #064e3b;
  --success-border: #047857;
  --success-text: #a7f3d0;

  --warning-bg: #78350f;
  --warning-border: #b45309;
  --warning-text: #fde68a;

  --danger-bg: #7f1d1d;
  --danger-border: #b91c1c;
  --danger-text: #fecaca;

  --info-bg: #0c4a6e;
  --info-border: #0284c7;
  --info-text: #bae6fd;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

/* CSS Reset & Core Elements */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

main {
  flex: 1 0 auto;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.625rem; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-bottom: 0.5rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.375rem; }
p { color: var(--text-secondary); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container-wide {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section-py {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.section-header p {
  font-size: 1.1rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background-color: var(--primary-50);
  color: var(--primary-600);
  border: 1px solid var(--primary-100);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Site Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: none;
  opacity: 0.95;
}

.brand-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-600);
  background-color: var(--bg-muted);
  text-decoration: none;
}

/* Nav Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  list-style: none;
  display: none;
  z-index: 101;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  display: block;
}

.dropdown-link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-link:hover, .dropdown-link:focus-visible {
  color: var(--primary-600);
  background-color: var(--bg-muted);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--bg-muted);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
}

.theme-icon-sun, .theme-icon-moon {
  width: 20px;
  height: 20px;
}

[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; }
:root:not([data-theme="dark"]) .theme-icon-sun { display: none; }
:root:not([data-theme="dark"]) .theme-icon-moon { display: block; }

/* Mobile Menu Toggle */
.mobile-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--bg-muted);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  cursor: pointer;
}

/* Breadcrumbs */
.breadcrumb-nav {
  padding: 0.875rem 0;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--border-strong);
  user-select: none;
}

.breadcrumb-item[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.4;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.05rem;
}

.btn-primary {
  background-color: var(--primary-600);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
  background-color: var(--bg-muted);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-600);
  border-color: var(--primary-600);
}

.btn-outline:hover {
  background-color: var(--primary-50);
}

.btn-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.btn-danger:hover {
  background-color: #fee2e2;
}

.btn-icon {
  padding: 0.5rem;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
}

/* Cards */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.card-title {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.card-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Tool Grid (Responsive) */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-500);
  box-shadow: var(--shadow-lg);
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.tool-card-body {
  flex: 1 0 auto;
}

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tool-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

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

.form-help {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Accordion (FAQ) */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 860px;
  margin: 0 auto;
}

.accordion-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.accordion-item:hover {
  border-color: var(--border-medium);
}

.accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.accordion-summary::-webkit-details-marker {
  display: none;
}

.accordion-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

details[open] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Modals / Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 200;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-muted);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-muted);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* Alert Banners */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.alert-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.alert-warning {
  background-color: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
}

.alert-danger {
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
}

.alert-success {
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

.alert-info {
  background-color: var(--info-bg);
  border: 1px solid var(--info-border);
  color: var(--info-text);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 300;
  pointer-events: none;
}

.toast {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem;
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  pointer-events: auto;
  animation: toastIn 0.2s ease forwards;
  max-width: 380px;
}

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

/* Site Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--primary-600);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 0.5rem;
    overflow-y: auto;
    display: none;
    border-top: 1px solid var(--border-subtle);
  }

  .nav-menu.active {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    background: transparent;
  }

  .mobile-toggle-btn {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-py {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
}
