/* GebzeUstam V170: shared, progressively enhanced UI shell.
 * This layer deliberately preserves legacy selectors, markup and backend actions.
 * Role-specific refinements are scoped to authenticated application screens.
 */
:root{
  --gx-navy:#0c2340;--gx-navy-2:#112f52;--gx-accent:#ff791b;
  --gx-surface:#fff;--gx-bg:#f3f6fa;--gx-stroke:#e2eaf2;
  --gx-ink:#16283e;--gx-slate:#697b90;--gx-green:#148261;
  --gx-radius:18px;--gx-shadow:0 10px 35px rgba(15,37,65,.055);
}
html{scroll-padding-top:86px}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin){
  --blue:#135a9e;--blue2:#0b487f;--orange:var(--gx-accent);--navy:var(--gx-navy);
  --text:var(--gx-ink);--bg:var(--gx-bg);--border:var(--gx-stroke);
  --radius:var(--gx-radius);--shadow:var(--gx-shadow);
  background:var(--gx-bg);font-feature-settings:'tnum' 1;
}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) :is(.card,.hero,.content-card,.form-card){border-color:var(--gx-stroke);box-shadow:var(--gx-shadow)}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .eyebrow{background:#fff3e9;color:#ad4f15;letter-spacing:.065em}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .btn.primary{background:var(--gx-accent);color:#fff;box-shadow:0 7px 18px rgba(255,121,27,.17)}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .btn.secondary{background:#edf4fa;color:#224d79}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) :is(.btn,button){transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) :is(input,select,textarea){accent-color:var(--gx-accent)}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) :is(button,a,input,select,textarea):focus-visible{outline:3px solid #ffa64b;outline-offset:3px}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .app-site-header{backdrop-filter:none;background:#fff;box-shadow:0 2px 18px rgba(11,30,56,.045);border-bottom:1px solid var(--gx-stroke)}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .brand-mark{background:var(--gx-accent);box-shadow:none;color:#fff;border-radius:12px;font-size:32px;line-height:1}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .brand strong{color:var(--gx-accent)}
.v170-header-actions{display:flex;gap:12px;align-items:center;margin-left:auto;min-width:0}
.v170-header-quick{display:inline-flex;justify-content:center;align-items:center;gap:8px;background:var(--gx-navy);color:#fff;font-weight:800;text-decoration:none;border-radius:12px;font-size:12px;padding:11px 14px;white-space:nowrap;min-height:44px}
.v170-header-quick:hover{background:#194873}
.v170-account{display:flex;align-items:center;gap:8px;max-width:215px}
.v170-account-mark{width:36px;height:36px;display:grid;place-items:center;flex:0 0 36px;border-radius:50%;color:#fff;background:linear-gradient(135deg,#204e7a,#0d2e4e);font-size:13px}
.v170-account>span:last-child{display:grid;min-width:0;line-height:1.3}
.v170-account b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v170-account small{font-size:10px;color:#8190a2;white-space:nowrap}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .app-bell{border:1px solid var(--gx-stroke);background:#f8fafc;border-radius:12px}
body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .page-shell{min-height:calc(100dvh - 175px)}

/* Desktop navigation: existing PHP routes are reused, never duplicated. */
@media (min-width:1100px){
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .app-site-header.is-authenticated{height:78px}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .app-site-header.is-authenticated .nav{
    width:calc(100% - 292px);max-width:none;margin:0 26px 0 266px;height:77px;justify-content:flex-end;
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .app-site-header .brand{
    position:fixed;inset:0 auto auto 0;width:240px;min-width:240px;height:78px;
    padding:0 18px;z-index:91;background:var(--gx-navy);border-bottom:1px solid rgba(255,255,255,.13);
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .brand b{color:#fff;font-size:22px}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .brand strong{color:#ff8b37;font-size:22px}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .brand small{color:#a9c0d9;font-size:10px}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .brand-mark{flex:0 0 38px;width:38px;height:38px;font-size:29px}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app{
    position:fixed;inset:78px auto 0 0;z-index:90;width:240px;min-width:240px;padding:19px 11px 24px;
    display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:4px;overflow-y:auto;
    background:linear-gradient(175deg,#0c2340,#09223f);box-shadow:4px 0 20px rgba(8,29,53,.08);
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app .app-nav-label{
    color:#819fbe;padding:12px 12px 4px;margin:0;font-size:10px;letter-spacing:.14em;
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app a{
    display:flex;align-items:center;min-height:44px;padding:10px 13px;white-space:normal;
    border:1px solid transparent;background:transparent;color:#c9d6e6;font-size:12px;border-radius:12px;
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app a:hover,
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app a:focus-visible{
    background:#1e3c5b;color:#fff;
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app a[aria-current="page"]{
    background:var(--gx-accent);color:#fff;font-weight:850;border-color:transparent;
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app .nav-exit{
    margin-top:auto;color:#c6d2df;border-top:1px solid rgba(255,255,255,.1);
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app .nav-notify{background:rgba(255,255,255,.055)}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .page-shell,
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-footer{
    margin-left:240px;
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .page-shell{
    width:calc(100% - 288px);max-width:1440px;margin-right:auto;margin-left:264px;padding:23px 0 38px;
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-footer>.container{max-width:none;width:calc(100% - 52px)}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) :is(.admin-topbar,.customer-topbar){margin-left:240px}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .admin-topbar .container{width:calc(100% - 52px);max-width:1440px}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .customer-topbar{display:none}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .mobile-bottom-nav{display:none}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .mobile-menu-toggle{display:none}
}

/* Mid-size screens use the complete, accessible flyout menu. */
@media (min-width:801px) and (max-width:1099px){
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .app-site-header .nav{height:70px;min-height:70px;width:calc(100% - 38px);max-width:none;position:relative}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .mobile-menu-toggle{display:flex;position:static;flex:0 0 44px;min-width:44px;min-height:44px;align-items:center;justify-content:center}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app{
    display:none;position:absolute;z-index:120;left:0;right:auto;top:68px;width:min(340px,90vw);max-height:calc(100dvh - 90px);
    padding:12px;background:#fff;border:1px solid var(--gx-stroke);border-radius:16px;
    flex-direction:column;align-items:stretch;overflow-y:auto;box-shadow:0 14px 35px rgba(11,35,62,.18)
  }
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app.open{display:flex}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app a{min-height:46px;white-space:normal}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app a[aria-current="page"]{color:#be5b0b;background:#fff1e8}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .page-shell{width:calc(100% - 36px);max-width:100%;padding-bottom:100px}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) :is(.admin-topbar,.customer-topbar){display:none}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .mobile-bottom-nav{display:flex}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-footer{display:none}
}

/* Unified role page heads and cards */
.role-customer .customer-command-hero,
.role-usta .usta-dashboard-hero-v2,
.role-admin .admin-dashboard-hero,
.role-super_admin .admin-dashboard-hero{
  background:linear-gradient(125deg,#ffffff 42%,#f1f6ff 100%);
  border:1px solid var(--gx-stroke);border-radius:20px;box-shadow:var(--gx-shadow);
}
.role-customer .customer-command-hero{padding:22px 26px;gap:16px}
.role-customer .customer-command-hero h1,
.role-usta .usta-dashboard-hero-v2 h1,
.role-admin .admin-dashboard-hero h1,.role-super_admin .admin-dashboard-hero h1{
  color:var(--gx-navy);font-size:clamp(24px,3vw,32px);letter-spacing:-.04em;line-height:1.16;
}
.role-usta .usta-dashboard-hero-v2 h1{margin:12px 0 8px}
.role-admin .admin-dashboard-hero,.role-super_admin .admin-dashboard-hero{padding:23px 26px}
.role-admin .admin-dashboard-hero .admin-page-head h1,.role-super_admin .admin-dashboard-hero .admin-page-head h1{margin:7px 0 7px;font-size:30px}
.role-admin .admin-dashboard-hero .admin-page-head p,.role-super_admin .admin-dashboard-hero .admin-page-head p{font-size:13px;margin:0}
.v170-admin-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:14px 0 12px}
.v170-admin-actions a{display:inline-flex;min-height:43px;align-items:center;gap:7px;border-radius:11px;background:#fff;border:1px solid #dbe5ef;padding:9px 13px;text-decoration:none;color:#274566;font-size:12px;font-weight:800}
.v170-admin-actions a:first-child{background:var(--gx-accent);color:#fff;border-color:var(--gx-accent)}
.role-admin .admin-dashboard-toolbar,.role-super_admin .admin-dashboard-toolbar{display:flex;flex-wrap:wrap;gap:8px;color:#7b8b9d;font-size:11px}
.role-admin .admin-stat-grid,.role-super_admin .admin-stat-grid{margin:15px 0;gap:10px}
.role-admin .admin-stat-card,.role-super_admin .admin-stat-card{border:1px solid var(--gx-stroke);border-radius:16px;background:#fff;min-width:0;padding:18px;box-shadow:var(--gx-shadow)}
.role-admin .admin-stat-card strong,.role-super_admin .admin-stat-card strong{color:#132e4c;font-size:28px}
.v170-admin-modules{border:1px solid var(--gx-stroke);border-radius:18px;background:#fff;margin:12px 0 20px;box-shadow:var(--gx-shadow)}
.v170-admin-modules summary{list-style:none;cursor:pointer;padding:16px 19px;font-size:13px;font-weight:850;display:flex;align-items:center;justify-content:space-between;color:#1c3c60;min-height:52px}
.v170-admin-modules summary::-webkit-details-marker{display:none}
.v170-admin-modules[open] summary{border-bottom:1px solid #edf0f5}
.v170-admin-modules .admin-nav-grid{padding:15px;gap:10px}
.v170-admin-modules .admin-nav-card{background:#f8fafc;min-width:0;border-radius:14px}
.v170-admin-modules .admin-nav-card b{font-size:12px}
.v170-admin-modules .admin-nav-card small{font-size:10px}
.role-usta .usta-welcome,.role-usta .usta-mobile-app-home{margin-bottom:14px}
.role-usta .usta-mobile-app-home{border:1px solid var(--gx-stroke);background:#fff;border-radius:18px;box-shadow:var(--gx-shadow)}
.role-usta .usta-live-workspace{margin-top:15px}
.role-usta .usta-job-card{background:#fff;border-radius:18px;box-shadow:var(--gx-shadow)}
.role-usta .usta-quick-stats{gap:10px}
.role-usta .usta-stat-card{background:#fff;border-radius:16px}
.role-usta .usta-stat-card.attention{background:#fff8ef}
.role-usta .usta-filters button.active{background:var(--gx-navy);color:#fff;border-color:var(--gx-navy)}
.role-usta .usta-offer-finance-preview{background:#f4f8fd;border-color:#dce8f5}
.role-usta .usta-fast-actions .btn.primary{background:#159766;color:#fff}
.role-usta .referral-promo-v1{margin-top:18px}
.role-customer .customer-workspace{margin-top:14px;border-radius:19px}
.role-customer .customer-job-v164{border-radius:17px}
.role-customer .customer-job-v164.needs-action{border-color:#ffcf9f;box-shadow:0 8px 26px rgba(239,127,33,.09)}
.role-customer .customer-job-number{background:#fff0e4;color:#b85816}
.role-customer .customer-job-status.action{background:#fff1e1;color:#a5510c}
.role-customer .customer-job-footer{background:#fafbfd}
.role-customer .customer-job-meta{background:#e7eef6}
.role-customer .customer-command-actions .btn{min-height:45px}
.v170-stage-list{padding:0 15px 12px;margin:0;list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.v170-stage-list li{position:relative;display:flex;align-items:center;gap:7px;min-width:0;padding:7px 5px;border-top:2px solid #dbe4ee;color:#8b9caf}
.v170-stage-list li span{flex:0 0 21px;height:21px;width:21px;display:grid;place-items:center;border-radius:50%;border:1px solid #dbe4ee;background:#f4f7fa;color:#71829a;font-size:11px;font-weight:800}
.v170-stage-list li small{font-size:10px;line-height:1.25;font-weight:700;min-width:0}
.v170-stage-list li.is-done{border-color:#1c9a77;color:#19795d}
.v170-stage-list li.is-done span{background:#eaf9f3;border-color:#bde8d7;color:#148261}
.v170-stage-list li.is-current{border-color:var(--gx-accent);color:#af540d}
.v170-stage-list li.is-current span{background:#fff0e1;color:#ba601b;border-color:#ffd6ad}
/* Screen-specific enhancements for existing message, notification and operations views. */
.role-admin :is(.admin-list-row,.priority-list a),.role-super_admin :is(.admin-list-row,.priority-list a){min-height:52px}
.role-customer :is(.customer-job-footer a,.customer-command-actions a),.role-usta :is(.usta-finance-shortcut,.usta-filters button){min-height:44px}
.role-usta :is(.usta-mobile-action,.usta-job-card .btn){touch-action:manipulation}

@media(max-width:1099px){
  .v170-header-quick{display:none}
  .v170-account{display:none}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .app-site-header.is-authenticated .brand-mark{background:var(--gx-accent)}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-menu-app a[aria-current="page"]{background:#fff0e5;color:#be5b13}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .mobile-bottom-nav{box-shadow:0 -5px 22px rgba(16,41,69,.065);border-top:1px solid #e0e9f1;background:#fff}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .mobile-bottom-nav a[aria-current="page"]{color:#d76012;background:#fff4ec}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .mobile-bottom-nav .bottom-main{color:#ad4e13}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .mobile-bottom-nav .bottom-main span{background:var(--gx-accent);box-shadow:0 6px 17px rgba(255,121,27,.25)}
  .v170-admin-modules .admin-nav-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:800px){
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-header .brand b,
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .site-header .brand strong{font-size:19px}
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) .page-shell{min-height:calc(100dvh - 155px);padding-bottom:102px}
  .role-customer .customer-command-hero{padding:17px}
  .role-customer .customer-workspace{margin-top:12px}
  .role-customer .customer-job-top{padding:13px 13px 9px}
  .role-customer .customer-job-top h3{font-size:16px}
  .v170-stage-list{gap:3px;padding:0 10px 11px}
  .v170-stage-list li{display:grid;align-content:start;justify-items:center;text-align:center;gap:5px;padding:6px 1px 0}
  .v170-stage-list li small{font-size:9px}
  .role-usta .usta-workspace-head{align-items:flex-start}
  .role-usta .usta-live-workspace{margin-top:12px}
  .role-admin .admin-dashboard-hero,.role-super_admin .admin-dashboard-hero{padding:17px}
  .v170-admin-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .v170-admin-actions a{justify-content:center;min-width:0}
  .v170-admin-actions a:first-child{grid-column:1/-1}
  .v170-admin-modules .admin-nav-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v170-admin-modules .admin-nav-card{min-height:70px;align-items:flex-start;padding:12px}
}
@media(max-width:380px){
  .v170-stage-list li small{font-size:8px}
  .role-customer .customer-job-meta b{font-size:11px}
  .v170-admin-modules .admin-nav-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  body:is(.role-customer,.role-usta,.role-admin,.role-super_admin) :is(.btn,button){transition:none!important}
}
