/* =============================== All Styles (Global) =============================== */
html { font-family: 'Raleway', sans-serif; }
body { margin: 0; height:100%; background-color: #f7f7f7; }
html,
body {
  overflow-x: hidden;
}
h1 { color: #000000; }
.Title { color: #FFFFFF; }
p { color: #000000; font-family: 'Raleway', sans-serif; font-size: 18px; }
a { -webkit-transition: .3s; transition: .3s; text-decoration: none; }
a:hover { color: #5aff37; }
.pgood { color: #00CC00; text-align: center; }
.pbad { color: #FF0009; text-align: center; }
/* Navigation */
.navDropButton {
  background-color: #FFFFFF;
  color: #444444;
  padding: 5px 0;              
  font-size: 25px;
  font-family: 'Montserrat', sans-serif;
  border: none;
  cursor: pointer;
  word-spacing: normal;
  display: inline-block;
  text-decoration: none;
}

/* Normalize <button> vs <a> so nav items render identical */
.navDropButton{
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  vertical-align: middle;
}
button.navDropButton{
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.navDropdown {
  position: relative;
  display: inline-block;
  margin: 0 18px;              
}

.navDropdownContent {
  display: none;
  position: absolute;
  background-color: #f1f1f1;
  min-width: 160px;
  padding: 5px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.navDropdownContent a {
  font-family: 'Montserrat', sans-serif;
  color: #444444;
  font-size: 25px;
  text-decoration: none;
  display: block;
}

.navDropdownContent a:hover {
  background-color: #ddd;
  color: #5aff37;
}

.navDropdown:hover .navDropdownContent {
  display: block;
}

.navDropdown:hover .navDropButton {
  color: #5aff37;
}

.DivFooter { text-align: center; margin-bottom: 20px; }
.PageTitleH1 { color: #0054ff; }
.PageTitle { width: 3px; padding: 0px 20px 0px; white-space: nowrap; }
.PageTitleTable { margin-left: auto; margin-right: auto; width: 80%; }
.pfooter { font-size: 10px; }

.DivNavigationBar { width: 100%; height: 65px; background-color: #FFFFFF; -webkit-box-shadow:0 0 2px #262626; -moz-box-shadow: 0 2px #262626; box-shadow:0 0 2px #262626; }
.NavigationBarButtons { padding-top: 15px; margin-top: -8px; text-align: center; color: #444444; font-size: 25px; word-spacing: 30px; font-family: 'Montserrat', sans-serif; }
.NavigationBarButtonsHREF { color: #444444; }
.NavBarOverlay { height: 100%; width: 100%; display: none; position: fixed; z-index: 1; top: 0; left: 0; background-color: rgba(0,0,0, 0.9); }
.NavBarOverlayContent { position: relative; top: 10%; width: 100%; text-align: center; margin-top: 10px; }
.NavBarOverlay a { padding: 8px; text-decoration: none; font-size: 36px; color: #818181; display: block; transition: 0.3s; }
.NavBarOverlay a:hover, .NavBarOverlay a:focus { color: #5aff37; }
.profilePicture { width: 250px; height: 250px; object-fit: cover; }
.commentsProfilePicture { width: 75px; height: 75px; object-fit: cover; }
.commentsTableTD { text-align: left; }
.NavBarOverlay .CloseButton { position: absolute; top: 20px; right: 45px; font-size: 60px; }

.HeaderTable { position: relative; top: 90px; padding-left: 30px; padding-right: 30px; margin-left: auto; margin-right: auto; border-color: #FFFFFF; border-style: solid; border-width: 5px; }

.MainContentColumns { width: 48%; min-width: 325px; vertical-align: top; display: inline-block; }

#WindowOverlay{ text-align: center; height:50%; width:50%; margin:0 auto; background:#141414; padding:10px; position:absolute; top:25%; left:25%; z-index:999; display:none; overflow-y:scroll; -webkit-border-radius:10px; -moz-border-radius:10px; -o-border-radius:10px; border-radius:10px; }
#WindowTopper{ position:fixed; top:0, left:0; background:rgba(0,0,0,0.5); z-index:499; width:100%; height:100%; display:none; }
#WindowOverlay:target, #WindowOverlay:target + #WindowTopper{ display:block; opacity:1; }

.MainContent { padding: 20px; margin: 10px auto; box-shadow: 3px 3px 5px #888888; text-align: center; background-color: #FFFFFF; width: 90%; max-width: 1024px; }

#InformationNote { position: fixed; vertical-align: middle; height: 40px; top: 0; left: 0; right: 0; background: #F78181; text-align: center; overflow: hidden; -webkit-box-shadow: 0 0 5px black; -moz-box-shadow: 0 0 5px black; box-shadow: 0 0 5px black; z-index: 999; }

.ContentPageTable { width: 90%; margin-left: auto; margin-right: auto; }
.ContentPageTableLeftTD { vertical-align: top; width: 70%; }
.ContentPageTableRightTD { width: 30%; vertical-align: top; }

.NewsDateTitleH2 { color: #0054ff; }
.NewsDateTitle { width: 3px; padding: 0px 20px 0px; white-space: nowrap; }
.NewsDateTable { margin-left: auto; margin-right: auto; width: 100%; }

div.polaroid { width: 80%; background-color: white; box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19); margin-bottom: 25px; margin-left: auto; margin-right: auto; }
div.container { text-align: center; padding: 10px 20px; margin-left: auto; margin-right: auto; font-size: 16px; }

/* =============================== News / Updates =============================== */
/* These classes are used on admin.php to keep News cards aligned and mobile friendly */
.polaroid.news-card{
  padding: 14px 18px 18px 18px;
  box-sizing: border-box;
  text-align: left;
}

.news-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 2px; /* slight nudge down */
  gap: 12px;
}

.news-title-wrap{
  min-width: 0;
}

.news-title{
  margin: 0;
  line-height: 1.2;
  display: inline;
}

.news-postedby{
  margin-left: 8px;
  font-size: 14px;
  color: #777;
}

.news-date{
  white-space: nowrap;
  font-size: 14px;
  color: #666;
  margin-top: 2px;
}

.news-content{ padding-top: 8px; }
.news-content p{ margin: 0; }

/* Reactions row (admin.php news feed) */
.news-reactions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(0,0,0,0.08);
}

.reaction-buttons{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.reaction-form{ display:inline; margin:0; }

.reaction-btn{
  position:relative;
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.16);
  background:#f7f7f7;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  padding:0;
  user-select:none;
  transition: filter 0.15s ease-in-out, transform 0.06s ease-in-out;
}
.reaction-btn:hover{ filter: brightness(0.98); }
.reaction-btn:active{ transform: scale(0.97); }

.reaction-btn.selected{
  border-color:#007bff;
  background:#eaf3ff;
}

.reaction-badge{
  position:absolute;
  right:-6px;
  top:-6px;
  min-width:18px;
  height:18px;
  border-radius:999px;
  padding:0 5px;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:700;
  background:#111;
  color:#fff;
}

.reaction-total{
  font-size:13px;
  color:#666;
  white-space:nowrap;
}

@media (max-width: 700px){
  .news-reactions{ justify-content:flex-start; }
  .reaction-total{ margin-left:auto; }
}


@media (max-width: 700px){
  .polaroid.news-card{ width: 92%; padding: 12px 14px 14px 14px; }
  .news-header{
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .news-postedby{
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }
  .news-date{ margin-top: 0; }
}

/* =============================== Weekly Calendar — Admin =============================== */
:root { --slot-height: 40px; }

/* Container and header */
.calendar-container{
  max-width:1200px;
  margin:20px auto;
  background:#fff;
  padding:12px 20px 20px;
  border-radius:8px;
  box-shadow:0 4px 8px rgba(0,0,0,.1);
  overflow-x:auto;
  color:#2c3e50;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}
.calendar-container > *:first-child { margin-top: 0; }

.calendar-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.calendar-header h2{margin:0;font-size:1.8em}
.calendar-nav a{text-decoration:none;color:#007bff;padding:8px 12px;border:1px solid #007bff;border-radius:4px;transition:.3s;font-size:.9em;margin-left:6px}
.calendar-nav a:hover{background:#007bff;color:#fff}
.calendar-nav-group{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.goto-date{display:flex;gap:8px;align-items:center;margin-left:6px}
.goto-date input[type="date"]{padding:6px 8px;border:1px solid #ccc;border-radius:4px;font-size:.9em}
.goto-date .button{padding:6px 10px;border-radius:6px;border:1px solid #007bff;background:#fff;color:#007bff;text-decoration:none;cursor:pointer}
.goto-date .button:hover{background:#007bff;color:#fff}
.calendar-actions .button{
  padding:8px 12px;
  border-radius:4px;
  border:1px solid #007bff;
  background:#fff;
  color:#007bff;
  text-decoration:none;
  cursor:pointer;
  font-size:.9em;
  transition:.3s;
}
.calendar-actions .button:hover{
  background:#007bff;
  color:#fff;
}
.calendar-view-switch{
  display:flex;
  gap:6px;
  margin-left:4px;
}
.calendar-view-switch-under-hours{
  margin:10px 0 14px 0;
  justify-content:flex-start;
}
.calendar-view-switch a{
  text-decoration:none;
  color:#007bff;
  border:1px solid #007bff;
  border-radius:6px;
  padding:6px 10px;
  font-size:.9em;
}
.calendar-view-switch a.active{
  background:#007bff;
  color:#fff;
}



/* Mobile fix for crunched calendar nav buttons */
@media (max-width: 700px){
  .calendar-header{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .calendar-nav-group{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* Remove the left margin that causes cramped wrapping on phones */
  .calendar-nav a{ margin-left: 0; }

  /* Make each nav button full width for clean stacking */
  .calendar-nav{
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .calendar-nav a{
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 12px 12px;
    font-size: 16px; /* helps iOS readability and avoids weird wrapping */
  }

  /* Date picker row: stack nicely */
  .goto-date{
    margin-left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .calendar-view-switch{
    margin-left: 0;
    width: 100%;
  }
  .calendar-view-switch-under-hours{
    margin:10px 0 6px 0;
  }
  .calendar-view-switch a{
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  .goto-date input[type="date"],
  .goto-date .button,
  .calendar-actions .button{
    width: 100%;
    box-sizing: border-box;
    height: 48px;            /* forces equal height */
    padding: 0 12px;         /* remove extra vertical padding */
    font-size: 16px;
    line-height: 48px;       /* vertically center text */
}

/* Remove iOS default date styling that makes it taller */
.goto-date input[type="date"]{
  appearance: none;
  -webkit-appearance: none;
}
}

/* Grid */
.weekly-calendar-grid{
  display:grid;
  grid-template-columns:80px repeat(7,minmax(120px,1fr));
  grid-template-rows:auto 1fr;
  border:1px solid #ddd;
}
.empty-corner{grid-column:1;grid-row:1;background:#f2f2f2;border-right:1px solid #ddd;border-bottom:1px solid #ddd}
.day-header{
  grid-row:1;
  text-align:center;
  padding:10px 5px;
  background:#e6e6e6;
  border-bottom:1px solid #ddd;
  border-right:1px solid #ddd;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
}
.day-header:last-of-type{border-right:none}
.day-header span{font-size:.9em;color:#555}
.current-day-header{background:#d8edf7;border-bottom:2px solid #007bff;color:#007bff}

/* Time gutter */
.time-column{
  grid-column:1;
  grid-row:2;
  border-right:1px solid #ddd;
  position:sticky;
  left:0;
  background:#f2f2f2;
  background-image:repeating-linear-gradient(
    to bottom,
    #eee 0,
    #eee 1px,
    transparent 1px,
    transparent var(--slot-height)
  );
}
.time-slot-label{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  font-size:.9em;
  color:#555;
  padding-top:4px;
  height:var(--slot-height);
  box-sizing:border-box;
  border-bottom:0;
}

/* Event columns */
.event-columns-container{
  grid-column:2 / -1;
  grid-row:2;
  display:grid;
  grid-template-columns:repeat(7,minmax(120px,1fr));
  position:relative;
}
.day-column-events{
  position:relative;
  border-right:1px solid #eee;
  background:#fcfcfc;
  background-image:repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--slot-height) - 1px),
    rgba(0,0,0,.06) calc(var(--slot-height) - 1px),
    rgba(0,0,0,.06) var(--slot-height)
  );
}
.day-column-events:last-of-type{border-right:none}
.current-day-column{background:#e6f7ff}

/* Monthly grid */
.monthly-calendar{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  border:1px solid #d7dee7;
  border-radius:8px;
  overflow:hidden;
}
.month-day-name{
  background:#edf3fa;
  border-right:1px solid #d7dee7;
  border-bottom:1px solid #d7dee7;
  padding:10px 8px;
  font-weight:700;
  text-align:center;
  color:#2f3f53;
}
.month-day-name:nth-child(7n){border-right:none}
.month-day-cell{
  min-height:130px;
  border-right:1px solid #edf0f5;
  border-bottom:1px solid #edf0f5;
  background:#fff;
  display:flex;
  flex-direction:column;
}
.month-day-cell.is-outside-month{background:#f8fafc}
.month-day-cell.is-today .month-day-head{
  background:#007bff;
  color:#fff;
}
.month-day-head{
  font-size:.88em;
  font-weight:700;
  color:#2f3f53;
  padding:6px 8px;
  border-bottom:1px solid #f1f3f7;
}
.month-day-body{
  flex:1;
  padding:6px;
  display:flex;
  flex-direction:column;
  gap:5px;
  cursor:pointer;
}
.month-event-chip{
  border:1px solid #b3e5fc;
  background:#e0f2f7;
  border-radius:6px;
  text-align:left;
  padding:5px 6px;
  cursor:pointer;
  display:flex;
  gap:6px;
  width:100%;
  box-sizing:border-box;
  font-size:12px;
  line-height:1.2;
}
.month-event-time{
  font-weight:700;
  color:#0f3f6e;
  min-width:38px;
}
.month-event-text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.month-more-events{
  font-size:12px;
  color:#5b6778;
  padding:2px 2px 0;
}

@media (max-width: 900px){
  .month-day-name{font-size:13px;padding:8px 4px}
  .month-day-cell{min-height:110px}
  .month-event-chip{font-size:11px}
}
@media (max-width: 700px){
  .monthly-calendar{
    grid-template-columns:repeat(1,minmax(0,1fr));
    border:none;
    gap:10px;
  }
  .month-day-name{display:none}
  .month-day-cell{
    border:1px solid #dbe4ef;
    border-radius:8px;
    min-height:0;
  }
  .month-day-head{
    background:#f4f8fd;
    border-bottom:1px solid #dbe4ef;
  }
}

/* Working hours light background (slot-style shading) */
.working-hours-shade{
  position:absolute;
  left:0;
  right:0;
  background:rgba(34,197,94,0.12);
  border-top:1px dashed rgba(34,197,94,0.35);
  border-bottom:1px dashed rgba(34,197,94,0.35);
  z-index:1;
  pointer-events:none;
}


/* Current time line */
.current-time-line{
  position:absolute;
  left:0;
  right:0;
  height:2px;
  background:#ef4444;
  z-index:4;
  pointer-events:none;
}
.current-time-line::before{
  content:"";
  position:absolute;
  left:-5px;
  top:-4px;
  width:10px;
  height:10px;
  border-radius:999px;
  background:#ef4444;
}

/* Booking cards */
.booking-event{
  position:absolute;
  background:#e0f2f7;
  border:1px solid #b3e5fc;
  padding:6px 8px 30px;
  border-radius:4px;
  font-size:.8em;
  line-height:1.2;
  box-shadow:0 1px 3px rgba(0,0,0,.08);
  cursor:pointer;
  overflow:hidden;
  z-index:2;
  box-sizing:border-box;
}
.booking-event b{
  color:#0056b3;
  display:block;
  margin-bottom:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.booking-event span{display:block;color:#666}

/* Status colors */
.status-Confirmed{background:#d4edda;border-color:#28a745}
.status-Pending{background:#fff3cd;border-color:#ffc107}
.status-Cancelled{background:#f8d7da;border-color:#dc3545;opacity:.9}
.status-Delivered{background:#e8f5e9;border-color:#8bc34a}
.status-Scheduled{background:#e0f2f7;border-color:#b3e5fc}

/* Blocked time */
.status-Blocked, .block-event{
  background:#fee2e2;
  border-color:#ef4444;
}
.block-event b{ color:#b91c1c; }
.block-event span, .block-event .block-notes{ color:#7f1d1d; }
.block-event{
  background-image:
    linear-gradient(135deg, rgba(185,28,28,0.08) 10%, rgba(0,0,0,0) 10%),
    linear-gradient(0deg, rgba(0,0,0,0), rgba(0,0,0,0));
  background-size:8px 8px, auto;
}

/* Meeting time */
.status-Meeting, .meeting-event{
  background:#fef3c7;
  border-color:#facc15;
}
.meeting-event b{ color:#92400e; }
.meeting-event span, .meeting-event .block-notes{ color:#78350f; }
.meeting-event{
  background-image:
    linear-gradient(135deg, rgba(234,179,8,0.12) 10%, rgba(0,0,0,0) 10%),
    linear-gradient(0deg, rgba(0,0,0,0), rgba(0,0,0,0));
  background-size:8px 8px, auto;
}

/* Add to cal links inside booking cards */
.add-to-cal{
  position:absolute;
  left:6px;
  right:6px;
  bottom:6px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  opacity:.95;
}
.add-to-cal a{
  font-size:.72em;
  text-decoration:none;
  border:1px solid #007bff;
  padding:2px 6px;
  border-radius:4px;
  color:#007bff;
  background:#fff;
  white-space:nowrap;
}

/* Inline status control */
.inline-status { margin-top:4px; font-size:.8em; }
.inline-status select { width:100%; font-size:.85em; padding:3px; }

/* Scoped success and error */
.MainContent .pgood{
  color:#0a7a2f;
  background:#eaf7ee;
  border:1px solid #bfe6cc;
  padding:8px 10px;
  border-radius:6px;
  text-align:center;
}
.MainContent .pbad{
  color:#b00020;
  background:#fde7eb;
  border:1px solid #ffc0cb;
  padding:8px 10px;
  border-radius:6px;
  text-align:center;
}
/* Modals */
.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1000;
}
.center-all {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.modal{
  background:#fff;
  border-radius:8px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  max-width:520px;
  width:92%;
  padding:16px;
}
.modal h3{margin-top:0;margin-bottom:12px}
.modal form label{display:block;font-weight:600;margin-top:10px}
.modal form input[type="datetime-local"],
.modal form select,
.modal form textarea{
  width:100%;
  padding:8px;
  border:1px solid #ccc;
  border-radius:6px;
  box-sizing:border-box;
  margin-top:6px;
}
.modal-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  margin-top:14px;
}

/* Buttons */
.btn{
  border:1px solid #007bff;
  padding:8px 12px;
  border-radius:6px;
  background:#007bff;
  color:#fff;
  text-decoration:none;
  cursor:pointer;
}
.btn.secondary{background:#fff;color:#007bff}

/* =============================== Confirmation Dialog =============================== */
.confirm-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1100;
  backdrop-filter: blur(2px);
}
.confirm-modal{
  background:#fff;
  border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.25);
  max-width:600px;
  width:94%;
  overflow:hidden;
  font-family:'Raleway',sans-serif;
}
.confirm-header{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px 20px;
  border-bottom:1px solid #f0f0f0;
}
.confirm-icon{
  width:40px;
  height:40px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  line-height:1;
  background:#eef6ff;
  color:#0b63c9;
  border:1px solid #d9ebff;
}
.confirm-title{
  margin:0;
  font-size:20px;
  font-weight:700;
  color:#111;
}
.confirm-body{
  padding:18px 20px 6px 20px;
  color:#333;
  font-size:16px;
  line-height:1.5;
  text-align:left;
}
.confirm-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding:16px 20px 20px 20px;
}
.btn-confirm{
  background:#007bff;
  border:1px solid #007bff;
  color:#fff;
  border-radius:10px;
  padding:10px 16px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
}
.btn-confirm:hover{ filter: brightness(0.95); }
.btn-cancel{
  background:#fff;
  border:1px solid #ddd;
  color:#333;
  border-radius:10px;
  padding:10px 16px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
}
.btn-cancel:hover{ background:#f7f7f7; }
.confirm--danger .confirm-icon{ background:#fff3f2;color:#c62828;border-color:#fbe3e1; }
.confirm--warn .confirm-icon{ background:#fff7e6;color:#b26a00;border-color:#ffe7bf; }
.confirm--info .confirm-icon{ background:#eef6ff;color:#0b63c9;border-color:#d9ebff; }

/* Minor normalization for AdminNavBar */
.AdminNavBar { margin: 0 auto; width: 90%; text-align: center; }

/* =============================== Student Directory — Filters and Table =============================== */
.filters-bar {
  max-width: 1400px;
  margin: 0 auto 12px auto;
  width: 95%;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}
.filters-bar label { font-weight: 600; display: block; margin-bottom: 4px; }
.filters-bar select,
.filters-bar input[type=text],
.filters-bar button {
  width: 100%;
  padding: 6px 8px;
  box-sizing: border-box;
}
.filters-search {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
.filters-search label {
  grid-column: 1 / -1;
  text-align: center;
}
.filters-search-input {
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 8px;
  font-size: 15px;
  min-height: 38px;
}
.filters-search-btn {
  width: auto;
  min-width: 110px;
  min-height: 38px;
  margin: 0;
}
@media (max-width: 720px) {
  .filters-bar { grid-template-columns: 1fr; }
  .filters-search {
    grid-template-columns: 1fr;
  }
  .filters-search label {
    text-align: left;
  }
  .filters-search-btn {
    width: 100%;
  }
}
.table-dir {
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1700px;
  table-layout: auto;
}
.table-dir th,
.table-dir td {
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 12px 12px;
  text-align: left;
  vertical-align: middle;
  font-size: 15px;
}
.table-dir thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f7f7;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  font-weight: 700;
}
.table-dir tbody tr:nth-child(even) { background: #fafafa; }
.table-dir tbody tr:hover { background: #f2f8ff; }
.table-dir input[type=text],
.table-dir input[type=tel],
.table-dir input[type=date],
.table-dir input[type=number],
.table-dir select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  min-width: 0;
  font-size: 14px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 8px;
  background: #fff;
}
.table-dir .email-cell,
.table-dir .wrap-cell,
.table-dir .phone-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.table-dir .terms-cell {
  text-align: center;
  font-size: 18px;
  white-space: nowrap;
}
.actions { text-align: left; }
.inline-form { margin: 0; display: inline; }
.block-form { margin: 6px 0 0 0; display: block; }
.savebtn {
  padding: 6px 10px;
  font-weight: 600;
  border: 1px solid #16a34a;
  background: #16a34a;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}
.savebtn:hover { filter: brightness(0.95); }
.delbtn {
  padding: 6px 10px;
  font-weight: 600;
  border: 1px solid #dc2626;
  background: #dc2626;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}
.delbtn:hover { filter: brightness(0.95); }
.btn-clear {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #666;
  background: #fff;
  color: #333;
  cursor: pointer;
}
.btn-clear:hover { background: #f2f2f2; }

/* =============================== Student Directory — Mobile Card Layout =============================== */
/* The directory has many columns. On small screens we turn each row into a “card” and
   use data-label attributes on <td> to show field labels. */

.dir-table-wrap{
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  background: #fff;
}

/* Action buttons should stack cleanly on narrow widths */
.actions .savebtn,
.actions .delbtn,
.actions .btn-cancel-future{
  width: 100%;
  box-sizing: border-box;
}
.actions .inline-form,
.actions .block-form{ display:block; }

@media (max-width: 820px){
  /* Allow horizontal scroll on smaller tablets */
  .table-dir{ min-width: 1300px; }
}

@media (max-width: 720px){
  /* Card mode */
  .dir-table-wrap{ overflow: visible; width: 95%; }
  .table-dir{ table-layout: auto; width: 100%; min-width: 0; }

  .table-dir thead{ display: none; }
  .table-dir,
  .table-dir tbody,
  .table-dir tr,
  .table-dir td{ display: block; width: 100%; }

  .table-dir tr{
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 14px;
    padding: 10px 12px;
    margin: 0 0 12px 0;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
  }

  .table-dir td{
    border: 0;
    padding: 8px 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table-dir td::before{
    content: attr(data-label);
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 3px;
    font-weight: 600;
  }

  /* Make inputs comfortable on iOS (prevents zoom) */
  .table-dir input[type=text],
  .table-dir input[type=tel],
  .table-dir input[type=date],
  .table-dir input[type=number],
  .table-dir select,
  .table-dir button{
    font-size: 16px;
  }

  /* Actions: keep spacing */
  .actions{ padding-top: 6px; }
  .actions .inline-form{ margin: 0 0 8px 0; }
  .actions .btn-cancel-future{ margin-top: 0; }
}

/* =============================== Working Hours Panel =============================== */
.working-hours-panel { margin: 8px 0 20px 0; text-align: center; }
.working-hours-panel > summary {
  display: list-item;
  margin: 0 auto 10px;
  width: max-content;
  text-align: left;
  cursor: pointer;
  font-weight: 400;
  padding: 6px 0;
}
.wh-grid {
  display: grid;
  justify-content: center;
  grid-template-columns: minmax(380px, 420px);
  gap: 12px;
  align-items: start;
  text-align: left;
}
.wh-form {
  border: 1px solid #e5e7eb;
  padding: 14px;
  border-radius: 10px;
  background: #fafafa;
  min-width: 380px;
  max-width: 420px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.wh-form label { font-weight: 600; display: block; margin: 6px 0 4px 0; }
.wh-form input[type="time"],
.wh-form select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  height: 38px;
}
.wh-form .btn { display: block; margin: 6px auto 0; }

.wh-current {
  border: 1px solid #e5e7eb;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
}
.wh-current ul { margin: 6px 0 0 0; padding-left: 16px; }

/* Bold the "Viewing calendar for" label */
.instructor-switcher label { font-weight: 700; }

/* =============================== Form UI (Generic) =============================== */
:root{
  --form-max: 720px;
  --form-gap: 14px;
  --form-label: #111;
  --form-text: #222;
  --form-muted: #666;
  --form-border: #d9d9d9;
  --form-focus: #0b63c9;
  --form-bg: #fff;
  --form-bg-alt: #fafafa;
  --form-radius: 10px;
  --form-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.form-wrap{ width: 100%; max-width: var(--form-max); margin: 0 auto; text-align: left; }
.form-card{ background: var(--form-bg); border: 1px solid #ececec; border-radius: var(--form-radius); padding: 18px; box-shadow: var(--form-shadow); }

.form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--form-gap); }
.form-grid .col-span-2{ grid-column: span 2; }
@media (max-width: 760px){
  .form-grid{ grid-template-columns: 1fr; }
  .form-grid .col-span-2{ grid-column: auto; }
}

.form-field{ display: flex; flex-direction: column; gap: 6px; }
.form-label{ font-weight: 600; color: var(--form-label); font-size: 15px; }
.form-hint{ font-size: 13px; color: var(--form-muted); }

.input,
.select,
.textarea{
  width: 100%;
  font: inherit;
  color: var(--form-text);
  border: 1px solid #d9d9d9;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  outline: none;
}
.textarea{ min-height: 120px; resize: vertical; }
.input:focus,
.select:focus,
.textarea:focus{
  border-color: #0b63c9;
  box-shadow: 0 0 0 3px rgba(11,99,201,.12);
}

.form-actions{ margin-top: 10px; display: flex; gap: 10px; justify-content: flex-end; }
.form-actions.center{ justify-content: center; }
.btn-primary{
  border: 1px solid #007bff;
  background: #007bff;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.btn-primary:hover{ filter: brightness(0.97); }

.form-note{
  background: #fafafa;
  border: 1px solid #eee;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
}

.alert{
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 15px;
}
.alert-good{ color:#0a7a2f;background:#eaf7ee;border:1px solid #bfe6cc; }
.alert-bad{ color:#b00020;background:#fde7eb;border:1px solid #ffc0cb; }

.stack-xs{ display: grid; gap: 4px; }
.stack-sm{ display: grid; gap: 8px; }
.stack-md{ display: grid; gap: 12px; }
.stack-lg{ display: grid; gap: 16px; }

input[type="submit"].btn-primary{ appearance: none; border: none; }
.form-intro{ margin: 0 0 4px 0; color: #666; font-size: 15px; }

/* Social links */
.social-links { display: inline-flex; gap: 8px; align-items: center; }
.social-links a { display: inline-block; line-height: 0; }
.social-links img { width: 48px; height: 48px; display: block; }

/* Generic Cards */
:root{
  --card-bg: #fff;
  --card-border: #ececec;
  --card-radius: 10px;
  --card-shadow: 0 2px 10px rgba(0,0,0,.06);
  --card-pad: 18px;
}
.card,
.form-card{
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-pad);
  box-shadow: var(--card-shadow);
}
.card-body{ padding: 0; }
.card > :first-child,
.form-card > :first-child{ margin-top: 0; }
.card > :last-child,
.form-card > :last-child{ margin-bottom: 0; }

@media (max-width: 900px){
  .wh-grid { grid-template-columns: minmax(300px, 1fr); }
  .wh-form { min-width: 300px; }
}

/* =============================== Homepage media helpers and mobile =============================== */

/* Hero banner responsive */
.hero-banner{
  display:block;
  width:100%;
  height:auto;
  max-height:420px;
  object-fit:cover;
}

/* Feature image */
.feature-image{
  display:block;
  width:100%;
  height:auto;
  max-height:375px;
  object-fit:cover;
}

/* DVSA logo */
.logo-strip{
  display:block;
  width:50%;
  height:auto;
  margin:0 auto;
}

/* Responsive iframe helpers for YouTube etc */
.embed{
  position:relative;
  width:100%;
  height:0;
  overflow:hidden;
}
.embed iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}
.embed-16x9{ padding-top:56.25%; }

/* Facebook Page Plugin wrapper */
.fb-page {
  width: 100%;
}
.facebook-card{
  padding: 10px 0;
  display: flex;
  justify-content: center;
}

.facebook-card .fb-page{
  max-width: 100%;
  width: 100%;
}
/* Desktop and down sizing for FB */
@media (max-width: 1200px){
  .fb-embed iframe{ height: 440px; }
}
@media (max-width: 900px){
  .fb-embed{ max-width: 520px; }
  .fb-embed iframe{ height: 400px; }
}
@media (max-width: 600px){
  .fb-embed{ max-width: 100%; }
  .fb-embed iframe{ height: 360px; }
}
@media (max-width: 380px){
  .fb-embed iframe{ height: 320px; }
}

/* ===== Row grid for perfect left/right alignment on desktop ===== */
.Row{
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 1.5%;
  align-items: start;
  margin: 18px 0;
}
.Row > *{ min-width: 0; }

/* Stack rows on smaller screens */
@media (max-width: 900px){
  .Row{
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0;
  }
}

/* Stack columns on smaller screens (legacy two-column pages) */
@media (max-width: 900px){
  .MainContent { width: 94%; padding: 16px; margin: 12px auto; }
  .PageTitleTable { width: 100%; }
  .PageTitleH1 { font-size: 28px; }

  .MainContentColumns{
    width:100% !important;
    min-width:0;
    display:block;
  }

  p{ font-size:16px; }
  .logo-strip{ width:72%; }
}

/* Tiny phones */
@media (max-width: 600px){
  .PageTitleH1 { font-size: 24px; }
  .logo-strip{ width:80%; }
}

/* Tighten nav text on phones */
@media (max-width: 900px){
  .NavigationBarButtons{
    font-size:20px;
    word-spacing:14px;
    padding-top:10px;
  }
}

/* Title table cell alignment and general image safety */
.PageTitleTable td{ vertical-align:middle; }
.MainContent img{ max-width:100%; height:auto; }

/* Fix any legacy float:center */
[style*="float:center"]{
  float:none !important;
  margin-left:auto !important;
  margin-right:auto !important;
  display:block !important;
}

/* Desktop 2-column enforcement + footer safety */
@media (min-width: 901px){
  .MainContentColumns{
    display: inline-block !important;
    width: 48% !important;
    min-width: 320px;
    vertical-align: top;
  }
  .MainContentColumns + .MainContentColumns{
    margin-left: 1.5%;
  }
  .fb-embed{ max-width: 100% !important; }
}

/* Optional helper wrapper */
.ColumnsWrap{
  display: flex;
  flex-wrap: wrap;
  gap: 1.5%;
  align-items: flex-start;
}
.ColumnsWrap > .MainContentColumns{
  flex: 1 1 48%;
  min-width: 320px;
}
@media (max-width: 900px){
  .ColumnsWrap{ display: block; }
  .ColumnsWrap > .MainContentColumns{
    width: 100%;
    min-width: 0;
    display: block;
    margin-left: 0;
  }
}

/* Ensure MainContent contains floats so the footer stays below */
.MainContent::after{
  content: "";
  display: block;
  clear: both;
}

/* =============================== Student User Page — Lessons table mobile UI =============================== */

.sectionTitle{
  margin: 18px 0 10px;
  font-size: 20px;
}

/* Small info card used for next-lesson + messages */
.infoCardWrap{
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin: 12px 0;
}

.instructorProfileThumbWrap{
  width: 220px;
  min-width: 220px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.instructorProfileThumb{
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.infoCard{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  margin: 0;
  flex: 1;
}
.infoCard p{ margin: 0; }

/* Paid hours label */
.hoursLeft{
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0 14px;
}
/* Make text inside the info card uniform */
.infoCard p {
  font-size: 18px;
  font-weight: 400;
  margin: 6px 0;
}

/* Override hoursLeft styling when shown inside infoCard */
.infoCard .hoursLeft {
  font-size: 18px;
  font-weight: 400;
  margin-top: 6px;
}

@media (max-width: 720px){
  .infoCardWrap{
    flex-direction: column;
    align-items: stretch;
  }
  .instructorProfileThumbWrap{
    width: 100%;
    min-width: 0;
  }
  .instructorProfileThumb{
    min-height: 160px;
  }
}

/* Filters for lessons */
.lessonFilters{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 14px;
  text-align: left;
}
.filterField{
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.filterField span{
  opacity: 0.85;
}
.lessonFilters select{
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  background: #fff;
  font-size: 16px; /* prevents iOS zoom */
  box-sizing: border-box;
}

/* Table wrapper: scroll on medium screens, cards on phones */
.tableWrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
}

/* Lessons table */
.lessonsTable{
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.lessonsTable thead th{
  text-align: center;
  font-weight: 700;
  padding: 12px;
  font-size: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.03);
}
.lessonsTable td{
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  vertical-align: top;
}
.lessonsTable tbody tr:last-child td{
  border-bottom: 0;
}

/* Mobile: filters stack + table becomes cards */
@media (max-width: 720px){
  .lessonFilters{ grid-template-columns: 1fr; }

  .tableWrap{
    border: 0;
    overflow: visible;
  }

  .lessonsTable{ min-width: 0; }
  .lessonsTable thead{ display: none; }

  .lessonsTable,
  .lessonsTable tbody,
  .lessonsTable tr,
  .lessonsTable td{
    display: block;
    width: 100%;
  }

  .lessonsTable tr{
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #fff;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }

  .lessonsTable td{
    border: 0;
    padding: 8px 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .lessonsTable td::before{
    content: attr(data-label);
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 3px;
  }
}


/* =============================== Short lesson behaviour and calendar buttons =============================== */

/* Short lessons: just slightly tighter padding, no extra popover */
.booking-event.short-event{
  padding:6px 8px;
  overflow:hidden;
}

/* Make sure any legacy popover element is hidden */
.booking-event.short-event .booking-popover,
.booking-event.short-event:hover .booking-popover{
  display:none !important;
}

/* In the edit modal, let the Add to calendar buttons breathe */
.modal .add-to-cal{
  position:static;
  margin-top:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
/* Edit booking locked state */
#editBookingForm.edit-locked select,
#editBookingForm.edit-locked input,
#editBookingForm.edit-locked textarea {
  background-color: #f3f3f3;
  color: #777;
  border-color: #ddd;
}

#editBookingForm.edit-locked button.btn[type="submit"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Keep the cancel button looking normal */
#editBookingForm.edit-locked #cancelEdit {
  opacity: 1;
  cursor: pointer;
}

/* Instagram viewer */
.ig-hero {
  position: relative;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,.1);
  background: #eee;
}

/* Image layers */
.ig-layer {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .5s ease-in-out;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.ig-layer.active { opacity: 1; }

/* Legacy single caption block (kept for compatibility, not used by new markup) */
.ig-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  background: rgba(0,0,0,.45);
  backdrop-filter: saturate(120%) blur(3px);
  color: #fff; text-align: center;
  font: 500 14px/1.35 'Raleway', sans-serif;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  word-break: break-word; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  z-index: 6;
}

/* New caption layers that crossfade in sync with the images */
.ig-cap-layer {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  background: rgba(0,0,0,.45);
  backdrop-filter: saturate(120%) blur(3px);
  color: #fff; text-align: center;
  font: 500 14px/1.35 'Raleway', sans-serif;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  word-break: break-word; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  z-index: 6;

  opacity: 0; transition: opacity .5s ease-in-out;
}
.ig-cap-layer.active { opacity: 1; }

@media (max-width: 420px){ .ig-cap-layer { font-size: 13px; } }

/* Badge */
.ig-badge {
  position: absolute; left: 10px; top: 10px;
  background: #fff; border-radius: 999px;
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  padding: 6px 8px; box-shadow: 0 2px 6px rgba(0,0,0,.15);
  z-index: 6;
}

/* Full clickable overlay for opening Instagram profile */
.ig-link{
  position: absolute;
  inset: 0;
  display: block;
  z-index: 7;
  cursor: pointer;
}

/* Navigation arrows overlay */
.ig-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border: none; border-radius: 999px;
  background: rgba(0,0,0,.45);
  color: #fff; font-size: 26px; line-height: 40px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
  z-index: 10;
  padding: 0;
}
.ig-prev { left: 10px; }
.ig-next { right: 10px; }

.ig-hero:hover .ig-nav,
.ig-hero:focus-within .ig-nav { opacity: 1; }

.ig-nav:hover { background: rgba(0,0,0,.6); transform: translateY(-50%) scale(1.03); }
.ig-nav:active { transform: translateY(-50%) scale(0.97); }

.ig-nav:focus-visible {
  outline: 2px solid #5aff37;
  outline-offset: 2px;
}

.ig-nav::after {
  content: "";
  position: absolute;
  inset: -8px;
}

@media (hover: none) and (pointer: coarse) {
  .ig-nav { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ig-layer { transition: none; }
  .ig-nav { transition: none; }
  .ig-cap-layer { transition: none; }
}


/* =============================== Cancel Future Lessons =============================== */
.btn-cancel-future {
  margin-top: 6px;
  padding: 6px 10px;
  font-weight: 600;
  border: 1px solid #f5d000;
  background: #fff9c4;      
  color: #8a6d00;           
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s ease-in-out;
}

.btn-cancel-future:hover {
  background: #ffe95a;      
  border-color: #e0c200;
  color: #6f5700;
}

/* =============================== Analytics — Tracking table =============================== */
.analytics-title{
  margin: 6px auto 12px;
  text-align: left;
  max-width: 1400px;
  width: 95%;
  color: #0054ff;
}

.analytics-table-wrap{
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  background: #fff;
}

.analytics-top-filter-row{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.analytics-top-filter-row label{
  font-weight: 600;
  white-space: nowrap;
}

.analytics-top-filter-row .analytics-filter-select{
  width: 220px;
}

.analytics-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
  text-align: left;
}

.analytics-table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f7f7;
  font-weight: 700;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  font-size: 15px;
}

.analytics-table tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  font-size: 15px;
  vertical-align: top;
}

.analytics-table tbody tr:nth-child(even){ background: #fafafa; }
.analytics-table tbody tr:hover{ background: #f2f8ff; }

.analytics-table tbody tr:last-child td{ border-bottom: 0; }

.analytics-table .mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  color: #333;
  white-space: nowrap;
}

.analytics-table .wrap{
  overflow-wrap: anywhere;
  word-break: break-word;
}

.analytics-empty{
  text-align: center;
  padding: 18px 12px;
  color: #666;
}

.analytics-footer{
  width: 95%;
  max-width: 1400px;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.analytics-count{
  color: #333;
  font-size: 15px;
}

/* All Bookings: center the "Showing X to Y" line like the Analytics layout */
.bookings-footer .bookings-count{
  width: 100%;
  text-align: center;
}

.analytics-pager{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Centered pager for Analytics */
.analytics-pager--center{
  width: 100%;
  justify-content: center;
  margin-left: 0;
  margin-right: 0;
}

/* Analytics filter row styling */
.analytics-filter-row th{
  background: rgba(0,0,0,0.03);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 10px 12px;
}

.analytics-date-range{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.analytics-date-sep{
  opacity: 0.7;
  font-size: 13px;
}

.analytics-filter-note{
  font-size: 13px;
}

.analytics-filter-input,
.analytics-filter-select{
  width: 100%;
  max-width: 100%;
  height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  font-size: 14px;
  box-sizing: border-box;
}

.analytics-date-range .analytics-filter-input{
  width: 160px;
}

.analytics-filter-input:focus,
.analytics-filter-select:focus{
  outline: none;
  border-color: rgba(0,0,0,0.35);
}

.analytics-page-filter{
  display: flex;
  align-items: center;
  gap: 10px;
}

.analytics-filter-reset{
  white-space: nowrap;
}

/* Mobile: stack the Page filter + reset button nicely */
@media (max-width: 700px){
  .analytics-page-filter{
    flex-direction: column;
    align-items: stretch;
  }
  .analytics-date-range .analytics-filter-input{
    width: 100%;
  }
  .analytics-top-filter-row{
    flex-direction: column;
    align-items: stretch;
  }
  .analytics-top-filter-row .analytics-filter-select{
    width: 100%;
  }
}


.btn.btn-disabled{
  opacity: .5;
  pointer-events: none;
}

.analytics-page{
  color: #666;
  font-size: 14px;
  white-space: nowrap;
}

.analytics-backlink{
  margin-top: 16px;
}


/* ===== Analytics column sizing + header weight ===== */
.analytics-header-row th{
  font-weight: 700;
}

.analytics-col-time{ width: 340px; }
.analytics-col-account{ width: 260px; }
.analytics-col-page{ width: 180px; }

/* Keep the date range inputs on ONE LINE */
.analytics-date-range{
  flex-wrap: nowrap;
}

.analytics-date-range .analytics-filter-input{
  width: 140px;
}

/* Make sure the "to" never wraps */
.analytics-date-sep{
  white-space: nowrap;
}

/* Mobile tweaks */
@media (max-width: 720px){
  .analytics-title{ width: 100%; text-align: center; }
  .analytics-footer{
    flex-direction: column;
    align-items: stretch;
  }
  .analytics-pager{
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
  .analytics-pager .btn{
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}


/* =============================== All Bookings — Table Styling =============================== */
/* Reuse Analytics table look for All Bookings, plus a few small tweaks */
.bookings-table-wrap{ margin-top: 10px; }

/* Toast messages (used on admin_all_bookings.php) */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(17,17,17,0.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  z-index: 2500;
  display: none;
  font-size: 14px;
  line-height: 1.3;
  max-width: min(520px, 92vw);
  text-align: center;
}

/* Locked status dropdown styling */
.status-locked select[disabled]{
  background: #f0f0f0;
  color: #777;
  border-color: #ddd;
}

/* Make table filters comfortable on mobile */
@media (max-width: 720px){
  .bookings-table .analytics-filter-select{
    font-size: 16px; /* prevents iOS zoom */
  }
}
.welcome-section {
  text-align: center;
  padding: 0px 0px 0px; /* reduced vertical padding */
  margin-bottom: 0px;
}

.welcome-section h1 {
  font-size: 34px; /* slightly smaller */
  margin-bottom: 8px;
}

.banner-text {
  font-size: 18px;
  color: #000000;
  margin-bottom: 0px;
}

.location-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 0px;
}

.cta-button {
  display: inline-block;
  padding: 10px 26px;
  background: #2b7cff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
}

.content-section {
  padding: 40px 20px; /* reduced from 60px */
  max-width: 1200px;
  margin: auto;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.content-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.video-wrapper iframe {
  width: 100%;
  height: 315px;
}

.logo-section {
  text-align: center;
  padding: 5px; /* slightly tighter */
}

.logo-section img {
  max-width: 400px;
}


/* ================= HOMEPAGE MOBILE FIX ================= */

.hero img{
  width:100%;
  height:auto;
  max-height:none;
  object-fit:contain;
}

/* Homepage grid layout */
.content-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px;
}

@media (max-width:768px){

  /* Stack homepage sections */
  .content-grid{
    grid-template-columns:1fr;
    gap:10px;
  }

  .content-section{
    padding:10px 10px;
  }

  .content-card{
    padding:10px;
  }

  .welcome-section{
    padding:10px 10px 5px;
  }

  .welcome-section h1{
    font-size:28px;
    line-height:1.3;
  }

  .location-text{
    font-size:16px;
  }

  /* Fix YouTube size */
  .video-wrapper iframe{
    width:100%;
    height:220px;
  }

  /* Facebook spacing */
  .facebook-card{
    padding:0;
  }

  /* DVSA logo scaling */
  .logo-section img{
    max-width:160px;
  }
}

/* ================= Account Settings: Calendar Privacy ================= */
.calendar-privacy-form{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.calendar-privacy-form label{
  margin: 0;
  font-weight: 600;
  color: #1f2937;
}

.calendar-privacy-form select{
  min-width: 180px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #b9cdf7;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-size: 15px;
  line-height: 1.2;
  outline: none;
}

.calendar-privacy-form select:focus{
  border-color: #2f6ff2;
  box-shadow: 0 0 0 3px rgba(47, 111, 242, 0.18);
}

.calendar-privacy-save{
  flex-basis: 100%;
  align-self: flex-start;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #1f5de2;
  border-radius: 8px;
  background: #2f6ff2;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

.calendar-privacy-save:hover{
  background: #2459c7;
  border-color: #2459c7;
}

.calendar-privacy-save:active{
  transform: translateY(1px);
}

/* ================= Student Calendar: Private Message ================= */
.calendar-private-card{
  max-width: 620px;
  margin: 28px auto;
  padding: 22px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  text-align: center;
}

.calendar-private-card h2{
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 26px;
}

.calendar-private-card p{
  margin: 0 0 16px 0;
  color: #4b5563;
  font-size: 16px;
}

.calendar-private-back-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #1f5de2;
  border-radius: 8px;
  background: #2f6ff2;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}

.calendar-private-back-btn:hover{
  background: #2459c7;
  border-color: #2459c7;
}

.calendar-private-back-btn:active{
  transform: translateY(1px);
}
