/* NobatYar Pro — Patient & Doctor Portal (v1) / RTL */
.nby-portal{--nby-p-fg:#101828;--nby-p-muted:#667085;--nby-p-line:#e4e7ec;--nby-p-bg:#f7f8fa;--nby-p-brand:#155eef;--nby-p-brand-dark:#0f4acb;--nby-p-brand-soft:#edf4ff;--nby-p-navy:#102a56;--nby-p-success:#079455;--nby-p-success-soft:#ecfdf3;--nby-p-warning:#dc6803;--nby-p-warning-soft:#fffaeb;--nby-p-danger:#d92d20;--nby-p-danger-soft:#fef3f2;direction:rtl;font-family:inherit;color:var(--nby-p-fg);max-width:1040px;margin:30px auto;padding:0 16px}
.nby-portal *{box-sizing:border-box}
.nby-portal a{text-decoration:none}
.nby-portal button{font-family:inherit;cursor:pointer}
.nby-portal input,.nby-portal select,.nby-portal textarea{width:100%;height:44px;border:1px solid #d0d5dd!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important;padding:0 13px!important;font:inherit!important;font-size:12px!important}
.nby-portal textarea{height:auto;padding-top:11px!important}
.nby-portal input:focus,.nby-portal select:focus,.nby-portal textarea:focus{outline:none!important;border-color:#84adff!important;box-shadow:0 0 0 3px var(--nby-p-brand-soft)!important}
.nby-portal input:disabled{background:#f2f4f7!important;color:#98a2b3}

/* ---------- Buttons ---------- */
.nby-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:44px;padding:0 18px;border-radius:10px;border:1px solid #d0d5dd;background:#fff;color:#344054;font-size:12px;font-weight:800;transition:.15s ease}
.nby-btn:hover{border-color:#b6bfcc;color:#344054}
.nby-btn-primary{background:var(--nby-p-brand);border-color:var(--nby-p-brand);color:#fff}
.nby-btn-primary:hover{background:var(--nby-p-brand-dark);border-color:var(--nby-p-brand-dark);color:#fff}
.nby-btn-ghost{background:transparent;border-color:transparent;color:var(--nby-p-brand)}
.nby-btn-block{width:100%}
.nby-btn-sm{height:34px;padding:0 12px;font-size:10px}

/* ---------- Auth (login/register/forgot) ---------- */
.nby-auth-shell{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,.9fr);gap:0;background:#fff;border:1px solid var(--nby-p-line);border-radius:20px;overflow:hidden;box-shadow:0 14px 40px rgba(16,24,40,.06)}
.nby-auth-shell-single{grid-template-columns:1fr}
.nby-auth-side{background:var(--nby-p-navy);color:#fff;padding:44px 38px;display:flex;flex-direction:column;justify-content:center}
.nby-auth-kicker{font-size:9px;letter-spacing:.14em;font-weight:900;opacity:.6}
.nby-auth-side h2{font-size:26px;color:#fff;margin:12px 0 10px}
.nby-auth-side p{color:#b7c9e8;font-size:12px;line-height:1.9;margin:0 0 18px}
.nby-auth-points{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.nby-auth-points li{font-size:11px;color:#dbe6f7;padding-right:20px;position:relative}
.nby-auth-points li:before{content:"✓";position:absolute;right:0;color:#7ab0ff;font-weight:900}
.nby-auth-box{padding:38px 34px}
.nby-auth-tabs{display:flex;gap:4px;background:var(--nby-p-bg);border-radius:10px;padding:4px;margin-bottom:22px}
.nby-auth-tab{flex:1;height:38px;border:0;background:transparent;border-radius:8px;font-size:11px;font-weight:800;color:var(--nby-p-muted)}
.nby-auth-tab.is-active{background:#fff;color:var(--nby-p-brand);box-shadow:0 2px 6px rgba(16,24,40,.08)}
.nby-auth-panel{display:none;flex-direction:column;gap:14px}
.nby-auth-panel.is-active{display:flex}
.nby-auth-panel label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:800;color:#344054}
.nby-input-with-btn{display:flex;gap:8px}
.nby-input-with-btn input{flex:1}
.nby-input-with-btn .nby-btn{white-space:nowrap;flex:0 0 auto}
.nby-auth-msg{min-height:16px;font-size:10px;color:var(--nby-p-danger)}
.nby-auth-msg.is-success{color:var(--nby-p-success)}
.nby-portal-notice{background:var(--nby-p-brand-soft);color:#175cd3;border-radius:10px;padding:12px 14px;font-size:11px;line-height:1.8;margin-bottom:16px}

/* ---------- Logged-in shell ---------- */
.nby-portal-shell{background:#fff;border:1px solid var(--nby-p-line);border-radius:20px;overflow:hidden;box-shadow:0 14px 40px rgba(16,24,40,.05)}
.nby-portal-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 26px;background:var(--nby-p-navy);color:#fff}
.nby-portal-brand{display:flex;align-items:center;gap:11px}
.nby-portal-mark{width:38px;height:38px;border-radius:11px;background:var(--nby-p-brand);display:grid;place-items:center;font-weight:900;font-size:18px}
.nby-portal-brand strong{display:block;font-size:13px;color:#fff}
.nby-portal-brand small{display:block;font-size:8px;letter-spacing:.12em;color:#9db4dd;margin-top:3px}
.nby-portal-user{display:flex;align-items:center;gap:10px}
.nby-portal-avatar{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.12);display:grid;place-items:center;font-weight:900;font-size:13px}
.nby-portal-user strong{display:block;font-size:11px;color:#fff}
.nby-portal-user small{display:block;font-size:8px;color:#9db4dd}

.nby-portal-tabs{display:flex;gap:2px;padding:0 20px;border-bottom:1px solid var(--nby-p-line);overflow-x:auto}
.nby-portal-tab{height:52px;padding:0 16px;border:0;background:transparent;font-size:11px;font-weight:800;color:var(--nby-p-muted);border-bottom:2px solid transparent;white-space:nowrap}
.nby-portal-tab.is-active{color:var(--nby-p-brand);border-bottom-color:var(--nby-p-brand)}

.nby-portal-panel{display:none;padding:26px}
.nby-portal-panel.is-active{display:block}
.nby-portal-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.nby-portal-panel-head h3{margin:0;font-size:14px;font-weight:800}
.nby-portal-loading{color:var(--nby-p-muted);font-size:11px;text-align:center;padding:24px}

.nby-overview-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:14px;margin-bottom:6px}
.nby-portal-card{background:var(--nby-p-bg);border:1px solid var(--nby-p-line);border-radius:14px;padding:18px}
.nby-portal-card-kicker{display:block;font-size:9px;font-weight:800;color:var(--nby-p-muted);margin-bottom:8px}
.nby-portal-card strong{font-size:20px}
.nby-next-apt-card{background:var(--nby-p-navy);border-color:var(--nby-p-navy);color:#fff}
.nby-next-apt-card .nby-portal-card-kicker{color:#9db4dd}
.nby-portal-stat-row{display:flex;justify-content:space-between;gap:10px}
.nby-portal-stat-row>div{text-align:center}
.nby-portal-stat-row strong{display:block;font-size:20px}
.nby-portal-stat-row small{display:block;font-size:9px;color:var(--nby-p-muted);margin-top:3px}

.nby-appointment-list{display:flex;flex-direction:column;gap:10px}
.nby-appointment-item{border:1px solid var(--nby-p-line);border-radius:12px;padding:14px;display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center}
.nby-appointment-item strong{display:block;font-size:11px}
.nby-appointment-item small{display:block;color:var(--nby-p-muted);font-size:9px;margin-top:4px}
.nby-appointment-status{border-radius:999px;padding:5px 10px;font-size:9px;font-weight:900;white-space:nowrap}
.nby-status-pending{background:var(--nby-p-warning-soft);color:var(--nby-p-warning)}
.nby-status-confirmed{background:var(--nby-p-success-soft);color:var(--nby-p-success)}
.nby-status-completed{background:var(--nby-p-brand-soft);color:#175cd3}
.nby-status-cancelled,.nby-status-no_show{background:var(--nby-p-danger-soft);color:var(--nby-p-danger)}
.nby-empty-state{text-align:center;padding:34px 15px;color:var(--nby-p-muted);font-size:11px}
.nby-empty-state strong{display:block;color:#344054;font-size:12px;margin-bottom:5px}

.nby-portal-form{display:grid;grid-template-columns:1fr 1fr;gap:14px;max-width:640px}
.nby-portal-form label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:800;color:#344054;grid-column:span 1}
.nby-portal-form button{grid-column:1/-1;justify-self:start}

/* Doctor-specific */
.nby-doctor-stat-grid{grid-template-columns:repeat(4,1fr);margin-bottom:20px}
.nby-doctor-stat-grid .nby-portal-card strong{font-size:22px;display:block;margin-top:6px}

@media(max-width:760px){
  .nby-portal{margin:14px auto;padding:0 10px}
  .nby-auth-shell{grid-template-columns:1fr}
  .nby-auth-side{display:none}
  .nby-overview-grid,.nby-doctor-stat-grid{grid-template-columns:1fr 1fr}
  .nby-portal-form{grid-template-columns:1fr}
  .nby-portal-form label{grid-column:1}
  .nby-appointment-item{grid-template-columns:1fr;text-align:right}
}
@media(max-width:460px){
  .nby-overview-grid,.nby-doctor-stat-grid{grid-template-columns:1fr}
}
