* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  /* stops white right-side space */
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0.5rem;
}

/* header  */
.Top-Branding {
  background-color: rgba(243, 100, 33);
  color: white;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  margin: 0;
}

header #logo {
  float: left;
  margin-left: -5px;
  margin-bottom: -10px;
  height: 150px;
}

.Top-Branding h1 {
  text-align: center;
  margin: 0;
  margin-top: 0.5px;
  font-size: 40px;
  color: #1e1e1e;
  font-family: 'Playfair Display Bold', serif;
  font-weight: 600;
  padding: 0;
  padding-right: 10px;
}

.Top-Branding h3 {
  text-align: center;
  color: #ffffff;
  margin: 0;
  font-size: 18px;
  font-weight: 100;
}

header a:hover {
  color: white;
  font-weight: bold;
}

/* Navigation Bar  */
nav {
  background-color: brown;
  margin: 0;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.menu li:has(.submenu) {
  position: relative;

  & small {
    margin-left: 0.35em;
  }

  &:hover>.submenu {
    display: block;
  }
}

.submenu {
  position: absolute;
  left: 0;
  right: auto;
  display: none;
  background-color: #00274c;
  list-style-type: none;
  width: 175%;
  text-align: center-left;
  padding: 1em 0.5em;
  margin-top: 8px;
  flex-wrap: wrap;
}

li {
  padding: 0.5em 1em;
}

header a {
  text-decoration: none;
  color: #ffffff;
  display: block;
  padding: 0.5em 1em;
  border-radius: 20px;
  float: none;
}

header a:hover {
  background-color: rgba(243, 100, 33);
}

/* Main Index html Area  */
main {
  display: flex;
  min-height: 70vh;
}

section {
  flex-basis: 50%;
  background-color: whitesmoke;
  margin: 0;
  padding: 0;
}

#section-design {
  flex-basis: 100%;
  background-color: whitesmoke;
  margin: 0;
  padding: 20px;
  min-height: 80vh;
}

#section1 {
  padding-left: 20px;
  color: #00274c;
  padding-top: 10px;
  font-size: 30px;
  font-weight: bold;
}

/* Aside  */
aside {
  flex-basis: 50%;
  padding-top: 13px;
  background-color: #e0e0e0;
  padding-left: 20px;
  padding-right: 25px;
}

#about1 {
  font-size: 25px;
  color: #00274c;
}

#about2 {
  color: brown;
}

/* ===== Tutor Intro Section ===== */
.tutor-intro {
  background-color: #f9fafb;
  color: #00274c;
  padding: 60px 40px;
  text-align: center;
  border-radius: 12px;
  margin: 40px auto;
  max-width: 900px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.tutor-intro h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #c62b28;
  font-family: 'Playfair Display', serif;
}

.tutor-intro p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #1e1e1e;
}

.tutor-search-buttons {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #00274c;
  color: #fff;
}

.btn-primary:hover {
  background-color: #0d6efd;
}

.btn-secondary {
  background-color: #f29b1c;
  color: #00274c;
}

.btn-secondary:hover {
  background-color: #c62b28;
  color: #fff;
}

/* Login Page  */
.main-login {
  display: flex;
  min-height: 70vh;
  background-color: whitesmoke;
  padding-bottom: 50px;
}

.login-section {
  display: flex;
  justify-content: flex-start;
  gap: 100px;
  padding: 40px 40px 90px 190px;
  margin: 0;
}

.login-card {
  background-color: #00274c;
  width: 350px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  border-top: rgba(243, 100, 33) 5px solid;
  margin-top: 40px;
  text-decoration: none;
  color: white;
}

.login-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.login-card h2 {
  padding-right: 10px;
  text-align: center;
}

.login-card:hover {
  transform: translateY(-20px);
  color: rgba(243, 100, 33);
  font-weight: bold;
  cursor: pointer;
}

/* Login Features - Student, Teachers & Admin */
.student-login {
  background-color: #e0e0e0;
  display: flex;
  padding: 65px 16px 72px;
  justify-content: center;
}

.auth-wrap {
  width: 100%;
  max-width: 640px;
}

.auth-wrap1 {
  width: 100%;
  max-width: 900px;
}

