/* Ekreon Studio Alpha 10 — Signature Blue component polish
 * CSS-only upgrade on Alpha 9. Existing route handlers, permissions and tokens remain unchanged.
 * Intent: understated depth, a coherent control rhythm, strong focus/disabled states,
 * consistent light/dark/blue rendering. No network fonts, UI CDN, or JavaScript libraries.
 */
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) {
  --premium-primary:#155ccb;
  --premium-primary-top:#287bf1;
  --premium-primary-bottom:#1255bd;
  --premium-border:#cbd8e9;
  --premium-input:#ffffff;
  --premium-elevated:var(--surface,#ffffff);
  --premium-inset:rgba(22,47,84,.035);
  --premium-ring:rgba(30,100,211,.18);
  --premium-btn-shadow:0 1px 0 rgba(255,255,255,.22) inset,0 2px 4px rgba(14,59,127,.14),0 7px 18px rgba(14,59,127,.11);
  --premium-soft-shadow:0 1px 2px rgba(20,41,77,.055),0 8px 22px rgba(20,41,77,.055);
  --premium-float-shadow:0 18px 48px rgba(15,35,66,.16),0 3px 10px rgba(15,35,66,.06);
}
body.theme-studio-dark{
  --premium-primary:#347cdb;
  --premium-primary-top:#438ff0;
  --premium-primary-bottom:#276cbe;
  --premium-border:#425a77;
  --premium-input:#192b42;
  --premium-elevated:#192b42;
  --premium-inset:rgba(2,10,23,.22);
  --premium-ring:rgba(106,171,255,.22);
  --premium-btn-shadow:0 1px 0 rgba(255,255,255,.22) inset,0 2px 5px rgba(3,10,22,.36),0 10px 23px rgba(5,14,30,.23);
  --premium-soft-shadow:0 1px 3px rgba(0,0,0,.15),0 10px 27px rgba(0,0,0,.18);
  --premium-float-shadow:0 20px 55px rgba(0,0,0,.42),0 3px 11px rgba(0,0,0,.24);
}
body.theme-studio-blue{--premium-primary:#115bbf;--premium-primary-top:#277de3;--premium-primary-bottom:#1256b4;--premium-ring:rgba(15,94,199,.19)}

/* Primary, secondary and destructive actions: tactile without neon or busy animation. */
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button,input.button){
  box-sizing:border-box;max-width:100%;min-height:42px;
  border:1px solid var(--premium-primary-bottom);border-radius:10px;
  padding:10px 17px;
  background:linear-gradient(180deg,var(--premium-primary-top),var(--premium-primary-bottom));
  color:#fff;font-size:13px;font-weight:750;line-height:1.35;letter-spacing:-.005em;
  text-align:center;text-decoration:none;
  box-shadow:var(--premium-btn-shadow);
  transition:background .16s ease,box-shadow .16s ease,transform .16s ease,border-color .16s ease;
  cursor:pointer;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button,input.button):hover:not(:disabled):not([aria-disabled="true"]){
  background:linear-gradient(180deg,color-mix(in srgb,var(--premium-primary-top) 90%,white),var(--premium-primary-bottom));
  border-color:var(--premium-primary);box-shadow:0 1px 0 #ffffff47 inset,0 3px 8px #103b7729,0 10px 24px #103b771c;
  transform:translateY(-1px);
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button,input.button):active:not(:disabled){transform:translateY(1px);box-shadow:0 1px 3px #082b612a inset,0 1px 3px #082b611c;}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(.button.button-small,.button-small.button){min-height:38px;padding:9px 15px;font-size:12px;border-radius:9px}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button).button-ghost{
  background:linear-gradient(180deg,var(--surface,#fff),var(--surface-2,#f8fafd));
  color:var(--text);border-color:var(--premium-border);
  box-shadow:0 1px 0 #ffffff66 inset,0 1px 3px #223b6015,0 4px 11px #223b600d;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button).button-ghost:hover:not(:disabled):not([aria-disabled="true"]){
  background:var(--surface-2);color:var(--text);border-color:color-mix(in srgb,var(--accent) 46%,var(--premium-border));
  box-shadow:0 1px 0 #ffffff45 inset,0 3px 12px #163e7523;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button).button-danger{
  background:linear-gradient(180deg,#fff3f4,#ffe7eb);color:#992443;border-color:#e8abb8;
  box-shadow:0 1px 0 #fff inset,0 2px 5px #8f2f4d18;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button).button-danger:hover:not(:disabled):not([aria-disabled="true"]){background:#ffe3e9;color:#84213b;border-color:#d58c9b;box-shadow:0 4px 12px #8f2f4d23}
body.theme-studio-dark :is(a.button,button.button).button-danger{background:linear-gradient(180deg,#543046,#442539);color:#ffccd9;border-color:#835369;box-shadow:0 1px 0 #ffffff10 inset,0 2px 6px #0003}
body.theme-studio-dark :is(a.button,button.button).button-danger:hover:not(:disabled):not([aria-disabled="true"]){background:#62374e;color:#fff;border-color:#ad6985}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button,input.button):disabled,
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button,input.button)[aria-disabled="true"]{
  opacity:.5;cursor:not-allowed;transform:none;box-shadow:none;filter:saturate(.55);
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button,input.button):focus-visible{
  outline:2px solid var(--premium-primary);outline-offset:3px;box-shadow:0 0 0 4px var(--premium-ring),var(--premium-btn-shadow);
}

/* A real form rhythm—action rows never crash into fields or helper copy. */
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .studio-enquiry-action-form{display:block}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .studio-enquiry-action-form > .field{margin-top:18px}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .studio-enquiry-action-form > .eyebrow{margin-bottom:18px!important}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .studio-enquiry-action-form > p{line-height:1.65;margin:10px 0 15px}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .studio-enquiry-form-actions{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;
  margin-top:24px;padding-top:20px;border-top:1px solid var(--line);
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(form.form-card,form.profile-card) > .button:last-child{
  margin-top:20px;align-self:flex-start;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(form.form-card,form.profile-card) > .field + .field{margin-top:16px}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .field small{line-height:1.5}

/* Inputs and dropdowns, with a purposeful surface and clear current focus. */
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content .field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea){
  min-height:44px;border-radius:10px;border:1px solid var(--premium-border);
  background-color:var(--premium-input);color:var(--text);
  box-shadow:0 1px 2px var(--premium-inset) inset,0 1px 0 #ffffff24;
  transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content .field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea):hover:not(:disabled){
  border-color:color-mix(in srgb,var(--accent) 30%,var(--premium-border));
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content .field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea):focus-visible{
  outline:2px solid var(--premium-primary);outline-offset:1px;
  border-color:var(--accent);box-shadow:0 0 0 4px var(--premium-ring);
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content .field select{
  appearance:none;-webkit-appearance:none;padding-right:39px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b7192' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 13px center;background-size:14px;
}
body.theme-studio-dark .app-content .field select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23bbd2ee' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content :is(input[type="checkbox"],input[type="radio"]){accent-color:var(--premium-primary);cursor:pointer}

/* Consistent elevated cards without changing cards into clickable surfaces. */
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content :is(.form-card,.profile-card,.portal-section,.analytics-panel,.settings-card,.studio-client-panel,.filter-panel){
  border-color:var(--line);box-shadow:var(--premium-soft-shadow);
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content :is(a.settings-card,a.account-hub-tile,a.user-directory-card){
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content :is(a.settings-card,a.account-hub-tile,a.user-directory-card):hover{
  transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 38%,var(--line));box-shadow:0 5px 18px #18427a18,0 16px 32px #18427a0b;
}
body.theme-studio-dark .app-content :is(a.settings-card,a.account-hub-tile,a.user-directory-card):hover{box-shadow:0 10px 26px #0006}

/* Popovers & toolbars: consistent geometry, elevation and affordance. */
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(.theme-popover-trigger,.topbar-action){
  border-radius:10px;border:1px solid var(--premium-border);box-shadow:0 1px 0 #ffffff35 inset,0 2px 5px #152d4f0f;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(.theme-popover-trigger,.topbar-action):hover{border-color:color-mix(in srgb,var(--accent) 42%,var(--premium-border));box-shadow:0 2px 9px #152d4f25;transform:translateY(-1px)}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(.theme-popover-menu,.global-search-results){
  border-radius:14px;border:1px solid var(--premium-border);box-shadow:var(--premium-float-shadow);padding:6px;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .theme-menu-item{border-radius:8px;margin:2px 0;transition:background .13s ease,color .13s ease}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content .filter-panel > summary{cursor:pointer;border-radius:10px}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content .filter-panel > summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content :is(.rich-toolbar button,.placeholder-chip){
  border-radius:9px;box-shadow:0 1px 3px #1a38581c;transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content :is(.rich-toolbar button,.placeholder-chip):hover{border-color:var(--accent);transform:translateY(-1px)}

/* Dialogs use consistent corners and overlay depth, but native keyboard behaviour remains. */
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .studio-force-close-dialog{
  border-radius:19px;border:1px solid var(--premium-border);box-shadow:0 24px 72px #07152c50,0 7px 18px #07152c24;
}
body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .studio-force-close-dialog .studio-force-close-actions{padding-top:16px;border-top:1px solid var(--line);margin-top:25px}

@media(max-width:560px){
 body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .studio-enquiry-form-actions .button{min-height:42px}
 body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) .app-content :is(form.form-card,form.profile-card) > .button:last-child{max-width:100%}
}
@media(prefers-reduced-motion:reduce){
 body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button,input.button,.theme-popover-trigger,.topbar-action,.theme-menu-item,.settings-card,.account-hub-tile,.user-directory-card){transition:none!important}
 body:is(.theme-studio,.theme-studio-dark,.theme-studio-blue) :is(a.button,button.button,input.button):hover{transform:none!important}
}

/* Public pages deliberately retain Ekreon Blue. Only actions are polished. */
body.studio-public-body.studio-public-blue :is(a.button,button.button){
  border-radius:11px;box-shadow:0 1px 0 #ffffff50 inset,0 4px 9px #06255026,0 13px 25px #06255014;
  transition:box-shadow .16s ease,transform .16s ease,background .16s ease;
}
body.studio-public-body.studio-public-blue :is(a.button,button.button):hover{transform:translateY(-1px);box-shadow:0 1px 0 #ffffff50 inset,0 6px 17px #06255037}
body.auth-studio .auth-shell :is(button.button,a.button){border-radius:11px;box-shadow:0 1px 0 #ffffff45 inset,0 4px 10px #1c57a52b,0 12px 22px #1c57a51a}
