/* DOURK_DOCTORS_RENDER_FIX_V11 - mobile-app/styles.css */
:root{
  --primary:#07427D;
  --secondary:#0D82E8;
  --light:#EAF5FF;
  --bg:#F7FCFF;
  --text:#0C1F32;
  --muted:#65758A;
  --success:#0F9F6E;
  --warning:#BF7B00;
  --danger:#C93637;
  --card:#fff;
  --line:rgba(7,66,125,.10);
  --shadow:0 8px 32px rgba(7,66,125,.10);
  --radius:20px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body,#app{width:100%;min-height:100%;margin:0;overflow-x:hidden;overflow-y:auto}
body{font-family:'Cairo',Tahoma,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px;direction:rtl}
button,input,textarea,select{font-family:inherit}
button{cursor:pointer}
.app-shell{min-height:100dvh;width:100%;max-width:430px;margin:0 auto;background:var(--bg);display:flex;flex-direction:column;overflow:visible;position:relative;border-left:1px solid rgba(7,66,125,.05);border-right:1px solid rgba(7,66,125,.05)}
.screen{flex:1;overflow:auto;padding:14px 14px 94px;scrollbar-width:none}.screen::-webkit-scrollbar{display:none}
.login-screen{min-height:100%;background:linear-gradient(160deg,var(--primary) 0%,var(--secondary) 55%,var(--light) 100%);overflow:auto;padding:42px 16px 26px;display:flex;flex-direction:column;align-items:center}
.logo-mark{width:72px;height:72px;border-radius:22px;display:grid;place-items:center;background:rgba(255,255,255,.18);border:1.5px solid rgba(255,255,255,.35);box-shadow:0 8px 28px rgba(0,0,0,.16);backdrop-filter:blur(8px);color:#fff;font-size:34px;font-weight:800;margin-bottom:12px}
.login-title{font-size:30px;font-weight:800;color:#fff;margin:0}.login-sub{font-size:13px;color:rgba(255,255,255,.78);margin:2px 0 26px}
.login-card{width:100%;background:#fff;border-radius:28px;padding:16px;box-shadow:0 8px 40px rgba(7,66,125,.22)}
.role-switch{display:flex;background:var(--light);border-radius:18px;padding:4px;gap:4px;margin-bottom:18px}.role-btn{flex:1;border:0;border-radius:14px;background:transparent;color:var(--muted);padding:11px;font-size:14px;font-weight:600}.role-btn.active{background:var(--primary);color:white;font-weight:800}
.form-group{margin-bottom:13px}.label{display:block;font-size:12px;font-weight:700;color:var(--muted);margin:0 0 7px}.input,.textarea,.select{width:100%;border:1.5px solid var(--light);background:#F7FCFF;border-radius:14px;padding:13px 14px;font-size:14px;color:var(--text);outline:none;min-height:48px}.textarea{resize:none;min-height:80px;line-height:1.6}.input:focus,.textarea:focus{border-color:var(--secondary);box-shadow:0 0 0 3px rgba(13,130,232,.09)}
.btn{border:0;border-radius:16px;padding:13px 14px;font-size:14px;font-weight:800;min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:7px}.btn-primary{background:linear-gradient(135deg,var(--primary),var(--secondary));color:#fff;box-shadow:0 4px 18px rgba(13,130,232,.28)}.btn-secondary{background:var(--light);color:var(--primary)}.btn-ghost{background:#fff;color:var(--primary);border:1px solid var(--line)}.btn-danger{background:#fff1f1;color:var(--danger)}.btn-success{background:#e8fff6;color:var(--success)}.btn-warning{background:#fff7e6;color:var(--warning)}.btn-sm{min-height:34px;padding:7px 10px;font-size:12px;border-radius:11px}.btn-block{width:100%}.btn:disabled{opacity:.55;cursor:not-allowed}
.header{background:linear-gradient(135deg,var(--primary),#05345f);border-radius:0 0 24px 24px;color:#fff;padding:14px 16px 18px;margin:-14px -14px 14px;box-shadow:0 8px 28px rgba(7,66,125,.18)}.header-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.brand{display:flex;align-items:center;gap:9px}.brand-icon{width:42px;height:42px;border-radius:14px;background:rgba(255,255,255,.16);display:grid;place-items:center;border:1px solid rgba(255,255,255,.25);font-size:20px}.brand h1{font-size:18px;margin:0;font-weight:800}.brand p{font-size:11px;margin:1px 0 0;color:rgba(255,255,255,.75)}.user-pill{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.20);border-radius:999px;padding:7px 10px;font-size:11px;color:#fff;max-width:135px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hero-card{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16);border-radius:18px;padding:12px;margin-top:14px}.hero-card h2{margin:0 0 4px;font-size:18px}.hero-card p{margin:0;font-size:12px;color:rgba(255,255,255,.75)}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px;margin-bottom:12px}.card-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.card-title h3{font-size:16px;margin:0;font-weight:800;color:var(--text)}.muted{color:var(--muted);font-size:12px}.search{position:relative;margin:10px 0 14px}.search input{padding-inline-start:40px}.search:before{content:'🔎';position:absolute;right:14px;top:50%;transform:translateY(-50%);z-index:1;opacity:.58}.doctor-card{padding:13px}.doctor-top{display:flex;gap:10px;align-items:flex-start}.doctor-avatar{width:48px;height:48px;border-radius:16px;background:linear-gradient(135deg,var(--light),#fff);display:grid;place-items:center;font-size:24px;flex:0 0 auto;border:1px solid var(--line)}.doctor-info{min-width:0;flex:1}.doctor-info h3{margin:0;font-size:15px;font-weight:800}.doctor-info p{margin:2px 0;color:var(--muted);font-size:12px;line-height:1.55}.badge{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800;white-space:nowrap}.badge-blue{background:var(--light);color:var(--primary)}.badge-success{background:#e8fff6;color:var(--success)}.badge-warn{background:#fff7e6;color:var(--warning)}.badge-danger{background:#fff1f1;color:var(--danger)}.meta-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:12px 0}.meta-box{background:#F7FCFF;border:1px solid var(--line);border-radius:14px;padding:8px;text-align:center}.meta-box b{display:block;color:var(--primary);font-size:16px}.meta-box span{display:block;color:var(--muted);font-size:10px;margin-top:1px}.actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.actions.one{grid-template-columns:1fr}.actions.three{grid-template-columns:repeat(3,1fr)}
.bottom-nav{background:#fff;border-top:1px solid var(--line);display:flex;padding:7px 0 12px;box-shadow:0 -4px 20px rgba(7,66,125,.07);z-index:5}.nav-btn{flex:1;background:none;border:0;display:flex;flex-direction:column;align-items:center;gap:2px;color:var(--muted);font-size:11px;padding:3px 0}.nav-btn .ico{font-size:21px;line-height:1}.nav-btn.active{color:var(--primary);font-weight:800}.nav-btn.active:after{content:'';width:22px;height:3px;background:var(--primary);border-radius:2px;margin-top:2px}
.booking-token{text-align:center;background:linear-gradient(135deg,var(--primary),var(--secondary));color:white;border-radius:24px;padding:18px;margin-bottom:12px}.booking-token small{display:block;color:rgba(255,255,255,.75);font-size:12px}.booking-token b{font-size:42px;letter-spacing:1px}.empty{padding:28px 16px;text-align:center;color:var(--muted)}.empty .icon{font-size:42px;margin-bottom:7px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.stat{background:#fff;border:1px solid var(--line);border-radius:18px;padding:10px;text-align:center;box-shadow:0 6px 18px rgba(7,66,125,.06)}.stat b{font-size:20px;color:var(--primary);display:block}.stat span{font-size:10px;color:var(--muted);display:block}.queue-card{border-right:4px solid var(--secondary)}.queue-row{display:flex;align-items:center;gap:10px}.token{min-width:52px;background:var(--light);color:var(--primary);font-size:17px;font-weight:900;text-align:center;border-radius:15px;padding:8px}.queue-details{flex:1;min-width:0}.queue-details h3{margin:0;font-size:15px}.queue-details p{margin:2px 0 0;color:var(--muted);font-size:12px}.queue-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}.notice{background:var(--light);color:var(--primary);border:1px solid rgba(13,130,232,.12);border-radius:16px;padding:10px;font-size:12px;line-height:1.6;margin-bottom:12px}.error{background:#fff1f1;color:var(--danger);border:1px solid rgba(201,54,55,.16)}.success{background:#e8fff6;color:var(--success);border:1px solid rgba(15,159,110,.16)}.map-box{height:230px;background:linear-gradient(135deg,#dff1ff,#f8fcff);border:1px solid var(--line);border-radius:20px;display:grid;place-items:center;color:var(--primary);font-weight:800;margin-bottom:12px;overflow:hidden}.leaflet-container{height:100%;width:100%;border-radius:20px}.hidden{display:none!important}
@media(max-width:370px){body{font-size:13px}.screen{padding:10px 10px 88px}.header{margin:-10px -10px 10px;padding:12px}.card{padding:11px;border-radius:17px}.btn{min-height:42px;font-size:13px}.stats,.meta-grid{gap:6px}.queue-actions{grid-template-columns:1fr 1fr}.brand h1{font-size:16px}.user-pill{max-width:110px}.login-screen{padding:30px 12px 20px}.logo-mark{width:62px;height:62px}.login-title{font-size:27px}}


/* DOURK_SECRETARY_UI_V3 - secretary queue redesign */
.secretary-screen{padding:0 0 94px;background:#f4fbff}
.sec-topbar{height:42px;background:#071d33;color:#dbeafa;display:flex;align-items:center;justify-content:space-between;padding:0 18px;font-size:12px}
.sec-topbar button{background:transparent;border:0;color:#dbeafa;font-family:inherit;font-size:12px}
.sec-hero{background:linear-gradient(135deg,#0a5594,#0d82e8);color:#fff;padding:22px 18px 26px;position:relative;box-shadow:0 10px 25px rgba(7,66,125,.16)}
.sec-refresh{position:absolute;left:18px;top:24px;width:42px;height:42px;border-radius:14px;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.16);color:#fff;font-size:22px}
.sec-title{text-align:right;padding-left:52px}.sec-title h1{margin:0;font-size:24px;font-weight:900}.sec-title p{margin:3px 0 18px;color:rgba(255,255,255,.72);font-size:13px}
.sec-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.sec-stats div{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.12);border-radius:13px;padding:11px 6px;text-align:center}.sec-stats b{display:block;font-size:22px;line-height:1;font-weight:900}.sec-stats span{display:block;font-size:11px;color:rgba(255,255,255,.82);margin-top:5px}
.sec-actions{display:grid;grid-template-columns:.85fr 1.5fr;gap:10px;padding:14px 16px 8px}.sec-actions button{height:54px;border-radius:16px;font-weight:900;font-size:15px;border:1px solid #bcdcf5}.sec-add{background:#eaf5ff;color:#07427D}.sec-call{border:0!important;background:linear-gradient(135deg,#07569d,#0d82e8);color:#fff;box-shadow:0 6px 18px rgba(13,130,232,.24)}
.queue-title{font-size:17px;font-weight:900;text-align:right;margin:6px 18px 12px;color:#071d33}.queue-list{padding:0 16px 10px}
.sec-patient-card{position:relative;min-height:64px;background:#fff;border:1px solid rgba(7,66,125,.07);border-radius:17px;box-shadow:0 8px 26px rgba(7,66,125,.07);margin-bottom:10px;display:flex;align-items:center;gap:10px;padding:10px 12px 10px 10px;overflow:hidden}.sec-patient-card.current{background:#e9f6ff;border-color:#8dc9ff;box-shadow:0 8px 24px rgba(13,130,232,.13)}
.sec-number{order:1;min-width:42px;height:42px;border-radius:14px;background:#eef8ff;border:1px solid #cbe6fb;color:#07569d;font-size:16px;font-weight:900;display:grid;place-items:center}.sec-patient-card.current .sec-number{background:#0873ca;color:#fff;border-color:#0873ca}
.sec-patient-info{order:2;flex:1;min-width:0;text-align:right}.sec-patient-info h3{margin:0;color:#071d33;font-size:15px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sec-patient-info p{margin:3px 0 0;color:#8aa0b6;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.current-badge{order:3;background:#e5fff5;color:#07986a;border:1px solid #84dec1;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:900}
.sec-controls{order:4;display:flex;align-items:center;gap:8px;margin-inline-start:auto}.presence-btn,.cancel-mini{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-size:18px;font-weight:900}.presence-btn.present{background:#e9fff7;border:1.5px solid #11a978;color:#07986a}.presence-btn.absent{background:#fff8e8;border:1.5px solid #d89117;color:#bf7b00}.presence-btn .person-icon{filter:saturate(.9)}.cancel-mini{background:#fff1f1;border:1.5px solid #ffc9c9;color:#c93637;font-size:22px;line-height:1}.inline-cancel{flex-basis:100%;width:100%;background:#fff;border-top:1px solid rgba(201,54,55,.12);margin:8px -12px -10px;padding:12px;display:block;text-align:center}.inline-cancel p{margin:0 0 9px;color:#c93637;font-weight:800;font-size:14px}.inline-cancel div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.inline-cancel button{border:0;height:42px;border-radius:12px;font-weight:900;font-family:inherit}.confirm-no{background:#eaf5ff;color:#07427D}.confirm-yes{background:#c93637;color:#fff}
.sec-status-pill{order:3;border-radius:999px;padding:6px 9px;font-size:11px;font-weight:900;white-space:nowrap;background:#fff1f1;color:#c93637;border:1px solid #fecaca}.sec-status-pill.present,.sec-status-pill.in_room{background:#e8fff6;color:#0f9f6e;border-color:#bbf7d0}.sec-status-pill.waiting{background:#fff7e6;color:#bf7b00;border-color:#fed7aa}
.patient-booking-card .booking-token{padding:14px}.refresh-bookings{margin-bottom:12px}
@media(max-width:370px){.sec-title h1{font-size:21px}.sec-stats{gap:6px}.sec-stats div{padding:9px 4px}.sec-stats b{font-size:19px}.sec-actions{padding:12px 10px 6px}.queue-list{padding:0 10px 8px}.sec-patient-card{padding:9px}.sec-number,.presence-btn,.cancel-mini{width:36px;height:36px}.sec-patient-info h3{font-size:14px}}


/* DOURK_SECRETARY_CLEANUP_V6 - patient home like Figma screenshot */
.patient-home-screen{background:#f3fbff;padding:0 14px 94px}
.home-hero{background:linear-gradient(135deg,#07427D,#0D82E8);color:#fff;margin:0 -14px 0;padding:18px 16px 30px;border-radius:0 0 0 0;position:relative;box-shadow:0 10px 28px rgba(7,66,125,.16)}
.home-bell{position:absolute;left:16px;top:22px;width:44px;height:44px;border-radius:15px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.16);color:#fff;font-size:20px}
.home-user{text-align:right;padding-left:56px;margin-bottom:14px}.home-user small{display:block;font-size:12px;color:rgba(255,255,255,.72)}.home-user b{display:block;font-size:20px;font-weight:900;line-height:1.2}
.home-search{position:relative;background:#fff;border-radius:14px;box-shadow:0 8px 20px rgba(7,66,125,.16)}.home-search input{width:100%;height:48px;border:0;background:transparent;border-radius:14px;padding:0 42px 0 16px;color:#0C1F32;font-size:13px;outline:none;text-align:right}.home-search span{position:absolute;right:14px;top:50%;transform:translateY(-50%);color:#7b8ba0}
.home-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:-16px 0 18px;position:relative;z-index:2}.home-stat{height:82px;background:#fff;border-radius:14px;box-shadow:0 8px 26px rgba(7,66,125,.08);border:1px solid rgba(7,66,125,.06);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.home-stat b{font-size:18px;color:#0873ca;line-height:1}.home-stat small{font-size:10px;color:#65758A}.home-stat>span{font-size:18px}.dot.green{width:18px;height:18px;border-radius:50%;background:linear-gradient(135deg,#37d78a,#0F9F6E);box-shadow:0 4px 10px rgba(15,159,110,.25)}
.section-title{font-size:16px;font-weight:900;color:#0C1F32;text-align:right;margin:12px 2px 10px}.specialty-pills{display:flex;gap:8px;overflow-x:auto;padding:0 0 4px;margin-bottom:8px;scrollbar-width:none}.specialty-pills::-webkit-scrollbar{display:none}.specialty-pill{border:0;border-radius:999px;background:#eaf5ff;color:#65758A;padding:9px 15px;font-size:12px;white-space:nowrap}.specialty-pill.active{background:#07427D;color:#fff;font-weight:900;box-shadow:0 5px 14px rgba(7,66,125,.2)}
.home-doctors-list{display:flex;flex-direction:column;gap:12px}.home-doctor-card{background:#fff;border:1px solid rgba(7,66,125,.08);border-radius:18px;padding:14px;box-shadow:0 8px 26px rgba(7,66,125,.08)}.home-doctor-main{display:flex;align-items:flex-start;gap:12px;position:relative}.doctor-token{order:1;width:54px;height:54px;border-radius:15px;background:linear-gradient(135deg,#07569d,#0D82E8);color:#fff;font-size:24px;font-weight:900;display:grid;place-items:center;box-shadow:0 6px 16px rgba(13,130,232,.22);flex:0 0 auto}.home-doctor-info{order:2;flex:1;text-align:right;min-width:0}.home-doctor-info h3{font-size:16px;margin:0 0 3px;color:#0C1F32;font-weight:900}.home-doctor-info p{font-size:12px;color:#65758A;margin:0;line-height:1.55}.home-doctor-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:5px;color:#65758A;font-size:11px}.home-doctor-meta span:first-child{color:#d88a00;font-weight:800}.home-status{order:3;position:absolute;left:0;top:0;background:#e8fff6;color:#0F9F6E;border-radius:999px;padding:5px 10px;font-size:11px;font-weight:900}.home-status.off{background:#fff1f1;color:#C93637}.home-book-btn{width:100%;height:48px;margin-top:13px;border:0;border-radius:12px;background:linear-gradient(135deg,#07569d,#0D82E8);color:#fff;font-size:15px;font-weight:900;box-shadow:0 8px 18px rgba(13,130,232,.22)}
.home-doctor-meta span{display:inline-flex;align-items:center;min-height:26px;border-radius:999px;background:#f6fbff;border:1px solid rgba(7,66,125,.08);padding:5px 9px;color:#52657a;font-weight:800}
.home-doctor-meta span:first-child{color:#07569d;background:#eaf5ff}
.specialty-pills{position:sticky;top:0;z-index:4;background:linear-gradient(180deg,var(--bg) 72%,rgba(247,251,255,0));padding-top:4px;padding-bottom:8px}
.specialty-pill{min-height:38px}
.patient-nav .nav-btn.active{color:#07427D}.patient-nav .nav-btn .ico{font-size:22px}

/* DOURK_SECRETARY_CLEANUP_V6 - secretary animated presence switch */
.presence-btn{display:none!important}.presence-switch{width:58px;height:32px;border:0;border-radius:999px;padding:3px;position:relative;transition:background .18s ease, box-shadow .18s ease;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);display:block}.presence-switch span{width:26px;height:26px;border-radius:50%;background:#fff;display:block;box-shadow:0 3px 8px rgba(0,0,0,.18);transition:transform .18s ease}.presence-switch.present{background:#0F9F6E}.presence-switch.absent{background:#C93637}.presence-switch.present span{transform:translateX(-26px)}.presence-switch.absent span{transform:translateX(0)}.presence-switch.present:before,.presence-switch.absent:before{position:absolute;top:50%;transform:translateY(-50%);font-size:12px;font-weight:900;color:#fff}.presence-switch.present:before{content:'حاضر';right:8px}.presence-switch.absent:before{content:'غائب';left:8px}
@media(max-width:370px){.home-stat{height:76px}.home-doctor-card{padding:12px}.doctor-token{width:50px;height:50px}.home-book-btn{height:45px}.presence-switch{width:54px;height:30px}.presence-switch span{width:24px;height:24px}.presence-switch.present span{transform:translateX(-24px)}}


/* DOURK_SECRETARY_CLEANUP_V6 */
.secretary-screen .sec-title{
  text-align:center;
  width:100%;
}
.secretary-screen .sec-title h1{
  text-align:center;
  margin-inline:auto;
  font-size:22px;
}
.secretary-screen .sec-title p{
  text-align:center;
  margin-inline:auto;
  font-weight:700;
}
.sec-stats.three{
  grid-template-columns:repeat(3,1fr) !important;
}
.sec-actions{
  grid-template-columns:1fr 1fr;
}
.sec-actions .sec-add::before,
.sec-actions .sec-call::before{
  content:'' !important;
}
.sec-call{
  font-size:16px !important;
  font-weight:900 !important;
}
.sec-add{
  font-size:16px !important;
  font-weight:900 !important;
}
.queue-title{
  display:none !important;
}
.presence-switch{
  width:52px !important;
  height:30px !important;
  border-radius:999px !important;
  padding:3px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  background:#FDECEC !important;
  border:1px solid rgba(201,54,55,.35) !important;
  transition:.18s ease !important;
  box-shadow:inset 0 1px 3px rgba(12,31,50,.08) !important;
}
.presence-switch span{
  width:24px !important;
  height:24px !important;
  border-radius:50% !important;
  background:#C93637 !important;
  display:block !important;
  transform:translateX(0) !important;
  transition:.18s ease !important;
  box-shadow:0 2px 8px rgba(12,31,50,.18) !important;
}
.presence-switch.present{
  justify-content:flex-end !important;
  background:#E8FFF5 !important;
  border-color:rgba(15,159,110,.35) !important;
}
.presence-switch.present span{
  background:#0F9F6E !important;
}
.presence-switch.absent{
  justify-content:flex-start !important;
}
.presence-switch.absent span{
  background:#C93637 !important;
}

/* DOURK_AUTH_FETCH_FIX_V10 */
.field-hint{display:block;margin-top:5px;color:#7d8ea3;font-size:11px;line-height:1.45}

/* DOURK_DOCTORS_RENDER_FIX_V11 */

/* DOURK_LIVE_QUEUE_NOTIFICATIONS_V18 */
.home-stats{grid-template-columns:repeat(2,1fr)!important;}
.clinic-toggle{width:calc(100% - 32px);margin:0 16px 10px;height:46px;border:0;border-radius:15px;font-weight:900;font-family:inherit;box-shadow:0 6px 18px rgba(7,66,125,.10)}
.clinic-toggle.open{background:#e8fff6;color:#0F9F6E;border:1px solid rgba(15,159,110,.25)}
.clinic-toggle.closed{background:#fff1f1;color:#C93637;border:1px solid rgba(201,54,55,.22)}
.home-search input{caret-color:#0D82E8;}
.sec-number,.booking-token b{font-variant-numeric:tabular-nums;}


/* DOURK_LIVE_QUEUE_NOTIFICATIONS_V18 */
.home-doctor-card.doctor-unavailable {
  opacity: .82;
}
.home-book-btn.disabled,
.home-book-btn:disabled {
  background: #9ca3af !important;
  color: #ffffff !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: .85 !important;
}
.home-status.off {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}


/* DOURK_LIVE_QUEUE_NOTIFICATIONS_V18 */
button.disabled,
button:disabled,
.sec-actions button:disabled,
.sec-refresh:disabled,
.cancel-mini:disabled,
.presence-switch:disabled {
  opacity: .48 !important;
  cursor: not-allowed !important;
  filter: grayscale(.35);
  box-shadow: none !important;
}
.sec-patient-card.locked {
  opacity: .82;
}
.sec-patient-card.locked .presence-switch,
.sec-patient-card.locked .cancel-mini {
  pointer-events: none;
}
.notice.warning {
  background: #fff7ed !important;
  border-color: #fed7aa !important;
  color: #9a3412 !important;
}
.sec-add.disabled,
.sec-call.disabled {
  background: #9ca3af !important;
  color: #fff !important;
}


/* DOURK_LIVE_QUEUE_NOTIFICATIONS_V18 */
.sec-hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sec-history-icon {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #eef2ff;
  color: #1e40af;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(30,64,175,.10);
}
.history-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-filter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
.history-filter .label {
  grid-column: 1 / -1;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
}
.history-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}
.history-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.history-main small {
  color: #6b7280;
}
.history-status {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  white-space: nowrap;
}


/* DOURK_LIVE_QUEUE_NOTIFICATIONS_V18 */
.sec-follow-box {
  margin: 14px 0;
  padding: 12px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}
.sec-follow-title {
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 10px;
}
.clinic-bottom-option {
  margin: 18px 0 84px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
}
.clinic-bottom-option small {
  display: block;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
}
.clinic-bottom-option b {
  font-size: 18px;
}
.clinic-bottom-option .clinic-toggle {
  min-width: 110px;
  border-radius: 16px;
}
.booking-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15,23,42,.45);
  display: grid;
  place-items: center;
  padding: 22px;
}
.booking-modal {
  width: min(420px, 100%);
  border-radius: 28px;
  background: #ffffff;
  padding: 24px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(15,23,42,.28);
}
.booking-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #22c55e;
  color: #ffffff;
  font-size: 44px;
  font-weight: 900;
  box-shadow: 0 14px 35px rgba(34,197,94,.35);
}
.booking-modal h2 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 24px;
}
.booking-modal p {
  margin: 0 0 16px;
  color: #64748b;
  font-weight: 700;
}
.booking-confirm-details {
  display: grid;
  gap: 10px;
  margin: 16px 0 18px;
  text-align: right;
}
.booking-confirm-details div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}
.booking-confirm-details span {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}
.booking-confirm-details b {
  color: #0f172a;
  font-size: 15px;
}


/* DOURK_LIVE_QUEUE_NOTIFICATIONS_V18 */
.refresh-bookings {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 24px rgba(37,99,235,.12);
}
.refresh-bookings .refresh-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.75);
  font-size: 18px;
  font-weight: 900;
}
.meta-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.queue-notice-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  top: max(14px, env(safe-area-inset-top));
  z-index: 10000;
  display: grid;
  grid-template-columns: 46px 1fr 32px;
  gap: 10px;
  align-items: center;
  padding: 13px;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  border: 1px solid #dbeafe;
  box-shadow: 0 18px 45px rgba(15,23,42,.18);
  backdrop-filter: blur(12px);
}
.queue-notice-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 22px;
}
.queue-notice-toast b {
  display: block;
  color: #0f172a;
  margin-bottom: 2px;
}
.queue-notice-toast p {
  margin: 0;
  color: #334155;
  font-weight: 800;
  line-height: 1.5;
}
.queue-notice-toast button {
  border: 0;
  background: #f1f5f9;
  color: #334155;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-weight: 900;
}
.clinic-bottom-option {
  width: 100%;
  border: 1px solid #e5e7eb;
  text-align: right;
  cursor: pointer;
}
.clinic-bottom-option.open {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.clinic-bottom-option.closed {
  background: #fef2f2;
  border-color: #fecaca;
}
.clinic-bottom-badge {
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  padding: 8px 12px;
  background: #ffffff;
  color: #0f172a;
}
.clinic-control-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.clinic-big-status {
  border-radius: 24px;
  padding: 22px;
  text-align: center;
  border: 1px solid #e5e7eb;
}
.clinic-big-status span {
  font-size: 42px;
  display: block;
  margin-bottom: 10px;
}
.clinic-big-status h2 {
  margin: 0 0 8px;
  font-size: 24px;
}
.clinic-big-status p {
  margin: 0;
  color: #64748b;
  font-weight: 700;
}
.clinic-big-status.open {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.clinic-big-status.closed {
  background: #fef2f2;
  border-color: #fecaca;
}
.btn-danger {
  background: #dc2626 !important;
  color: #ffffff !important;
}
.patient-nav {
  grid-template-columns: repeat(3, 1fr);
}

.patient-booking-card {
  border-radius: 22px !important;
  padding: 16px !important;
  overflow: hidden;
}
.booking-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.booking-card-head small,
.booking-primary-number small,
.booking-summary-grid span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.booking-card-head h3 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}
.booking-primary-number {
  border-radius: 20px;
  background: linear-gradient(135deg,#07427D,#0D82E8);
  color: #fff;
  padding: 18px;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(13,130,232,.22);
}
.booking-primary-number small {
  color: rgba(255,255,255,.78);
}
.booking-primary-number b {
  display: block;
  font-size: 42px;
  line-height: 1;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.booking-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.booking-summary-grid div {
  min-height: 72px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid rgba(7,66,125,.08);
  padding: 11px;
}
.booking-summary-grid div:first-child {
  grid-column: 1 / -1;
}
.booking-summary-grid b {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  margin-top: 5px;
  line-height: 1.35;
}

/* phone and tablet dimensions */
html, body, #app {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body {
  min-height: 100dvh;
}

.app-shell {
  width: 100% !important;
  min-height: 100dvh !important;
  height: auto !important;
  margin: 0 auto !important;
  overflow: visible !important;
  background: var(--bg);
}

.screen,
.login-screen,
.patient-home-screen,
.secretary-screen {
  width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  padding-left: max(14px, env(safe-area-inset-left)) !important;
  padding-right: max(14px, env(safe-area-inset-right)) !important;
  padding-bottom: calc(98px + env(safe-area-inset-bottom)) !important;
}

.login-screen {
  min-height: 100dvh !important;
}

.bottom-nav {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: env(safe-area-inset-bottom) !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 18px 18px 0 0;
}

.home-hero,
.header,
.sec-hero {
  box-sizing: border-box !important;
}

.queue-notice-toast {
  box-sizing: border-box !important;
}

@media (max-width: 599px) {
  .app-shell { max-width: 430px !important; }
  .screen, .login-screen, .patient-home-screen, .secretary-screen { max-width: 430px !important; }
  .bottom-nav { max-width: 430px !important; }
  .queue-notice-toast {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(calc(100% - 24px), 430px) !important;
  }
}

@media (min-width: 600px) and (max-width: 1023px) {
  .app-shell { max-width: 820px !important; }
  .screen, .login-screen, .patient-home-screen, .secretary-screen {
    max-width: 820px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  .bottom-nav { max-width: 820px !important; }
  .login-card {
    max-width: 500px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .home-doctors-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
  .home-hero {
    border-radius: 0 0 24px 24px !important;
  }
  .specialty-pills {
    top: 0;
    margin-left: -24px;
    margin-right: -24px;
    padding-right: 24px;
    padding-left: 24px;
  }
  .home-doctor-card { margin-bottom: 0 !important; }
  .queue-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .queue-list .empty { grid-column: 1 / -1 !important; }
  .history-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .history-card,
  .clinic-control-screen,
  .patient-booking-card {
    max-width: 720px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .booking-summary-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .booking-summary-grid div:first-child {
    grid-column: auto;
  }
  .sec-actions,
  .sec-follow-box,
  .clinic-bottom-option {
    max-width: 720px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .sec-stats.three {
    max-width: 620px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .queue-notice-toast {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(calc(100% - 48px), 760px) !important;
  }
}

@media (min-width: 1024px) {
  .app-shell { max-width: 1100px !important; }
  .screen, .patient-home-screen, .secretary-screen {
    max-width: 1100px !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
  }
  .login-screen { max-width: 1100px !important; }
  .bottom-nav { max-width: 1100px !important; }
  .home-doctors-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
  .specialty-pills {
    top: 0;
    margin-left: -32px;
    margin-right: -32px;
    padding-right: 32px;
    padding-left: 32px;
  }
  .home-doctor-card { margin-bottom: 0 !important; }
  .queue-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .queue-list .empty { grid-column: 1 / -1 !important; }
  .history-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .history-card,
  .clinic-control-screen,
  .patient-booking-card {
    max-width: 780px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .booking-summary-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .booking-summary-grid div:first-child {
    grid-column: auto;
  }
  .sec-actions,
  .sec-follow-box,
  .clinic-bottom-option {
    max-width: 760px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .sec-stats.three {
    max-width: 700px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .queue-notice-toast {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(calc(100% - 64px), 900px) !important;
  }
}

@media (max-width: 380px) {
  .screen, .login-screen, .patient-home-screen, .secretary-screen {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .sec-stats b { font-size: 18px !important; }
  .sec-stats span { font-size: 10px !important; }
  .nav-btn { font-size: 11px !important; }
}
