@media(max-width:768px) {
  body { -webkit-overflow-scrolling:touch; }
  .tbl-wrap, .afis-panel-controls { -webkit-overflow-scrolling:touch; }
  .hdr { padding:0 1rem; }
  .hdr-title { font-size:14px; }
  .hdr-sub { display:none; }
  .wrap { padding:1rem; }
  .tabs { width:100%; overflow-x:auto; }
  .tab { flex:1; justify-content:center; padding:8px 10px; font-size:11px; }
  .settings-row { grid-template-columns:1fr; }
  table { font-size:12px; }
  th, td { padding:8px 6px; }
  .export-bar { flex-direction:column; }
  .export-bar .btn { width:100%; justify-content:center; }
  .help-btn, .company-btn { bottom:16px; }
  .help-btn { right:16px; }
  .company-btn { bottom:64px; right:16px; }
  .afis-overlay.visible { flex-direction:column; padding:1rem; overflow-y:auto; align-items:center; }
  .afis-preview-wrap { width:100%; }
  #afisCanvas { width:240px; height:339px; }
  .afis-modal { width:100%; }
}

@media(max-width:480px) {
  .hdr-icon { display:none; }
  .tabs { gap:0; }
  .tab { padding:8px 10px; font-size:11px; }
  .card-hdr h3 { font-size:12px; }
}

@media(max-width:480px) {
  .tab { font-size:10px; padding:7px 8px; }
}

@media(max-width:640px) {
  .hdr { padding:0 0.875rem; height:56px; }
  .hdr-icon { width:30px; height:30px; font-size:15px; }
  .hdr-title { font-size:13px; }
  #userName { display:none; }
  #userDropdown {
    right:0 !important;
    left:auto !important;
    min-width:280px !important;
    max-width:calc(100vw - 16px) !important;
    max-height:80vh;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  .wrap { padding:0.75rem; }
  .tabs { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; white-space:nowrap; display:flex; }
  .tabs::-webkit-scrollbar { display:none; }
  .tab { flex-shrink:0; padding:8px 14px; font-size:12px; }
  .card { border-radius:12px; }
  .card-body { padding:1rem; }
  .card-hdr { padding:0.875rem 1rem; flex-wrap:wrap; gap:8px; }
  .inp-row { display:none !important; }
  .action-bar { flex-wrap:wrap; gap:6px; }
  .action-bar .btn { flex:1; min-width:120px; font-size:12px; padding:8px 10px; }
  .export-bar { flex-direction:column; }
  .export-bar .btn { width:100%; justify-content:center; }
  .btn { min-height:44px; }
  .help-btn { width:44px; height:44px; bottom:12px; right:12px; }
  .company-btn { width:44px; height:44px; bottom:64px; right:12px; }
}

@media(max-width:640px) {
  #settingsPage .s-api-box { padding:10px !important; }
  #apiKeySetupModal > div { padding:1.25rem 1rem 2rem !important; }
  #apiKeySetupModal .kart { padding:1.5rem 1.25rem !important; }
  #maliyetUyariBar { font-size:11px; padding:6px 1rem; }
}

@media(max-width:480px) {
  #apiKeySetupModal > div > div { padding:1.25rem 1rem !important; }
}

@media(max-width:768px) {
  #settingsPage .s-content, #userDropdown, #apiKeySetupModal { -webkit-overflow-scrolling:touch; }
}

@media(max-width:768px){.wrap{padding:1rem}.settings-row{grid-template-columns:1fr}}
