:root{--bg:#f7f5f1;--card:#fff;--text:#1f2724;--muted:#6e7773;--line:#e4ded6;--green:#173d33;--green2:#2f6d5b;--danger:#8a3131}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select{font:inherit}button{min-height:42px;border:0;border-radius:12px;padding:9px 13px;cursor:pointer;background:#ece8e2;color:inherit;font-weight:700}button.primary,button.active{background:var(--green);color:white}button.danger{background:var(--danger);color:white}button.small{min-height:34px;padding:6px 9px;font-size:12px}button:disabled{opacity:.4;cursor:not-allowed}input,select{width:100%;min-height:44px;border:1px solid #d7d1c9;border-radius:12px;background:#fff;padding:9px 11px;font-size:16px}label{display:block;font-size:12px;font-weight:750;margin-bottom:6px;color:var(--muted)}.hidden{display:none!important}.login-wrap{display:grid;place-items:center;padding:50px 16px}.login-card{width:min(460px,100%);background:var(--card);border:1px solid var(--line);border-radius:26px;padding:26px;box-shadow:0 18px 55px rgba(0,0,0,.08)}.brand{display:flex;align-items:center;gap:12px}.brand.small .logo{width:48px;height:48px}.logo{width:56px;height:56px;border-radius:18px;background:linear-gradient(135deg,var(--green),var(--green2));color:white;display:grid;place-items:center;font-weight:850}.brand h1{font-size:22px;margin:0}.brand p{font-size:12px;color:var(--muted);margin:3px 0 0}.lang{display:flex;border:1px solid #d8d3cb;border-radius:12px;overflow:hidden;width:max-content;margin:18px 0}.lang button{border-radius:0;background:transparent;min-height:40px}.topbar{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;backdrop-filter:blur(8px)}.top-actions,.filters,.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.badge{display:inline-flex;padding:5px 9px;border-radius:999px;background:#e8f0ed;color:#245345;font-size:11px;font-weight:800}.nav{display:flex;gap:8px;overflow:auto;padding:14px 18px 10px}.nav button{white-space:nowrap;background:transparent;border:1px solid #ddd8d1}.nav button.active{background:var(--green);color:white;border-color:var(--green)}main{padding:0 18px 22px}.card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:17px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-grid .full{grid-column:1/-1}.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}.section-head h2{margin:0;font-size:17px}.section-head p{margin:4px 0 0;font-size:12px;color:var(--muted)}.calendar-scroll,.table-wrap{overflow:auto;border-radius:16px;border:1px solid var(--line)}.calendar-grid{display:grid;min-width:780px}.cal-cell{min-height:68px;padding:8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);font-size:11px;background:#fff}.cal-head{min-height:46px;font-weight:800;background:#f1eee9}.time-cell{font-weight:800;background:#faf8f5}.booking-chip{padding:8px 9px;border-radius:10px;background:#e6f1ed;border:1px solid #d5e6df;cursor:pointer;margin-bottom:5px}.booking-chip strong{display:block}.booking-chip small{color:var(--muted)}.free-slot{width:100%;min-height:50px;border:1px dashed #d6d0c8;background:transparent;font-size:11px}.therapist-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.therapist{border:1px solid #ddd8d0;border-radius:13px;padding:11px;text-align:left;background:transparent}.therapist.selected{outline:2px solid #3f7d69;background:#edf5f2}.therapist.busy{opacity:.42}.list{display:grid;gap:9px}.item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px}.item strong{display:block}.item small{color:var(--muted)}table{width:100%;border-collapse:collapse;min-width:780px}th,td{text-align:left;padding:11px 10px;border-bottom:1px solid #ebe6df;font-size:12px}th{font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);background:#faf8f5}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:14px 0}.kpi{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px}.kpi span{display:block;font-size:11px;color:var(--muted)}.kpi strong{display:block;font-size:24px;margin-top:5px}.error{color:#8a3131;background:#f6e7e7;padding:10px 12px;border-radius:10px}.wide{width:100%}.status{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800}.status.Booked{background:#fff3d7;color:#765816}.status.Completed{background:#e2f3e8;color:#24633b}.status.Cancelled{background:#f4e1e1;color:#8e3636}
@media(max-width:760px){.topbar{padding:12px}.nav{padding:12px 12px 10px}main{padding:0 12px 18px}.grid2,.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.therapist-grid{grid-template-columns:1fr}.kpis{grid-template-columns:1fr 1fr}}
.calendar-grid{position:relative;display:grid;min-width:900px;grid-auto-rows:34px;background:#fff}
.cal-cell{min-height:34px;padding:6px 8px}.cal-head{min-height:44px;height:44px;display:flex;align-items:center;position:sticky;top:0;z-index:6}
.time-cell{display:flex;align-items:flex-start;justify-content:flex-end;padding-right:10px;color:var(--muted)}
.slot-cell{min-height:34px;padding:3px;position:relative}.slot-cell.is-busy{background:#f4f7f5}
.free-slot{min-height:27px;height:27px;padding:2px 6px;font-size:10px;opacity:.65}
.booking-block{position:relative;z-index:4;margin:3px 5px;padding:8px 9px;border-radius:11px;background:#fff5df;border:1px solid #ead9ad;overflow:hidden;cursor:pointer}
.booking-block.Completed{background:#e5f4e9;border-color:#cce5d3}.booking-block strong{display:block;font-size:12px}.booking-block small{display:block;color:var(--muted);margin-top:3px}
.booking-block .end-time{font-weight:800;color:#245345}.section-note{font-size:13px;color:var(--muted)}
.security-list{display:grid;gap:10px}.security-list>div{padding:12px;border:1px solid var(--line);border-radius:14px}.security-list strong,.security-list small{display:block}.security-list small{margin-top:4px;color:var(--muted)}




/* V1.2.3 — CLEAN calendar, single table only */
.calendar-scroll{
  overflow:auto !important;
  border-radius:16px;
  border:1px solid var(--line);
  background:#fff;
}
.calendar-grid{
  display:block !important;
  position:static !important;
  width:100% !important;
  min-width:0 !important;
  height:auto !important;
  background:#fff !important;
}
.schedule-table{
  width:100% !important;
  min-width:760px !important;
  border-collapse:collapse !important;
  table-layout:fixed !important;
  background:#fff;
  margin:0;
}
.schedule-table thead,
.schedule-table tbody,
.schedule-table tr{
  width:100%;
}
.schedule-table th,
.schedule-table td{
  box-sizing:border-box;
}
.schedule-table th{
  position:sticky;
  top:0;
  z-index:5;
  background:#f1eee9 !important;
  font-size:12px;
  font-weight:800;
  text-transform:none;
  letter-spacing:0;
  color:var(--text);
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:10px 8px;
  text-align:center;
  height:44px;
}
.schedule-time-head{
  width:76px !important;
  min-width:76px !important;
  max-width:76px !important;
  left:0;
  z-index:7 !important;
}
.schedule-time{
  width:76px !important;
  min-width:76px !important;
  max-width:76px !important;
  position:sticky;
  left:0;
  z-index:3;
  background:#faf8f5 !important;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  text-align:right;
  padding:7px 9px 7px 4px !important;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  vertical-align:middle;
  height:42px;
}
.schedule-cell{
  height:42px !important;
  min-height:42px !important;
  padding:3px !important;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  vertical-align:top;
  background:#fff !important;
  position:static !important;
}
.schedule-cell.occupied{
  background:#f7f8f7 !important;
}
.schedule-free{
  width:100% !important;
  min-height:34px !important;
  height:34px !important;
  border:1px dashed transparent !important;
  border-radius:8px !important;
  background:transparent !important;
  font-size:10px !important;
  opacity:.3;
  padding:3px 6px !important;
  margin:0 !important;
  position:static !important;
}
.schedule-free:hover{
  opacity:1;
  border-color:#cdd9d4 !important;
  background:#f1f7f4 !important;
}
.schedule-booking{
  width:100% !important;
  min-height:34px !important;
  height:auto !important;
  display:block !important;
  position:static !important;
  text-align:left;
  padding:6px 7px !important;
  margin:0 !important;
  border-radius:9px !important;
  border:1px solid #ead9ad !important;
  background:#fff5df !important;
  color:var(--text);
  overflow:hidden;
}
.schedule-booking.Completed{
  background:#e5f4e9 !important;
  border-color:#cce5d3 !important;
}
.schedule-booking strong{
  display:block;
  font-size:11px;
  line-height:1.2;
}
.schedule-booking small{
  display:block;
  font-size:10px;
  line-height:1.2;
  color:var(--muted);
  margin-top:2px;
}
.schedule-continuation{
  width:100% !important;
  height:34px !important;
  position:static !important;
  border-radius:7px;
  background:repeating-linear-gradient(
    135deg,
    rgba(47,109,91,.055),
    rgba(47,109,91,.055) 5px,
    rgba(47,109,91,.10) 5px,
    rgba(47,109,91,.10) 10px
  ) !important;
}
@media(max-width:760px){
  .schedule-table{min-width:720px !important}
}

.user-item small{display:block;margin-top:4px}
.reset-box{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.reset-box h3{font-size:14px;margin:0 0 10px}

.report-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:16px;
}
.report-mini-table{
  min-width:520px;
}
.report-mini-table td:nth-child(2),
.report-mini-table td:nth-child(3),
.report-mini-table td:nth-child(4),
.report-mini-table th:nth-child(2),
.report-mini-table th:nth-child(3),
.report-mini-table th:nth-child(4){
  text-align:right;
}
@media(max-width:900px){
  .report-grid{grid-template-columns:1fr}
}


/* =========================
   V1.5 UI OPTIMIZATION
   ========================= */

:root{
  --bg:#f5f3ef;
  --card:#ffffff;
  --text:#1c2522;
  --muted:#717a76;
  --line:#e4dfd8;
  --green:#173d33;
  --green2:#2f6d5b;
  --green-soft:#edf5f2;
  --danger:#8a3131;
  --shadow:0 8px 30px rgba(20,35,30,.06);
}

body{
  background:
    radial-gradient(circle at top right, rgba(47,109,91,.055), transparent 28rem),
    var(--bg);
  color:var(--text);
}

.topbar{
  min-height:76px;
  padding:14px 22px;
  box-shadow:0 1px 0 rgba(0,0,0,.03);
}

.brand h1{
  font-size:23px;
  letter-spacing:-.02em;
}

.brand p{
  margin-top:4px;
  font-size:12px;
}

.logo{
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.10),0 6px 16px rgba(23,61,51,.16);
}

.nav{
  padding:14px 22px 12px;
  gap:9px;
  background:transparent;
}

.nav button{
  min-height:44px;
  padding:10px 16px;
  border-radius:13px;
  background:rgba(255,255,255,.72);
  border:1px solid var(--line);
  box-shadow:0 2px 8px rgba(20,35,30,.025);
}

.nav button.active{
  background:var(--green);
  border-color:var(--green);
  box-shadow:0 7px 18px rgba(23,61,51,.17);
}

main{
  max-width:1600px;
  margin:0 auto;
  padding:4px 22px 30px;
}

.card{
  border-radius:22px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  padding:20px;
}

.section-head{
  margin-bottom:16px;
}

.section-head h2,
.card>h2{
  font-size:18px;
  letter-spacing:-.015em;
}

.section-head p{
  font-size:12px;
  line-height:1.45;
}

button{
  transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease;
}

button:hover:not(:disabled){
  transform:translateY(-1px);
}

button.primary:hover:not(:disabled),
.nav button.active:hover:not(:disabled){
  box-shadow:0 8px 18px rgba(23,61,51,.18);
}

input,select{
  min-height:46px;
  border-radius:12px;
  border-color:#d8d2cb;
  background:#fff;
}

input:focus,select:focus{
  border-color:#5d8f7f;
  box-shadow:0 0 0 3px rgba(47,109,91,.10);
}

label{
  margin-bottom:7px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.035em;
}

.filters{
  gap:9px;
}

.filters input,
.filters select{
  min-width:160px;
}

.badge{
  background:var(--green-soft);
  color:#285848;
  border:1px solid #d9e7e1;
}

/* Calendar */
.calendar-scroll{
  border-radius:18px;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.012);
}

.schedule-table th{
  height:48px;
  background:#f0ede8 !important;
  font-size:12px;
  color:#33413c;
}

.schedule-time{
  font-variant-numeric:tabular-nums;
  color:#63706b;
}

.schedule-cell{
  height:46px !important;
  min-height:46px !important;
}

.schedule-free{
  opacity:.22;
  font-weight:700;
}

.schedule-free:hover{
  opacity:1;
}

.schedule-booking{
  border-radius:10px !important;
  box-shadow:0 3px 10px rgba(0,0,0,.045);
}

.schedule-booking strong{
  font-size:11.5px;
}

.schedule-booking small{
  margin-top:3px;
}

.schedule-continuation{
  opacity:.65;
}

/* Tables */
.table-wrap{
  border-radius:16px;
  background:#fff;
}

table th{
  background:#f8f6f2;
  color:#6b7470;
  padding-top:12px;
  padding-bottom:12px;
}

table td{
  padding-top:12px;
  padding-bottom:12px;
}

tbody tr:hover td{
  background:#fbfaf8;
}

/* KPI cards */
.kpis{
  gap:14px;
  margin:16px 0;
}

.kpi{
  border-radius:20px;
  padding:18px;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}

.kpi::after{
  content:"";
  position:absolute;
  width:64px;
  height:64px;
  border-radius:50%;
  right:-24px;
  top:-24px;
  background:rgba(47,109,91,.055);
}

.kpi span{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:750;
}

.kpi strong{
  font-size:27px;
  letter-spacing:-.03em;
}

/* Reports */
.report-grid{
  gap:18px;
}

.report-grid .card{
  min-width:0;
}

/* Lists / admin */
.item{
  border-radius:15px;
  padding:13px 14px;
  background:#fff;
}

.item:hover{
  border-color:#d7d0c8;
  box-shadow:0 4px 14px rgba(20,35,30,.035);
}

.user-item strong{
  font-size:14px;
}

/* Login */
.login-wrap{
  min-height:100vh;
  background:
    radial-gradient(circle at 80% 20%, rgba(47,109,91,.13), transparent 26rem),
    linear-gradient(180deg,#f8f6f2,#f3f0eb);
}

.login-card{
  border-radius:28px;
  padding:30px;
  box-shadow:0 22px 70px rgba(20,35,30,.12);
}

.login-card .brand{
  margin-bottom:4px;
}

.lang{
  background:#f4f1ec;
}

.lang button{
  min-width:88px;
}

.lang button.active{
  box-shadow:none;
}

/* Account & forms */
.form-grid{
  gap:14px;
}

.actions{
  gap:8px;
}

.reset-box{
  border-top:1px solid var(--line);
  margin-top:20px;
  padding-top:18px;
}

/* Responsive */
@media(max-width:980px){
  .topbar{
    align-items:flex-start;
  }
  .top-actions{
    width:100%;
    justify-content:space-between;
  }
  .grid2{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  .topbar{
    padding:12px 14px;
  }
  .brand h1{
    font-size:19px;
  }
  .brand.small .logo{
    width:43px;
    height:43px;
  }
  .nav{
    padding:10px 12px 9px;
  }
  .nav button{
    min-height:40px;
    padding:8px 12px;
    font-size:12px;
  }
  main{
    padding:2px 12px 20px;
  }
  .card{
    padding:14px;
    border-radius:18px;
  }
  .section-head{
    align-items:stretch;
  }
  .section-head .filters,
  .report-filters .filters{
    width:100%;
  }
  .filters>*{
    flex:1 1 140px;
    min-width:0 !important;
  }
  .kpis{
    grid-template-columns:1fr 1fr;
    gap:9px;
  }
  .kpi{
    padding:14px;
  }
  .kpi strong{
    font-size:21px;
  }
  .schedule-table{
    min-width:680px !important;
  }
}

@media(max-width:430px){
  .top-actions{
    gap:6px;
  }
  .lang button{
    min-width:60px;
    padding-left:8px;
    padding-right:8px;
  }
  .badge{
    display:none;
  }
  .kpis{
    grid-template-columns:1fr 1fr;
  }
  .login-card{
    padding:22px;
    border-radius:22px;
  }
}
