@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
  --bg: #f6fbfc;
  --turq: #06b6d4;
  --accent: #0ea5a4;
  --dark: #063047;
  --muted: #6b7280;
  --card: #ffffff;
  --danger: #ef4444;
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px
}

/* Header: inner container centered and constrained */
.site-header {
  background: linear-gradient(90deg, var(--dark), #0b4f62);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.08)
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1100px;
  margin: 0 auto
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700
}

.logo-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--turq), var(--accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 700;
  color: #00343a
}

.logo-text {
  font-size: 18px
}

/* Nav */
.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-shrink: 0
}

.nav-links a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: background .18s, transform .18s
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px)
}

.hamburger {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px
}

/* make header contents centered on page and not stretched edge-to-edge */
.header-inner.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px
}

/* Hero and cards */
.hero {
  background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.9));
  padding: 36px;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.06);
  display: flex;
  gap: 28px;
  align-items: center;
  margin-top: 18px
}

.hero-left {
  flex: 1
}

.hero-right {
  width: 380px
}

.h1 {
  font-size: 28px;
  margin: 0 0 8px;
  color: var(--dark);
  font-weight: 700
}

.lead {
  color: var(--muted);
  margin: 0 0 16px
}

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

.btn {
  background: linear-gradient(90deg, var(--turq), var(--accent));
  border: none;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.12);
  transition: transform .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px
}

.btn.secondary {
  background: #fff;
  color: var(--dark);
  border: 1px solid #eef6f6
}

.btn:hover {
  transform: translateY(-3px)
}

.btn--edit {
  background: linear-gradient(90deg, #f59e0b, #f97316);
  border: none;
  color: #fff;
  padding: 7px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.12);
  transition: transform .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px
}

.btn--danger {
  background: linear-gradient(90deg, #ff6b6b, #ef4444);
  border: none;
  color: #fff;
  padding: 7px 18px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.12);
  transition: transform .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px
}

a.delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  border: 2px solid #e22929;
  color: #e22929;
  font-weight: 600;
  text-decoration: none;
  font-family: system-ui, sans-serif;
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(226, 41, 41, 0.15);
}

a.delete-btn:hover {
  background: #e22929;
  color: #fff;
  box-shadow: 0 4px 10px rgba(226, 41, 41, 0.3);
  transform: translateY(-1px);
}

a.delete-btn:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(226, 41, 41, 0.2);
}


/* make anchor .btn look like button */
a.btn {
  display: inline-flex;
  text-decoration: none
}


/* global inputs and file input styling */
.input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e6f7f7;
  background: #fbffff;
  font-size: 14px
}

input[type="file"] {
  padding: 8px;
  background: #fafcff;
  border-radius: 8px;
  border: 1px solid #e9f7f7;
  font-size: 14px
}



/* nicer file input: hide ugly default on some browsers using label pattern - styles here for fallback */
.file-label {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e9fbfc;
  border: 1px solid #d7f2f3;
  color: var(--dark);
  cursor: pointer
}

.file-label:hover {
  transform: translateY(-2px)
}

/* cards and doctors */
.card {
  background: var(--card);
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.04)
}

.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px
}

.doctor {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  transition: transform .12s ease, box-shadow .12s ease;
  background: linear-gradient(180deg, #fff, #fbffff)
}

.doctor:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06)
}

/* Improved photo container: fixed aspect ratio and centered crop */
.doc-photo {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  /* background: #ffffff; */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(3, 54, 60, 0.04)
}

.doc-photo img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center center;
  display: block
}

/* slots */
.slots {
  margin-top: 12px
}

.slot {
  padding: 8px;
  border-radius: 8px;
  border: 1px dashed #e6f7f8;
  cursor: pointer;
  text-align: center;
  margin: 6px;
  display: inline-block;
  min-width: 64px;
  transition: all .12s ease;
  background: #f7ffff
}

.slot.busy {
  background: #fff0f0;
  color: var(--danger);
  border-color: #ffdddd;
  cursor: not-allowed;
  opacity: 0.9
}

.slot.selected {
  background: linear-gradient(90deg, var(--turq), var(--accent));
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.08)
}

/* admin menu */
.admin-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 18px 0
}

.menu-card {
  background: linear-gradient(180deg, #ffffff, #f4ffff);
  padding: 18px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  transition: transform .12s, box-shadow .12s
}

.menu-card i {
  font-size: 26px;
  color: var(--turq)
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 48px rgba(3, 54, 60, 0.08)
}

/* ensure menu cards fit in small screens */
@media(max-width:768px) {
  .admin-menu {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px
  }

  .header-inner.container {
    padding-left: 12px;
    padding-right: 12px
  }
}

/* table and links */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px
}

.table th,
.table td {
  padding: 8px;
  border-bottom: 1px solid #f0f3f7;
  text-align: left
}

a.small {
  color: var(--muted);
  text-decoration: none
}

a.small:hover {
  color: var(--danger)
}

/* make delete links look like small buttons */

/* modal and footer */
.modal-backdrop {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto
}

.modal {
  background: #fff;
  padding: 22px;
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.18);
  transform: translateY(6px);
  transition: transform .18s ease
}

.modal.show {
  transform: translateY(0)
}

/* responsive nav behavior */
@media(max-width:980px) {
  .hero {
    flex-direction: column
  }

  .hero-right {
    width: 100%
  }
}

@media(max-width:768px) {
  .nav-links {
    display: none;
    position: absolute;
    right: 16px;
    top: 70px;
    background: linear-gradient(180deg, #07343a, #0b6b73);
    padding: 12px;
    border-radius: 8px;
    flex-direction: column;
    gap: 6px;
    width: 220px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.12)
  }

  .nav-links a {
    color: #e6ffff;
    padding: 10px;
    border-radius: 6px;
    display: block
  }

  .nav-links.active {
    display: flex
  }

  .hamburger {
    display: block
  }

  .container {
    padding: 12px
  }

  .admin-menu {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr))
  }
}

/* accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}