/* Modern CSS Reset */
html { box-sizing: border-box; position: relative;
}
*, *:before, *:after { box-sizing: inherit; }
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: #f7f8fa;
  color: #222;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  margin: 0 0 60px 0; /* bottom margin = footer height */
}
footer {
  width: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
  height: 60px; /* match this to your actual footer height */
  background: #2563eb;
  color: #fff;
  text-align: center;
  padding: 1em 0 0.5em 0;
  border-radius: 24px 24px 0 0;
}

/* Accent Colors */
:root {
  --accent-blue: #2563eb;
  --accent-blue-dark: #1e40af;
  --accent-gold: #eab308;
  --accent-gold-dark: #b68900;
  --gray-light: #f1f5f9;
  --gray-border: #e2e8f0;
  --gray-text: #64748b;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent-blue);
  color: #fff;
  padding: 1em 2em;
  box-shadow: 0 2px 8px rgba(44,62,80,0.06);
  margin-bottom: 2em;
  border-radius: 0 0 12px 12px;
}
.navbar-left, .navbar-right {
  display: flex;
  align-items: center;
  gap: 1.5em;
}
.navbar-logo {
  font-size: 1.4em;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -1px;
  margin-right: 2em;
}
.navbar-link {
  color: #fff !important;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  padding: 0.4em 1em;
  border-radius: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-block;
}
.navbar-link:hover {
  background: var(--accent-blue-dark);
  color: #fff !important;
}
.navbar-user {
  font-weight: 500;
  margin-right: 1em;
}

/* Header */
.header {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5em;
  color: #2d3748;
  letter-spacing: -1px;
  text-align: center;
}

/* Tiles & Cards */
.form-tile, .tile, .card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.06);
  padding: 2em;
  margin: auto;
  max-width: 600px;
}
.tile-title {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 0.5em;
}
.tile-meta {
  color: var(--gray-text);
  margin-bottom: 1em;
}

/* Tabs */
.tab-container {
  display: flex;
  gap: 0.5em;
  margin-bottom: 1em;
}
.tab-link {
  background: var(--gray-light);
  border: none;
  padding: 0.7em 2em;
  border-radius: 8px 8px 0 0;
  font-weight: 500;
  color: #2d3748;
  cursor: pointer;
  transition: background 0.2s;
}
.tab-link.active, .tab-link:hover {
  background: #fff;
  color: var(--accent-blue);
  border-bottom: 2px solid var(--accent-blue);
}
.tab-content {
  border: 1px solid var(--gray-border);
  border-top: none;
  padding: 2em;
  border-radius: 0 0 12px 12px;
  background: #fff;
}

/* Buttons */
.button, .button-link {
  background: var(--accent-blue);
  color: #fff !important;
  border: none;
  border-radius: 6px;
  padding: 0.6em 1.5em;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
  margin-right: 0.5em;
  margin-bottom: 0.5em;
  display: inline-block;
}
.button:hover, .button-link:hover {
  background: var(--accent-blue-dark);
}
.button.gold, .button-link.gold {
  background: var(--accent-gold);
  color: #fff !important;
}
.button.gold:hover, .button-link.gold:hover {
  background: var(--accent-gold-dark);
}

/* Forms */
.form-group {
  margin-bottom: 1.2em;
}
.form-label, .form-tile label {
  font-weight: 500;
  color: var(--accent-blue);
  margin-bottom: 0.3em;
  display: block;
}
/* Inputs */
.form-input, .form-tile input, .form-tile select, .form-tile textarea {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.6em;
  font-size: 0.8em;
  background: #f8fafc;
  width: 100%;
  margin-bottom: 0.2em;
  transition: border 0.2s;
  box-sizing: border-box;
}
.form-input:focus, .form-tile input:focus, .form-tile select:focus, .form-tile textarea:focus {
  border-color: var(--accent-blue);
  outline: none;
}

/* Section headers in forms */
.form-tile h3, .form-tile h2 {
  color: var(--accent-blue);
  font-size: 0.8em;
  margin-bottom: 1em;
  margin-top: 0.5em;
  font-weight: 600;
}

/* Buttons in forms */
.form-tile .button,
.form-tile .button.gold,
.form-tile .button-link {
  min-width: 120px;
  max-width: 220px;
  width: auto;
  display: inline-block;
  margin: 0 0.5em 0 0;
  padding: 0.6em 1.5em;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.8em;
  box-shadow: 0 2px 8px rgba(44,62,80,0.06);
}

.form-tile .button:last-child,
.form-tile .button.gold:last-child {
  margin-right: 0;
}
.form-tile .button,
.form-tile .button-link {
  background: var(--accent-blue);
  color: #fff !important;
  border: none;
  transition: background 0.2s;
}
.form-tile .button.gold,
.form-tile .button-link.gold {
  background: var(--accent-gold);
  color: #fff !important;
}
.form-tile .button:hover,
.form-tile .button-link:hover {
  background: var(--accent-blue-dark);
}
.form-tile .button.gold:hover,
.form-tile .button-link.gold:hover {
  background: var(--accent-gold-dark);
}

/* Checkbox and radio alignment */
.form-tile input[type="checkbox"],
.form-tile input[type="radio"] {
  width: auto;
  margin-right: 0.5em;
  vertical-align: middle;
}

