/* =========================================================
   Coach Hajar — Course Platform
   Theme: Black / White / Green — Minimal, Modern, Fitness
========================================================= */

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root{
  --bg:        #000000;
  --card:      #111111;
  --surface:   #1a1a1a;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.14);
  --text:      #ffffff;
  --muted:     #9a9a9a;
  --green:     #17a34a;
  --green-dim: rgba(23,163,74,0.15);
  --red:       #ef4444;
  --red-dim:   rgba(239,68,68,0.12);
  --radius:    16px;
  --radius-sm: 10px;
  --max:       960px;
}

html { scroll-behavior:smooth; }

body{
  font-family:'Segoe UI', Tahoma, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

a{ color:inherit; text-decoration:none; }

img{ max-width:100%; display:block; }

/* ---------------------------------------------------------
   Layout wrapper
--------------------------------------------------------- */
.page{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:24px 16px;
  width:100%;
}

.container{
  width:100%;
  max-width:var(--max);
}

/* ---------------------------------------------------------
   Logo
--------------------------------------------------------- */
.site-logo{
  display:block;
  margin:0 auto 22px;
  max-width:120px;
  filter: drop-shadow(0 4px 18px rgba(0,0,0,0.6));
}

/* ---------------------------------------------------------
   Login Card
--------------------------------------------------------- */
.login-wrap{
  flex:1;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:24px 16px;
}

.login-card{
  width:100%;
  max-width:380px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:24px;
  padding:32px 26px;
  text-align:center;
  box-shadow:0 24px 64px rgba(0,0,0,0.6);
  animation:riseUp .5s cubic-bezier(.22,1,.36,1) both;
}

@keyframes riseUp{
  from{ opacity:0; transform:translateY(18px); }
  to{ opacity:1; transform:translateY(0); }
}

.login-title{
  font-size:22px;
  font-weight:800;
  margin-bottom:10px;
}

.login-sub{
  font-size:14px;
  color:var(--muted);
  line-height:1.8;
  margin-bottom:26px;
}

.form-group{
  margin-bottom:16px;
  text-align:right;
}

.form-input{
  width:100%;
  background:var(--surface);
  border:1px solid var(--border2);
  color:var(--text);
  font-size:15px;
  padding:14px 16px;
  border-radius:var(--radius-sm);
  outline:none;
  transition:border-color .2s, box-shadow .2s;
  font-family:inherit;
  text-align:center;
}

.form-input:focus{
  border-color:var(--green);
  box-shadow:0 0 0 3px var(--green-dim);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  border:none;
  border-radius:var(--radius-sm);
  padding:14px 18px;
  font-size:15px;
  font-weight:800;
  cursor:pointer;
  transition:transform .15s, opacity .2s, box-shadow .2s;
  font-family:inherit;
}

.btn:active{ transform:scale(.97); }

.btn-green{
  background:var(--green);
  color:#fff;
  box-shadow:0 8px 22px rgba(23,163,74,0.32);
}
.btn-green:hover{ opacity:.92; }

.btn-outline{
  background:transparent;
  color:var(--text);
  border:1px solid var(--border2);
}
.btn-outline:hover{ background:rgba(255,255,255,0.05); }

.btn-red{
  background:var(--red);
  color:#fff;
  box-shadow:0 8px 22px rgba(239,68,68,0.28);
}
.btn-red:hover{ opacity:.9; }

.btn-sm{
  width:auto;
  padding:9px 16px;
  font-size:13px;
}

.alert{
  border-radius:var(--radius-sm);
  padding:12px 14px;
  font-size:13.5px;
  font-weight:700;
  margin-bottom:18px;
  text-align:center;
}

.alert-error{
  background:var(--red-dim);
  border:1px solid rgba(239,68,68,0.3);
  color:#ff8a8a;
}

.alert-success{
  background:var(--green-dim);
  border:1px solid rgba(23,163,74,0.3);
  color:#5ee08a;
}

/* ---------------------------------------------------------
   Header (course + admin pages)
--------------------------------------------------------- */
.top-header{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 4px 8px;
  max-width:var(--max);
  margin:0 auto;
  flex-wrap:wrap;
}

.top-header .site-logo{
  margin:0;
  max-width:70px;
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

/* ---------------------------------------------------------
   Welcome banner
--------------------------------------------------------- */
.welcome-box{
  text-align:center;
  margin:10px auto 26px;
}
.welcome-box h1{
  font-size:24px;
  font-weight:800;
  margin-bottom:6px;
}
.welcome-box p{
  color:var(--muted);
  font-size:14px;
}

/* ---------------------------------------------------------
   Course / Week Cards
--------------------------------------------------------- */
.course-block{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;
  margin-bottom:22px;
}

.course-block-title{
  font-size:19px;
  font-weight:800;
  margin-bottom:16px;
  display:flex;
  align-items:center;
  gap:10px;
}

.course-block-title::before{
  content:'';
  width:5px;
  height:20px;
  background:var(--green);
  border-radius:4px;
  display:inline-block;
}

.week{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  margin-bottom:12px;
  overflow:hidden;
}

.week-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:15px 16px;
  cursor:pointer;
  user-select:none;
  font-weight:700;
  font-size:15px;
  transition:background .2s;
}
.week-header:hover{ background:rgba(255,255,255,0.03); }

.week-header .chevron{
  transition:transform .3s;
  color:var(--green);
  flex-shrink:0;
}
.week.open .chevron{ transform:rotate(180deg); }

.week-body{
  max-height:0;
  overflow:hidden;
  transition:max-height .35s ease;
  border-top:1px solid transparent;
}
.week.open .week-body{
  border-top:1px solid var(--border);
}

.video-list{
  list-style:none;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.video-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:9px;
  cursor:pointer;
  transition:border-color .2s, background .2s;
  font-size:13.5px;
  font-weight:600;
}
.video-item:hover{
  border-color:var(--green);
  background:rgba(23,163,74,0.06);
}
.video-item .play-ic{
  width:26px;height:26px;border-radius:50%;
  background:var(--green-dim);
  color:var(--green);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
  font-size:11px;
}

.video-player-wrap{
  padding:12px;
  display:none;
}
.video-player-wrap.active{ display:block; }

.responsive-video{
  position:relative;
  width:100%;
  padding-bottom:56.25%;
  height:0;
  border-radius:var(--radius-sm);
  overflow:hidden;
  background:#000;
  border:1px solid var(--border);
}
.responsive-video iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

.empty-state{
  text-align:center;
  color:var(--muted);
  padding:40px 20px;
  font-size:14px;
}

/* ---------------------------------------------------------
   Admin Dashboard
--------------------------------------------------------- */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-bottom:28px;
}
@media(max-width:700px){
  .stats-grid{ grid-template-columns:repeat(2,1fr); }
}

