/* =====================================================================
   PROJE: PUANTAJLA.COM — MASTER MOBİL & TABLET ÖNCELİKLİ STİL DOSYASI
   MİMARİ: Mobile-First, Zero Click-Blockers, Smooth Touch & Horizontal Scroll
   Kapsam: Mobil ve Tablet Ekranları (320px — 1024px)
   ===================================================================== */

/* =====================================================================
   0. ROOT DEĞİŞKENLER & GÜVENLİ ALAN (SAFE AREA) TANIMLARI
   ===================================================================== */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --min-touch-target: 44px;
}

/* =====================================================================
   1. TABLET VE MOBİL GENEL SIFIRLAMA & TAŞMA KORUMASI (<=1140px)
   ===================================================================== */
@media (max-width: 1140px) {

  html {
    scroll-behavior: smooth !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    overflow-x: clip !important;
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  body {
    overflow-x: clip !important;
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    position: relative !important;
    -webkit-tap-highlight-color: transparent !important;
    padding-left: var(--safe-left) !important;
    padding-right: var(--safe-right) !important;
  }

  body.sidebar-open {
    overflow: hidden !important;
    overscroll-behavior-y: none !important;
  }

  *, *::before, *::after {
    box-sizing: border-box !important;
  }

  /* Master Sıfır Kayma ve Taşma Koruması (Anti-Horizontal Shift Shield) */
  .app-container,
  .main-content,
  .top-header,
  .page-container,
  .content-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: clip !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .kpi-grid,
  .stats-grid,
  .responsive-grid-1-2,
  .responsive-grid-2,
  .responsive-grid-3,
  .responsive-grid-4,
  .features-bento,
  .sectors-grid,
  .pricing-grid,
  .grid-wrapper-card,
  .card,
  .kpi-card,
  .stat-card {
    min-width: 0;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Kartlar, Paneller ve Tablo Kapsayıcıları: Sayfayı Asla Dışarı Doğru İtemez, Kendi İçinde Yatay Kayar */
  .card,
  .grid-wrapper-card,
  .table-card,
  .panel,
  .box,
  .widget,
  .dashboard-card,
  .table-responsive,
  .table-responsive-container,
  .table-responsive-wrapper,
  .table-wrapper {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Toolbarlar, Buton Grupları ve Formlar: Mobilde otomatik alt satıra geçer, ekranı sağa doğru zorlamaz */
  .top-header,
  .filter-bar,
  .table-toolbar,
  .actions-bar,
  .btn-group-responsive,
  .header-actions {
    flex-wrap: wrap !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  img, video, iframe, embed, object, svg {
    max-width: 100% !important;
    height: auto !important;
  }

  /* --- TÜM İNTERAKTİF ELEMANLAR İÇİN DOKUNMA & TIKLAMA HASSASİYETİ --- */
  a, button, input, select, textarea, label, [role="button"], .btn, .shift-cell-btn, .drag-badge, .popover-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
  }

  /* --- OVERLAY VE ÇEKMECELER (KAPALIYKEN KESİNLİKLE TIKLAMALARI ENGELLEMEZ) --- */
  .sidebar-overlay,
  .nav-drawer-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(4, 6, 14, 0.65) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 99988 !important;
    opacity: 0 !important;
    pointer-events: none !important; /* CRITICAL: Kapalıyken tıklamayı engellemez */
    transition: opacity 0.3s ease !important;
    display: block !important;
  }

  .sidebar-overlay.active,
  .nav-drawer-overlay.open,
  .nav-drawer-overlay.active {
    opacity: 1 !important;
    pointer-events: auto !important; /* Sadece açıkken tıklanabilir */
    touch-action: none !important;
  }

  .sidebar {
    z-index: 99999 !important;
  }

  .sidebar:not(.mobile-active) {
    pointer-events: none !important;
    visibility: hidden !important;
  }

  .nav-drawer {
    z-index: 99999 !important;
    background: var(--bg-card) !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.45) !important;
  }

  .nav-drawer:not(.open) {
    pointer-events: none !important;
    visibility: hidden !important;
  }

  /* --- MODAL BACKDROP POINTER-EVENTS KONTROLÜ --- */
  .modal-backdrop,
  .sa-modal-backdrop {
    pointer-events: none !important;
    opacity: 0 !important;
  }

  .modal-backdrop.active,
  .sa-modal-backdrop.active {
    pointer-events: auto !important;
    opacity: 1 !important;
    display: flex !important;
  }

  /* --- NAVBAR & HEADER --- */
  .navbar {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9900 !important;
  }

  .navbar .nav-actions .btn-primary,
  .navbar .nav-actions .btn-outline,
  .navbar .nav-actions .btn-logged,
  .navbar .nav-actions a.btn {
    display: none !important;
  }

  .navbar .nav-links {
    display: none !important;
  }

  .nav-hamburger {
    display: flex !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
    z-index: 9905 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .nav-hamburger .h-line {
    display: block !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 2.5px !important;
    background: var(--text-primary) !important;
    border-radius: 9999px !important;
    margin: 0 auto !important;
  }

  .nav-drawer-footer .btn,
  .nav-drawer-footer a.btn {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 12px 18px !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    min-height: 48px !important;
    touch-action: manipulation !important;
  }

  /* --- GRID VE KARTLAR (Tablet) --- */
  .kpi-grid,
  .stats-grid,
  .sa-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  .responsive-grid-4,
  .features-bento,
  .sectors-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  .responsive-grid-1-2 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* --- PUANTAJ VE GENEL TABLO YATAY KAYDIRMA (SMOOTH HORIZONTAL SCROLL) --- */
  .table-responsive-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    overscroll-behavior-x: contain !important;
    display: block !important;
    position: relative !important;
    max-height: calc(100dvh - 180px) !important;
  }

  /* Puantaj Takvim Tablosu Genişliği (Sadece Aylık Vardiya Takvimi) */
  #shiftsMainTable,
  .shifts-grid-table,
  .shifts-calendar-table {
    width: max-content !important;
    min-width: 960px !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
  }

  #shiftsMainTable th:not(.col-employee):not(.col-sira-drag):not(.col-group-no),
  #shiftsMainTable td:not(.col-employee):not(.col-sira-drag):not(.col-group-no),
  .shifts-grid-table th:not(.col-employee):not(.col-sira-drag):not(.col-group-no),
  .shifts-grid-table td:not(.col-employee):not(.col-sira-drag):not(.col-group-no) {
    min-width: 26px !important;
    width: 26px !important;
    max-width: 26px !important;
  }

  /* Standart Veri Tabloları (PDKS Yoklama, Personel Listesi, İzinler, Denetim, Bordro vb.) */
  .shifts-table:not(#shiftsMainTable):not(.shifts-grid-table),
  .data-table,
  .table {
    width: 100% !important;
    min-width: 680px !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
  }

  .shifts-table:not(#shiftsMainTable):not(.shifts-grid-table) th,
  .shifts-table:not(#shiftsMainTable):not(.shifts-grid-table) td,
  .data-table th,
  .data-table td,
  .table th,
  .table td {
    min-width: auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    padding: 10px 14px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
  }

  /* --- MODALLAR (TÜM MODAL TİPLERİ İÇİN MOBİL TAŞMA KORUMASI) --- */
  .modal-card,
  .sa-modal-dialog,
  .glass-modal-box,
  .modal-box {
    max-width: 95vw !important;
    width: 95vw !important;
    max-height: calc(100dvh - 24px) !important;
    margin: auto !important;
    border-radius: 16px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .glass-modal-backdrop,
  .modal-backdrop,
  .sa-modal-backdrop,
  .modal-overlay {
    padding: 10px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .glass-modal-box [style*="grid-template-columns"],
  .modal-card [style*="grid-template-columns"],
  .modal-coordinates-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .top-header {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  .top-header > div:last-child {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* =====================================================================
   2. MOBİL ANA BREAKPOINT (<=860px) — PANEL, DASHBOARD & LANDING
   ===================================================================== */
@media (max-width: 860px) {

  /* Arka plan ışıkları performans için kaldır */
  body::before,
  body::after {
    display: none !important;
  }

  .app-container {
    flex-direction: column !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
    box-sizing: border-box !important;
  }

  /* --- SİDEBAR (PREMIUM ÇEKMECE MENÜ) --- */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: min(88vw, 320px) !important;
    max-width: 320px !important;
    background: #090e1a !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translate3d(-105%, 0, 0) !important;
    box-shadow: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: 100000 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0s linear 0.32s,
                box-shadow 0.32s ease !important;
    will-change: transform;
    overflow: hidden !important;
    touch-action: pan-y !important;
  }

  [data-theme="dark"] .sidebar,
  :root .sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #090e1a 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  [data-theme="light"] .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-right: 1px solid rgba(15, 23, 42, 0.12) !important;
  }

  .sidebar.mobile-active {
    transform: translate3d(0, 0, 0) !important;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.85) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0s linear 0s,
                box-shadow 0.32s ease !important;
  }

  [data-theme="light"] .sidebar.mobile-active {
    box-shadow: 24px 0 60px rgba(15, 23, 42, 0.22) !important;
  }

  /* Sidebar Header & Brand */
  .sidebar-header-box {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: max(14px, var(--safe-top)) 16px 14px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.02) !important;
  }

  [data-theme="light"] .sidebar-header-box {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: rgba(15, 23, 42, 0.02) !important;
  }

  .brand-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .brand-title-text {
    font-weight: 900 !important;
    font-size: 1.18rem !important;
    letter-spacing: -0.03em !important;
    color: #f8fafc !important;
    white-space: nowrap !important;
  }

  [data-theme="light"] .brand-title-text {
    color: #0f172a !important;
  }

  .sidebar-close-btn {
    display: flex !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #f8fafc !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    transition: all 0.18s ease !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  [data-theme="light"] .sidebar-close-btn {
    background: rgba(15, 23, 42, 0.06) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
  }

  .sidebar-close-btn:hover,
  .sidebar-close-btn:active {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
    transform: scale(0.95);
  }

  /* Nav Menu */
  .sidebar .nav-menu {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    padding: 12px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    list-style: none !important;
    margin: 0 !important;
  }

  .sidebar .nav-item,
  .sidebar .nav-item a {
    width: 100% !important;
    touch-action: pan-y !important;
  }

  .sidebar .nav-item a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 11px 14px !important;
    border-radius: 10px !important;
    color: #cbd5e1 !important;
    text-decoration: none !important;
    font-size: 0.90rem !important;
    font-weight: 600 !important;
    min-height: 46px !important;
    transition: all 0.18s ease !important;
    box-sizing: border-box !important;
  }

  [data-theme="light"] .sidebar .nav-item a {
    color: #334155 !important;
  }

  .sidebar .nav-item a svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    color: #38bdf8 !important;
    transition: transform 0.18s ease !important;
  }

  [data-theme="light"] .sidebar .nav-item a svg {
    color: #0284c7 !important;
  }

  .sidebar .nav-item a:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #ffffff !important;
  }

  [data-theme="light"] .sidebar .nav-item a:hover {
    background: rgba(2, 132, 199, 0.08) !important;
    color: #0284c7 !important;
  }

  .sidebar .nav-item.active a {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 18px rgba(2, 132, 199, 0.45) !important;
  }

  .sidebar .nav-item.active a svg {
    color: #ffffff !important;
  }

  /* User Profile Bottom */
  .sidebar .user-profile-bottom {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    padding: 12px 14px max(14px, var(--safe-bottom)) 14px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    border-radius: 0 !important;
    position: relative !important;
  }

  [data-theme="light"] .sidebar .user-profile-bottom {
    background: rgba(15, 23, 42, 0.03) !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
  }

  .sidebar .user-profile-bottom .user-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.88rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35) !important;
  }

  .sidebar .user-profile-bottom .user-meta .name {
    color: #f8fafc !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
  }

  [data-theme="light"] .sidebar .user-profile-bottom .user-meta .name {
    color: #0f172a !important;
  }

  .sidebar .user-profile-bottom .user-meta .role {
    color: #94a3b8 !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
  }

  .sidebar .user-profile-bottom .logout-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
  }

  .sidebar .user-profile-bottom .logout-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    transform: scale(1.05);
  }

  /* --- SİDEBAR OVERLAY --- */
  .sidebar-overlay {
    background: rgba(3, 7, 18, 0.75) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 99990 !important;
  }

  /* --- ANA İÇERİK --- */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
    box-sizing: border-box !important;
    padding: 0 16px calc(90px + var(--safe-bottom)) 16px !important;
    min-height: calc(100dvh - 58px) !important;
  }

  /* --- MOBİL ÜST BAR (STICKY & NOTCH-AWARE) --- */
  .mobile-top-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: calc(58px + var(--safe-top)) !important;
    min-height: calc(58px + var(--safe-top)) !important;
    max-height: calc(58px + var(--safe-top)) !important;
    padding: var(--safe-top) 16px 0 16px !important;
    background: #0d1527 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 900 !important;
    overflow: hidden !important;
    gap: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
    margin: 0 -16px 16px -16px !important;
  }

  [data-theme="light"] .mobile-top-bar {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
  }

  .mobile-menu-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4.5px !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    padding: 0 !important;
    transition: all 0.18s ease !important;
  }

  [data-theme="light"] .mobile-menu-btn {
    background: rgba(15, 23, 42, 0.05) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
  }

  .mobile-menu-btn .hamburger-line {
    width: 20px !important;
    height: 2px !important;
    background-color: var(--text-primary) !important;
    border-radius: 2px !important;
  }

  .mobile-bell-btn,
  .theme-toggle-btn {
    min-width: 40px !important;
    min-height: 40px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
  }

  [data-theme="light"] .mobile-bell-btn,
  [data-theme="light"] .theme-toggle-btn {
    background: rgba(15, 23, 42, 0.05) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
  }

  .desktop-notification-wrapper {
    display: none !important;
  }

  /* --- SAYFA BAŞLIKLARI & AKIŞKAN TİPOGRAFİ --- */
  .top-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .page-title h1 {
    font-size: clamp(1.1rem, 4.2vw, 1.35rem) !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
  }

  .page-title p {
    font-size: clamp(0.78rem, 3vw, 0.85rem) !important;
    line-height: 1.4 !important;
    margin-top: 3px !important;
  }

  .top-header > div:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .top-header .btn {
    flex: 1 1 auto !important;
    min-width: 130px !important;
    min-height: 44px !important;
    justify-content: center !important;
    touch-action: manipulation !important;
  }

  /* --- LANDING HERO & TRUST GRID MOBİL DÜZENLEMELERİ --- */
  .hero-section {
    padding: 22px 0 16px !important;
  }

  .hero-announcement {
    margin-bottom: 12px !important;
  }

  .hero-announcement .badge-pill {
    font-size: 0.72rem !important;
    padding: 4px 12px !important;
  }

  .hero-title {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem) !important;
    line-height: 1.22 !important;
    margin-bottom: 10px !important;
    letter-spacing: -0.03em !important;
  }

  .hero-subtitle {
    font-size: 0.86rem !important;
    line-height: 1.54 !important;
    margin-bottom: 20px !important;
    max-width: 96% !important;
  }

  .hero-cta {
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto 24px auto !important;
  }

  .hero-cta .btn {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
    font-size: 0.92rem !important;
  }

  .trust-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 12px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    max-width: 100% !important;
    margin: 0 auto 28px auto !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
  }

  .trust-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.72rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.3 !important;
    text-align: left !important;
  }

  .trust-item svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }

  /* --- LANDING SECTION HEADERS & GENEL TİPOGRAFİ --- */
  .section-header {
    margin-bottom: 26px !important;
    padding: 0 8px !important;
    text-align: center !important;
  }

  .section-header h2 {
    font-size: clamp(1.35rem, 5vw, 1.65rem) !important;
    line-height: 1.26 !important;
    margin-bottom: 8px !important;
    letter-spacing: -0.025em !important;
    font-weight: 800 !important;
  }

  .section-header p {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
    color: var(--text-secondary) !important;
    max-width: 92% !important;
    margin: 0 auto !important;
  }

  /* --- CANLI PUANTAJ SİMÜLATÖRÜ MOBİL DÜZENİ --- */
  .sim-window-bar {
    display: flex !important;
    flex-direction: column !important;
    padding: 14px 14px !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .sim-window-topline {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .sim-window-dots {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .sim-location-wrap {
    width: 100% !important;
  }

  .sim-location-select {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.80rem !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    background-color: var(--bg-surface) !important;
  }

  .sim-rotation-presets {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .sim-preset-label {
    font-size: 0.74rem !important;
    color: var(--text-muted) !important;
    font-weight: 700 !important;
  }

  .sim-preset-btns {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .sim-preset-btn {
    width: 100% !important;
    padding: 8px 4px !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    min-height: 38px !important;
  }

  .sim-live-badge {
    font-size: 0.68rem !important;
    padding: 3px 8px !important;
  }

  .sim-mobile-swipe-tip {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: rgba(2, 132, 199, 0.08) !important;
    color: var(--accent-brand) !important;
    padding: 8px 14px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    text-align: center !important;
  }

  /* --- PRICING TOGGLE WRAP (Mobilde Gizlenir) --- */
  .pricing-toggle-wrap {
    display: none !important;
  }

  /* --- PRICING CARDS --- */
  .pricing-grid {
    display: grid !important;
    grid-template-columns: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 18px !important;
    margin-bottom: 32px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  .pricing-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 28px 18px 24px 18px !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    position: relative !important;
    margin-top: 14px !important;
  }

  .plan-badge {
    position: absolute !important;
    top: -11px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: var(--accent-brand) !important;
    color: #ffffff !important;
    font-size: 0.70rem !important;
    font-weight: 800 !important;
    padding: 4px 14px !important;
    border-radius: 9999px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
    z-index: 10 !important;
    white-space: nowrap !important;
  }

  .plan-name {
    font-size: 1.25rem !important;
    margin-top: 2px !important;
    margin-bottom: 6px !important;
    word-break: break-word !important;
  }

  .plan-desc {
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    margin-bottom: 14px !important;
    min-height: auto !important;
    word-break: break-word !important;
  }

  .plan-price-wrap {
    margin-bottom: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .plan-price-wrap .price-main {
    display: flex !important;
    align-items: baseline !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
  }

  .plan-price {
    font-size: 2rem !important;
    line-height: 1 !important;
  }

  .plan-period {
    font-size: 0.82rem !important;
  }

  .plan-yearly-hint {
    font-size: 0.76rem !important;
    color: var(--accent-emerald) !important;
    font-weight: 700 !important;
    margin-top: 2px !important;
    word-break: break-word !important;
  }

  .plan-features {
    margin-bottom: 18px !important;
    gap: 8px !important;
    width: 100% !important;
    padding-left: 0 !important;
  }

  .plan-features li {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    gap: 8px !important;
    word-break: break-word !important;
  }

  .plan-features li svg {
    width: 15px !important;
    height: 15px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
  }

  .pricing-card-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pricing-card .btn {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px !important;
    font-size: 0.82rem !important; /* Aylık/Ücretsiz Buton Yazı Boyutu */
    font-weight: 800 !important;
    min-height: 46px !important;
    border-radius: 10px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    letter-spacing: -0.01em !important;
  }

  .pricing-card .btn-plan-yearly {
    font-size: 0.79rem !important; /* Yıllık Satın Al Buton Yazı Boyutu */
    letter-spacing: -0.02em !important;
  }

  /* --- ENTERPRISE BANNER --- */
  .enterprise-banner {
    padding: 22px 18px !important;
    border-radius: 16px !important;
    text-align: center !important;
    gap: 14px !important;
    margin-bottom: 40px !important;
    margin-top: 14px !important;
    flex-direction: column !important;
  }

  .enterprise-info h3 {
    font-size: 1.12rem !important;
    line-height: 1.35 !important;
    margin-bottom: 6px !important;
  }

  .enterprise-info p {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    color: var(--text-secondary) !important;
    margin: 0 auto 14px auto !important;
    max-width: 95% !important;
  }

  .enterprise-banner .btn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.90rem !important;
    padding: 12px 18px !important;
    min-height: 46px !important;
    border-radius: 10px !important;
  }

  /* --- FEATURES BENTO & SECTORS GRID --- */
  .features-bento,
  .sectors-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin-bottom: 48px !important;
  }

  .bento-card,
  .sector-card {
    padding: 22px 18px !important;
    border-radius: 16px !important;
  }

  .bento-card h3,
  .sector-card h3 {
    font-size: 1.08rem !important;
    margin-bottom: 8px !important;
  }

  .bento-card p,
  .sector-card p {
    font-size: 0.84rem !important;
    line-height: 1.52 !important;
    margin-bottom: 12px !important;
  }

  .bento-icon-wrap {
    width: 40px !important;
    height: 40px !important;
    margin-bottom: 14px !important;
  }

  .bento-icon-wrap svg {
    width: 20px !important;
    height: 20px !important;
  }

  .bento-tag {
    font-size: 0.72rem !important;
  }

  /* --- KPI DEĞERLERİ & KARTLARI --- */
  .kpi-grid,
  .stats-grid,
  .sa-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  .kpi-value {
    font-size: clamp(1.3rem, 5vw, 1.6rem) !important;
    line-height: 1.2 !important;
  }

  .kpi-card,
  .stat-card,
  .sa-kpi-card {
    padding: 14px 12px !important;
    min-width: 0 !important;
  }

  .grid-wrapper-card {
    padding: 16px 14px !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: 14px !important;
  }

  /* --- 1 KOLONLU MOBİL GRİDLER --- */
  .responsive-grid-1-2,
  .responsive-grid-2,
  .responsive-grid-3,
  .responsive-grid-4 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* --- MODALLAR (BOTTOM-SHEET ALTTAN ÇEKMECE) --- */
  .modal-backdrop.active,
  .sa-modal-backdrop.active {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
    z-index: 3000 !important;
  }

  .modal-card,
  .sa-modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    padding: 20px 16px calc(20px + var(--safe-bottom)) 16px !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 22px 22px 0 0 !important;
    margin-bottom: 0 !important;
    position: relative !important;
  }

  /* Bottom sheet tutamaç çizgisi */
  .modal-card::before,
  .sa-modal-dialog::before {
    content: '' !important;
    display: block !important;
    width: 36px !important;
    height: 4px !important;
    background: var(--border-strong, rgba(255, 255, 255, 0.25)) !important;
    border-radius: 9999px !important;
    margin: 0 auto 14px auto !important;
  }

  .sa-modal-footer,
  .modal-footer {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .sa-modal-footer .btn,
  .modal-footer .btn {
    width: 100% !important;
    min-height: 46px !important;
    justify-content: center !important;
  }

  .modal-header,
  .sa-modal-header {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  /* --- FORM ELEMANLARI (iOS OTOMATİK ZOOM KESİN ENGELİ) --- */
  .form-control,
  .form-select,
  .form-input,
  .sa-form-input,
  .sa-form-select,
  .sa-form-textarea,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px !important; /* iOS zoom engeli */
    min-height: 44px !important;
    touch-action: manipulation !important;
    border-radius: 8px !important;
  }

  textarea.form-control,
  textarea.sa-form-textarea {
    min-height: 88px !important;
  }

  /* --- TOAST BİLDİRİMLERİ --- */
  .toast-container {
    bottom: calc(16px + var(--safe-bottom)) !important;
    right: 12px !important;
    left: 12px !important;
    z-index: 9999 !important;
  }

  .toast {
    min-width: unset !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* --- VARDİYA & PUANTAJ ARAÇLARI --- */
  .shift-legend-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  .drag-palette {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .drag-badge {
    min-height: 38px !important;
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
  }

  #shiftFilterForm {
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 8px !important;
  }

  #filterEmployeeName {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px !important;
  }

  #shiftFilterForm select {
    flex: 1 1 auto !important;
    min-width: 90px !important;
  }

  /* --- DİNAMİK INLINE GRİD DÜZELTMELERİ --- */
  div[style*="grid-template-columns: 280px 1fr"],
  div[style*="grid-template-columns: 280px"],
  div[style*="grid-template-columns: 3fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr 1fr"],
  div[style*="grid-template-columns: repeat(auto-fit, minmax("] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* --- FOOTER --- */
  .app-footer-inner,
  .app-footer-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  .app-footer-nav {
    gap: 6px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  .footer-pill-link {
    min-height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
}

/* =====================================================================
   3. STANDART TELEFON (<=640px)
   ===================================================================== */
@media (max-width: 640px) {

  .kpi-grid,
  .stats-grid,
  .sa-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .page-title h1 {
    font-size: clamp(1.05rem, 4vw, 1.2rem) !important;
  }

  .page-title p {
    font-size: 0.78rem !important;
  }

  .btn {
    padding: 9px 14px !important;
    font-size: 0.84rem !important;
    min-height: 44px !important;
  }

  .kpi-card,
  .stat-card,
  .sa-kpi-card {
    padding: 12px 10px !important;
  }

  .kpi-value {
    font-size: 1.35rem !important;
  }

  /* Hızlı Seçim Popover */
  .quick-shift-popover {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(16px + var(--safe-bottom)) !important;
    top: auto !important;
    width: auto !important;
    max-width: calc(100% - 24px) !important;
    padding: 14px !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75) !important;
    z-index: 5000 !important;
  }

  .popover-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }

  .popover-btn {
    min-height: 42px !important;
    font-size: 0.82rem !important;
  }

  /* Puantaj Tablosu Sabit Sütun Genişlikleri & Z-Index (Sadece Aylık Vardiya Takvimi) */
  #shiftsMainTable .col-sira-drag,
  .shifts-grid-table .col-sira-drag {
    position: sticky !important;
    left: 0 !important;
    width: 22px !important;
    min-width: 22px !important;
    z-index: 18 !important;
  }

  #shiftsMainTable .col-group-no,
  .shifts-grid-table .col-group-no {
    position: sticky !important;
    left: 22px !important;
    width: 22px !important;
    min-width: 22px !important;
    z-index: 18 !important;
  }

  #shiftsMainTable .col-employee,
  .shifts-grid-table .col-employee {
    position: sticky !important;
    left: 44px !important;
    min-width: 110px !important;
    max-width: 125px !important;
    padding: 3px 6px !important;
    z-index: 20 !important;
  }

  #shiftsMainTable thead .col-sira-drag,
  #shiftsMainTable thead .col-group-no,
  #shiftsMainTable thead .col-employee,
  .shifts-grid-table thead .col-sira-drag,
  .shifts-grid-table thead .col-group-no,
  .shifts-grid-table thead .col-employee {
    z-index: 45 !important;
  }

  .emp-name {
    max-width: 95px !important;
    font-size: 0.72rem !important;
  }

  .emp-meta {
    font-size: 0.6rem !important;
  }

  #shiftsMainTable tfoot td.col-sira-drag,
  .shifts-grid-table tfoot td.col-sira-drag {
    position: sticky !important;
    left: 0 !important;
    z-index: 18 !important;
  }

  #shiftsMainTable tfoot td.col-group-no,
  .shifts-grid-table tfoot td.col-group-no {
    position: sticky !important;
    left: 22px !important;
    z-index: 18 !important;
  }

  #shiftsMainTable tfoot td.col-employee,
  .shifts-grid-table tfoot td.col-employee {
    position: sticky !important;
    left: 44px !important;
    z-index: 20 !important;
  }

  #shiftsMainTable th,
  #shiftsMainTable td,
  .shifts-grid-table th,
  .shifts-grid-table td {
    padding: 4px 2px !important;
    font-size: 0.72rem !important;
    height: 32px !important;
  }

  .shift-cell-btn {
    height: 28px !important;
    font-size: 0.72rem !important;
  }

  .ticket-bubble {
    max-width: 92% !important;
    font-size: 0.84rem !important;
  }

  .sa-analytics-table th,
  .sa-analytics-table td {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
  }

  .table-responsive table:not(#shiftsMainTable):not(.shifts-grid-table),
  .table-responsive-container table:not(#shiftsMainTable):not(.shifts-grid-table),
  .table-card table:not(#shiftsMainTable):not(.shifts-grid-table),
  .card table:not(#shiftsMainTable):not(.shifts-grid-table),
  .grid-wrapper-card table:not(#shiftsMainTable):not(.shifts-grid-table) {
    min-width: 520px !important;
  }

  table:not(#shiftsMainTable):not(.shifts-grid-table) {
    max-width: 100%;
  }

  .mobile-nav-label {
    display: none !important;
  }
}

/* =====================================================================
   4. KOMPAKT TELEFON (<=480px)
   ===================================================================== */
@media (max-width: 480px) {

  .main-content {
    padding: 0 12px calc(80px + var(--safe-bottom)) 12px !important;
  }

  .mobile-top-bar {
    padding: var(--safe-top) 12px 0 12px !important;
    margin: 0 -12px 14px -12px !important;
  }

  .sidebar.mobile-active {
    width: min(88vw, 320px) !important;
    max-width: 320px !important;
  }

  .mobile-project-badge {
    display: none !important;
  }

  .page-title h1 {
    font-size: 1.05rem !important;
    gap: 6px !important;
  }

  .kpi-value {
    font-size: 1.25rem !important;
  }

  .kpi-title {
    font-size: 0.72rem !important;
  }

  .modal-card,
  .sa-modal-dialog {
    border-radius: 18px 18px 0 0 !important;
    padding: 16px 12px calc(16px + var(--safe-bottom)) 12px !important;
    max-height: 92dvh !important;
  }

  #shiftFilterForm {
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  #shiftFilterForm select,
  #shiftFilterForm input,
  #shiftFilterForm button {
    width: 100% !important;
  }

  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .grid-wrapper-card {
    padding: 14px 12px !important;
  }

  .shift-legend-toolbar {
    gap: 6px !important;
    padding: 8px 10px !important;
  }

  .drag-badge {
    font-size: 0.72rem !important;
    padding: 5px 8px !important;
    min-height: 36px !important;
  }

  /* Tablo ve Kart Düzenleri */
  .table-responsive-container {
    border-radius: var(--radius-md) !important;
  }
}

/* =====================================================================
   5. MİNİ EKRANLAR (<=375px — iPhone SE, Galaxy Mini vb.)
   ===================================================================== */
@media (max-width: 375px) {

  .mobile-top-bar {
    padding: var(--safe-top) 8px 0 8px !important;
    margin: 0 -8px 12px -8px !important;
  }

  .main-content {
    padding: 0 8px calc(75px + var(--safe-bottom)) 8px !important;
  }

  .kpi-grid,
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .kpi-value {
    font-size: 1.2rem !important;
  }

  .btn {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
    min-height: 44px !important;
  }

  .modal-card,
  .sa-modal-dialog {
    border-radius: 14px 14px 0 0 !important;
  }

  #shiftsMainTable .col-employee,
  .shifts-grid-table .col-employee {
    min-width: 95px !important;
    max-width: 105px !important;
  }

  .emp-name {
    max-width: 80px !important;
    font-size: 0.68rem !important;
  }
}

/* =====================================================================
   6. ULTRA MİNİ EKRANLAR (<=320px) — SIFIR TAŞMA & MİKRO AYARLAR
   ===================================================================== */
@media (max-width: 320px) {

  html, body {
    font-size: 14px !important;
  }

  .mobile-top-bar {
    height: calc(50px + var(--safe-top)) !important;
    min-height: calc(50px + var(--safe-top)) !important;
    padding: var(--safe-top) 6px 0 6px !important;
  }

  .brand-wrapper span,
  .mobile-top-bar a span {
    font-size: 0.92rem !important;
  }

  .mobile-project-badge {
    display: none !important;
  }

  .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .kpi-card {
    padding: 10px 8px !important;
  }
}

/* =====================================================================
   7. DOKUNMA AYGITI STANDARTLARI (WCAG AA & 48px HITBOXES)
   ===================================================================== */
@media (hover: none) and (pointer: coarse) {

  /* Hover kaynaklı zıplamaları ve titremeleri önle */
  .kpi-card:hover,
  .stat-card:hover,
  .sa-kpi-card:hover,
  .btn:hover,
  .header-icon-btn:hover,
  .theme-toggle-btn:hover,
  .shift-cell-btn:hover,
  .footer-pill-link:hover,
  .drag-badge:hover {
    transform: none !important;
  }

  /* Minimum 44-48px Dokunma Hedefi (Hitbox) */
  .nav-item a {
    min-height: 46px !important;
    padding: 12px 14px !important;
    display: flex !important;
    align-items: center !important;
  }

  .btn {
    min-height: 44px !important;
  }

  .modal-close,
  .sa-modal-close {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .shift-cell-btn {
    height: 32px !important;
    min-height: 32px !important;
  }

  .form-control,
  .form-select,
  .sa-form-input,
  .sa-form-select {
    padding: 11px 12px !important;
    min-height: 46px !important;
  }

  .mobile-menu-btn,
  .nav-hamburger,
  .mobile-bell-btn,
  .theme-toggle-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .modal-card,
  .sa-modal-dialog,
  .nav-menu,
  .ticket-chat-container,
  .custom-scroll,
  .table-responsive-container {
    -webkit-overflow-scrolling: touch !important;
  }
}

/* =====================================================================
   8. YATAY YÖNELİM (LANDSCAPE MOBİL/TABLET)
   ===================================================================== */
@media (max-width: 1024px) and (orientation: landscape) {

  .mobile-top-bar {
    height: calc(48px + var(--safe-top)) !important;
    min-height: calc(48px + var(--safe-top)) !important;
    max-height: calc(48px + var(--safe-top)) !important;
    padding-top: var(--safe-top) !important;
  }

  .main-content {
    padding-bottom: calc(30px + var(--safe-bottom)) !important;
  }

  .sidebar.mobile-active {
    width: min(75vw, 300px) !important;
    max-width: 320px !important;
  }

  .modal-card,
  .sa-modal-dialog {
    max-height: 90vh !important;
    max-height: 90dvh !important;
    border-radius: var(--radius-xl) !important;
  }

  .modal-backdrop.active,
  .sa-modal-backdrop.active {
    align-items: center !important;
  }

  .kpi-grid,
  .stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
  }

  .sa-kpi-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* =====================================================================
   9. EVRENSEL TAŞMA KORUMASI & FULL RESPONSIVE DOKUNMATİK HİZALAMA
   Kapsam: QR Giriş-Çıkış, Puantaj Masası, Modallar, Filtre Barları & Kartlar
   ===================================================================== */
@media (max-width: 768px) {
  /* Üst Aksiyon Barları ve Buton Grupları */
  .top-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px 16px !important;
  }

  .top-header > div:first-child {
    width: 100% !important;
  }

  .top-header > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .top-header .btn,
  .top-header .btn-qr-action,
  .top-header a.btn {
    flex: 1 1 auto !important;
    min-width: 120px !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 8px 12px !important;
  }

  /* Filtre Formları */
  .top-header form,
  form[action="/attendance/logs"],
  #shiftFilterForm {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .top-header form .form-control,
  .top-header form .form-select,
  form[action="/attendance/logs"] .form-control,
  form[action="/attendance/logs"] .form-select,
  #shiftFilterForm .form-select,
  #shiftFilterForm .form-control {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 130px !important;
    width: auto !important;
    max-width: 100% !important;
  }

  /* Seçili Personel / Şantiye Bilgi Bannerları */
  .qr-status-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px 16px !important;
  }

  .qr-status-banner > div {
    min-width: 0 !important;
    width: 100% !important;
  }

  .qr-status-banner button,
  .qr-status-banner a {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Cam Modallar (Glass Modals - 3D QR Oluşturucu & Manuel Basış) */
  .glass-modal-backdrop {
    padding: 8px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .glass-modal-box {
    max-width: calc(100% - 16px) !important;
    width: 100% !important;
    max-height: calc(100dvh - 20px) !important;
    margin: auto !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  .glass-modal-box > div:first-child {
    padding: 14px 16px !important;
  }

  .glass-modal-box > div:nth-child(2) {
    padding: 14px 16px !important;
    max-height: calc(100dvh - 120px) !important;
  }

  /* 3D Harita Konteyneri */
  #qr3dMap {
    height: clamp(200px, 32vh, 280px) !important;
    width: 100% !important;
  }

  /* Koordinat ve Form Gridleri Tek Sütun */
  .modal-coordinates-grid,
  .glass-modal-box [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Hızlı Seçim Rozetleri / Çipler */
  .qr-chip-btn {
    font-size: 0.72rem !important;
    padding: 4px 8px !important;
    flex: 1 1 auto !important;
    text-align: center !important;
  }
}

@media (max-width: 480px) {
  /* Kompakt Telefonlarda Form Elemanları Tam Genişlik */
  .top-header form .form-control,
  .top-header form .form-select,
  form[action="/attendance/logs"] .form-control,
  form[action="/attendance/logs"] .form-select {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  /* Mini Ekranlarda 2'li KPI Gridleri */
  .kpi-grid-mobile-2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* =====================================================================
   10. GENEL TAŞMA VE YATAY KAYDIRMA SİGORTASI (TABLE & GRID SHIELD)
   ===================================================================== */
@media (max-width: 992px) {
  /* Geniş Gridlerin ve Formların Mobilde 1 Sütuna Katlanması */
  .responsive-2col-grid,
  .responsive-keyword-form,
  [style*="grid-template-columns: repeat(auto-fit, minmax(4"],
  [style*="grid-template-columns: repeat(auto-fit, minmax(3"],
  [style*="grid-template-columns: repeat(auto-fill, minmax(3"],
  [style*="grid-template-columns: 2fr 2fr 1fr auto"],
  form[style*="grid-template-columns: 2fr 2fr 1fr auto"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Tüm Tablo Kapsayıcılarının Dokunmatik Yatay Kaydırma Zırhı */
  .table-responsive-container,
  .table-responsive,
  .sa-table-wrapper,
  .sa-blog-table-wrap,
  .sim-table-wrap,
  .table-scroll {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    overscroll-behavior-x: contain !important;
    display: block !important;
    position: relative !important;
  }

  /* Buton grupları ve aksiyonlar mobilde düzgün sarılsın */
  .seo-header-actions,
  .sa-blog-form-top-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }
}

/* Vardiya çizelgesi araç çubuğu (mobil) */
@media (max-width: 768px) {
  .shifts-toolbar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .shifts-toolbar > * {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .shifts-toolbar > div:first-child,
  .shifts-toolbar > #shiftFilterForm {
    grid-column: 1 / -1 !important;
  }
  .shifts-toolbar #shiftFilterForm {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    flex-direction: row !important;
    gap: 8px !important;
  }
  .shifts-toolbar #shiftFilterForm select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
  }
  .shifts-toolbar #shiftFilterForm select[name="project_id"] {
    grid-column: 1 / -1 !important;
  }
  .shifts-toolbar > form:not(#shiftFilterForm),
  .shifts-toolbar > .dropdown {
    display: block !important;
  }
  .shifts-toolbar .btn {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .shifts-toolbar #filterEmployeeName {
    padding-right: 44px !important;
  }
}