.auth-wrap2 {
  width: 100%;
  max-width: 950px;
}

.auth-card {
  background: rgb(255, 255, 255);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 30px;
}

.auth-card1 {
  background: rgb(255, 255, 255);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 50px;
}

.auth-title {
  font-size: 36px;
  margin: 4px 0 8px;
  color: #0a2c4a;
}

.auth-sub {
  display: block;
  margin: 0 0 30px;
  color: rgb(72, 101, 129);
}

fieldset {
  margin-bottom: 30px;
  padding: 10px 15px;
  border: 2px solid #c3b1e1;
  border-radius: 6px;
}

legend {
  color: brown;
  margin-bottom: 10px;
  font-weight: 800;
}

.field-error {
  color: red;
  font-size: 0.9rem;
  margin-left: 10px;
}

.auth-label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid gray;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.auth-input:focus {
  border-color: #1663eb;
  box-shadow: 0 0 0 4px rgba(22, 99, 235, 0.15);
}

.auth-btn {
  width: 100%;
  height: 46px;
  margin-top: 16px;
  border: none;
  border-radius: 8px;
  background: #00274c;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.auth-btn:hover {
  background: #0d6efd;
}

/* Language chip selector inside teacher registration form */
.language-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 4px;
}

.language-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.language-chip input[type="checkbox"] {
  display: none;
}

.language-chip span {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.9rem;
  color: #0f172a;
  transition: background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, transform 0.05s ease,
    box-shadow 0.1s ease;
}

.language-chip input[type="checkbox"]:checked+span {
  background: #f36a21;
  border-color: #f36a21;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.language-chip span:hover {
  border-color: #94a3b8;
}

.language-chip-help {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
}

/* Hourly rate $ styling */
.rate-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.rate-symbol {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  color: #555;
  font-weight: bold;
  pointer-events: none;
}

.rate-input {
  padding-left: 25px !important;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
}

.toggle-password svg {
  fill: #00274c;
}

.toggle-password:hover svg {
  fill: brown;
}

.signup-card {
  margin-top: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 22px;
  text-align: center;
}

.signup-text {
  margin: 0 0 12px;
  font-size: 20px;
  color: #111827;
}

.signup-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1.6px solid #1663eb;
  color: #1663eb;
  text-decoration: none;
  font-weight: 700;
}

.signup-btn:hover {
  background: #0d6efd;
  color: #fff;
}

/* Admin top navigation alignment */
.admin-nav {
  justify-content: center;
  gap: 100px;
}

.admin-nav .welcome {
  color: black;
  font-size: 18px;
  font-weight: 600;
  padding-top: 17px;
}

/* Dashboard Php  */
.dashboard-details {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.dashboard-label {
  font-weight: bold;
  color: #111827;
}

.dashboard-value {
  color: #374151;
  text-align: right;
}

.dashboard-actions {
  margin-top: 1rem;
}

.dashboard-actions .auth-btn {
  margin-right: 0.5rem;
}

.dashboard-secondary-actions {
  margin-top: 1rem;
  text-align: right;
}

.admin-btn-group {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 25px 0 25px;
}

.subtext {
  font-size: 1.25rem;
  font-weight: bold;
  color: rgba(243, 100, 33);
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
}

.dashboard-subheading {
  font-size: 1.25rem;
  font-weight: bold;
  color: rgba(243, 100, 33);
  margin-top: 1.0rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.dashboard-subheading::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #0f172a;
  margin-top: 4px;
  margin-bottom: 23px;
  border-radius: 2px;
}

/* =========================
   BOOKING (SCOPED FIX ✅)
   Only applies to booking.php
   ========================= */

/* IMPORTANT:
   DO NOT make auth-wrap wider globally.
   Booking page gets width using .booking-page wrapper only.
*/
.booking-page .auth-wrap {
  width: 100%;
  max-width: 1200px;
  /* booking page wide container only */
  margin: 0 auto;
}

/* Your booking.php uses .booking (not .booking-layout in your final code) */
.booking-page .booking {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 15px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* Left panel */
.booking-page .schedule-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 18px 30px 20px;
  width: 64%;
  min-width: 600px;
}

/* Right panel */
.booking-page .appointments-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 0 14px 10px;
  width: 64%;
  min-width: 600px;
}

