/* --------------------------
GLOBAL
--------------------------- */

body{
  font-family: Arial, Helvetica, sans-serif;
  margin:0;
  background:#f4f6f9;
  color:#1f2937;
  transition: all 0.2s ease;
}

h1,h2,h3{
  margin-top:0;
}

a{
  text-decoration:none;
  color:#2563eb;
}

hr{
  border:none;
  border-top:1px solid #e5e7eb;
  margin:20px 0;
}

/* --------------------------
HEADER
--------------------------- */

.site-header{
  position:sticky;
  top:0;
  background:linear-gradient(90deg,#0f172a,#1e293b);
  color:white;
  padding:12px 30px;
  box-shadow:0 3px 8px rgba(0,0,0,0.15);
  z-index:1000;
  transition: all 0.2s ease;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}

/* BRAND */

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

.logo{
  width:48px;
  height:48px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid white;
}

.site-title{
  font-size:20px;
  font-weight:600;
  letter-spacing:0.3px;
}

/* --------------------------
NAV
--------------------------- */

.main-nav{
  display:flex;
  gap:25px;
  align-items:center;
}

.main-nav a{
  color:white;
  font-weight:500;
  font-size:15px;
  opacity:0.9;
  transition:all 0.2s ease;
  padding:4px 0;
  position:relative;
}

.main-nav a::after{
  content:"";
  position:absolute;
  bottom:-4px;
  left:0;
  width:0;
  height:2px;
  background:#22c55e;
  transition:0.2s;
}

.main-nav a:hover{
  opacity:1;
}

.main-nav a:hover::after{
  width:100%;
}

/* --------------------------
AUTH AREA
--------------------------- */

.auth-area{
  display:flex;
  align-items:center;
  gap:10px;
}

.auth-area span{
  font-size:14px;
  opacity:0.9;
}

.auth-area a{
  background:#22c55e;
  color:white;
  padding:6px 14px;
  border-radius:6px;
  font-weight:500;
}

.auth-area a:hover{
  background:#16a34a;
}

/* --------------------------
FOOTER
--------------------------- */

.site-footer{
  margin-top:40px;
  padding:20px;
  text-align:center;
  background:#111827;
  color:white;
}

/* --------------------------
PAGE CONTAINER
--------------------------- */

.container{
  max-width:1200px;
  margin:0;              /* ✅ FIXED (no centering conflict) */
  padding:20px;
}

/* --------------------------
FORMS
--------------------------- */

input, select{
  padding:8px 10px;
  border-radius:6px;
  border:1px solid #d1d5db;
  margin:5px;
  font-size:14px;
}

input:focus{
  outline:none;
  border-color:#2563eb;
}

/* --------------------------
BUTTONS
--------------------------- */

button{
  background:#2563eb;
  color:white;
  border:none;
  padding:8px 16px;
  border-radius:6px;
  cursor:pointer;
  font-size:14px;
}

button:hover{
  background:#1d4ed8;
}

.button-secondary{
  background:#6b7280;
}

.button-secondary:hover{
  background:#4b5563;
}

.button-danger{
  background:#ef4444;
}

.button-danger:hover{
  background:#dc2626;
}

/* --------------------------
TABLES
--------------------------- */

table{
  width:100%;
  border-collapse:collapse;
  background:white;
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
}

thead{
  background:#111827;
  color:white;
}

th,td{
  padding:10px 12px;
  text-align:left;
}

tbody tr{
  border-bottom:1px solid #e5e7eb;
}

tbody tr:hover{
  background:#f9fafb;
}

/* --------------------------
COACH SIDEBAR MODE
--------------------------- */

/* Shift whole page */

body.coach-layout{
  padding-left:240px;
}

/* Sidebar */

body.coach-layout .site-header{
  position:fixed !important;  /* ✅ FORCE override */
  top:0;
  left:0;
  height:100vh;
  width:240px;
  padding:20px;
  display:flex;
  flex-direction:column;
  background:#0f172a;
}

/* Sidebar layout */

body.coach-layout .header-inner{
  flex-direction:column;
  height:100%;
}

/* Nav vertical */

body.coach-layout .main-nav{
  flex-direction:column;
  gap:10px;
  margin-top:20px;
  overflow-y:auto;
}

/* Links */

body.coach-layout .main-nav a{
  width:100%;
  padding:10px;
  border-radius:6px;
}

body.coach-layout .main-nav a:hover{
  background:#1e293b;
}

/* Auth bottom */

body.coach-layout .auth-area{
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,0.1);
}

/* --------------------------
COLLAPSED SIDEBAR
--------------------------- */

body.sidebar-collapsed{
  padding-left:70px;
}

body.sidebar-collapsed .site-header{
  width:70px;
}

/* Hide text */

body.sidebar-collapsed .site-title{
  display:none;
}

body.sidebar-collapsed .main-nav a{
  font-size:0;
}

/* Toggle button */

.sidebar-toggle{
  background:none;
  border:none;
  color:white;
  font-size:20px;
  cursor:pointer;
}

/* --------------------------
MOBILE
--------------------------- */

@media (max-width:800px){

  body.coach-layout{
    padding-left:0;
  }

  body.coach-layout .site-header{
    position:relative;
    width:100%;
    height:auto;
  }

  .header-inner{
    flex-direction:column;
    align-items:flex-start;
  }

  .main-nav{
    flex-direction:column;
    width:100%;
  }

}

/* --------------------------
FINAL SIDEBAR FIX (DO NOT REMOVE)
--------------------------- */

body.coach-layout #header{
  position:fixed;
  left:0;
  top:0;
  width:240px;
  height:100vh;
  z-index:1000;
}

body.coach-layout .container{
  margin-left:70px !important;
}

/* COLLAPSED */

body.sidebar-collapsed #header{
  width:70px;
}

body.sidebar-collapsed .container{
  margin-left:70px !important;
}

#slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.slot {
  padding: 15px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
}

.available {
  background: #28a745;
  color: white;
}

.blocked {
  background: #ccc;
}

.modal {
  position: fixed;
  top:0;left:0;right:0;bottom:0;
  background: rgba(0,0,0,0.6);
  display:none;
  justify-content:center;
  align-items:center;
}

.modal-content {
  background:white;
  padding:20px;
  width:90%;
  border-radius:10px;
}

/* -------------------------
SLOTS GRID
------------------------- */
#slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
}

/* -------------------------
SLOT BUTTONS
------------------------- */
.slot {
  padding: 15px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}

.slot:hover {
  transform: scale(1.03);
}

/* AVAILABLE */
.available {
  background: #28a745;
  color: white;
}

/* BLOCKED */
.blocked {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
}

/* -------------------------
MODAL
------------------------- */
.modal {
  position: fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background: rgba(0,0,0,0.6);
  display:none;
  justify-content:center;
  align-items:center;
  z-index: 1000;
}

.modal-content {
  background:white;
  padding:20px;
  width:90%;
  max-width:400px;
  border-radius:10px;
}

/* -------------------------
FORM ELEMENTS
------------------------- */
input, select, button {
  width:100%;
  margin-top:10px;
  padding:12px;
  font-size:16px;
  border-radius:6px;
  border:1px solid #ddd;
}

/* BUTTON */
button {
  background:#007bff;
  color:white;
  border:none;
}

button:hover {
  background:#0056b3;
}

/* -------------------------
MOBILE OPTIMISATION
------------------------- */
@media (max-width: 768px) {

  #slots {
    grid-template-columns: repeat(2, 1fr);
  }

  .slot {
    padding: 18px;
    font-size: 18px;
  }

  h2 {
    font-size: 20px;
  }
}