/* نظام عيادات زاد — التصميم الأساسي */
@font-face { font-family: 'Cairo'; src: url('cairo-400.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Cairo'; src: url('cairo-500.ttf') format('truetype'); font-weight: 500; }
@font-face { font-family: 'Cairo'; src: url('cairo-600.ttf') format('truetype'); font-weight: 600; }
@font-face { font-family: 'Cairo'; src: url('cairo-700.ttf') format('truetype'); font-weight: 700; }
@font-face { font-family: 'Cairo'; src: url('cairo-800.ttf') format('truetype'); font-weight: 800; }

:root {
  --bg: #F3F5F3;
  --card: #FFFFFF;
  --ink: #17251F;
  --muted: #67766D;
  --line: #E3E9E4;
  --primary: #0E7C5B;
  --primary-dark: #0A5D45;
  --primary-soft: #E4F2EB;
  --sidebar: #0D3B2C;
  --sidebar-soft: #13493A;
  --amber: #9A6B12;
  --amber-bg: #FBF3E2;
  --red: #A93327;
  --red-bg: #FBEAE7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23,37,31,.05), 0 4px 14px rgba(23,37,31,.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { direction: ltr; }
body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
bdi { unicode-bidi: isolate; }
a { color: inherit; text-decoration: none; }

/* ===== الهيكل ===== */
.shell { display: flex; min-height: 100vh; }

/* الشريط الجانبي */
.sidebar {
  width: 248px;
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-brand {
  padding: 22px 22px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.side-logo {
  width: 78px; height: 46px;
  background: transparent url('zad-logo.png') center / contain no-repeat;
  color: transparent;
  font-size: 20px;
  flex-shrink: 0;
}

.side-brand b { font-size: 18px; font-weight: 700; display: block; line-height: 1.3; }
.side-brand small { color: #9FC5B6; font-size: 12px; }

.branch-pick { padding: 14px 18px 6px; }
.branch-pick label { font-size: 11.5px; color: #9FC5B6; display: block; margin-bottom: 6px; }
.branch-current {
  background: var(--sidebar-soft);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 9px 12px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
}
.branch-current small { color: #9FC5B6; font-weight: 400; font-size: 11px; }

.side-nav { padding: 14px 12px; flex: 1; }
.side-nav span.nav-label { display: block; font-size: 11px; color: #7FA895; padding: 10px 12px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  color: #D7E8DF;
  margin-bottom: 2px;
}
.nav-item .ico { width: 20px; height: 20px; flex-shrink: 0; opacity: .85; }
.nav-item:hover { background: rgba(255,255,255,.06); }
.nav-item.is-active { background: #fff; color: var(--sidebar); font-weight: 700; }
.nav-item.is-active .ico { opacity: 1; }
.nav-item .count {
  margin-inline-start: auto;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 11.5px; font-weight: 700;
  border-radius: 20px;
  padding: 1px 8px;
}
.nav-item.is-active .count { background: var(--primary-soft); color: var(--primary-dark); }

.side-user {
  margin: 12px;
  padding: 12px;
  background: var(--sidebar-soft);
  border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: #2C6B54;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.side-user b { font-size: 13.5px; display: block; line-height: 1.35; }
.side-user small { color: #9FC5B6; font-size: 11.5px; }

/* المحتوى */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 19px; font-weight: 700; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.search {
  margin-inline-start: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  width: 260px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
}
.search::placeholder { color: #9AA8A0; }
.top-actions { display: flex; gap: 10px; align-items: center; }

.content { padding: 26px 28px 60px; }

/* أزرار */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--primary-dark); }
.btn.ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--bg); }
.btn.small { padding: 6px 13px; font-size: 12.5px; border-radius: 8px; }

/* بطاقات إحصائية */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.stat .s-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat .s-num { font-size: 27px; font-weight: 800; margin-top: 2px; letter-spacing: -.5px; }
.stat .s-num small { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat .s-sub { font-size: 12px; margin-top: 4px; font-weight: 600; }
.stat .s-sub.up { color: var(--primary); }
.stat .s-sub.warn { color: var(--amber); }
.stat .s-ico {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  float: left;
}
.stat .s-ico svg { width: 20px; height: 20px; }

/* لوحات */
.panel {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-head h2 { font-size: 15.5px; font-weight: 700; }
.panel-head .link { color: var(--primary); font-size: 12.5px; font-weight: 700; }
.panel-body { padding: 8px 20px 14px; }
.panel-body.flush { padding: 0; }

/* صفوف وجداول */
.row-line {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row-line:last-child { border-bottom: none; }
.pet-dot {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  background: var(--primary-soft);
  flex-shrink: 0;
}
.row-main { flex: 1; min-width: 0; }
.row-main b { font-size: 14px; display: block; }
.row-main small { color: var(--muted); font-size: 12px; }
.row-meta { text-align: right; font-size: 12.5px; color: var(--muted); flex-shrink: 0; }
.row-meta b { color: var(--ink); display: block; font-size: 13px; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left;
  font-size: 12px; color: var(--muted); font-weight: 700;
  padding: 12px 20px;
  background: #FAFBFA;
  border-bottom: 1px solid var(--line);
}
.tbl td { padding: 13px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #FAFBFA; }

/* شارات */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 700;
  border-radius: 20px;
  padding: 3px 11px;
  background: #EEF1EE;
  color: var(--muted);
  white-space: nowrap;
}
.badge.ok { background: var(--primary-soft); color: var(--primary-dark); }
.badge.warn { background: var(--amber-bg); color: var(--amber); }
.badge.danger { background: var(--red-bg); color: var(--red); }
.badge.info { background: #E8F0FA; color: #2B5A8F; }

/* رقائع */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  padding: 6px 15px;
  font-size: 12.5px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.chip.is-active { background: var(--sidebar); border-color: var(--sidebar); color: #fff; }

/* نماذج */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; padding: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.field label small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font-family: inherit;
  font-size: 13.5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 13px;
  background: #FAFBFA;
  color: var(--ink);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.form-actions {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-start;
  background: #FAFBFA;
}

/* شبكة عمودين */
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }

/* صفحة تسجيل الدخول */
.login-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #0D3B2C 0%, #0E7C5B 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  width: 100%;
  max-width: 430px;
  padding: 40px 38px 30px;
}
.login-logo {
  width: 150px; height: 64px;
  background: transparent url('zad-logo-mark.png') center / contain no-repeat;
  color: transparent;
  margin: 0 auto 14px;
}
.login-card h1 { text-align: center; font-size: 22px; font-weight: 800; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin: 4px 0 26px; }
.login-card .field { margin-bottom: 16px; }
.login-btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-top: 6px; }
.login-roles { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 16px; }
.login-roles p { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 10px; }
.login-foot { text-align: center; color: rgba(255,255,255,.75); font-size: 12px; margin-top: 22px; }

/* ترويسة ملف المريض */
.profile-head {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 20px;
}
.profile-head .pet-dot { width: 64px; height: 64px; font-size: 30px; border-radius: 18px; }
.profile-head h2 { font-size: 20px; font-weight: 800; }
.profile-head .p-sub { color: var(--muted); font-size: 13px; }
.profile-head .p-actions { margin-inline-start: auto; display: flex; gap: 10px; }

/* خط زمني */
.timeline { position: relative; padding-inline-start: 22px; }
.timeline::before {
  content: '';
  position: absolute;
  inset-inline-start: 6px;
  top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: '';
  position: absolute;
  inset-inline-start: -20px;
  top: 7px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.tl-item .tl-date { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.tl-item b { font-size: 13.5px; display: block; }
.tl-item small { color: var(--muted); font-size: 12px; }

/* معلومات جانبية */
.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border: none; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; }

/* موبايل */
.mobile-tabbar { display: none; }

@media (max-width:1100px) {
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 16.5px; }
  .search { display: none; }
  .content { padding: 18px 14px 90px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .s-num { font-size: 22px; }
  .cols { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .profile-head { flex-wrap: wrap; }
  .profile-head .p-actions { margin-inline-start: 0; width: 100%; }
  .panel-body.flush { overflow-x: auto; }
  .tbl th:nth-child(4), .tbl td:nth-child(4), .tbl th:nth-child(5), .tbl td:nth-child(5) { display: none; }
  .top-actions .btn { padding: 8px 12px; font-size: 12.5px; }
  .mobile-tabbar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--sidebar);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    z-index: 20;
    justify-content: space-around;
  }
  .mobile-tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: #9FC5B6; font-size: 10.5px; font-weight: 600;
    padding: 4px 10px; border-radius: 10px;
  }
  .mobile-tabbar a.is-active { color: #fff; }
  .mobile-tabbar svg { width: 21px; height: 21px; }
  .m-brand { display: flex !important; }
}
.m-brand { display: none; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.m-brand .side-logo { width: 44px; height: 22px; background: transparent url('zad-logo-mark.png') center / contain no-repeat; }
@media (max-width:1100px) {
  .patients-tbl th:nth-child(3), .patients-tbl td:nth-child(3),
  .patients-tbl th:nth-child(4), .patients-tbl td:nth-child(4),
  .patients-tbl th:nth-child(5), .patients-tbl td:nth-child(5) { display: none; }
  .patients-tbl th, .patients-tbl td { padding: 12px 10px; font-size: 12.5px; }
}
@media (max-width:1100px) {
  .tbl .badge { font-size: 10px; padding: 2px 8px; white-space: normal; text-align: center; }
}
@media (max-width:1100px) {
  .slot { flex-direction: column; align-items: stretch; gap: 6px; }
  .slot .t { width: auto; }
}

/* اختيار الفرع — قائمة منسدلة */
.branch-pick { position: relative; }
.branch-current { user-select: none; }
.branch-current .caret { font-size: 11px; color: #9FC5B6; margin-inline-start: 4px; }
.branch-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  inset-inline: 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
  overflow: hidden;
  z-index: 30;
}
.branch-menu.is-open { display: block; }
.bm-item {
  display: block;
  padding: 11px 14px;
  color: var(--ink);
  font-size: 13.5px; font-weight: 700;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.bm-item:last-child { border-bottom: none; }
.bm-item small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.bm-item:hover { background: var(--bg); }
.bm-item.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.bm-item .bm-check { float: inline-end; color: var(--primary); font-weight: 800; }

/* اختيار الفرع على الموبايل */
.m-branch { display: none; }
@media (max-width:1100px) {
  .m-branch { display: block; margin-bottom: 16px; }
  .m-branch label { font-size: 11.5px; color: var(--muted); display: block; margin-bottom: 6px; }
  .m-branch .branch-current { background: var(--card); border-color: var(--line); color: var(--ink); }
  .m-branch .branch-current small { color: var(--muted); }
  .m-branch .branch-current .caret { color: var(--muted); }
  .m-branch .branch-menu { inset-inline: 0; box-shadow: 0 14px 34px rgba(0,0,0,.16); border: 1px solid var(--line); }
}

/* فرع مقفول للدكتور والاستقبال */
.branch-locked {
  margin: 14px 18px 6px;
  background: var(--sidebar-soft);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
.branch-locked small { color: #9FC5B6; font-weight: 400; font-size: 11px; }
@media (max-width:1100px) {
  .branch-locked.m-locked {
    margin: 0 0 16px;
    background: var(--card);
    border-color: var(--line);
    color: var(--ink);
  }
  .branch-locked.m-locked small { color: var(--muted); }
}

.branch-locked.m-locked { display: none; }
@media (max-width:1100px) {
  .branch-locked.m-locked { display: flex; }
  .panel-body.flush { overflow-x: auto; }
  .panel-body.flush .tbl.wide { min-width: 560px; }
}

/* mobile fixes */
@media (max-width:1100px) {
  .m-brand { padding: 14px 16px 4px; }
  .m-branch { margin: 8px 16px 0; }
  .kpi-row { grid-template-columns: 1fr 1fr !important; }
  [style*="repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
  [style*="repeat(4,1fr)"] { grid-template-columns: 1fr 1fr !important; }
  .mobile-tabbar { overflow-x: auto; }
  .mobile-tabbar a { white-space: nowrap; }
  .branch-locked.m-locked { margin: 8px 16px 0; }
}

/* ==== hotfix: kpi cards, styled inputs, touch targets, empty states ==== */
.kpi-row { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px; }
.kpi { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px 18px; }
.kpi small { color:var(--muted); font-size:12.5px; font-weight:600; display:block; }
.kpi .v { font-size:26px; font-weight:800; margin-top:3px; letter-spacing:-.5px; }
.kpi .d { font-size:12px; color:var(--muted); margin-top:3px; font-weight:600; }

.input { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; font-family:inherit; font-size:15px; color:var(--ink); min-height:44px; }
.input:focus { outline:2px solid var(--primary-soft); border-color:var(--primary); }
.panel-body form label { font-size:13px; font-weight:600; color:var(--ink); display:grid; gap:6px; align-content:start; }

.empty-state { padding:26px 18px; text-align:center; color:var(--muted); font-size:14px; line-height:1.7; }
.empty-state b { display:block; color:var(--ink); font-size:15px; margin-bottom:4px; }
.empty-state .btn { margin-top:12px; }
.form-error { background:var(--red-bg); color:var(--red); border:1px solid #F0D2CE; border-radius:10px; padding:10px 14px; font-size:13px; font-weight:600; margin-bottom:12px; }
.form-ok { background:var(--primary-soft); color:var(--primary-dark); border:1px solid #CBE6D9; border-radius:10px; padding:10px 14px; font-size:13px; font-weight:600; margin-bottom:12px; }

@media (max-width:1100px) {
  body { font-size:16px; }
  .kpi { padding:14px; }
  .kpi .v { font-size:21px; }
  .input { font-size:16px; min-height:46px; }
  .btn { min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
  .btn.small { min-height:36px; }
  .mobile-tabbar { overflow-x:auto; justify-content:flex-start; gap:2px; scrollbar-width:none; }
  .mobile-tabbar::-webkit-scrollbar { display:none; }
  .mobile-tabbar a { white-space:nowrap; flex:0 0 auto; padding:6px 12px; min-height:48px; justify-content:center; }
  .panel-body form label { font-size:14px; }
  .tbl { font-size:14px; }
  .topbar { flex-wrap:wrap; gap:8px; }
  .top-actions { margin-inline-start:0 !important; }
}

/* logo on a white plate, brand shown once */
.side-brand { padding:18px 18px 14px; display:block; }
.side-plate { display:flex; align-items:center; justify-content:center; background:#fff; border-radius:14px; padding:10px 14px; }
.side-plate .side-logo { width:100%; max-width:150px; height:52px; background:transparent url('zad-logo.png') center / contain no-repeat; }
@media (max-width:1100px) {
  .m-brand { display:flex !important; justify-content:center; background:#fff; padding:12px 16px; border-bottom:1px solid var(--line); }
  .m-brand .side-logo { width:130px; height:44px; background:transparent url('zad-logo.png') center / contain no-repeat; }
  .m-branch { margin:12px 16px 0; }
}

.day-pick .input { width:auto; min-height:40px; padding:6px 10px; }
@media (max-width:1100px) { .day-pick { flex:1 1 100%; order:-1; } .day-pick .input { width:100%; } }

.range-pick { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; }
.range-pick label { font-size:12.5px; font-weight:600; display:grid; gap:4px; color:var(--muted); }
.range-pick .input { width:auto; min-height:40px; padding:6px 10px; }
@media (max-width:1100px) { .range-pick { flex:1 1 100%; } .range-pick label { flex:1 1 40%; } .range-pick .input { width:100%; min-height:46px; } .range-pick .btn { flex:1 1 100%; } }

.pager { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 16px; border-top:1px solid var(--line); font-size:13px; color:var(--muted); font-weight:600; }
@media (max-width:1100px) {
  .topbar { display:block; }
  .top-actions { display:flex; flex-wrap:wrap; gap:8px; width:100%; margin-top:10px; margin-inline-start:0 !important; }
  .top-actions > .btn { flex:1 1 30%; }
  .top-actions > .day-pick, .top-actions > .range-pick { flex:1 1 100%; width:100%; }
  .range-pick { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .range-pick .btn { grid-column:1/-1; }
  .range-pick label { min-width:0; }
  .range-pick .input, .day-pick .input { min-width:0; max-width:100%; }
  .side-brand { display:none; }
}
@media (max-width:1100px) {
  .topbar { position:static !important; }
  .top-actions > .btn { order:2; flex:1 1 28%; }
  .top-actions > .day-pick, .top-actions > .range-pick { order:1; }
}

@media (max-width:1100px) {
  .tbl.cards thead { display:none; }
  .tbl.cards, .tbl.cards tbody { display:block; width:100%; }
  .tbl.cards tr { display:block; background:#fff; border:1px solid #e3ebe7; border-radius:14px; margin:10px 12px; padding:10px 14px; }
  .tbl.cards td { display:flex; justify-content:space-between; gap:12px; border:0; padding:6px 0; font-size:16px; text-align:end; }
  .tbl.cards td::before { content:attr(data-l); color:#7a8a84; font-size:13px; text-align:start; flex:0 0 72px; }
  .tbl.cards td[data-l=""]::before { display:none; }
  .tbl.cards td[data-l=""] { justify-content:flex-end; }
  .tbl-scroll { overflow-x:visible; }
}
@media (max-width:1100px) { .panel-head { flex-wrap:wrap; gap:8px; } .panel-head .badge, .panel-head .pill { font-size:12px; } }
.range-pick label { overflow:visible; white-space:nowrap; }
@media (max-width:1100px) { .range-pick label { white-space:normal; } .range-pick { overflow:visible; } .topbar { overflow:visible; } }

/* ===== modern pass ===== */
:root { --bg:#F5F7F6; --line:#E8EDEA; --radius:18px; --shadow:0 1px 2px rgba(16,34,27,.04), 0 8px 24px rgba(16,34,27,.06); }
html { -webkit-text-size-adjust:100%; }
body { font-family:'Inter','Cairo',system-ui,-apple-system,'Segoe UI',sans-serif; font-size:16px; background:var(--bg); letter-spacing:-.005em; }
.panel, .kpi { border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.panel-head h2 { font-size:17px; font-weight:650; }
.btn { border-radius:999px; font-weight:600; transition:all .15s ease; }
.btn:hover { transform:translateY(-1px); }
.btn:not(.ghost) { background:linear-gradient(180deg,#12906a,#0E7C5B); box-shadow:0 4px 12px rgba(14,124,91,.28); }
.btn.ghost { background:#fff; border:1px solid var(--line); }
.input, select.input { border-radius:12px; border:1px solid #DDE5E0; background:#fff; transition:border-color .15s, box-shadow .15s; }
.input:focus { outline:none; border-color:#0E7C5B; box-shadow:0 0 0 4px rgba(14,124,91,.12); }
.badge { border-radius:999px; padding:4px 11px; font-weight:600; font-size:12.5px; text-transform:capitalize; }
.tbl th { font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:#8a9a92; font-weight:600; }
.tbl tbody tr { transition:background .12s; } .tbl tbody tr:hover { background:#F7FAF8; }
.topbar { background:rgba(255,255,255,.85); backdrop-filter:blur(8px); }
.topbar h1 { font-size:22px; font-weight:700; letter-spacing:-.02em; }
.kpi .v { font-size:28px; font-weight:700; letter-spacing:-.02em; }
/* sidebar: transparent logo directly on the green, icon nav */
.side-brand { padding:24px 22px 18px; border-bottom:0; }
.side-plate { background:none !important; padding:0 !important; justify-content:flex-start !important; border-radius:0 !important; }
.side-plate .side-logo { width:140px !important; max-width:none !important; height:64px !important; background:transparent url('zad-logo-white.png') left center / contain no-repeat !important; }
.side-nav .nav-item { display:flex; align-items:center; gap:12px; border-radius:12px; font-weight:500; transition:background .15s, color .15s; }
.side-nav .nav-item .ico { width:20px; height:20px; flex:0 0 20px; opacity:.85; }
.side-nav .nav-item:hover { background:rgba(255,255,255,.08); }
.side-nav .nav-item.is-active { background:#fff; color:#0D3B2C; font-weight:650; box-shadow:0 4px 14px rgba(0,0,0,.18); }
.mobile-tabbar .ico { width:22px; height:22px; display:block; margin:0 auto 3px; }
.mobile-tabbar a { text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.mobile-tabbar a span { font-size:11px; }
@media (max-width:1100px) {
  .m-brand { background:#0D3B2C !important; border-bottom:0 !important; padding:10px 16px !important; }
  .m-brand .side-logo { width:120px !important; height:44px !important; background:transparent url('zad-logo-white.png') center / contain no-repeat !important; }
  .mobile-tabbar { box-shadow:0 -6px 20px rgba(0,0,0,.18); padding-bottom:max(6px, env(safe-area-inset-bottom)); }
  .mobile-tabbar a { min-width:64px; padding:8px 6px; }
  .mobile-tabbar a.is-active { color:#fff; }
  .mobile-tabbar a.is-active .ico { color:#5fe0b4; }
  .panel, .kpi { border-radius:20px; }
  .btn { min-height:46px; }
}
/* login */
.login-bg { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:radial-gradient(1200px 600px at 20% -10%, #14634a 0%, #0D3B2C 55%, #0a2e22 100%); }
.login-wrap { width:100%; max-width:400px; display:grid; gap:22px; justify-items:center; }
.login-wrap .login-logo { width:190px; height:84px; margin:0; background:transparent url('zad-logo-white.png') center / contain no-repeat; }
.login-form { box-shadow:0 24px 60px rgba(0,0,0,.35); }

/* ===== compact mobile spacing ===== */
@media (max-width:1100px) {
  .content { padding:10px 12px 90px !important; }
  .topbar { padding:10px 14px !important; }
  .topbar h1 { font-size:19px; }
  .top-actions { margin-top:8px !important; gap:6px !important; }
  .range-pick { gap:6px !important; }
  .range-pick .input, .day-pick .input { min-height:42px !important; padding:6px 10px; }
  .top-actions > .btn { min-height:40px; padding:6px 10px; }
  .m-branch { margin:8px 12px 0 !important; }
  .m-branch .input { min-height:42px; }
  .m-brand { padding:6px 16px !important; }
  .m-brand .side-logo { height:38px !important; }
  .panel { margin-bottom:12px; }
  .panel-head { padding:12px 14px !important; }
  .panel-body { padding:12px 14px; }
  .panel-body.flush { padding:0; }
  .ap-form { grid-template-columns:1fr 1fr !important; gap:10px !important; }
  .ap-form label { font-size:13px; font-weight:600; color:var(--muted); display:grid; gap:4px; min-width:0; }
  .ap-form .input { width:100%; min-height:42px; font-size:16px; color:var(--ink); font-weight:400; }
  .ap-form .f-pet, .ap-form .f-reason, .ap-form .f-book { grid-column:1/-1; }
  .ap-form .f-pet { order:-1; }
  .ap-form .f-book .btn { width:100%; }
  .tbl.cards tr { margin:8px 10px; padding:8px 12px; }
  .tbl.cards td { display:grid !important; grid-template-columns:64px 1fr; gap:8px; text-align:start !important; padding:3px 0; justify-content:start; font-size:15px; align-items:baseline; }
  .tbl.cards td::before { flex:none; font-size:12px; }
  .tbl.cards td[data-l=""] { display:block !important; padding-top:6px; }
  .tbl.cards td[data-l=""] .btn { width:100%; }
  .kpi-row, .stats { gap:8px !important; margin-bottom:12px !important; }
}

/* ===== booking modal / bottom sheet ===== */
.modal[hidden] { display:none; }
.modal { position:fixed; inset:0; z-index:50; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-bg { position:absolute; inset:0; background:rgba(10,30,22,.5); backdrop-filter:blur(3px); }
.modal-card { position:relative; width:100%; max-width:640px; max-height:90vh; overflow:auto; margin:0 !important; animation:pop .18s ease; }
.modal-card .panel-head { display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; background:#fff; z-index:1; }
.modal-card .x { border:0; background:#F0F4F2; width:36px; height:36px; border-radius:50%; font-size:22px; line-height:1; cursor:pointer; color:var(--ink); }
body.modal-open { overflow:hidden; }
@keyframes pop { from { transform:translateY(14px); opacity:0; } to { transform:none; opacity:1; } }
.f-search .lbl { display:block; font-size:13px; font-weight:600; color:var(--muted); margin-bottom:4px; }
.f-search .results { display:grid; gap:4px; margin-top:6px; }
.f-search .results button { text-align:start; padding:11px 12px; border:1px solid var(--line); background:#fff; border-radius:12px; font-size:15px; cursor:pointer; min-height:44px; }
.f-search .results button:hover { background:#F2F8F5; border-color:#0E7C5B; }
.f-search .none { padding:10px 12px; color:var(--muted); font-size:14px; }
.f-search .chosen { margin-top:6px; padding:8px 12px; background:var(--primary-soft); color:#0A5D45; border-radius:12px; font-size:14px; font-weight:600; }
.quick-add { border-top:1px solid var(--line); }
.quick-add summary { cursor:pointer; font-weight:600; color:#0E7C5B; padding:2px 0; }
.qa-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.qa-grid label { font-size:13px; font-weight:600; color:var(--muted); display:grid; gap:4px; }
.qa-grid .qa-btn { grid-column:1/-1; }
.new-appt { white-space:nowrap; }
@media (max-width:1100px) {
  .modal { align-items:flex-start; padding:14px; overflow:auto; }
  .modal-card { max-width:560px; max-height:none; margin:12px auto !important; border-radius:18px !important; animation:pop .18s ease; }
  @keyframes sheet { from { transform:translateY(100%); } to { transform:none; } }
  .top-actions > .new-appt { order:0 !important; flex:1 1 100% !important; }
}
@media (max-width:1100px) {
  .tbl.cards td { display:block !important; }
  .tbl.cards td::before { display:inline-block !important; width:68px; flex:none; vertical-align:baseline; }
  .tbl.cards td[data-l=""]::before { display:none !important; }
  .tbl.cards td br { display:none; }
  .tbl.cards td small { margin-inline-start:8px; }
}
.menu { position:relative; }
.menu summary { list-style:none; cursor:pointer; }
.menu summary::-webkit-details-marker { display:none; }
.menu .menu-list { position:absolute; inset-inline-end:0; top:calc(100% + 6px); background:#fff; border:1px solid #e3e8e5; border-radius:12px; box-shadow:0 8px 24px rgba(20,40,30,.14); padding:6px; min-width:190px; z-index:40; }
.menu .menu-list a { display:block; padding:9px 12px; border-radius:8px; color:#17352a; font-weight:600; font-size:14px; }
.menu .menu-list a:hover { background:#f2f6f3; }

/* ===== visual upgrade: contrast, depth, richer ZAD green ===== */
:root {
  --bg: #ECF1EE;
  --ink: #0E1B15;
  --muted: #46584F;
  --line: #D5DFD8;
  --primary: #0C7A52;
  --primary-dark: #085C3E;
  --grad: linear-gradient(135deg, #10925F 0%, #0A5D45 100%);
  --shadow: 0 1px 2px rgba(14,27,21,.08), 0 6px 18px rgba(14,27,21,.09);
}
body { font-size: 15.5px; color: var(--ink); }
h1, h2, h3 { color: var(--ink); letter-spacing: -.01em; }
.topbar .crumb { color: var(--muted); font-weight: 600; }
.panel { border: 1px solid var(--line); box-shadow: var(--shadow); transition: box-shadow .15s ease; }
.panel-head { border-bottom: 1.5px solid var(--line); }
.btn { background: var(--grad); border: 0; font-weight: 700; box-shadow: 0 2px 8px rgba(10,93,69,.35), inset 0 1px 0 rgba(255,255,255,.18); transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.07); box-shadow: 0 4px 14px rgba(10,93,69,.4); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; font-weight: 600; }
.btn.ghost:hover { background: #F4F8F5; border-color: #B9C9BF; }
.input, select.input, textarea.input { border: 1.5px solid #C6D3CB; background: #fff; color: var(--ink); font-weight: 500; transition: border-color .12s ease, box-shadow .12s ease; }
.input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(12,122,82,.18); }
label, .lbl { color: #33463D; font-weight: 700; }
.tbl thead th { color: #33463D; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; background: #F2F6F3; border-bottom: 1.5px solid var(--line); }
.tbl tbody td { border-bottom: 1px solid #E7EDE9; color: var(--ink); }
.badge { font-weight: 700; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.badge.ok { background: #DCF2E5; color: #0B6B44; }
.badge.warn { background: #FCEFC9; color: #8A5A00; }
.badge.danger { background: #FBDEDA; color: #B3261E; }
.badge.info { background: #E2ECF9; color: #1D4E89; }
.stat { border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat .s-num { color: var(--ink); }
.sidebar { background: linear-gradient(180deg, #0E4232 0%, #092B21 100%); }
.mob-header { background: var(--grad); }
.tabbar, .mob-tabs { background: #0B3527; }
a { transition: color .12s ease; }
.modal-card { box-shadow: 0 18px 60px rgba(8,30,22,.35); }

/* ===== ZAD 2026 futuristic layer ===== */
body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(16,146,95,.14), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(10,93,69,.12), transparent 55%),
    linear-gradient(180deg, #EDF3EF 0%, #E4EDE8 100%);
  background-attachment: fixed;
}
.panel {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 1px 2px rgba(9,40,29,.06), 0 10px 30px rgba(9,40,29,.09);
  border-radius: 18px;
}
.panel-head { border-bottom: 1px solid rgba(14,27,21,.08); }
h1 { font-size: 26px; font-weight: 800; }
.panel-head h2 { font-size: 17px; font-weight: 800; }
.btn { border-radius: 999px; padding: 11px 22px; letter-spacing: .01em; }
.btn.small { padding: 7px 14px; }
.stat { background: rgba(255,255,255,.82); backdrop-filter: blur(12px); border-radius: 18px; border: 1px solid rgba(255,255,255,.7); box-shadow: 0 8px 24px rgba(9,40,29,.08); transition: transform .15s ease, box-shadow .15s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(9,40,29,.13); }
.stat .s-num { font-size: 30px; font-weight: 800; background: linear-gradient(120deg, #0C7A52, #12A06E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.input { border-radius: 12px; }
.sidebar { background: linear-gradient(185deg, #0F4A38 0%, #082A20 78%); box-shadow: 4px 0 30px rgba(6,30,22,.25); }
.nav-item { border-radius: 12px; margin: 2px 12px; transition: background .15s ease, transform .15s ease; }
.nav-item:hover { background: rgba(255,255,255,.09); transform: translateX(3px); }
.nav-item.is-active { background: linear-gradient(120deg, rgba(24,190,128,.35), rgba(16,146,95,.2)); box-shadow: inset 0 0 0 1px rgba(46,220,150,.35), 0 4px 14px rgba(0,0,0,.25); }
.mob-header { background: linear-gradient(120deg, #0F4A38, #0A5D45); backdrop-filter: blur(10px); }
.mobile-tabbar { background: rgba(9,42,32,.92); backdrop-filter: blur(16px); border-top: 1px solid rgba(255,255,255,.08); }
.mobile-tabbar a.is-active { color: #4BE3A5; text-shadow: 0 0 14px rgba(75,227,165,.5); }
.badge.ok { box-shadow: 0 0 0 1px rgba(11,107,68,.15); }
.badge.danger { box-shadow: 0 0 0 1px rgba(179,38,30,.15); }
.tbl tbody tr { transition: background .12s ease; }
.tbl tbody tr:hover { background: rgba(16,146,95,.05); }
.content > * { animation: rise .35s ease both; }
.content > *:nth-child(2) { animation-delay: .04s; }
.content > *:nth-child(3) { animation-delay: .08s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-state b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.empty-state::before { content: ""; display: block; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(16,146,95,.18), rgba(10,93,69,.08)); box-shadow: inset 0 0 0 1.5px rgba(16,146,95,.3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(10,93,69,.3); border-radius: 99px; }
.theme-toggle { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 60; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.85); backdrop-filter: blur(10px); box-shadow: 0 6px 18px rgba(9,40,29,.2); font-size: 19px; cursor: pointer; }
@media (max-width:1100px) { .theme-toggle { bottom: 76px; } }

/* dark mode */
html.dark body { background: radial-gradient(900px 500px at 85% -10%, rgba(16,146,95,.12), transparent 60%), linear-gradient(180deg, #0A1512 0%, #081009 100%); color: #E6F2EB; }
html.dark .panel, html.dark .stat { background: rgba(18,32,27,.72); border: 1px solid rgba(255,255,255,.09); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
html.dark h1, html.dark h2, html.dark h3, html.dark .stat .s-num, html.dark .empty-state b { color: #EAF6EF; -webkit-text-fill-color: #EAF6EF; }
html.dark .topbar .crumb, html.dark label, html.dark .lbl { color: #9DB4A9; }
html.dark .input, html.dark select.input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #EAF6EF; }
html.dark .tbl thead th { background: rgba(255,255,255,.05); color: #9DB4A9; }
html.dark .tbl tbody td { border-color: rgba(255,255,255,.07); color: #E6F2EB; }
html.dark .btn.ghost { background: rgba(255,255,255,.07); color: #EAF6EF; border-color: rgba(255,255,255,.16); }
html.dark .modal-card .panel-head { background: #14211B; }
html.dark .badge.ok { background: rgba(21,160,110,.2); color: #4BE3A5; }
html.dark .badge.warn { background: rgba(240,180,60,.16); color: #F2C14E; }
html.dark .badge.danger { background: rgba(220,70,55,.18); color: #F2857A; }
html.dark .badge.info { background: rgba(80,140,220,.18); color: #8FB8F0; }

/* dashboard widgets + header toggle */
.kpi { position:relative; }
.kpi .k-ico { position:absolute; top:12px; inset-inline-end:12px; width:34px; height:34px; border-radius:11px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg, rgba(16,146,95,.16), rgba(10,93,69,.07)); color:var(--primary); }
.kpi .k-ico svg { width:18px; height:18px; }
.kpi .v .cur { font-size:13px; font-weight:700; color:var(--muted); }
.qa-row { display:flex; gap:10px; flex-wrap:wrap; }
.chip-row { display:flex; gap:8px; flex-wrap:wrap; }
.chip { padding:7px 15px; border-radius:999px; border:1.5px solid var(--line); background:rgba(255,255,255,.7); font-weight:700; font-size:13.5px; color:var(--muted); }
.chip.on { background:var(--grad); color:#fff; border-color:transparent; box-shadow:0 3px 10px rgba(10,93,69,.35); }
.dash-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; }
.tline { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:12px; background:rgba(255,255,255,.6); border:1px solid rgba(14,27,21,.06); }
.t-time { font-weight:700; font-size:13px; min-width:66px; color:var(--muted); }
.t-dot { width:9px; height:9px; border-radius:50%; background:#2FA37C; box-shadow:0 0 8px rgba(47,163,124,.6); flex:none; }
.t-dot.done { background:#9DB4A9; box-shadow:none; }
.t-dot.warn { background:#E0A32E; box-shadow:0 0 8px rgba(224,163,46,.6); }
.t-body { flex:1; min-width:0; }
.bars { display:flex; align-items:flex-end; gap:10px; height:170px; padding-top:10px; }
.bar-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; justify-content:flex-end; }
.bar { width:100%; max-width:38px; border-radius:8px 8px 4px 4px; background:linear-gradient(180deg,#17B57E,#0A5D45); box-shadow:0 4px 10px rgba(10,93,69,.25); transition:height .3s ease; }
.bar.today { box-shadow:0 0 0 2px rgba(23,181,126,.35), 0 4px 12px rgba(10,93,69,.35); }
.bar-val { font-size:10.5px; font-weight:700; color:var(--muted); }
.bar-day { font-size:11px; font-weight:700; color:var(--muted); }
.m-brand { display:flex; align-items:center; justify-content:space-between; padding-inline-end:14px; }
.theme-toggle.m-toggle { position:static; width:38px; height:38px; font-size:17px; display:none; }
@media (max-width:1100px) { .theme-toggle.m-toggle { display:block; } .theme-toggle.d-toggle { display:none; } }
html.dark .tline { background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.08); }
html.dark .chip { background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.14); color:#9DB4A9; }
html.dark .chip.on { color:#fff; }
html.dark .kpi .k-ico { background:rgba(46,220,150,.14); color:#4BE3A5; }
html.dark .kpi { background:rgba(18,32,27,.72); border:1px solid rgba(255,255,255,.09); box-shadow:0 10px 30px rgba(0,0,0,.4); }
html.dark .kpi .v, html.dark .kpi small { color:#EAF6EF; }
html.dark .topbar h1 { color:#EAF6EF; }
html.dark .topbar { background:rgba(10,21,18,.85); border-color:rgba(255,255,255,.08); }
html.dark .m-branch .input { background:rgba(255,255,255,.08); color:#EAF6EF; border-color:rgba(255,255,255,.16); }
.view-toggle { display:inline-flex; gap:6px; margin-inline-start:auto; }
.view-toggle .chip { padding:6px 14px; border-radius:999px; border:1px solid rgba(13,84,57,.18); background:rgba(255,255,255,.6); font-size:12.5px; font-weight:600; color:#33514A; text-decoration:none; }
.view-toggle .chip.on { background:linear-gradient(135deg,#0E6B45,#15A06E); color:#fff; border-color:transparent; }
.doc-grid { display:flex; gap:12px; overflow-x:auto; padding:14px; align-items:flex-start; }
.doc-col { flex:1 0 190px; min-width:190px; background:rgba(255,255,255,.72); border:1px solid rgba(13,84,57,.12); border-radius:16px; padding:10px; backdrop-filter:blur(6px); }
.doc-col h3 { display:flex; align-items:center; gap:8px; font-size:14px; margin:2px 2px 10px; color:#0D5439; }
.doc-col h3 .cnt { margin-inline-start:auto; background:rgba(21,160,110,.14); color:#0E6B45; border-radius:999px; font-size:11.5px; padding:2px 9px; font-weight:700; }
.doc-empty { color:#8AA39A; font-size:12.5px; text-align:center; padding:14px 0; }
.doc-appt { background:#fff; border:1px solid rgba(13,84,57,.1); border-radius:12px; padding:9px 11px; margin-bottom:8px; box-shadow:0 3px 10px rgba(10,60,40,.06); }
.doc-appt.done { opacity:.62; }
.doc-appt .da-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:3px; }
.doc-appt .da-pet { font-weight:700; font-size:13.5px; }
.doc-appt .da-pet small { color:#7a8a84; font-weight:500; }
.doc-appt .da-client { color:#5B7067; font-size:12.5px; margin-bottom:6px; }
.doc-appt .btn.small { width:100%; }
html.dark .doc-col { background:rgba(18,32,27,.72); border-color:rgba(255,255,255,.09); }
html.dark .doc-col h3 { color:#7BE3B4; }
html.dark .doc-appt { background:rgba(10,21,18,.6); border-color:rgba(255,255,255,.08); }
html.dark .doc-appt .da-client { color:#9DB4A9; }
html.dark .view-toggle .chip { background:rgba(255,255,255,.07); color:#9DB4A9; border-color:rgba(255,255,255,.16); }
/* field contrast */
.input, select.input, input.input, textarea.input { border:1.5px solid #6C8579 !important; background:#fff; color:#0B1A14; }
.input::placeholder { color:#52665D; opacity:1; }
.input:focus { border-color:#0E6B45 !important; box-shadow:0 0 0 3px rgba(21,160,110,.22); }
label, .lbl { color:#2B3F37; font-weight:600; }
html.dark .input, html.dark select.input { border:1.5px solid rgba(255,255,255,.38) !important; background:rgba(255,255,255,.08); color:#F1FAF5; }
html.dark .input::placeholder { color:#A9BFB4; }
html.dark label, html.dark .lbl { color:#B9CEC3; }

/* booking dialog: keep labels visible above fields */
.ap-form label{align-content:start;overflow:visible;line-height:1.3}
.ap-form label>.input,.ap-form label>select{position:static;margin:0;min-width:0;max-width:100%;box-sizing:border-box}

/* phone dialogs: one large column, bigger labels and fields (all modals) */
@media (max-width:700px) {
  .modal { padding:10px; }
  .modal-card { max-width:none !important; width:100%; }
  .modal-card .panel-head h2 { font-size:20px; }
  .modal-card form, .modal-card .panel-body, .modal-card .ap-form, .modal-card .qa-grid, .modal-card .form-grid { grid-template-columns:1fr !important; gap:14px !important; }
  .modal-card form > *, .modal-card .ap-form > * { grid-column:1 / -1 !important; }
  .modal-card label { font-size:15px !important; font-weight:600; gap:6px !important; }
  .modal-card .input, .modal-card select, .modal-card textarea { font-size:17px !important; min-height:50px !important; padding:12px 14px !important; }
  .modal-card .btn { width:100%; min-height:50px; font-size:17px; }
  .modal-card .x { width:44px; height:44px; }
}
