:root{
  --bg:#0b1020;
  --bg-soft:#121a31;
  --card:rgba(255,255,255,.06);
  --line:rgba(255,255,255,.12);
  --text:#eef2ff;
  --muted:#aab4d0;
  --accent:#ff8a00;
  --accent2:#ff4d4d;
  --ok:#22c55e;
  --danger:#ef4444;
  --shadow:0 20px 60px rgba(0,0,0,.35);
  --radius:22px;
  --radius-sm:14px;
  --max:1200px;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(255,138,0,.15), transparent 55%),
    radial-gradient(1000px 600px at 90% 10%, rgba(255,77,77,.12), transparent 55%),
    linear-gradient(180deg,#0b1020,#0f1730);
}

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

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

.container{
  width:min(calc(100% - 32px), var(--max));
  margin-inline:auto;
}

.page-space{
  padding:40px 0 80px;
}

/* =========================
   HEADER / NAV
========================= */
.site-header{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(11,16,32,.82);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}

.nav-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 0;
  min-height:88px;
  position:relative;
  flex-wrap:nowrap;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex:1 1 auto;
}

.brand-logo{
  height:48px;
  width:auto;
  object-fit:contain;
}

.brand-text{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}

.brand-text strong{
  font-size:1rem;
  line-height:1.2;
  margin:0;
}

.brand-text small{
  color:var(--muted);
  line-height:1.25;
  margin:0;
}

.nav-toggle{
  display:none;
  width:48px;
  height:48px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.08);
  cursor:pointer;
  padding:0;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
  margin:0;
  flex:0 0 auto;
}

.nav-toggle span{
  display:block;
  width:20px;
  height:2px;
  background:#fff;
  border-radius:999px;
  transition:.25s ease;
}

.nav-toggle.active span:nth-child(1){
  transform:translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2){
  opacity:0;
}

.nav-toggle.active span:nth-child(3){
  transform:translateY(-7px) rotate(-45deg);
}

.nav-links{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.nav-links a{
  color:var(--muted);
  transition:.2s ease;
}

.nav-links a:hover{
  color:#fff;
}

.nav-links .btn{
  color:#fff;
}

/* =========================
   HERO
========================= */
.hero{
  padding:70px 0 50px;
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);
  gap:32px;
  align-items:center;
}

.eyebrow{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(255,138,0,.26);
  background:rgba(255,138,0,.10);
  color:#ffd9ae;
  font-size:.8rem;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hero h1{
  margin:16px 0 14px;
  font-size:clamp(2rem, 4.5vw, 4.1rem);
  line-height:1.05;
}

.hero h1 span{
  background:linear-gradient(90deg,#ffd18a,#ff7b7b);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hero p{
  color:var(--muted);
  line-height:1.8;
  font-size:1.05rem;
  max-width:680px;
}

.hero-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:24px;
}

.hero-card,
.card{
  background:var(--card);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  border-radius:var(--radius);
}

.hero-card{
  padding:24px;
}

.hero-card h3{
  margin-top:0;
}

.info-box{
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#0f162b;
  margin-top:10px;
  overflow-wrap:anywhere;
}

.issue-box{
  padding:16px;
  margin-top:12px;
  border-radius:16px;
  background:rgba(255,138,0,.08);
  border:1px solid rgba(255,138,0,.28);
}

.issue-box p{
  margin:8px 0 0;
  color:#e8edff;
  line-height:1.75;
}

/* =========================
   SHARED SECTIONS
========================= */
.section-head{
  margin-bottom:24px;
}

.section-head.left{
  text-align:left;
}

.section-head:not(.left){
  text-align:center;
}

.section-head h1,
.section-head h2{
  margin:10px 0 0;
  line-height:1.15;
}

.section-head p{
  color:var(--muted);
  line-height:1.8;
}

/* =========================
   CARDS
========================= */
.card{
  padding:24px;
}

.feature-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:20px;
}

.features{
  padding-bottom:30px;
}

/* =========================
   FORM
========================= */
.form-layout{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);
  gap:24px;
  align-items:start;
}

.appointment-form{
  display:grid;
  gap:18px;
}

.grid-2{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:18px;
}

label{
  display:block;
  margin-bottom:8px;
  font-weight:600;
}

input,
select,
textarea{
  width:100%;
  padding:13px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#0f162b;
  color:#fff;
  font:inherit;
}

textarea{
  min-height:150px;
  resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(255,138,0,.12);
}

.check-list{
  padding-left:18px;
  color:var(--muted);
  line-height:1.9;
}