/* Blue top bar like your professional screenshot */
.booking-page .appointments-topbar {
  height: 6px;
  background: #1e73e8;
  border-radius: 8px 8px 0 0;
  margin: 8px 6px 10px;
}

/* Form rows in booking */
.booking-page .form-row {
  margin-bottom: 14px;
}

.booking-page .form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0a2c4a;
}

.booking-page .input {
  width: 100%;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
}

.booking-page .input:focus {
  border-color: #1663eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 99, 235, 0.12);
}

/* Button in booking page */
.booking-page .btn-primary {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #00274c;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.booking-page .btn-primary:hover {
  background: #0d6efd;
}

.booking-page .btn-primary:active {
  transform: translateY(1px);
}

/* Tutor results scroll (left) */
.booking-page .results {
  margin-top: 14px;
  display: grid;
  gap: 25px;
  max-height: 800px;
  overflow-y: auto;
  padding-right: 12px;
}

/* Tutor cards */
.booking-page .tutor-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 14px 16px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #c3b1e1;
}

.booking-page .tutor-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.booking-page .tutor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #d9e2ec;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0a2c4a;
}

.booking-page .tutor-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: rgba(243, 100, 33);
}

.booking-page .tutor-meta {
  margin: 2px 0 8px;
  color: #1663eb;
  font-size: 16px;
}

/* Tabs (right side) */
.booking-page .appt-tabs {
  display: flex;
  gap: 22px;
  padding: 0 6px;
}

.booking-page .appt-tab {
  position: relative;
  background: transparent;
  border: 0;
  padding: 12px 0 10px;
  font: 600 16px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: #4b5563;
  cursor: pointer;
}

.booking-page .appt-tab.is-active {
  color: #0a2c4a;
}

.booking-page .appt-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: #0a2c4a;
  border-radius: 2px;
}

.booking-page .appt-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 8px 6px 14px;
}

.booking-page .appt-content {
  display: grid;
  gap: 25px;
  padding: 0 6px 4px;
  min-height: 210px;
  /* keeps the right panel full like your screenshot */
}

/* Empty state card (the “No appointments to show” box) */
.booking-page .appt-empty {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  border-color: #c3b1e1;
  padding: 28px 18px;
  text-align: center;
  color: #374151;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.booking-page .appt-empty .icon {
  font-size: 42px;
  opacity: 0.55;
  margin-bottom: 10px;
}

.booking-page .appt-empty .lead {
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0 6px;
}

/* Appointment cards (when there ARE bookings) */
.booking-page .appt-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.booking-page .appt-card .badge-row {
  padding: 12px 14px 8px;
}

.booking-page .badge {
  display: inline-block;
  padding: 6px 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-weight: 700;
  color: #374151;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.booking-page .appt-body {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 12px 14px 16px;
  border-top: 1px solid #e5e7eb;
}

.booking-page .appt-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #d9e2ec;
  display: grid;
  place-items: center;
  color: #0a2c4a;
  font-weight: 800;
}

.booking-page .appt-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.15;
  color: #111827;
}

