/* Mahour Professional 2 — Phase 5 UI/UX Refresh. Visual/workflow only. */
:root{--p5-bg:#f5f6f7;--p5-surface:#fff;--p5-ink:#20272e;--p5-muted:#707980;--p5-line:#e6e8ea;--p5-accent:#a65f72;--p5-accent-soft:#f7eef1;--p5-green:#28745f;--p5-red:#a54c55;--p5-amber:#96672f;--p5-radius:12px;--p5-shadow:0 1px 2px rgba(24,30,36,.04)}
body{background:var(--p5-bg)!important;color:var(--p5-ink)!important;font-size:13px}
.topbar{height:64px!important;background:rgba(255,255,255,.96)!important;border-bottom:1px solid var(--p5-line)!important;box-shadow:none!important;backdrop-filter:blur(10px)}
.brand img{width:38px!important;height:38px!important;border-radius:10px!important;object-fit:cover}.brand strong{font-size:17px}.brand small{font-size:10px;color:var(--p5-muted)!important}
.shell{max-width:1680px;margin:auto}.sidebar{width:218px!important;background:#fafafa!important;border-left:1px solid var(--p5-line)!important;padding:18px 10px!important}.main{padding:24px 28px 44px!important;max-width:1440px;width:100%}
.nav{display:flex;flex-direction:column;gap:4px}.nav button{position:relative;border-radius:9px!important;padding:10px 38px 10px 12px!important;text-align:right!important;font-weight:600!important;color:#596169!important;background:transparent!important;transition:.15s ease}.nav button:before{position:absolute;right:13px;top:50%;transform:translateY(-50%);font-size:15px;opacity:.72}.nav button:nth-child(1):before{content:'◫'}.nav button:nth-child(2):before{content:'◷'}.nav button:nth-child(3):before{content:'♙'}.nav button:nth-child(4):before{content:'＋'}.nav button:nth-child(5):before{content:'⌁'}.nav button:nth-child(6):before{content:'≡'}.nav button:nth-child(7):before{content:'◌'}.nav button:nth-child(8):before{content:'✓'}.nav button:nth-child(9):before{content:'⚙'}
.nav button.active{background:var(--p5-accent-soft)!important;color:#81495a!important}.nav button.active:after{content:'';position:absolute;right:0;top:9px;bottom:9px;width:3px;border-radius:3px;background:var(--p5-accent)}.nav button:hover{background:#f1f2f3!important;color:#30363c!important}
.page-head{margin-bottom:18px!important;align-items:center}.page-head h2{font-size:22px!important;margin-bottom:4px!important;letter-spacing:-.5px}.page-head p{color:var(--p5-muted)!important;margin:0!important}.btn{border-radius:9px!important;min-height:36px!important;font-weight:650!important;box-shadow:none!important}.primary{background:var(--p5-accent)!important}.secondary{background:#fff!important;border:1px solid #dfe2e4!important;color:#4d555c!important}.danger{background:#fff3f4!important;color:var(--p5-red)!important;border:1px solid #f0d8db!important}
.card,.panel,.form-panel,.setting,.m2-welcome,.m2-quick,.m2-insight,.m2-p360{border:1px solid var(--p5-line)!important;border-radius:var(--p5-radius)!important;box-shadow:var(--p5-shadow)!important;background:var(--p5-surface)!important}.card:before{display:none!important}.cards{gap:10px!important}.card{padding:14px 15px!important}.card small{color:var(--p5-muted)!important}.card strong{font-size:21px!important;margin-top:6px!important}.panel,.form-panel{padding:16px!important}
input,select,textarea{border:1px solid #dfe2e4!important;border-radius:9px!important;background:#fff!important;min-height:39px;outline:none;transition:.15s}input:focus,select:focus,textarea:focus{border-color:#c48b9a!important;box-shadow:0 0 0 3px rgba(166,95,114,.09)!important}.toolbar{background:transparent!important;padding:0 0 12px!important}
table{border-collapse:separate!important;border-spacing:0!important}th{background:#f7f8f8!important;color:#606970!important;font-size:11px!important;font-weight:700!important;border-bottom:1px solid var(--p5-line)!important}td{border-bottom:1px solid #eff0f1!important}tbody tr:hover td{background:#fafafa!important}
/* Command center */
#page-dashboard.p5-command .page-head{padding-bottom:14px;border-bottom:1px solid var(--p5-line)}.p5-command-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.7fr);gap:14px;margin-bottom:14px}.p5-primary-zone,.p5-side-zone{min-width:0}.p5-side-zone{display:flex;flex-direction:column;gap:12px}.p5-section-label{display:flex;align-items:center;justify-content:space-between;margin:0 0 9px}.p5-section-label b{font-size:14px}.p5-section-label small{color:var(--p5-muted)}
.p5-command .m2-hero{display:block!important;margin:0!important}.p5-command .m2-welcome{padding:16px!important}.p5-command .m2-quick{padding:14px!important}.p5-command .m2-day-strip{grid-template-columns:repeat(4,1fr)!important}.p5-command .cards{grid-template-columns:repeat(4,minmax(0,1fr))!important}.p5-command .attendance-cards{margin-top:10px}.p5-command #todayPanel{margin-top:0}.p5-command #todayPanel .toolbar input{font-size:13px}
.p5-command .m2-insights{grid-template-columns:repeat(2,1fr)!important;margin:0!important}.p5-command .m2-insight{padding:12px!important}.p5-command .m2-insight b{font-size:17px!important}.p5-command #m2WeekWrap{margin-top:22px!important;border-top:1px solid var(--p5-line);padding-top:18px}
.m2-week{gap:7px!important}.m2-day{border-radius:10px!important;box-shadow:none!important;min-height:105px!important}.m2-day.today{border-color:#cfa5b0!important;box-shadow:0 0 0 2px var(--p5-accent-soft)!important}.m2-appt{font-size:10px!important}
/* calmer modals */
.modal{background:rgba(28,32,36,.42)!important;backdrop-filter:blur(2px)}.modal-card{border-radius:14px!important;border:1px solid rgba(255,255,255,.7)!important;box-shadow:0 24px 70px rgba(20,25,30,.18)!important}
/* status hierarchy */
.revenue-actual strong{color:var(--p5-green)!important}.attendance-cards .card:nth-child(2) strong{color:var(--p5-red)!important}.attendance-cards .card:nth-child(3) strong{color:var(--p5-amber)!important}
@media(max-width:1050px){.p5-command-grid{grid-template-columns:1fr}.p5-side-zone{display:grid;grid-template-columns:1fr 1fr}.main{padding:20px}.sidebar{width:190px!important}}
@media(max-width:760px){.sidebar{width:100%!important}.main{padding:14px!important}.p5-side-zone{display:flex}.p5-command .cards{grid-template-columns:1fr 1fr!important}.p5-command .m2-day-strip{grid-template-columns:1fr 1fr!important}.topbar{height:auto!important}.nav button{padding-right:34px!important}}


/* FINAL CLEAN CORRECTIONS — scoped only */

/* Remove weekly clinic view completely */
#m2WeekWrap{display:none!important}

/* Today's ORIGINAL list/table must remain visible and functional */
#page-dashboard #todayTable{display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;overflow-x:hidden!important}
#page-dashboard #todayTable table{display:table!important;visibility:visible!important;opacity:1!important;width:100%!important;min-width:0!important;table-layout:fixed!important}
#page-dashboard #todayTable th,#page-dashboard #todayTable td{white-space:normal!important;padding:7px 4px!important;font-size:12px!important;line-height:1.45!important;vertical-align:middle!important}
#page-dashboard #todayTable th:nth-child(1),#page-dashboard #todayTable td:nth-child(1){width:6%!important}
#page-dashboard #todayTable th:nth-child(2),#page-dashboard #todayTable td:nth-child(2){width:13%!important}
#page-dashboard #todayTable th:nth-child(3),#page-dashboard #todayTable td:nth-child(3){width:9%!important}
#page-dashboard #todayTable th:nth-child(4),#page-dashboard #todayTable td:nth-child(4){width:8%!important}
#page-dashboard #todayTable th:nth-child(5),#page-dashboard #todayTable td:nth-child(5){width:13%!important}
#page-dashboard #todayTable th:nth-child(6),#page-dashboard #todayTable td:nth-child(6){width:10%!important}
#page-dashboard #todayTable th:nth-child(7),#page-dashboard #todayTable td:nth-child(7){width:20%!important}
#page-dashboard #todayTable th:nth-child(8),#page-dashboard #todayTable td:nth-child(8){width:21%!important}

/* Native attendance buttons: selected state colors */
#page-dashboard #todayTable .attendance-buttons{display:flex!important;gap:3px!important;flex-wrap:nowrap!important}
#page-dashboard #todayTable .attendance-buttons .btn{padding:6px 4px!important;font-size:10px!important;min-width:0!important;flex:1 1 0!important}
#page-dashboard #todayTable .attendance-present{background:#16a34a!important;border-color:#16a34a!important;color:#fff!important}
#page-dashboard #todayTable .attendance-absent{background:#dc2626!important;border-color:#dc2626!important;color:#fff!important}
#page-dashboard #todayTable .attendance-pending{background:#f59e0b!important;border-color:#f59e0b!important;color:#fff!important}

/* Keep payment visible */
#page-dashboard #todayTable .payment-cell{display:flex!important;align-items:center!important;gap:3px!important;white-space:nowrap!important}
#page-dashboard #todayTable .payment-input{width:78px!important;max-width:78px!important;font-size:11px!important}

/* Readability only */
body{font-size:15px!important;line-height:1.6!important}
.nav button{font-size:14px!important}
input,select,textarea{font-size:14px!important}
table th{font-size:12px!important}
table td{font-size:13px!important}

/* Patient phone numbers: always readable on one line */
#patientsTable td:nth-child(2),
#patientsTable td:nth-child(3),
#patientsTable td:nth-child(2) a,
#patientsTable td:nth-child(3) a{
  white-space:nowrap!important;
  word-break:keep-all!important;
  direction:ltr!important;
  unicode-bidi:embed!important;
  display:table-cell;
}
#patientsTable td:nth-child(2) a,
#patientsTable td:nth-child(3) a{display:inline-block!important}

/* Other result tables: fit page without changing icons/buttons */
.table-wrap,.table-container{max-width:100%!important}
table{max-width:100%!important}


/* ONLY REQUESTED CHANGES */
#page-dashboard #m2Hero,
#page-dashboard .m2-hero{display:none!important}

#page-dashboard #todayTable button.cabin-ui-selected{
  background:#dbeafe!important;
  border-color:#93c5fd!important;
  color:#1d4ed8!important;
}


/* ONLY CHANGE: Today/patient list uses the full freed page width */
#page-dashboard{
  width:100%!important;
  max-width:none!important;
}
#page-dashboard #todayPanel,
#page-dashboard #todayTable{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}
#page-dashboard #todayTable{
  overflow-x:hidden!important;
}
#page-dashboard #todayTable table{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}
#page-dashboard #todayTable th,
#page-dashboard #todayTable td{
  min-width:0!important;
  box-sizing:border-box!important;
}
#page-dashboard #todayTable td:last-child,
#page-dashboard #todayTable th:last-child{
  overflow:visible!important;
}
#page-dashboard #todayTable td button,
#page-dashboard #todayTable td .btn{
  max-width:100%!important;
  box-sizing:border-box!important;
}


/* ROOT FIX ONLY: after removing Work Center, Today list occupies the entire command grid */
#page-dashboard.p5-command .p5-command-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:0!important;
  width:100%!important;
  max-width:100%!important;
}
#page-dashboard.p5-command .p5-primary-zone{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  grid-column:1 / -1!important;
}
#page-dashboard.p5-command .p5-side-zone{
  display:none!important;
  width:0!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
}
#page-dashboard.p5-command #todayPanel,
#page-dashboard.p5-command #todayTable{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
