.auth-top-action{border:1px solid #cdd9ee;background:#fff;border-radius:9px;color:#173b72;font:700 12px/1 "DM Sans",sans-serif;padding:9px 13px;cursor:pointer}.auth-top-action:hover{border-color:#377cff;background:#f4f8ff}.auth-top-action:disabled{cursor:wait;opacity:.65}.auth-page{min-height:calc(100vh - 96px);display:grid;place-items:center;padding:40px 22px;background:linear-gradient(145deg,#f4f7ff,#f9fbff)}.auth-card{width:min(100%,420px);background:#fff;border:1px solid #dce5f5;border-radius:20px;padding:34px;box-shadow:0 20px 48px rgba(26,66,132,.12)}.auth-kicker{display:block;color:#2475ee;font-size:11px;font-weight:800;letter-spacing:.11em}.auth-card h1{margin:9px 0 7px;color:#09295a;font-size:29px}.auth-card>p{margin:0 0 25px;color:#647693;line-height:1.55}.auth-card form{display:grid;gap:17px}.auth-card label{display:grid;gap:7px;color:#18355f;font-size:13px;font-weight:700}.auth-card input{box-sizing:border-box;width:100%;border:1px solid #cad7eb;border-radius:10px;padding:12px 13px;background:#fff;color:#102d56;font:500 14px "DM Sans",sans-serif}.auth-card input:focus{outline:3px solid rgba(45,119,246,.16);border-color:#397df2}.auth-primary{border:0;border-radius:10px;padding:13px;background:#2475ee;color:white;font:800 14px "DM Sans",sans-serif;cursor:pointer}.auth-primary:hover{background:#1765d8}.auth-primary:disabled{opacity:.7;cursor:wait}.auth-form-error{min-height:18px!important;margin:0!important;color:#c62d42!important;font-size:12px!important;line-height:1.35!important}.auth-message{padding:10px 12px;border-radius:9px;margin:0 0 17px;font-size:13px}.auth-message.error{background:#fff1f3;color:#b62940;border:1px solid #ffd6dd}.auth-back{width:100%;margin-top:16px;background:transparent;border:0;color:#366bb9;font:700 13px "DM Sans",sans-serif;cursor:pointer}@media(max-width:640px){.auth-page{min-height:calc(100vh - 70px);padding:22px 14px}.auth-card{padding:26px 20px;border-radius:16px}.top-actions .auth-top-action{display:none}}

/* The protected shell stays unavailable until auth-ui has completed its
   server session check. This is presentation hardening; protected APIs remain
   server-authorised in PHP. */
.app-shell[data-auth-state="checking"]>.sidebar,.app-shell[data-auth-state="checking"]>.sidebar-backdrop,.app-shell[data-auth-state="checking"] .topbar,.app-shell[data-auth-state="signed-out"]>.sidebar,.app-shell[data-auth-state="signed-out"]>.sidebar-backdrop,.app-shell[data-auth-state="signed-out"] .topbar{display:none!important}.app-shell[data-auth-state="checking"] .main-content,.app-shell[data-auth-state="signed-out"] .main-content{width:100%;margin:0}.app-shell[data-auth-state="checking"] #app,.app-shell[data-auth-state="signed-out"] #app{min-height:100vh;padding:0;background:linear-gradient(145deg,#f4f7ff,#f9fbff)}.app-shell[data-auth-state="checking"] #app>:not(.auth-page),.app-shell[data-auth-state="signed-out"] #app>:not(.auth-page){display:none!important}.app-shell[data-auth-state="checking"] .auth-page,.app-shell[data-auth-state="signed-out"] .auth-page{min-height:100vh}

/* Header profile: retains the existing topbar layout while exposing real account data. */
.header-profile-trigger{display:flex;align-items:center;gap:10px;border:0;background:transparent;padding:2px;cursor:pointer;text-align:left;color:inherit}.header-profile-trigger:focus-visible{outline:3px solid rgba(44,126,242,.22);border-radius:12px}.header-profile-trigger .admin-name{min-width:0}.profile-backdrop{position:fixed;z-index:100;inset:0;display:grid;place-items:center;padding:18px;background:rgba(8,27,60,.38);backdrop-filter:blur(2px)}.profile-modal{width:min(640px,calc(100vw - 32px));max-height:min(760px,calc(100vh - 32px));overflow:auto;border:1px solid #cfe4fb;border-radius:18px;background:#fff;padding:24px;box-shadow:0 28px 65px rgba(8,35,78,.3);color:#132e59}.profile-loading{width:min(390px,calc(100vw - 32px));padding:30px;text-align:center;font-weight:700;color:#3568a5}.profile-modal-title,.profile-edit-heading{display:flex;align-items:center;gap:13px}.profile-modal-avatar{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:linear-gradient(145deg,#22a3ff,#4936ef);box-shadow:0 8px 17px rgba(40,96,232,.23);color:#fff;font-weight:800}.store-logo-avatar{overflow:hidden;background:#fff!important;padding:3px}.store-logo-avatar-image{display:block;width:100%;height:100%;object-fit:contain}.profile-modal-title span,.profile-store header span,.profile-edit-heading span{display:block;color:#287ee8;font-size:10px;font-weight:800;letter-spacing:.1em}.profile-modal h2{margin:4px 0 2px;color:#112b5d;font:800 23px Manrope,"DM Sans",sans-serif}.profile-modal-title p,.profile-edit-heading p{margin:0;color:#6c80a0;font-size:12px}.profile-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:20px 0 14px}.profile-summary div,.profile-store,.profile-modal form section{border:1px solid #dceafa;border-radius:11px;background:linear-gradient(145deg,#fff,#f7fbff);padding:12px}.profile-summary span,.profile-detail-list dt{display:block;color:#7285a3;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.profile-summary b{display:block;overflow-wrap:anywhere;margin-top:5px;color:#183760;font-size:11px}.profile-store header h3,.profile-modal form h3{margin:5px 0 0;color:#18345f;font:800 15px Manrope,"DM Sans",sans-serif}.profile-detail-list{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:15px 0 0}.profile-detail-list .wide{grid-column:span 2}.profile-detail-list dd{margin:4px 0 0;overflow-wrap:anywhere;color:#233e65;font-size:11px}.profile-modal footer{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.profile-primary,.profile-secondary{min-height:37px;border-radius:9px;padding:0 14px;font:800 12px "DM Sans",sans-serif;cursor:pointer}.profile-primary{border:0;background:linear-gradient(106deg,#198cff,#4936ed);color:#fff;box-shadow:0 8px 16px rgba(41,84,231,.2)}.profile-primary:disabled{cursor:not-allowed;opacity:.55}.profile-secondary{border:1px solid #cfe1f6;background:#fff;color:#1d62b1}.profile-close{margin-left:auto;width:34px;height:34px;border:1px solid #d4e3f5;border-radius:9px;background:#fff;color:#315a8d;font-size:23px;line-height:1;cursor:pointer}.profile-edit-heading{align-items:flex-start;margin-bottom:18px}.profile-modal form{display:grid;gap:13px}.profile-modal form section{display:grid;gap:10px}.profile-modal label{display:grid;gap:5px;color:#3b587e;font-size:10px;font-weight:800}.profile-modal input,.profile-modal textarea{width:100%;border:1px solid #cfdfef;border-radius:8px;padding:9px 10px;background:#fff;color:#1c365c;font:500 12px "DM Sans",sans-serif}.profile-modal textarea{min-height:64px;resize:vertical}.profile-modal input:focus,.profile-modal textarea:focus{outline:3px solid rgba(54,132,244,.15);border-color:#3a89f5}.profile-modal input:disabled{background:#f3f7fb;color:#71809a}.profile-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.profile-form-grid .wide{grid-column:span 2}.profile-form-error{min-height:16px;margin:0;color:#c2394b;font-size:11px;font-weight:700}.profile-readonly,.profile-empty{margin:14px 0 0;color:#6c7e98;font-size:12px;line-height:1.5}@media(max-width:640px){.header-profile-trigger .admin-name{display:none}.profile-modal{padding:18px}.profile-summary,.profile-detail-list,.profile-form-grid{grid-template-columns:1fr}.profile-detail-list .wide,.profile-form-grid .wide{grid-column:auto}.profile-modal footer{flex-wrap:wrap}.profile-modal footer button{flex:1}}
/* Expanded first-store setup fields. */
.profile-setup-note,.profile-store-help{margin:9px 0 0;color:#3975a8;font-size:11px;line-height:1.5}.profile-store-help{grid-column:1/-1}.profile-modal form section h3{margin-bottom:0}.profile-modal form section>p{margin:0}.profile-modal input[type="date"]{min-height:37px}