.booking-page .appt-when {
  color: #374151;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}

.booking-page .appt-meta {
  color: #334155;
  font-size: 13px;
  letter-spacing: 0.3px;
}


/* Messaging Layout
-------------------------------------- */

.messaging-layout {
  display: grid;
  grid-template-columns: minmax(230px, 260px) minmax(0, 1.6fr);
  gap: 1.5rem;
  margin-top: 1.75rem;
  align-items: flex-start;
}

.back-dashboard-btn {
  display: inline-block;
  width: auto;
  padding: 0.55rem 1.2rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.conversation-list {
  background: #f3f4f6;
  border-radius: 10px;
  padding: 0.9rem 0.9rem 1.1rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
}

.conversation-list h2 {
  font-size: 1.05rem;
  margin: 0 0 .6rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 2px solid #cbd5e1;
  padding-bottom: .35rem;
}

.conversation-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .4rem;
}

.conversation-items li {
  margin: 0;
}

.conversation-items a {
  display: block;
  padding: .45rem .65rem;
  background: #ffffff;
  border-radius: 8px;
  color: #111827;
  text-decoration: none;
  font-size: .9rem;
  border: 1px solid #e5e7eb;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.05s;
}

.conversation-items a:hover {
  background: #00274c;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

.conversation-active a {
  background: #c62b28;
  border-color: #c62b28;
  color: #ffffff;
  font-weight: 700;
}

.conversation-thread {
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.3rem 1.1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
  min-height: 460px;
  border: 1px solid #e5e7eb;
}

.message-thread {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 4px;
}

.message-row {
  margin-bottom: 0.75rem;
  padding: .6rem .9rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.message-incoming {
  background: #f1f5f9;
  border-left: 4px solid #00274c;
}

.message-outgoing {
  background: #e0f2fe;
  border-right: 4px solid #0d6efd;
  text-align: right;
}

.message-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.message-flag {
  background: #dc2626;
  color: #ffffff;
  padding: 2px 6px;
  font-size: 0.7rem;
  border-radius: 999px;
}

.message-body {
  font-size: 1rem;
  color: #0f172a;
  white-space: pre-line;
}

.message-compose-form textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.message-compose-form textarea:focus {
  outline: none;
  border-color: #1663eb;
  box-shadow: 0 0 0 3px rgba(22, 99, 235, 0.15);
}

.message-compose-form button {
  margin-top: .65rem;
  width: 100%;
}

/* Meet the designer */

.dark2 {
  max-width: 900px;
  margin: 40px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  color: rgba(243, 100, 33);
  height: auto;
}

#food {
  text-align: left;
  margin-left: 5%;
  color: rgba(243, 100, 33);
}

#food1 {
  text-align: left;
  margin-left: 5%;
  color: #00274c;
  margin-bottom: 30px;
}

.dark2 img {
  float: none;
  margin: 0;
  max-width: 280px;
  height: auto;
  display: block;
}

.profile {
  margin: 0;
  text-align: left;
  float: none;
  padding-right: 0;
}

.profile h3 {
  margin-top: 10px;
  text-align: center;
}

.profile p {
  color: #00163f;
}

/* Footer Page  */
footer {
  background-color: #00274c;
  padding: 0;
  margin-top: auto;
  color: rgba(243, 100, 33);
  text-align: center;
  padding-bottom: 8px;
}

#down {
  color: white;
}

#down1 {
  color: brown;
}

#down1:hover {
  color: white;
}

/* Teacher bookings: "Manage Availability" button */
.teacher-booking-page .t-availability-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid #1663eb;
  color: #1663eb;
  text-decoration: none;
  font-weight: 800;
  background: #fff;
}

.teacher-booking-page .t-availability-btn:hover {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}


/* =========================================================
   TEACHER PAGES: BOOKINGS + AVAILABILITY (SAFE, SCOPED)
   - Fixes broken UI without affecting student booking.php
   ========================================================= */

/* Common button-like link used on teacher pages */
.teacher-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.6px solid #1663eb;
  color: #1663eb;
  background: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.teacher-link-btn:hover {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #ffffff;
}

/* ---------- Teacher Bookings ---------- */
.teacher-bookings-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 56px;
  display: flex;
  justify-content: center;
}

.teacher-bookings .appointments-panel {
  width: 100%;
  max-width: 860px;
}

.teacher-bookings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 0;
}

/* ---------- Teacher Availability ---------- */
.teacher-availability-wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.teacher-availability-card {
  border-top: rgba(243, 100, 33) 5px solid;
}

.teacher-availability-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

/* Flash message */
.booking-alert {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0f172a;
  padding: 12px 14px;
  border-radius: 12px;
  margin: 10px 0 18px;
  font-weight: 700;
}

/* Sections */
.availability-section {
  margin-top: 18px;
  padding-top: 14px;
  border: 2px solid #c3b1e1;
  padding-left: 15px;
  padding-right: 15px;
  border-radius: 15px;
  padding-bottom: 20px;

}

.availability-title {
  margin: 0 0 12px;
  color: #1663eb;
  font-size: 18px;
}

/* Form grid */
.availability-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
}

.availability-field label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
  color: #0a2c4a;
  font-size: 13px;
}

.availability-full {
  grid-column: 1 / -1;
}

