/* GebzeUstam V222.9: common responsive design layer. Loaded after prior version assets. */
:root{--gu29-ink:#132b4c;--gu29-blue:#174a81;--gu29-orange:#ff842b;--gu29-border:#dfe8f1;--gu29-radius:16px}
:where(.btn, .nav a, .customer-command a, .usta-live-workspace button, .gu-wa-launch){touch-action:manipulation}
:where(.content-card,.card,.customer-workspace,.usta-job-card){min-width:0}
:where(.app-body) :is(input,select,textarea){max-width:100%}
:where(.app-body) :is(.content-card,.card,.customer-command,.v226-panel,.usta-live-workspace){overflow-wrap:anywhere}
/* phone/tablet category list: 2 columns on phones, 3 on small tablets; no 9px labels */
@media (min-width:521px) and (max-width:800px){
  .main-category-grid-v4{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
  .main-category-card-v4 b{font-size:13px!important;line-height:1.32!important;overflow-wrap:anywhere}
  .main-category-card-v4{min-height:106px!important;padding:13px 8px!important}
}
@media (max-width:520px){
  .main-category-grid-v4{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .main-category-card-v4{min-height:105px!important;padding:13px 8px!important;border-radius:15px!important;gap:6px}
  .main-category-card-v4 b{font-size:14px!important;line-height:1.25!important;letter-spacing:0!important;overflow-wrap:anywhere;text-align:center}
  .main-category-icon-v4{width:46px!important;height:46px!important}
  .main-category-icon-v4 svg{width:24px!important;height:24px!important}
  .home-hero-v4{min-height:758px!important}
  .hero-photo-v29,.hero-photo-overlay-v4{height:700px!important}
  .hero-spotlight-customer{top:291px!important}
  .hero-spotlight-pro{top:480px!important}
  .hero-spotlight{height:173px!important}
  .hero-search-v4{bottom:13px!important}
  .hero-copy-v4 h1{font-size:clamp(27px,8vw,33px)!important}
}
@media(max-width:350px){
  .main-category-grid-v4{gap:8px!important}
  .main-category-card-v4 b{font-size:13px!important}
  .hero-spotlight-customer{top:303px!important}
  .hero-spotlight-pro{top:487px!important}
}
/* Avoid horizontal scrolling from large headings, badges, and multi-action control rows */
@media(max-width:800px){
  .role-customer .gu-customer-layout,.role-customer .gu-customer-main,.role-customer .gu-customer-aside{min-width:0;width:100%;max-width:100%}
  .role-customer .customer-command-hero{padding:15px!important;gap:12px}
  .role-customer .customer-command-actions{flex-wrap:wrap}
  .role-customer .customer-command-actions .btn{min-height:46px;white-space:normal}
  .role-customer .customer-quickbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .role-usta .usta-job-card{padding:14px;max-width:100%}
  .role-usta .usta-quick-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .role-usta .usta-stat-card{min-height:98px;padding:12px}
  .role-usta .usta-stat-card strong{font-size:26px}
  .role-usta .usta-stat-card:last-child{grid-column:1/-1}
  .role-usta .usta-job-card>.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .role-usta .usta-fast-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .role-usta .usta-fast-actions .btn{min-height:48px;white-space:normal}
  .role-usta .usta-status-pills{flex-wrap:wrap}
  .role-usta .usta-pill{max-width:100%;white-space:normal}
  :where(.role-admin,.role-super_admin) .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :where(.role-admin,.role-super_admin) .admin-page-head{flex-wrap:wrap}
}
@media(max-width:540px){
 :where(.role-admin,.role-super_admin) .filter-grid{grid-template-columns:minmax(0,1fr)!important}
 :where(.role-admin,.role-super_admin) .filter-grid :is(input,select,button,.btn){width:100%;min-width:0;min-height:44px}
 :where(.role-admin,.role-super_admin) .filter-actions{display:flex;flex-wrap:wrap;gap:8px}
 :where(.role-admin,.role-super_admin) .section-head{flex-wrap:wrap;gap:10px}
 :where(.role-admin,.role-super_admin) :is(.v226-action,.actions){flex-wrap:wrap}
}
/* Customer referral callout before the active jobs; duplicate sidebar banner kept only on desktop. */
.v229-mobile-referral{display:none}
@media(max-width:800px){
  .v229-mobile-referral{display:flex;align-items:center;gap:12px;padding:14px 15px;border-radius:17px;background:linear-gradient(117deg,#123253,#1b5281);color:#fff!important;text-decoration:none;box-shadow:0 9px 22px #142f5224;min-height:77px}
  .v229-referral-icon{width:44px;height:44px;display:grid;place-items:center;background:#ffffff29;border-radius:12px;font-size:25px;flex:0 0 44px}
  .v229-referral-text{display:grid;gap:3px;flex:1;min-width:0}
  .v229-referral-text strong{font-size:15px;line-height:1.3}
  .v229-referral-text small{font-size:12px;line-height:1.4;color:#d5e9fa}
  .v229-referral-arrow{font-size:24px;flex:0 0 auto}
  .role-customer .gu-customer-aside>.gu-referral-banner{display:none}
  .role-customer .gu-customer-aside>.gu-side-quickactions{order:0}
  .role-customer .gu-customer-aside>.gu-loyalty{order:1}
  .role-customer .gu-customer-aside>.customer-quickbar{order:2}
}
/* Admin presentation: card rows are enhanced only when matching <th> labels are available. */
@media(max-width:800px){
  :where(.role-admin,.role-super_admin) .table-wrap:has(>table.v229-mobile-cards){overflow:visible!important;max-width:100%;border:0!important;box-shadow:none!important;background:transparent!important}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards{display:block!important;min-width:0!important;width:100%!important;border:0!important;background:transparent!important}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards thead{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tbody{display:grid!important;gap:12px!important;max-width:100%!important}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row{display:block!important;min-width:0!important;padding:10px!important;background:#fff!important;border:1px solid var(--gu29-border)!important;border-radius:16px!important;box-shadow:0 5px 16px #142b4b0a!important}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row>td{display:grid!important;grid-template-columns:minmax(96px,35%) minmax(0,1fr);gap:10px!important;align-items:start!important;text-align:left!important;min-width:0!important;max-width:100%!important;min-height:41px!important;padding:10px 5px!important;border:0!important;border-bottom:1px solid #ebeff5!important;white-space:normal!important;overflow-wrap:anywhere!important}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row>td:last-child{border-bottom:0!important}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row>td::before{content:attr(data-label);display:block;color:#60748d;font-size:12px;font-weight:800;line-height:1.4;text-align:left;min-width:0;overflow-wrap:anywhere}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row>td :is(form,details,.actions){max-width:100%;min-width:0}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row>td :is(input,select,textarea){max-width:100%;min-width:0;min-height:44px;font-size:16px;box-sizing:border-box}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row>td :is(.btn,button){min-height:44px;white-space:normal}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row>td form.inline-form{display:grid!important;gap:6px;margin-bottom:7px}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-empty-row{display:block;width:100%;border:1px solid var(--gu29-border);border-radius:14px;padding:12px;background:#fff}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-empty-row>td{display:block!important;border:0!important;padding:8px!important}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-empty-row>td::before{content:none!important}
}
@media(max-width:380px){
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row>td{grid-template-columns:minmax(0,1fr)!important;gap:4px!important}
  :where(.role-admin,.role-super_admin) table.v229-mobile-cards tr.v229-card-row>td::before{font-size:11px}
}
/* Non-enhanced admin tables retain horizontal overflow with visible hint */
@media(max-width:800px){
  :where(.role-admin,.role-super_admin) .table-wrap:not(:has(>table.v229-mobile-cards)){overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  :where(.role-admin,.role-super_admin) .table-wrap:not(:has(>table.v229-mobile-cards))::before{content:'Tabloyu yana kaydırarak diğer alanları görüntüleyin →';display:block;position:sticky;left:0;max-width:260px;padding:7px 10px;color:#62768c;font-size:11px}
}
/* Larger tap and focus targets across auth and admin forms */
@media(hover:none) and (pointer:coarse){
  :where(.app-body) :is(.btn,button:not([hidden]),a.gu-referral-banner-link){min-height:44px}
  :where(.app-body) input:not([type=checkbox]):not([type=radio]),:where(.app-body) select{min-height:44px}
}
@media(prefers-reduced-motion:reduce){.v229-mobile-referral{scroll-behavior:auto}}
/* Executive, e-document and autopilot summary harmonization. Existing financial meaning is unchanged. */
@media(max-width:800px){
 :where(.role-admin,.role-super_admin) .v225-ceo-two{grid-template-columns:minmax(0,1fr)!important}
 :where(.role-admin,.role-super_admin) .v225-ceo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px}
 :where(.role-admin,.role-super_admin) .v225-ceo-card{padding:13px;border-radius:15px;min-width:0}
 :where(.role-admin,.role-super_admin) .v225-ceo-value{font-size:clamp(20px,4vw,26px);overflow-wrap:anywhere}
 :where(.role-admin,.role-super_admin) .v225-ceo-funnel{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 :where(.role-admin,.role-super_admin) .v225-edoc-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 :where(.role-admin,.role-super_admin) .v225-edoc-tile{min-width:0;padding:13px}
 :where(.role-admin,.role-super_admin) .v225-edoc-flow{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 :where(.role-admin,.role-super_admin) .v225-edoc-flow>div{min-width:0;padding:12px}
 :where(.role-admin,.role-super_admin) .v226-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 :where(.role-admin,.role-super_admin) .v226-form{grid-template-columns:minmax(0,1fr)!important}
 :where(.role-admin,.role-super_admin) .v226-action{display:flex;gap:8px;flex-wrap:wrap}
 :where(.role-admin,.role-super_admin) .v226-action>*{min-height:44px}
 :where(.role-admin,.role-super_admin) .content-card :is(h1,h2,h3){overflow-wrap:anywhere}
}
@media(max-width:440px){
 :where(.role-admin,.role-super_admin) .v225-ceo-grid{grid-template-columns:minmax(0,1fr)!important}
 :where(.role-admin,.role-super_admin) .v225-edoc-cards{grid-template-columns:minmax(0,1fr)!important}
 :where(.role-admin,.role-super_admin) .v225-edoc-flow{grid-template-columns:minmax(0,1fr)!important}
 :where(.role-admin,.role-super_admin) .v225-ceo-funnel>div{padding:12px 8px}
 :where(.role-admin,.role-super_admin) .v226-kpis{grid-template-columns:minmax(0,1fr)!important}
}