.side-panel{
  min-width:0;
}

/* =========================
   BUTTONS
========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 20px;
  border:none;
  border-radius:14px;
  font-weight:700;
  cursor:pointer;
  transition:.2s ease;
  text-align:center;
}

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

.btn-primary{
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:#fff;
}

.btn-secondary{
  background:rgba(255,255,255,.08);
  border:1px solid var(--line);
  color:#fff;
}

.btn-danger{
  background:#ef4444;
  color:#fff;
}

.full{
  width:100%;
}

/* =========================
   DASHBOARD
========================= */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:18px;
  margin:22px 0;
}

.stat-card span{
  display:block;
  color:var(--muted);
}

.stat-card strong{
  display:block;
  margin-top:8px;
  font-size:2rem;
  line-height:1;
}

.filter-card{
  margin-bottom:22px;
}

.filter-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) 220px auto auto;
  gap:12px;
}

.appointments-list{
  display:grid;
  gap:20px;
}

.appointment-card{
  padding:24px;
}

.appointment-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.appointment-top h2{
  margin:0 0 6px;
  overflow-wrap:anywhere;
}

.muted{
  color:var(--muted);
}

.appointment-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px 18px;
  margin-top:16px;
}

.appointment-grid div{
  overflow-wrap:anywhere;
}

.status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:999px;
  font-weight:700;
  white-space:nowrap;
}

.status-new{
  background:#fde68a20;
  color:#fde68a;
}

.status-confirmed{
  background:#93c5fd20;
  color:#bfdbfe;
}

.status-in-progress{
  background:#fdba7420;
  color:#fdba74;
}

.status-completed{
  background:#86efac20;
  color:#bbf7d0;
}

.actions-row{
  margin-top:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.inline-form{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.alert{
  padding:14px 16px;
  border-radius:14px;
  margin:20px 0;
}

.success{
  background:#22c55e20;
  border:1px solid #22c55e40;
}

.empty-state{
  text-align:center;
}

/* =========================
   FOOTER
========================= */
.site-footer{
  margin-top:50px;
  padding:34px 0;
  border-top:1px solid var(--line);
}

.footer-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:24px;
}

.site-footer ul{
  padding-left:18px;
  margin:8px 0 0;
}

.site-footer li,
.site-footer p{
  color:var(--muted);
  line-height:1.8;
}

/* =========================
   UTIL
========================= */
.mt-16{
  margin-top:16px;
}

/* =========================
   LARGE TABLETS
========================= */
@media (max-width:1100px){
  .hero-grid{
    grid-template-columns:1fr;
  }

  .form-layout{
    grid-template-columns:1fr;
  }

  .feature-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .stats-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .footer-grid{
    grid-template-columns:1fr 1fr;
  }
}

/* =========================
   TABLETS / MOBILE NAV
========================= */
@media (max-width:820px){
  .nav-toggle{
    display:flex;
  }

  .nav-links{
    display:none;
    position:absolute;
    top:calc(100% + 10px);
    left:0;
    right:0;
    width:100%;
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:14px;
    background:#0f1730;
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:var(--shadow);
    z-index:120;
  }

  .nav-links.open{
    display:flex;
  }

  .nav-links a,
  .nav-links .btn{
    width:100%;
  }

  .nav-links a{
    padding:12px 14px;
    border:1px solid var(--line);
    border-radius:14px;
    background:rgba(255,255,255,.05);
  }

  .grid-2{
    grid-template-columns:1fr;
  }

  .filter-form{
    grid-template-columns:1fr 1fr;
  }

  .appointment-grid{
    grid-template-columns:1fr;
  }

  .actions-row{
    flex-direction:column;
    align-items:stretch;
  }

  .inline-form{
    width:100%;
  }

  .inline-form select,
  .inline-form button{
    width:100%;
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width:640px){
  .container{
    width:min(calc(100% - 24px), var(--max));
  }

  .hero{
    padding:42px 0 34px;
  }

  .hero-actions{
    flex-direction:column;
  }

  .hero-actions .btn{
    width:100%;
  }

  .feature-grid,
  .stats-grid,
  .footer-grid,
  .filter-form{
    grid-template-columns:1fr;
  }

  .card,
  .hero-card,
  .appointment-card{
    padding:18px;
  }

  .brand-text strong{
    font-size:.95rem;
  }

  .appointment-top{
    flex-direction:column;
    align-items:flex-start;
  }

  .status-badge{
    white-space:normal;
  }

  .page-space{
    padding:26px 0 60px;
  }
}