/* Same visual foundation as business/assets/partner-ui.css. Platform layout,
   billing controls, tenant visibility and mobile login rules stay authoritative. */
:root {
  --ink:#25382e; --ink-2:#647168; --muted:#647168;
  --cream:#f5f5f0; --paper:#fff; --card:#fff; --line:#dfe5dc;
  --green:#24553f; --green-deep:#1d4433; --green-soft:#eaf1e6;
  --teal:#316d60; --amber:#94621d; --red:#b43e39; --red-soft:#fbeae8;
  --shadow:none; --sans:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  --display:var(--sans); color-scheme:light;
}
html,body { background:var(--cream); color:var(--ink); font-family:var(--sans); line-height:1.65; }
html body.ps-body { background:var(--cream); color:var(--ink); }
button,input,select,textarea { font-family:inherit; }
a,button { -webkit-tap-highlight-color:transparent; }
:is(a,button,input,select,textarea,summary):focus-visible { outline:3px solid #9b7129; outline-offset:3px; }
h1,h2,h3 { letter-spacing:0; line-height:1.5; }
.sidebar { background:#fbfcf8; color:var(--ink); border-right:1px solid var(--line); box-shadow:none; }
.side-brand,.side-bottom { border-color:var(--line); }
.side-brand :is(strong,span),.side-admin :is(strong,b) { color:var(--ink); }
.side-brand small,.side-label,.side-admin small,.side-bottom { color:var(--muted); }
.side-link { color:#516057; border-radius:7px; font-size:14px; min-height:44px; }
.side-link:hover { background:#f0f4eb; color:var(--green); }
.side-link.active,.side-link.is-active { background:#e5eddf; color:#204d36; font-weight:650; box-shadow:none; border-left-color:var(--green); }
.side-link.is-active .icon { color:var(--green); }
.side-exit,.side-logout { color:var(--green); border-color:var(--line); }
.topbar { gap:20px; }
.topbar h1 { font-size:28px; font-weight:650; }
.kicker { color:var(--muted); font-size:12px; font-weight:500; letter-spacing:.04em; }
:is(.panel,.stat-block,.tenant-hero,.tenant-card,.billing-panel) { background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:none; }
.panel-head { border-bottom:1px solid #e8ece3; gap:16px; }
.panel-head h2,.panel-head h3 { color:var(--ink); font-size:18px; font-weight:650; }
.panel-head p,.panel-copy { color:var(--muted); font-size:14px; line-height:1.8; }
.stat-block { min-width:0; }
.stat-block strong { color:var(--ink); }
.stat-block :is(small,span) { color:var(--muted); }
.button { min-height:44px; border-radius:8px; font-size:14px; font-weight:550; box-shadow:none; transition:background 140ms,border-color 140ms; }
.button-primary { background:var(--green); border-color:var(--green); color:#fff; }
.button-primary:hover { background:var(--green-deep); }
.button-ghost { background:#fff; color:var(--green); border:1px solid #cbd7c5; }
.button-danger { background:var(--red); color:#fff; border-color:var(--red); }
.danger-link { color:var(--red); }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea {
  min-height:44px; font-size:15px; line-height:1.5; border:1px solid #adbcaa;
  border-radius:8px; background:#fff; color:var(--ink); box-shadow:none;
}
input::placeholder,textarea::placeholder { color:#7c867c; opacity:1; }
input:disabled,select:disabled,textarea:disabled { background:#edf0e9; color:#687366; }
input[type=checkbox],input[type=radio] { accent-color:var(--green); }
.form-stack label,.panel-form label { font-size:14px; font-weight:500; }
.form-two { gap:17px 20px; }
.table-wrap { border:1px solid var(--line); border-radius:9px; background:#fff; }
.table-wrap table { font-size:14px; }
.table-wrap th { background:#f0f3eb; color:#53644f; font-size:12px; font-weight:600; letter-spacing:0; }
.table-wrap :is(td,th) { padding:13px 14px; border-bottom-color:#e6ebe1; line-height:1.65; }
.table-wrap tbody tr:hover { background:#f7f8f3; }
.tenant-hero h2,.tenant-hero p,.hero-status strong { color:var(--ink); }
.hero-status small,.tenant-hero .kicker { color:var(--muted); }
.alert,.notice { border-radius:8px; box-shadow:none; font-size:14px; }
.empty-action,.empty-state { background:#f7f8f3; border-color:#d7dfd0; color:var(--muted); }
.auth-body { background:var(--cream); }
.auth-intro { background:#edf2e8; color:var(--ink); }
.auth-intro :is(h1,p,strong),.auth-line { color:var(--ink); }
.auth-intro:after { display:none; }
.auth-panel { background:#fff; }
.auth-team-message { background:var(--cream); }
.row-actions .tenant-action-form { border-radius:8px; background:#f7f8f3; gap:8px; }
.platform-ad-preview,.platform-ad-preview-empty { background:#f7f8f3; border-radius:8px; }
@media(max-width:680px) {
  .sidebar { border-right:0; border-bottom:1px solid var(--line); }
  .topbar h1 { font-size:24px; }
  .main-area { padding-inline:13px; }
  .form-two { grid-template-columns:1fr; }
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea { font-size:16px; }
  .tenant-auth-body .auth-intro { display:none; }
}
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { transition:none!important; scroll-behavior:auto!important; } }

/* A single login card at every width; the introduction is absent from HTML. */
body.auth-body { display:flex; flex-direction:column; min-height:100vh; min-height:100svh; background:var(--cream); }
body.auth-body .auth-shell { display:flex; flex:1; align-items:center; justify-content:center; min-height:0; padding:48px 24px 24px; }
body.auth-body .auth-panel { width:100%; max-width:448px; padding:32px; border:1px solid var(--line); border-radius:16px; }
body.auth-body .auth-panel-head { margin-bottom:24px; }
body.auth-body .auth-panel-head .partner-brand-logo { width:48px; height:48px; margin-bottom:16px; }
body.auth-body .auth-panel-head h2 { margin:0; font-size:28px; line-height:1.4; }
body.auth-body .auth-team-message { background:transparent; padding:20px 24px max(24px,env(safe-area-inset-bottom)); }
body.auth-body .sr-login-links { margin:0; padding:8px 24px; }
body.auth-body [hidden] { display:none!important; }
/* Flex children must shrink before the nav can become a scroll container. */
@media(min-width:681px) {
  .app-body .sidebar { height:100vh; height:100dvh; overflow:hidden; }
  .app-body .side-brand,.app-body .side-label,.app-body .side-bottom { flex-shrink:0; }
  .app-body .side-nav { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; align-content:start; overscroll-behavior-y:contain; -webkit-overflow-scrolling:touch; padding-bottom:12px; scrollbar-width:thin; scrollbar-gutter:stable; }
  .app-body .side-bottom { margin-top:0; }
}
@media(max-width:680px) {
  body.auth-body { background:#fff; }
  body.auth-body .auth-shell { align-items:flex-start; padding:calc(32px + env(safe-area-inset-top)) 24px 16px; }
  body.auth-body .auth-panel { padding:0; border:0; border-radius:0; }
  body.auth-body .auth-panel-head h2 { font-size:26px; }
  body.auth-body .auth-panel-head .partner-brand-logo { margin-bottom:20px; }
  body.auth-body .form-stack input:not([type=checkbox]):not([type=radio]) { min-height:48px; font-size:16px; }
  body.auth-body .login-tab { min-height:44px; }
}