/* List */
.availability-list-wrap {
  margin-top: 14px;
}

.availability-list {
  display: grid;
  gap: 10px;
}

.availability-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.availability-row-title {
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 2px;
}

.availability-row-sub {
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}

.availability-row-actions {
  margin: 0;
}

.availability-danger {
  border: 1.6px solid #dc2626;
  background: #ffffff;
  color: #dc2626;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 900;
  cursor: pointer;
}

.availability-danger:hover {
  background: rgba(220, 38, 38, 0.08);
}

/* ==========================
   Tutor Search Pages (class.php, language.php)
   Scoped so it won't affect booking.php
========================== */

.tutor-search-page .auth-card1 {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 27px;
  border-radius: 12px;
}

.tutor-search-page .btn-primary {
  width: 100%;
  display: block;
  border-radius: 8px;
}

/* Results list */
.tutor-search-page .results {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tutor card */
.tutor-search-page .tutor-card {
  background: #fff;
  border: 2px solid #e6e6e6;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.tutor-search-page .tutor-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 6px;
}

.tutor-search-page .tutor-avatar {
  width: 50px;
  height: 40px;
  border-radius: 45%;
  background: #e9eef6;
  color: #00274c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex: 0 0 36px;
  padding-top: 2px;
}

.tutor-search-page .tutor-name {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #00274c;
}

.tutor-search-page .tutor-meta {
  margin: 6px 0;
  font-size: 15px;
  color: #333;
}

/* Buttons (match your 3rd screenshot: View Profile outline, Book orange) */
.tutor-search-page .tutor-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.tutor-search-page .tutor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  line-height: 1;
  border: 1px solid transparent;
}

.tutor-search-page .tutor-btn-outline {
  background: #fff;
  border-color: #2b6cb0;
  color: #2b6cb0;
}

.tutor-search-page .tutor-btn-outline:hover {
  background: rgba(43, 108, 176, 0.08);
}

.tutor-search-page .tutor-btn-book {
  background: rgba(243, 100, 33);
  border-color: #f29b1c;
  color: #fff;
}

.tutor-search-page .tutor-btn-book:hover {
  filter: brightness(0.95);
}


/* ==========================
   Tutor Profile Page (teacher-profile.php)
   ========================== */

.tutor-profile-page .tutor-profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.tutor-profile-page .tutor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #d9e2ec;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #0a2c4a;
  flex: 0 0 auto;
}

/* Big avatar */
.tutor-profile-page .tutor-avatar-lg {
  width: 84px;
  height: 84px;
  font-size: 20px;
}

.tutor-profile-page .tutor-profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* Filter row layout */
.admin-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 14px 0 18px;
}

.admin-filter-row label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: #0a2c4a;
  font-size: 0.9rem;
}

.admin-filter-row select {
  height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  background: #fff;
  min-width: 170px;
}

/* Admin table base (desktop) */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  border: 1px solid #e5e7eb;
  padding: 6px;
  vertical-align: top;
}

.admin-table thead tr {
  background: #f3f4f6;
}

/* =========================
   Mobile & Tablet (≤ 768px)
   ========================= */

