/* =========================================================
THE-ABC.RO V18.18 — Global Surface / Role Truth Lock
Scop: aceeași suprafață vizuală pentru vizitator, client, partener și admin-preview.
Adminul vede aceleași pagini + informații tehnice, fără layout diferit.
========================================================= */
:root{
  --abc-page-max: none;
  --abc-page-pad-x: clamp(10px, 1.35vw, 22px);
  --abc-page-pad-y: clamp(6px, .85vh, 14px);
  --abc-client: rgba(255, 200, 64, .92);
  --abc-partner: rgba(166, 96, 255, .92);
  --abc-admin: rgba(35, 210, 130, .92);
  --abc-standard: rgba(70, 150, 255, .92);
  --abc-emergency: rgba(255, 75, 75, .92);
  --abc-surface-border: rgba(255,255,255,.13);
}
html, body{max-width:100%; overflow-x:hidden !important;}
*,*::before,*::after{box-sizing:border-box; min-width:0;}
body:not([data-user-type="admin"]):not([data-user-role="admin"]){min-height:100svh;}
body[data-page="index"],
body[data-page="auth_login"],
body[data-page="auth_notice"],
body[data-page="client_dashboard"],
body[data-page="partner_dashboard"],
body[data-page*="flow"],
body[data-abc-consolidated-page="true"]{width:100%; margin:0;}
.page-shell,
.compact-page,
.compact-index-page,
.compact-auth-page,
.client_dashboard-page-shell,
.partner_dashboard-page-shell{
  width:100% !important;
  max-width:100% !important;
  min-height:100svh;
  margin:0 !important;
  padding:var(--abc-page-pad-y) var(--abc-page-pad-x) !important;
  overflow-x:hidden !important;
  display:flex;
  flex-direction:column;
  gap:clamp(7px, .8vw, 12px);
}
.abc-stack,
.index-total-content-shell,
.client_dashboard-stack,
.partner_dashboard-stack,
main[data-content-root="true"]{
  width:100% !important;
  max-width:100% !important;
  flex:1 1 auto;
  overflow-x:hidden !important;
  margin-inline:0 !important;
}
.panel,
.compact-panel,
.content-engine-panel,
.abc-public-global-box,
.abc-public-index-content,
.client_dashboard-panel-shell,
.partner_dashboard-panel-shell,
.auth-content-panel,
.auth-shell-content-panel{
  width:100% !important;
  max-width:100% !important;
  margin-inline:0 !important;
  overflow-x:hidden !important;
  border-color:var(--abc-surface-border) !important;
}
/* auth nu mai este pagină separată / îngustă */
.auth-shell-page .abc-stack,
.auth-shell-page main,
.auth-shell-page .auth-content-panel{display:flex; align-items:stretch; justify-content:center;}
.auth-card,
.auth-panel-card,
.auth-dashboard-shell,
.auth-card-dashboard,
.auth-dashboard-panel--compact{
  width:min(100%, 980px) !important;
  max-width:min(100%, 980px) !important;
  margin:0 auto !important;
  padding:clamp(14px, 1.6vw, 22px) !important;
  border-width:1px !important;
  border-style:solid !important;
  border-radius:18px !important;
  box-shadow:0 18px 50px rgba(0,0,0,.22) !important;
  background:linear-gradient(180deg, rgba(15,18,24,.96), rgba(9,12,18,.96)) !important;
  outline:0 !important;
}
.auth-dashboard-panel__title,
.auth-dashboard-heading h1,
.auth-card h1{
  font-size:clamp(1.45rem, 2vw, 2.1rem) !important;
  line-height:1.05 !important;
  margin:0 !important;
  letter-spacing:-.035em;
}
.auth-panel-badge{font-size:.78rem !important; padding:.28rem .55rem !important; border-radius:999px !important;}
.auth-panel-family-client .auth-card,
.auth-panel-family-client .auth-panel-card,
body[data-auth-role="client"] .auth-card{border-color:var(--abc-client) !important;}
.auth-panel-family-partner .auth-card,
.auth-panel-family-partner .auth-panel-card,
body[data-auth-role="partner"] .auth-card{border-color:var(--abc-partner) !important;}
.auth-panel-family-admin .auth-card,
.auth-panel-family-admin .auth-panel-card,
body[data-auth-role="admin"] .auth-card{border-color:var(--abc-admin) !important;}
/* roșu legacy interzis în auth/shell; roșu rămâne permis doar flow emergency */
body:not([data-flow-type="emergency"]) .auth-card,
body:not([data-flow-type="emergency"]) .auth-panel-card,
body:not([data-flow-type="emergency"]) .auth-content-panel,
body:not([data-flow-type="emergency"]) .client_dashboard-panel-shell,
body:not([data-flow-type="emergency"]) .partner_dashboard-panel-shell{
  --danger: transparent;
  --red: transparent;
}
body:not([data-flow-type="emergency"]) .auth-card[style*="red"],
body:not([data-flow-type="emergency"]) .auth-panel-card[style*="red"]{border-color:rgba(255,255,255,.16) !important; background:rgba(12,15,22,.96) !important;}
/* carduri homepage/flow: full surface controlat + culori fine */
.abc-home-six-grid,
[data-home-flow-layout],
.abc-index-flow-module-v8,
.abc-index-flow-module-v10{width:100% !important; max-width:100% !important; margin-inline:0 !important;}
.abc-home-six-grid,[data-home-flow-layout="role-aware"]{display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(10px,1.1vw,16px);}
.home-route-card,.quick-action-card,.compact-home-card{border-width:1px !important; border-style:solid !important; border-radius:18px !important; min-width:0 !important;}
.home-flow-standard{border-color:var(--abc-standard) !important;}
.home-flow-emergency{border-color:var(--abc-emergency) !important;}
.home-flow-partner,.home-flow-partner-request{border-color:var(--abc-partner) !important;}
.home-flow-client:not(.home-flow-emergency):not(.home-flow-standard){border-color:var(--abc-client) !important;}
/* dashboard profile: fără access tehnic pentru client/partener real; scroll doar intern */
body[data-page="client_dashboard"]:not([data-admin-debug-ui="true"]) [data-global-slot="access-dashboard"],
body[data-page="partner_dashboard"]:not([data-admin-debug-ui="true"]) [data-global-slot="access-dashboard"],
body[data-page="client_dashboard"]:not([data-admin-debug-ui="true"]) .abc-dashboard-access-module-v10,
body[data-page="partner_dashboard"]:not([data-admin-debug-ui="true"]) .abc-dashboard-access-module-v10{display:none !important; visibility:hidden !important; pointer-events:none !important;}
.profile-dashboard-shell,
.client-profile-card,
.partner-profile-card,
.dashboard-profile-shell{width:100% !important; max-width:100% !important; overflow:hidden !important;}
.profile-dashboard-shell [class*="content"],
.client-profile-card [class*="content"],
.partner-profile-card [class*="content"]{min-width:0;}
/* public/client/partner: body fără scroll haotic; modulele lungi scrollează intern */
body:not([data-admin-debug-ui="true"]) .profile-dashboard-shell,
body:not([data-admin-debug-ui="true"]) .client-profile-card,
body:not([data-admin-debug-ui="true"]) .partner-profile-card,
body:not([data-admin-debug-ui="true"]) .abc-flow-form-shell,
body:not([data-admin-debug-ui="true"]) .flow-content-panel{max-height:calc(100svh - 185px); overflow:auto;}
body[data-admin-debug-ui="true"] .abc-admin-technical,
body[data-admin-debug-ui="true"] [data-admin-technical="true"]{display:block;}
body:not([data-admin-debug-ui="true"]) .abc-admin-technical,
body:not([data-admin-debug-ui="true"]) [data-admin-technical="true"],
body:not([data-admin-debug-ui="true"]) .abc-zone-note{display:none !important;}
@media (min-width:1180px){
  .abc-flow-grid,.flow-fields-grid,.abc-form-grid,.form-grid{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
}
@media (max-width:860px){
  .page-shell,.compact-page{padding:8px !important;}
  .abc-home-six-grid,[data-home-flow-layout="role-aware"]{grid-template-columns:1fr !important;}
  .auth-card,.auth-panel-card{width:100% !important; max-width:100% !important; padding:14px !important;}
  body:not([data-admin-debug-ui="true"]) .profile-dashboard-shell,
  body:not([data-admin-debug-ui="true"]) .client-profile-card,
  body:not([data-admin-debug-ui="true"]) .partner-profile-card,
  body:not([data-admin-debug-ui="true"]) .abc-flow-form-shell,
  body:not([data-admin-debug-ui="true"]) .flow-content-panel{max-height:none; overflow:visible;}
}
