/* =============================================================================
   PORTAL.CSS — shared styling for /staff/ and /admin/ pages.
   Reuses the same brand variables as the public site's style.css (loaded
   before this file on every portal page), just laid out as an app shell
   instead of a marketing site.
   ============================================================================= */

.portal-body{
  min-height:100vh;
  display:flex; flex-direction:column;
  background:
    radial-gradient(1100px 700px at 85% -8%, var(--purple-soft) 0%, transparent 55%),
    radial-gradient(900px 600px at -10% 30%, var(--rose-soft) 0%, transparent 50%),
    var(--porcelain);
}

/* ---------- Centered auth card (login / forgot password) ---------- */
.auth-shell{
  flex:1; display:flex; align-items:center; justify-content:center; padding:32px 20px;
}
.auth-card{
  width:100%; max-width:400px; background:var(--porcelain);
  border:1px solid rgba(42,20,32,0.1); border-radius:24px; padding:40px 34px;
  box-shadow:0 40px 80px -40px rgba(42,20,32,0.35);
}
.auth-card .logo{display:flex; justify-content:center; margin-bottom:24px;}
.auth-card .logo img{height:44px;}
.auth-card h1{font-size:24px; text-align:center; margin-bottom:6px;}
.auth-card .auth-sub{text-align:center; font-size:13.5px; color:rgba(42,20,32,0.55); margin-bottom:28px;}
.auth-card .btn{width:100%; justify-content:center;}
.auth-card .review-form-row{margin-bottom:18px;}
.auth-links{display:flex; justify-content:center; margin-top:18px; font-size:13px;}
.auth-links a{color:var(--raspberry); font-weight:700;}
.auth-message{
  font-size:13.5px; border-radius:12px; padding:12px 16px; margin-bottom:18px; display:none;
}
.auth-message.is-visible{display:block;}
.auth-message.is-error{background:rgba(161,31,82,0.08); border:1px solid rgba(161,31,82,0.3); color:var(--raspberry-deep);}
.auth-message.is-success{background:rgba(59,163,104,0.1); border:1px solid rgba(59,163,104,0.35); color:#2a7a4d;}

/* ---------- App shell (dashboard/calendar/availability/profile) ---------- */
.portal-topbar{
  position:sticky; top:0; z-index:50;
  background:rgba(255,253,248,0.92); backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(42,20,32,0.08);
  padding:16px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.portal-topbar .logo img{height:32px;}
.portal-topbar .pt-user{display:flex; align-items:center; gap:14px; font-size:13.5px;}
.portal-topbar .pt-role{
  font-size:10.5px; font-weight:800; letter-spacing:0.05em; text-transform:uppercase;
  color:var(--raspberry); background:var(--rose-soft); padding:3px 9px; border-radius:100px;
}
.portal-topbar .pt-signout{
  font-size:13px; font-weight:700; color:rgba(42,20,32,0.5); background:none; border:none; cursor:pointer;
}
.portal-topbar .pt-signout:hover{color:var(--raspberry);}

.portal-shell{display:flex; flex:1;}
.portal-sidebar{
  width:220px; flex-shrink:0; padding:28px 16px; border-right:1px solid rgba(42,20,32,0.08);
  display:flex; flex-direction:column; gap:4px;
}
.portal-sidebar a{
  display:flex; align-items:center; gap:12px; padding:12px 16px; border-radius:12px;
  font-size:14.5px; font-weight:700; color:rgba(42,20,32,0.6);
}
.portal-sidebar a:hover{background:var(--porcelain-deep);}
.portal-sidebar a.is-active{background:var(--raspberry); color:var(--porcelain);}

.portal-main{flex:1; min-width:0; padding:32px; padding-bottom:100px;}
.portal-page-head{margin-bottom:28px;}
.portal-page-head h1{font-size:clamp(24px,3vw,32px);}
.portal-page-head p{color:rgba(42,20,32,0.55); font-size:14px; margin-top:6px;}

/* Mobile bottom nav */
.portal-bottom-nav{
  display:none;
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  background:rgba(255,253,248,0.96); backdrop-filter:blur(10px);
  border-top:1px solid rgba(42,20,32,0.1);
  padding:8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  justify-content:space-around;
}
.portal-bottom-nav a{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  font-size:11px; font-weight:700; color:rgba(42,20,32,0.45);
  padding:6px 10px; border-radius:12px; min-width:64px;
}
.portal-bottom-nav a .icon{font-size:19px;}
.portal-bottom-nav a.is-active{color:var(--raspberry);}

@media (max-width:900px){
  .portal-sidebar{display:none;}
  .portal-bottom-nav{display:flex;}
  .portal-main{padding:20px 16px 96px;}
}

/* ---------- Appointment cards ---------- */
.appt-list{display:flex; flex-direction:column; gap:14px;}
.appt-card{
  background:var(--porcelain); border:1px solid rgba(42,20,32,0.1); border-radius:16px;
  padding:20px 22px; display:flex; gap:18px; align-items:flex-start; flex-wrap:wrap;
}
.appt-card .appt-time{
  font-family:'Fraunces', serif; font-weight:600; font-size:16px; color:var(--raspberry);
  min-width:92px;
}
.appt-card .appt-body{flex:1; min-width:200px;}
.appt-card .appt-body h3{font-size:16px; margin-bottom:2px;}
.appt-card .appt-meta{font-size:13px; color:rgba(42,20,32,0.55); line-height:1.6;}
.appt-card .appt-meta a{color:var(--raspberry); font-weight:600;}
.appt-card .appt-notes{font-size:12.5px; color:rgba(42,20,32,0.5); font-style:italic; margin-top:6px;}
.appt-actions{display:flex; gap:8px; flex-wrap:wrap;}
.status-badge{
  font-size:10.5px; font-weight:800; letter-spacing:0.04em; text-transform:uppercase;
  padding:5px 11px; border-radius:100px; white-space:nowrap;
}
.status-badge.confirmed{background:var(--rose-soft); color:var(--raspberry-deep);}
.status-badge.checked_in{background:var(--gold-soft); color:#6b5108;}
.status-badge.completed{background:rgba(59,163,104,0.16); color:#2a7a4d;}
.status-badge.cancelled{background:rgba(42,20,32,0.08); color:rgba(42,20,32,0.5);}
.status-badge.no_show{background:rgba(161,31,82,0.14); color:var(--raspberry-deep);}
.btn-tiny{
  font-size:12px; font-weight:700; padding:7px 13px; border-radius:100px;
  border:1px solid rgba(42,20,32,0.16); background:var(--porcelain); color:var(--ink); cursor:pointer;
}
.btn-tiny:hover{border-color:var(--raspberry); color:var(--raspberry);}
.btn-tiny.danger:hover{border-color:var(--raspberry-deep); background:var(--raspberry-deep); color:var(--porcelain);}
.appt-empty{
  text-align:center; padding:50px 20px; color:rgba(42,20,32,0.45);
  font-style:italic; font-family:'Fraunces', serif; font-size:16px;
}

/* ---------- Simple data tables (admin) ---------- */
.data-table{width:100%; border-collapse:collapse; font-size:13.5px;}
.data-table th{
  text-align:left; font-size:11px; font-weight:800; letter-spacing:0.05em; text-transform:uppercase;
  color:rgba(42,20,32,0.45); padding:10px 12px; border-bottom:1px solid rgba(42,20,32,0.12);
}
.data-table td{padding:12px; border-bottom:1px solid rgba(42,20,32,0.07); vertical-align:middle;}
.data-table tr:last-child td{border-bottom:none;}
.table-wrap{overflow-x:auto; background:var(--porcelain); border:1px solid rgba(42,20,32,0.1); border-radius:16px; padding:6px;}

.tab-bar{display:flex; gap:8px; margin-bottom:26px; flex-wrap:wrap;}
.tab-btn{
  font-size:13.5px; font-weight:700; padding:10px 18px; border-radius:100px;
  border:1px solid rgba(42,20,32,0.14); background:var(--porcelain); color:rgba(42,20,32,0.6); cursor:pointer;
}
.tab-btn.is-active{background:var(--raspberry); border-color:var(--raspberry); color:var(--porcelain);}
.tab-panel{display:none;}
.tab-panel.is-active{display:block;}

.stat-cards{display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:16px; margin-bottom:32px;}
.stat-card{
  background:var(--porcelain); border:1px solid rgba(42,20,32,0.1); border-radius:16px; padding:20px 22px;
}
.stat-card b{font-family:'Fraunces', serif; font-size:32px; color:var(--raspberry); display:block;}
.stat-card span{font-size:12.5px; color:rgba(42,20,32,0.55); font-weight:600;}

.form-card{
  background:var(--porcelain); border:1px solid rgba(42,20,32,0.1); border-radius:18px; padding:26px;
}
.form-inline{display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap;}
.form-inline .review-form-row{margin-bottom:0; flex:1; min-width:120px;}

.week-row-label{font-size:12.5px; font-weight:700; width:110px; flex-shrink:0;}
.avail-row{display:flex; align-items:center; gap:14px; padding:12px 0; border-top:1px solid rgba(42,20,32,0.08); flex-wrap:wrap;}
.avail-row:first-child{border-top:none;}
.avail-row input[type="time"]{
  font-family:'Manrope',sans-serif; font-size:14px; padding:8px 10px; border-radius:10px;
  border:1px solid rgba(42,20,32,0.18); background:var(--porcelain);
}
.toggle-off{display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:rgba(42,20,32,0.6);}

.select-input, select{
  font-family:'Manrope', sans-serif; font-size:14px; color:var(--ink);
  background:var(--porcelain); border:1px solid rgba(42,20,32,0.18); border-radius:10px;
  padding:10px 12px;
}

.badge-pill{font-size:11px; font-weight:700; padding:4px 10px; border-radius:100px;}
.badge-pill.active{background:rgba(59,163,104,0.14); color:#2a7a4d;}
.badge-pill.inactive{background:rgba(42,20,32,0.08); color:rgba(42,20,32,0.5);}

.page-loading{padding:60px 0; text-align:center; color:rgba(42,20,32,0.4); font-style:italic; font-family:'Fraunces',serif;}

/* ===== PHOTOS TAB (admin dashboard) ===== */
.photo-field-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:18px;
}
.photo-field-card{
  border:1px solid rgba(42,20,32,0.12); border-radius:14px; overflow:hidden;
  background:var(--porcelain);
}
.photo-field-thumb{
  aspect-ratio:4/3; background:rgba(42,20,32,0.05);
  display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.photo-field-thumb img{width:100%; height:100%; object-fit:cover; display:block;}
.photo-field-empty{font-size:12px; color:rgba(42,20,32,0.4); font-style:italic; padding:0 16px; text-align:center;}
.photo-field-body{padding:14px 16px;}
.photo-field-label{font-size:13px; font-weight:700; margin-bottom:10px; line-height:1.4;}