@media (max-width: 768px) {

  /* Body spacing */
  body {
    margin: 0;
  }

  /* Header / Branding */
  .Top-Branding {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 12px 12px 20px;
  }

  header #logo {
    float: none;
    margin: 0;
    height: 110px;
  }

  .Top-Branding h1 {
    font-size: 30px;
    padding-right: 0;
    padding-top: -10px;
  }

  .Top-Branding h3 {
    font-size: 15px;
  }

  /* Nav */
  .menu {
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 6px;
  }

  .menu li {
    padding: 0.4em 0;
  }

  header a {
    border-radius: 0;
    text-align: center;
    padding: 0.4em 0.8em;
  }

  .menu li:has(.submenu) {
    position: static;
  }

  .submenu {
    position: static;
    width: 100%;
    margin-top: 0;
    padding: 10px 10px;
  }

  .admin-nav .welcome {
    color: black;
    font-size: 18px;
    text-align: center;
    padding-top: 18px;

  }

  .admin-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 0;
    padding-bottom: 8px;
  }

  .admin-nav li {
    padding: 0.2em 0;
  }

  /* Main layout */
  main {
    flex-direction: column;
  }

  section,
  aside {
    flex-basis: 100%;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 10px;
  }

  #section-design {
    padding: 16px;
  }

  #section1 {
    text-align: center;
    font-size: 25px;
    padding-left: 10px;
  }

  #about1 {
    text-align: left;
    color: #1663eb;
  }

  #about2 {
    color: rgba(243, 100, 33);
  }

  /* Tutor Intro */
  .tutor-intro {
    padding: 20px 16px;
    margin: 20px 12px;
  }

  .tutor-intro h2 {
    font-size: 26px;
  }

  .tutor-intro p {
    font-size: 15px;
  }

  .tutor-search-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  /* Login page cards */
  .login-section {
    flex-direction: column;
    gap: 40px;
    padding: 40px 18px 25px;
  }

  .login-card {
    width: 100%;
    margin-top: 0;
  }

  /* Shared auth wrappers */
  .student-login {
    padding: 36px 14px 50px;
  }

  .auth-wrap,
  .auth-wrap1,
  .auth-wrap2 {
    max-width: 100%;
  }

  .auth-card {
    padding: 18px;
  }

  .auth-card1 {
    padding: 20px;
  }

  .auth-title {
    font-size: 26px;
  }

  /* BOOKING (booking.php) */
  .booking-page .booking {
    flex-direction: column;
    gap: 25px;
    padding: 8px 0px;
  }

  .booking-page .schedule-panel,
  .booking-page .appointments-panel {
    width: 100%;
    min-width: 0;
    padding: 16px;
  }

  .booking-page .results {
    max-height: 520px;
    padding-right: 15px;
  }

  .booking-page .input {
    width: 90%;
    height: 42px;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
  }


  /* Teacher bookings + availability headers */
  .teacher-bookings-header,
  .teacher-availability-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .teacher-link-btn {
    width: 100%;
  }

  /* Availability form grid -> 1 column */
  .availability-form-grid {
    grid-template-columns: 1fr;
  }

  /* Tutor Search Page */
  .tutor-search-page .auth-card1 {
    padding: 18px;
  }

  .tutor-search-page .tutor-head {
    gap: 12px;
  }

  .tutor-search-page .tutor-actions {
    flex-direction: column;
  }

  .tutor-search-page .tutor-btn {
    width: 100%;
  }

  /* Tutor Profile Page */
  .tutor-profile-page .tutor-profile-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tutor-profile-page .tutor-profile-actions {
    flex-direction: column;
  }

  .tutor-profile-page .tutor-profile-actions a {
    width: 100%;
    text-align: center;
  }

  /* Messaging layout -> single column */
  .messaging-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .conversation-list {
    max-height: 320px;
  }

  .conversation-thread {
    min-height: 360px;
  }

  /* Make the "Meet the Developer" section stack nicely */
  #food,
  #food1 {
    margin-left: 0;
    text-align: center;
    padding: 0 1rem;
  }

  .dark2 {
    width: 100%;
    height: auto;
    /* remove fixed height */
    margin: 0 auto 1.5rem;
    display: flex;
    flex-direction: column;
    /* stack image and text */
    align-items: center;
    justify-content: center;
  }

  .dark2 img {
    margin: 0 auto 1rem;
    /* center image */
    max-width: 260px;
    width: 70%;
    height: auto;
  }

  .profile {
    float: none;
    /* no float on small screens */
    padding-right: 0;
    margin-top: -15px;
    text-align: center;
    padding-bottom: 10px;
  }

  .profile h3,
  .profile p {
    text-align: center;
  }

  .admin-filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-filter-row select,
  .admin-filter-row .btn-secondary,
  .admin-filter-row .signup-btn {
    width: 100%;
  }

  .admin-table tr {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  }


  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table td {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    padding: 10px 12px;
  }

  .admin-table td:last-child {
    border-bottom: none;
  }

  .admin-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 800;
    color: #0a2c4a;
    margin-bottom: 4px;
    font-size: 0.85rem;
  }

  /* Make action controls stack */
  .admin-table td form {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .admin-table td select,
  .admin-table td button {
    width: 100% !important;
  }

}