.stat-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  text-align:center;
}
.stat-num{
  font-size:30px;
  font-weight:800;
  color:var(--green);
  margin-bottom:4px;
}
.stat-label{
  font-size:12px;
  color:var(--muted);
  font-weight:600;
}

.admin-section{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  margin-bottom:24px;
}

.admin-section-title{
  font-size:17px;
  font-weight:800;
  margin-bottom:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.inline-form{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.inline-form .form-input{ flex:1; min-width:180px; text-align:right; }

table.data-table{
  width:100%;
  border-collapse:collapse;
  font-size:13.5px;
}
table.data-table th,
table.data-table td{
  padding:12px 10px;
  border-bottom:1px solid var(--border);
  text-align:right;
}
table.data-table th{
  color:var(--muted);
  font-weight:700;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.4px;
}
table.data-table tr:last-child td{ border-bottom:none; }

.key-pill{
  display:inline-block;
  background:var(--surface);
  border:1px solid var(--border2);
  padding:5px 10px;
  border-radius:8px;
  font-weight:700;
  letter-spacing:.5px;
  font-family:monospace;
  font-size:13px;
}

.course-admin-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:16px;
  margin-bottom:14px;
}
.course-admin-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.course-admin-head h3{ font-size:16px; font-weight:800; }

.week-admin-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:9px;
  padding:12px 14px;
  margin-bottom:10px;
}
.week-admin-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:8px;
}
.week-admin-head strong{ font-size:14px; }

.video-admin-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  background:var(--surface);
  border-radius:8px;
  margin-bottom:6px;
  font-size:12.5px;
  flex-wrap:wrap;
}

.btn-icon{
  background:transparent;
  border:none;
  color:var(--red);
  cursor:pointer;
  font-size:13px;
  padding:6px 8px;
  border-radius:6px;
  transition:background .2s;
}
.btn-icon:hover{ background:var(--red-dim); }

.tag{
  font-size:11px;
  font-weight:700;
  padding:3px 9px;
  border-radius:50px;
  background:var(--green-dim);
  color:#5ee08a;
  white-space:nowrap;
}

hr.sep{
  border:none;
  border-top:1px solid var(--border);
  margin:18px 0;
}

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

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
footer{
  text-align:center;
  padding:30px 20px 26px;
  border-top:1px solid var(--border);
  margin-top:20px;
  width:100%;
}

.footer-social{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-bottom:16px;
}

.footer-social a{
  width:38px;height:38px;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--card);
  border:1px solid var(--border);
  font-size:16px;
  transition:transform .2s, background .2s, border-color .2s;
}
.footer-social a:hover{
  transform:translateY(-2px);
  background:var(--surface);
  border-color:var(--border2);
}
.footer-social .ig{ color:#e1306c; }
.footer-social .tt{ color:#e0e0e0; }
.footer-social .yt{ color:#ff4040; }
.footer-social .wa{ color:var(--green); }

.footer-links{
  font-size:12.5px;
  color:var(--muted);
}
.footer-links a{
  color:var(--muted);
  transition:color .2s;
}
.footer-links a:hover{ color:var(--text); }

.footer-copy{
  margin-top:10px;
  font-size:11px;
  color:rgba(154,154,154,0.5);
}

/* ---------------------------------------------------------
   Floating WhatsApp Button
--------------------------------------------------------- */
.wa-float{
  position:fixed;
  bottom:22px;
  left:16px;
  z-index:9999;
  width:54px;height:54px;
  border-radius:50%;
  background:var(--green);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 22px rgba(23,163,74,0.45);
  text-decoration:none;
  animation:waPulse 2.5s infinite;
  transition:transform .2s;
  font-size:24px;
  color:#fff;
}
.wa-float:hover{ transform:scale(1.08); }
@keyframes waPulse{
  0%{ box-shadow:0 0 0 0 rgba(23,163,74,.55), 0 6px 22px rgba(23,163,74,.45); }
  70%{ box-shadow:0 0 0 12px rgba(23,163,74,0), 0 6px 22px rgba(23,163,74,.45); }
  100%{ box-shadow:0 0 0 0 rgba(23,163,74,0), 0 6px 22px rgba(23,163,74,.45); }
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media(max-width:600px){
  .login-card{ padding:26px 20px; }
  .stats-grid{ grid-template-columns:repeat(2,1fr); }
  .admin-section{ padding:16px; }
  table.data-table{ font-size:12px; }
  table.data-table th, table.data-table td{ padding:9px 6px; }
}