/* Make all buttons use a smaller font */
.button, .button-link, .form-tile .button, .form-tile .button-link {
  font-size: 0.85em !important;
  padding: 0.4em 1em !important;
}

/* Make all tables use a smaller font */
table, th, td {
  font-size: 0.92em;
}

/* Table Styles */
table, .patients-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(44,62,80,0.15);
  margin-bottom: 2em;
}
th, td, .patients-table th, .patients-table td {
  padding: 1em;
  text-align: left;
}
th, .patients-table th {
  background: var(--gray-light);
  color: #2d3748;
  font-weight: 600;
  border-bottom: 2px solid var(--gray-border);
}
tr, .patients-table tr {
  border-bottom: 1px solid var(--gray-border);
}
tr:last-child, .patients-table tr:last-child {
  border-bottom: none;
}
tr:hover, .patients-table tr:hover {
  background: #f9fafb;
}

/* Search Form */
.search-form .search-input {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.5em 1em;
  font-size: 0.8em;
  background: #f8fafc;
  margin-right: 0.5em;
}
.search-form label {
  font-weight: 500;
  color: var(--gray-text);
}

/* Misc */
ul {
  margin: 0.5em 0 0 1.2em;
  padding: 0;
}

.flash-messages {
  margin-bottom: 2em;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.flash {
  padding: 1em 1.5em;
  border-radius: 8px;
  font-size: 0.8em;
  margin-bottom: 1em;
  box-shadow: 0 2px 8px rgba(44,62,80,0.06);
  border: 1px solid transparent;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.notice {
  background: #f1f5f9;
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.alert {
  background: #fef3c7;
  color: var(--accent-gold-dark);
  border-color: var(--accent-gold);
}

.flash-messages.hidden {
  display: none;
}

/* ...existing navbar styles... */
/* Profile icon white */
.profile-icon {
  font-size: 1.8em;
  color: #fff !important;
  cursor: pointer;
  padding: 0 0.5em;
  vertical-align: middle;
}

/* Dropdown menu styling */
.navbar-user-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 2.5em;
  background: #fff;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-radius: 6px;
  padding: 0.5em 0;
  z-index: 1000;
  list-style: none;
  margin: 0;
}

.navbar-user-dropdown:hover .dropdown-menu,
.navbar-user-dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  padding: 0;
}

/* Uniform dropdown links and button */
.dropdown-link,
.dropdown-link.logout-link {
  display: block;
  width: 100%;
  padding: 0.75em 1.5em;
  color: #2d3748;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.8em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.dropdown-link:hover,
.dropdown-link.logout-link:hover {
  background: #f0f4fa;
  color: #2563eb;
}

.autocomplete-suggestions:empty {
  display: none;
}

.autocomplete-suggestions {
  position: absolute;
  background: #fff;
  border: 1px solid #2563eb22;
  border-radius: 6px;
  z-index: 1000;
  max-width: 350px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 2px 8px #2563eb22;
}
.autocomplete-suggestions div {
  padding: 0.5em 1em;
  cursor: pointer;
}
.autocomplete-suggestions div:hover {
  background: #2563eb;
  color: #fff;
}

/* Bulk Import Container */
.bulk-import-container {
  margin: 2em 0;
  padding: 2em;
  background: #f9fafb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Title */
.bulk-import-title {
  margin-top: 0;
  margin-bottom: 1em;
  color: #2563eb;
  font-size: 1.5em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* Description */
.bulk-import-description {
  color: #475569;
  font-size: 1em;
  margin-bottom: 1.5em;
  line-height: 1.6;
}

/* Required Columns */
.required-column {
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
  padding: 0.2em 0.6em;
  font-weight: 600;
}

/* Actions */
.bulk-import-actions {
  margin-bottom: 1.5em;
  text-align: center;
}

.bulk-import-actions .template-download {
  background: #eab308;
  color: #222;
  font-weight: 600;
  padding: 0.6em 1.2em;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
}

.bulk-import-actions .template-download:hover {
  background: #d4a106;
  color: #000;
}

/* Form */
.bulk-import-form {
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: center;
}

.bulk-import-form .form-group {
  width: 100%;
}

.bulk-import-form .form-input {
  width: 100%;
  padding: 0.6em;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1em;
}

.bulk-import-form .form-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.bulk-import-form .button.gold {
  background: #f59e0b;
  color: #fff;
  font-weight: 600;
  padding: 0.6em 1.5em;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.bulk-import-form .button.gold:hover {
  background: #d97706;
}

.selected-services-container {
  margin-top: 1em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.selected-service {
  display: flex;
  align-items: center;
  background: #e5f3ff;
  border: 1px solid #2563eb;
  border-radius: 4px;
  padding: 0.5em 1em;
  font-size: 0.9em;
  color: #2563eb;
}

.selected-service span {
  margin-right: 0.5em;
}

/* Responsive */
@media (max-width: 700px) {
  .form-tile, .tab-content, .card {
    padding: 1em;
  }
  th, td, .patients-table th, .patients-table td {
    padding: 0.5em;
  }
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1em;
  }
  .navbar-left, .navbar-right {
    flex-direction: column;
    gap: 0.5em;
    width: 100%;
  }
  .navbar-logo {
    margin-bottom: 0.5em;
  }
}