/* ===== ROOT VARIABLES ===== */
:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 12px;
    --radius-sm: 8px;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    /* Mobil: genel touch-action kısıtlaması KALDIRILDI.
       Alt elemanlar kendi touch-action'larını doğru belirliyor.
       Buradaki pan-y kısıtı frozen-table gibi yatay scroll gereken
       container'larda dokunma olaylarını tarayıcı seviyesinde bloke ediyordu. */
    overscroll-behavior-y: contain;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea {
    font-family: inherit;
    /* iOS Safari otomatik zoom'u engelle: font-size 16px'den küçük olduğunda
       mobil Safari input'a odaklanınca sayfayı yakınlaştırır. 16px ile bu engellenir. */
    font-size: 16px !important;
    touch-action: manipulation;
}

/* ===== LOGIN ===== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    color: white;
    box-shadow: 0 8px 20px rgba(30,64,175,0.4);
}

.login-logo h1 { font-size: 24px; font-weight: 700; color: var(--secondary); }
.login-logo p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.law-badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 8px;
    border: 1px solid #bfdbfe;
}

.login-form { margin-bottom: 24px; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-group label i { margin-right: 6px; }

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.2s;
    background: white;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.login-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 12px;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(30,64,175,0.3);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30,64,175,0.4); }

.demo-users { border-top: 1px solid var(--border); padding-top: 20px; }
.demo-users p { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; text-align: center; }

.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.demo-grid button {
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text);
    transition: all 0.2s;
}
.demo-grid button:hover { background: #eff6ff; border-color: var(--primary-light); color: var(--primary); }

/* ===== APP LAYOUT ===== */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
    /* Mobil rubber-band / pull-to-refresh'i engelle */
    overscroll-behavior: none;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--secondary);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    /* GPU katmanına al — transform animasyonu sırasında donmayı önle */
    will-change: transform;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow-y: auto;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo { display: flex; align-items: center; gap: 12px; }
.sidebar-logo i { font-size: 24px; color: var(--primary-light); }
.sidebar-title { display: block; font-weight: 700; font-size: 16px; }
.sidebar-sub { display: block; font-size: 11px; color: #94a3b8; }

.sidebar-close {
    color: #94a3b8;
    font-size: 18px;
    display: none;
    padding: 4px;
}

/* ===== PC SIDEBAR DARALT/GENİŞLET ===== */
.sidebar-collapse-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Daraltılmış sidebar — PC'de animasyonlu gizle */
.app.sidebar-collapsed .sidebar {
    width: 0;
    overflow: hidden;
    min-width: 0;
    padding: 0;
}
/* Sidebar geçiş animasyonu (zaten transition: transform var, width de olsun) */
.sidebar {
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-card {
    margin: 16px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.user-name { display: block; font-weight: 600; font-size: 14px; }

.user-role-badge {
    display: inline-block;
    background: rgba(59,130,246,0.2);
    color: var(--primary-light);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 2px;
}

.sidebar-nav { flex: 1; padding: 8px; }

.nav-section {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 8px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 2px;
}

.nav-item:hover { background: rgba(255,255,255,0.07); color: white; }
.nav-item.active { background: var(--primary); color: white; }
.nav-item i { width: 18px; text-align: center; font-size: 15px; }

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); }

.btn-logout {
    width: 100%;
    padding: 10px;
    background: rgba(239,68,68,0.15);
    color: #f87171;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-logout:hover { background: rgba(239,68,68,0.25); }

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    overscroll-behavior: contain;
}

/* ===== TOPBAR ===== */
.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text);
    transition: all 0.2s;
}
.menu-toggle:hover { background: var(--border); }

.page-title { font-size: 18px; font-weight: 700; color: var(--text); }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.notification-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}
.notification-btn:hover { background: var(--border); }

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.topbar-user { display: flex; align-items: center; gap: 8px; }
.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
}
#topbarName { font-size: 14px; font-weight: 600; }

/* ===== BİLDİRİM PANELİ ===== */
.notif-panel {
    position: absolute;
    top: var(--topbar-height);
    right: 24px;
    width: 360px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 200;
    max-height: 480px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notif-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-header h3 { font-size: 15px; font-weight: 700; }
.notif-header button { font-size: 12px; color: var(--primary); font-weight: 600; }

.notif-list { overflow-y: auto; }

.notif-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #eff6ff; }
.notif-item.unread:hover { background: #dbeafe; }

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.notif-body { flex: 1; min-width: 0; }
.notif-msg { font-size: 13px; color: var(--text); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ===== PAGE CONTENT ===== */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    /* touch-action: pan-y kaldırıldı — alt scroll container'ların
       yatay/çapraz swipe'ını tarayıcı seviyesinde bloke ediyordu.
       Her scroll container kendi touch-action'ını kendisi belirliyor. */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    /* İş listesi modu: overflow hidden + flex column (JS tarafından ayarlanır) */
}
/* İş listesi açıkken page-content flex column olur */
.page-content.is-listesi-modu {
    overflow: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
    /* Yatay + dikey scroll alt elemamlara devredildi */
    touch-action: auto;
}

/* ===== AJANDA TAM EKRAN MODU ===== */
.page-content.ajanda-modu {
    overflow: hidden;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    touch-action: auto;
    height: 100%;
}

/* Ajanda nav bar — üst kısım sabit yükseklikte */
.page-content.ajanda-modu > .ajanda-nav {
    flex-shrink: 0;
}

/* Ajanda tablo sarmalayıcı — kalan tüm alanı doldur */
.page-content.ajanda-modu #ajandaWrap {
    flex: 1 1 0;
    min-height: 0;
    max-height: none !important;
    height: auto !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* ===== CARDS ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i { color: var(--primary); }

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-info {}
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d97706; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #0891b2; }

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* ===== BADGES / STATUS ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-beklemede { background: #fef3c7; color: #92400e; }
.badge-sahaya_atandi { background: #dbeafe; color: #1e40af; }
.badge-saha_tamamlandi { background: #d1fae5; color: #065f46; }
.badge-laboratuvarda { background: #ede9fe; color: #5b21b6; }
.badge-lab_tamamlandi { background: #d1fae5; color: #065f46; }
.badge-analizde { background: #fce7f3; color: #9d174d; }
.badge-analiz_tamamlandi { background: #d1fae5; color: #065f46; }
.badge-teslim_edildi { background: #bbf7d0; color: #14532d; border: 1px solid #86efac; }
.badge-onaylandi { background: #d1fae5; color: #065f46; }
.badge-itiraz { background: #fee2e2; color: #991b1b; }
.badge-geri_bildirim { background: #fff3cd; color: #92400e; }
.badge-tamamlandi { background: #d1fae5; color: #065f46; }

/* ===== TABLO ===== */
.table-wrapper {
    overflow-x: auto;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:hover td { background: #f8fafc; }
.data-table tr:last-child td { border-bottom: none; }

/* ===== MODAL — TAM EKRAN ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(3px);
    animation: overlayIn 0.2s ease;
    /* Mobile browser bar fix */
    height: 100%;
    min-height: -webkit-fill-available;
    touch-action: none;
    overscroll-behavior: contain;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes overlayOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.modal {
    background: white;
    border-radius: 0;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100svh !important;
    max-height: 100vh !important;   /* fallback */
    height: 100svh !important;
    height: 100vh !important;       /* fallback */
    height: -webkit-fill-available !important;
    overflow: hidden;           /* Kendisi scroll etmez */
    box-shadow: none;
    border-radius: 0 !important;
    margin: 0 !important;
    animation: modalSlideIn 0.25s ease;
    display: flex;
    flex-direction: column;
    will-change: transform;
    overscroll-behavior: contain;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    min-height: 56px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: inherit;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.modal-close:hover { background: rgba(255,255,255,.35); }

/* Geri butonu — modal header sol köşesi */
.modal-back-btn {
    background: rgba(255,255,255,0.18);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    flex-shrink: 0;
    transition: background 0.15s;
}
.modal-back-btn:hover { background: rgba(255,255,255,0.32); }

.modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.modal-body-wide {
    max-width: 100%;
}
.modal-footer {
    padding: 10px 16px;
    border-top: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
    flex-shrink: 0;          /* Footer asla küçülmez */
    box-shadow: 0 -2px 8px rgba(0,0,0,.08);
    z-index: 5;
}
/* Form modallarında butonlar tam genişlik — Yığma/Çelik/Karma/Ahşap */
.modal-footer.footer-full {
    gap: 8px;
}
.modal-footer.footer-full .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center;
    justify-content: center;
}

/* ===== FORM STİLLERİ ===== */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.2s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-group textarea { resize: vertical; min-height: 80px; }

/* ===== DURUM AKIŞ ÇUBUĞU ===== */
.workflow-bar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 20px 0;
    overflow-x: auto;
    margin-bottom: 24px;
}

.workflow-step {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 100px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    border: 3px solid var(--border);
    background: white;
    color: var(--text-muted);
    transition: all 0.3s;
}

.step-circle.done { background: var(--success); border-color: var(--success); color: white; }
.step-circle.active { background: var(--primary); border-color: var(--primary); color: white; }

.step-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-align: center; }
.step-label.done, .step-label.active { color: var(--text); }

.step-line {
    flex: 1;
    height: 3px;
    background: var(--border);
    min-width: 40px;
    max-width: 80px;
}
.step-line.done { background: var(--success); }

/* ===== ALERT ===== */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--warning); }
.alert-danger { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-info { background: #e0f2fe; color: #0c4a6e; border-left: 4px solid var(--info); }

/* ===== SEARCH & FILTER ===== */
.search-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-input-wrap input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.search-input-wrap input:focus {
    outline: none;
    border-color: var(--primary-light);
}

/* ===== BOŞ DURUM ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 14px; }

/* ===== BINA KART ===== */
.building-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.building-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }

.building-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.building-is-no { font-size: 12px; font-weight: 700; color: var(--primary); }
.building-adres { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.building-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.building-meta span { display: flex; align-items: center; gap: 4px; }

.building-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); }
.building-team { font-size: 12px; color: var(--text-muted); }
.building-date { font-size: 12px; color: var(--text-muted); }

/* ===== DURUM RENK ŞERIDI ===== */
.building-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
}
.building-card.beklemede::before { background: var(--warning); }
.building-card.sahaya_atandi::before { background: var(--primary); }
.building-card.saha_tamamlandi::before { background: var(--info); }
.building-card.laboratuvarda::before { background: purple; }
.building-card.lab_tamamlandi::before { background: var(--info); }
.building-card.analizde::before { background: #ec4899; }
.building-card.analiz_tamamlandi::before { background: var(--success); }
.building-card.onaylandi::before { background: var(--success); }
.building-card.itiraz::before { background: var(--danger); }
.building-card.tamamlandi::before { background: #10b981; }

/* ===== GRID LAYOUT ===== */
.buildings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* ===== AJANDA ===== */
.ajanda-list { display: flex; flex-direction: column; gap: 8px; }

.ajanda-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
}

.ajanda-item.done { border-left-color: var(--success); opacity: 0.7; }
.ajanda-item.urgent { border-left-color: var(--danger); }

.ajanda-date { 
    text-align: center;
    min-width: 48px;
}
.ajanda-day { font-size: 22px; font-weight: 800; line-height: 1; }
.ajanda-month { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.ajanda-content { flex: 1; }
.ajanda-title { font-size: 14px; font-weight: 600; }
.ajanda-sub { font-size: 12px; color: var(--text-muted); }

/* ===== TOAST BİLDİRİM ===== */
.toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 12px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    max-width: 340px;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)     scale(1); }
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    :root { --sidebar-width: 240px; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        touch-action: pan-y;
    }

    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .sidebar-overlay { touch-action: none; }
    .sidebar-close { display: flex; }
    /* Mobilde daraltma butonu gizle */
    .sidebar-collapse-btn { display: none; }
    /* Mobilde collapsed class etkisizleştir */
    .app.sidebar-collapsed .sidebar { width: var(--sidebar-width); overflow-y: auto; min-width: var(--sidebar-width); }

    .page-content { padding: 16px; }
    .topbar { padding: 0 16px; }
    #topbarName { display: none; }

    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }

    .stats-grid { grid-template-columns: 1fr 1fr; }

    .modal { max-height: 100vh; }
    .modal-body { padding: 16px; }
    .notif-panel { width: calc(100vw - 32px); right: 16px; }

    .buildings-grid { grid-template-columns: 1fr; }

    .card-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .demo-grid { grid-template-columns: 1fr; }
    .page-content { padding: 12px; }
    .card { padding: 16px; }
}

/* ===== FROZEN TABLE (Koordinatör İş Tablosu) ===== */
/* ===== DURUM FİLTRE KUTUCUKLARI ===== */
#durumKutuculari button {
    transition: all 0.18s ease;
    user-select: none;
}
#durumKutuculari button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.12) !important;
}

/* Tablo wrapper: tek scroll container (x+y) — yükseklik JS ile dinamik ayarlanır */
.frozen-table-wrap {
    position: relative;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: auto;
    overflow-y: auto;
    /* pan-x pan-y pinch-zoom: tarayıcıya hem yatay hem dikey hem de
       pinch-zoom dokunma hareketlerini bu container'dan işlemesini söyler.
       Üst elemanlarda touch-action kısıtı olmadığından bu değer etkin çalışır. */
    touch-action: pan-x pan-y pinch-zoom;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 0;
    min-height: 200px;
    transform-origin: 0 0;
    will-change: transform;
}

.frozen-table-scroll {
    /* Artık kullanılmıyor — eski yapıdan kalma */
    overflow: visible;
}

.frozen-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 12px;
    table-layout: fixed;
}

/* Header TH — ortak stil */
.frozen-table th {
    color: white;
    padding: 10px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.18);
    border-bottom: 2px solid rgba(255,255,255,0.2);
    user-select: none;
    cursor: pointer;
    overflow: hidden;
    /* position: relative buraya yazma — sticky'yi kırıyor */
}

/* Başlık satırı: sticky */
.frozen-table thead tr:first-child th {
    position: sticky !important;
    top: 0 !important;
    z-index: 21 !important;
    /* Arkaplan opak olmalı — aksi hâlde scroll'da içerik üstünden geçince şeffaf görünür */
    /* background: Renk bandları aşağıdaki nth-child kurallarından geliyor */
}
/* Başlık arka planları (tekrar tanımla — !important ile override) */
.frozen-table thead tr:first-child th:nth-child(odd)  { background: #1e3a8a !important; }
.frozen-table thead tr:first-child th:nth-child(even) { background: #1e40af !important; }

/* 2. satır (filtre) sticky */
.frozen-table thead tr.filter-row th {
    position: sticky !important;
    top: 34px;   /* JS tarafından override edilir */
    z-index: 20 !important;
}
/* Filtre arka planları */
.frozen-table thead tr.filter-row th:nth-child(odd)  { background: #172554 !important; }
.frozen-table thead tr.filter-row th:nth-child(even) { background: #1e3a8a !important; }

/* Resize handle */
.col-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 10;
    background: transparent;
    transition: background 0.15s;
}
.col-resize-handle:hover,
.col-resize-handle.resizing {
    background: rgba(255,255,255,0.35);
}

.frozen-table th:hover { filter: brightness(1.1); }
.frozen-table th.sorted-asc::after { content: ' ↑'; }
.frozen-table th.sorted-desc::after { content: ' ↓'; }

/* Renk bantları yukarıda !important ile tanımlandı — burası kaldırıldı */

/* Satır zebra stripe — tek satır açık, çift satır hafif koyu */
.frozen-table tbody tr:nth-child(odd)  td { background: #f8fafc; }
.frozen-table tbody tr:nth-child(even) td { background: #ffffff; }

.frozen-table tr:hover td {
    background: #e8f0fe !important;
    transition: background 0.15s;
}

/* Seçili satır — tüm td'ler boyunca yatay kaydırmada da sabit renk */
.frozen-table tbody tr.satir-secili td {
    background: #fef08a !important;          /* canlı sarı */
    border-top: 2px solid #f59e0b !important;
    border-bottom: 2px solid #f59e0b !important;
}
.frozen-table tbody tr.satir-secili:hover td {
    background: #fde047 !important;          /* hover'da biraz daha koyu */
}

/* Freeze YOK — tüm sütunlar birlikte kayar */

.frozen-table td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid rgba(203,213,225,0.5);
    white-space: nowrap;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    /* Satır yüksekliğini sabit tut — çok satırlı içerik kesilir */
    max-height: 32px;
    line-height: 1.3;
}

/* Filtre satırı — renk ve padding (sticky page-content'e göre üstte kalır) */
.frozen-table .filter-row th {
    padding: 4px 6px;
}
.frozen-table .filter-row th:nth-child(odd)  { background: #172554; }
.frozen-table .filter-row th:nth-child(even) { background: #1e3a8a; }

.col-filter {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 4px;
    font-size: 11px;
    background: rgba(255,255,255,0.1);
    color: white;
    min-width: 60px;
}

.col-filter::placeholder { color: rgba(255,255,255,0.5); }
.col-filter:focus { outline: none; background: rgba(255,255,255,0.2); }
.col-filter option { background: #1e3a8a; color: white; }

/* ===== AJANDA HAFTALIK ===== */
.ajanda-weekly {
    display: grid;
    grid-template-columns: 100px 1fr 1fr 1fr;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-height: 500px;
}

.ajanda-weekly-header {
    display: contents;
}

.ajanda-week-col-header {
    background: #1e3a8a;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    border-right: 1px solid rgba(255,255,255,0.15);
    position: sticky;
    top: 0;
    z-index: 5;
}

.ajanda-date-cell {
    padding: 8px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #fef9f0;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 12px;
}

.ajanda-date-num {
    font-size: 22px;
    font-weight: 900;
    color: #f59e0b;
    line-height: 1;
}

.ajanda-date-day {
    font-size: 11px;
    color: #92400e;
    font-weight: 600;
    text-transform: uppercase;
}

.ajanda-date-month {
    font-size: 10px;
    color: #b45309;
}

.ajanda-team-cell {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 6px;
    min-height: 160px;
    background: white;
    position: relative;
}

.ajanda-team-cell.drag-over {
    background: #eff6ff;
    border: 2px dashed var(--primary);
}

/* ── Ajanda: Ekip hücre kapsayıcısı ── */
.ajanda-ekip-td {
    padding: 6px;
    vertical-align: top;
}

/* Her hücredeki slot listesi — flex column, eşit yükseklik */
.ajanda-slots-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
}

/* ── Dolu iş kartı ── */
.ajanda-job-item {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
    cursor: grab;
    transition: all 0.15s;
    position: relative;
    /* Sabit yükseklik — tüm kartlar eşit boyutlu */
    min-height: 82px;
    height: 82px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-sizing: border-box;
    overflow: hidden;
}
.ajanda-job-item:active { cursor: grabbing; opacity: 0.7; }
.ajanda-job-item:hover { box-shadow: 0 2px 8px rgba(59,130,246,0.3); transform: translateY(-1px); }

/* ── Boş placeholder slot — iş kartıyla aynı yükseklikte ── */
.ajanda-job-placeholder {
    min-height: 82px;
    height: 82px;
    border: 1.5px dashed #e2e8f0;
    border-radius: 6px;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.15s;
    box-sizing: border-box;
    color: #cbd5e1;
    font-size: 11px;
}
.ajanda-job-placeholder:hover {
    background: #f0f9ff;
    border-color: #7dd3fc;
    color: #0ea5e9;
}
.ajanda-job-placeholder i { font-size: 14px; }

.ajanda-job-no  { font-weight: 700; color: #1e40af; font-size: 10px; display: flex; align-items: center; gap: 4px; }
.ajanda-job-adres { color: #1e293b; font-weight: 600; line-height: 1.3; font-size: 11px; }
.ajanda-job-meta  { color: #64748b; font-size: 10px; line-height: 1.4; }

/* Ajanda haftalık tablo — tüm satırlar eşit */
#ajandaTable tbody tr {
    /* Yükseklik JS'deki slot sayısından otomatik gelir, min koy */
}
#ajandaTable tbody tr td {
    vertical-align: top;
    padding: 6px;
}

/* ── İnce "Ekle" butonu (4. slot) ── */
.ajanda-add-btn {
    width: 100%;
    padding: 5px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    box-sizing: border-box;
}
.ajanda-add-btn:hover { background: #eff6ff; color: var(--primary); border-color: var(--primary); }

/* ── Aylık görünüm: hücre içi küçük ekle butonu ── */
.ajanda-aylik-ekle-btn {
    width: 100%;
    padding: 3px 4px;
    border: 1px dashed #e2e8f0;
    border-radius: 4px;
    font-size: 10px;
    color: #cbd5e1;
    text-align: center;
    cursor: pointer;
    background: transparent;
    margin-top: 3px;
    transition: all 0.15s;
    display: block;
}
.ajanda-aylik-ekle-btn:hover {
    background: #eff6ff;
    color: var(--primary);
    border-color: var(--primary);
}

/* Aylık takvim hücre — drag-over vurgusu */
#ajandaTable td[ondragover]:hover { background: #f0f9ff !important; }

.team-header-cell {
    padding: 8px 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.team-names {
    font-size: 10px;
    font-weight: 600;
    color: #ef4444;
    margin-top: 4px;
    text-align: center;
    line-height: 1.4;
}

.job-count-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 10px;
    margin-top: 2px;
}

.job-count-badge.full { background: rgba(239,68,68,0.3); }

/* ===== MUHASEBE ===== */
.odeme-progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 4px;
}

.odeme-progress-bar {
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s;
}

.taksit-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.taksit-odendi { background: #d1fae5; color: #065f46; }
.taksit-bekliyor { background: #fef3c7; color: #92400e; }
.taksit-gecikti { background: #fee2e2; color: #991b1b; }

/* ===== PRINT (eski — genel) ===== */
@media print {
    .sidebar, .topbar, .toast-container { display: none !important; }
    .main-content { margin-left: 0; }
    .page-content { padding: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; }
    .frozen-table-scroll { max-height: none; overflow: visible; }
    /* Not: .modal-overlay burada gizlenmez — teklif print layer ayrı yönetilir */
}

/* ===== SCROLL ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
* { scrollbar-width: thin; scrollbar-color: #94a3b8 #e2e8f0; }

/* ===== LOADING ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-muted);
    gap: 12px;
}
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.w-full { width: 100%; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.hidden { display: none; }

/* ===== FİRMA SEKMELER ===== */
.firma-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.firma-tab {
    padding: 6px 14px;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
}

.firma-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.firma-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== FİYATLANDIRMA ===== */
.fiyat-model-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.fiyat-model-card:hover,
.fiyat-model-card.selected {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px #dbeafe;
}

.fiyat-model-card .fiyat-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--primary);
}

.fiyat-model-card .fiyat-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--secondary);
    margin-bottom: 4px;
}

.fiyat-model-card .fiyat-desc {
    font-size: 11px;
    color: #64748b;
}

/* ===== PERSONEL KART ===== */
.personel-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

/* ===== ARAÇ KART ===== */
.arac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}

.arac-plaka {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    background: #eff6ff;
    border: 2px solid var(--primary-light);
    border-radius: 6px;
    padding: 4px 12px;
    display: inline-block;
}

/* ===== CARİ KART ===== */
.cari-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.sozlesme-kart {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.sozlesme-kart::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(59,130,246,0.1);
    border-radius: 50%;
}

/* ===== GELİR/GİDER ROW RENK ===== */
.gg-row-gelir { background: #f0fdf4; }
.gg-row-gider { background: #fff5f5; }

/* ===== MUHASEBE ÖZET BAR ===== */
.muhasebe-ozet-bar {
    display: flex;
    gap: 16px;
    padding: 12px 18px;
    background: linear-gradient(to right, #eff6ff, #f0fdf4);
    border-radius: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid var(--border);
}

/* ===== PERSONEL ÖDEME TARİHÇE ===== */
.odeme-gecmisi-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.odeme-gecmisi-item:last-child { border-bottom: none; }

/* ===== HGS DÜŞÜK UYARI ===== */
.hgs-warning {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== BORÇ/ALACAK BADGE ===== */
.borc-badge {
    background: #fee2e2;
    color: #dc2626;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.alacak-badge {
    background: #d1fae5;
    color: #059669;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* ===== ROW PAID/PENDING ===== */
.row-paid { background: #f0fdf4 !important; }
.row-paid:hover td { background: #dcfce7 !important; }
.row-pending { background: #fff5f5 !important; }
.row-pending:hover td { background: #fee2e2 !important; }

/* ===== HATIRLATMA ACIL ===== */
.hatirlatma-acil {
    border-left: 4px solid #ef4444;
    background: #fff5f5;
}

.hatirlatma-yakin {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

/* ===== MUHASEBE FİYAT HESAP ===== */
.fiyat-hesap-box {
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 10px;
}

.fiyat-hesap-satir {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px dashed #bfdbfe;
}

.fiyat-hesap-satir:last-child {
    border-bottom: none;
    font-weight: 800;
    font-size: 15px;
    color: var(--primary);
    padding-top: 8px;
    margin-top: 4px;
    border-top: 2px solid #bfdbfe;
}

/* ===== CARD-BODY TOGGLE ===== */
.card-body { padding: 0 16px 16px; }

/* ===== KAT BAŞI FİYAT TABLOSU ===== */
.fiyat-tablosu {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}

.fiyat-tablosu th {
    background: #1e3a8a;
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-size: 11px;
}

.fiyat-tablosu td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.fiyat-tablosu tr:hover td { background: #f8fafc; }

/* ===== RESPONSIVE MUHASEBE ===== */
@media (max-width: 768px) {
    .personel-list-grid,
    .arac-grid,
    .cari-grid {
        grid-template-columns: 1fr;
    }
    
    .muhasebe-ozet-bar {
        gap: 10px;
    }
    
    .firma-tabs {
        width: 100%;
    }
}

/* ===== FİRMA SEKME BUTONLARI ===== */
.firma-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.firma-tab {
    padding: 6px 16px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: white;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.firma-tab:hover { border-color: var(--primary); color: var(--primary); }
.firma-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== MUHASEBE ÖZEL STİLLER ===== */

/* Ödeme tablosu — yeşil/kırmızı satır */
.frozen-table tr.row-paid td { background: #f0fdf4 !important; }
.frozen-table tr.row-paid:hover td { background: #dcfce7 !important; }
.frozen-table tr.row-paid td:nth-child(1),
.frozen-table tr.row-paid td:nth-child(2) { background: #dcfce7 !important; }

.frozen-table tr.row-pending td { background: #fff5f5 !important; }
.frozen-table tr.row-pending:hover td { background: #fee2e2 !important; }
.frozen-table tr.row-pending td:nth-child(1),
.frozen-table tr.row-pending td:nth-child(2) { background: #fee2e2 !important; }

/* Ödeme tablosu — özel frozen (odeme-table sınıfı için nth-child override yok) */
.frozen-table.odeme-table td:nth-child(1),
.frozen-table.odeme-table td:nth-child(2) {
    background: inherit; /* renk row seviyesinde kontrol edilir */
    border-right: 2px solid #e2e8f0;
    box-shadow: 2px 0 4px rgba(0,0,0,0.06);
}

/* Kasa/Banka hareket satırları */
.kasa-gelir { color: #059669; font-weight: 700; }
.kasa-gider { color: #ef4444; font-weight: 700; }

/* Taksit badge */
.taksit-odendi {
    background: #d1fae5;
    color: #059669;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-block;
    margin: 2px;
}
.taksit-bekliyor {
    background: #fee2e2;
    color: #ef4444;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-block;
    margin: 2px;
}
.taksit-odendi:hover { background: #a7f3d0; transform: scale(1.05); }
.taksit-bekliyor:hover { background: #fecaca; transform: scale(1.05); }

/* ===== ARAÇ / HATIRLATMA KARTLARI ===== */
.arac-kart-kritik { border-color: #f59e0b !important; }

/* Firma tab bar */
.firma-tab-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

/* Kasa/banka özet */
.kasa-ozet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 480px) { .kasa-ozet-grid { grid-template-columns: 1fr; } }

/* Hatırlatma kart urgency renkleri */
.hat-gecikti  { border-left-color: #ef4444 !important; }
.hat-yakinda  { border-left-color: #f59e0b !important; }
.hat-normal   { border-left-color: #1e40af !important; }
.hat-tamam    { border-left-color: #059669 !important; opacity: 0.7; }

/* Gelir/Gider tablo */
.gg-gelir-row td:first-child { border-left: 3px solid #059669; }
.gg-gider-row td:first-child { border-left: 3px solid #ef4444; }

/* ===== PWA & OFFLINE ===== */

/* PWA Kur Butonu */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 20px #1e40af44;
    transition: transform .2s, box-shadow .2s;
}
.pwa-install-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px #1e40af55; }
.pwa-install-btn i { font-size: 16px; }

/* Sync badge (topbar'a) */
.sync-badge-wrap { position: relative; }
#syncBadge {
    position: absolute;
    top: -4px; right: -4px;
    background: #f59e0b;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ===== SAHA FÖY SİSTEMİ — GENİŞLETİLMİŞ ===== */

/* Genel bölüm kutusu */
.foy-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}
.foy-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1.5px solid #f1f5f9;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.foy-sub-title {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin: 10px 0 6px;
}
.req { color: #ef4444; }
.foy-textarea {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    width: 100%;
    resize: vertical;
    font-size: 13px;
    font-family: inherit;
}
.foy-textarea:focus { outline: none; border-color: var(--primary); }

/* Grid yardımcıları */
.foy-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.foy-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.foy-grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 600px) {
    .foy-grid-3, .foy-grid-4 { grid-template-columns: 1fr 1fr; }
    .foy-grid-2 { grid-template-columns: 1fr; }
}

/* Bilgi barı (oran göstergesi) */
.foy-info-bar {
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid #059669;
    color: #059669;
    background: #f0fdf4;
    margin-bottom: 10px;
}

/* Boş ipucu */
.foy-empty-hint {
    text-align: center;
    color: #94a3b8;
    padding: 20px;
    font-size: 13px;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px dashed #e2e8f0;
}

/* ===== DASHBOARD SLIDE DOWN ANİMASYONU ===== */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Koordinatör durum dropdown */
.durum-secici-wrap select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30,64,175,0.15);
}

/* İtiraz / Geri bildirim kırmızı badge */
.badge-geri_bildirim {
    background: #fff3cd;
    color: #d97706;
}

/* Raportör cevap tamamlandi yeşil kart */
.raporter-cevap-tamam {
    border-color: #10b981 !important;
    border-left-color: #10b981 !important;
    background: #f0fdf4 !important;
    transition: all 0.4s ease;
}

/* Stat kart hover efekti */
.stat-card-clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Dashboard filtre paneli */
#dashFiltrePaneli .data-table tr:hover td {
    background: #f0f9ff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Koordinatör durum dropdown (iş listesi) */
.koordinator-durum-select {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    padding: 4px 28px 4px 10px;
    min-width: 120px;
    transition: box-shadow 0.2s;
}
.koordinator-durum-select:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.koordinator-durum-select:focus {
    box-shadow: 0 0 0 3px rgba(30,64,175,0.2);
}

/* Raportör itiraz/geri bildirim kart geçiş animasyonu */
[id^="raporter_kart_"] {
    transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.3s ease;
}
[id^="raporter_kart_"]:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Cevap Ver butonu animasyonu */
@keyframes pulseRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
.btn-cevap-ver {
    animation: pulseRed 2s infinite;
}

/* Dashboard stat kart açık/seçili hali */
.stat-card-active {
    border: 2px solid currentColor;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
    transform: translateY(-2px);
}

/* ── SIYIRMA KOLON KARTI ── */
.siyirma-kart {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #7c3aed;
    margin-bottom: 12px;
    overflow: hidden;
}
.sk-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.sk-tip-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.sk-no-input {
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 700;
    width: 80px;
    color: #1e293b;
}
.sk-no-input:focus { outline: none; border-color: var(--primary); }
.sk-body {
    padding: 12px 14px;
}

/* Korozyon sonuç kutusu */
.korozyon-sonuc {
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    height: 38px;
    display: flex;
    align-items: center;
    margin-top: 22px; /* form-group label ile hizala */
}
.korozyon-sonuc.korozyon-aktif {
    background: #fff;
    border-color: currentColor;
}

/* Korozyon özet kartı */
.korozyon-ozet {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 10px 0 0;
    border: 1px solid #e2e8f0;
}
.kor-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    flex-wrap: wrap;
}
.kor-label {
    font-weight: 600;
    color: #475569;
    min-width: 140px;
}
.kor-val { font-weight: 700; }

/* ── SCHMIDT TABLO ── */
.schmidt-tablo {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.schmidt-tablo th {
    background: #f8fafc;
    padding: 8px 6px;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-align: center;
    white-space: nowrap;
}
.schmidt-tablo td {
    padding: 4px 3px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}
.schmidt-tablo tr:hover td { background: #f8fafc; }

/* ── FOTOĞRAF KUTULARI ── */
.sk-foto-wrap {
    padding: 10px 14px 14px;
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
}
.foy-foto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.foto-kutu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.foto-preview {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f1f5f9;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #94a3b8;
    overflow: hidden;
    transition: border-color .2s;
    cursor: pointer;
}
.foto-preview:hover { border-color: var(--primary); }
.foto-ad {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}
.foto-butonlar {
    display: flex;
    gap: 4px;
}
.foto-btn-galeri {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
}
.foto-btn-kamera {
    background: #f0fdf4;
    color: #059669;
    border: 1px solid #a7f3d0;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
}
.foto-btn-sil {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: none;
    align-items: center;
}

/* ══════════════════════════════════════════
   FÖY KAYIT GÖRÜNTÜLEME — TAM TABLO SİSTEMİ
══════════════════════════════════════════ */
.foy-kayit-wrap {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: box-shadow .2s;
}
.foy-kayit-wrap:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.09);
}
.foy-kayit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    font-size: 13px;
}
.fkh-kat {
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
}
.fkh-bilgi {
    font-size: 12px;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}
.fkh-tarih {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
    white-space: nowrap;
}

/* ── FÖY TABLO SARICI ── */
.foy-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.foy-table-wrap::-webkit-scrollbar { height: 9px; width: 9px; }
.foy-table-wrap::-webkit-scrollbar-track { background: #f1f5f9; }
.foy-table-wrap::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
.foy-table-wrap::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ── FÖY TABLOSU ── */
.foy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 760px;
}
.foy-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}
/* Grup başlık satırı */
.foy-thead-grup th {
    padding: 8px 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.18);
    border-right: 1px solid rgba(255,255,255,.12);
}
.foy-thead-grup th:last-child { border-right: none; }
.fth-eleman  { background: #334155; color: #fff; }
.fth-boyuna  { background: #1e40af; color: #fff; }
.fth-etriye  { background: #b45309; color: #fff; }
.fth-diger   { background: #374151; color: #fff; }
/* Alt başlık satırı */
.foy-thead-alt th {
    padding: 7px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 2px solid #cbd5e1;
    border-right: 1px solid #e8ecf0;
    color: #475569;
    background: #f8fafc;
}
.foy-thead-alt th:last-child { border-right: none; }
.foy-thead-alt-eleman th:nth-child(-n+3) { background: #64748b12; color: #334155; }
/* Karot-specific alt başlık  */
.foy-thead-alt-karot th:nth-child(-n+3) { background: #0d948812; color: #065f46; }

/* Tablo body satırları */
.foy-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}
.foy-table tbody tr:last-child { border-bottom: none; }
.foy-table tbody tr:hover:not(.foy-kat-separator) { background: #f0f7ff !important; }
.foy-table td {
    padding: 8px 10px;
    vertical-align: middle;
    text-align: center;
    color: #1e293b;
    line-height: 1.4;
}

/* Kat separator satırı */
.foy-kat-separator td {
    padding: 0 !important;
}
.foy-kat-separator:hover td { background: transparent !important; }

/* Özel hücre tipleri */
.td-no       { font-weight: 700; font-size: 13px; color: #1e293b; }
.td-kesit    { font-family: monospace; font-size: 12px; font-weight: 600; color: #334155; }
.td-x        { color: #94a3b8; margin: 0 1px; }
.td-donati   { font-size: 11px; }
.dt-adet     { color: #64748b; font-size: 11px; margin-right: 2px; }
.td-cap      { font-size: 12px; font-weight: 600; font-family: monospace; }
.td-korozyon { font-size: 11px; font-weight: 700; border-radius: 4px; line-height: 1.5; padding: 5px 7px !important; }
.kor-pct     { font-size: 13px; font-weight: 900; display: block; }
.td-aralik   { font-weight: 600; font-size: 12px; color: #475569; }
.td-foto     { white-space: nowrap; }
.td-bos      { color: #cbd5e1; font-size: 15px; letter-spacing: 1px; }

/* Eleman badge tipleri */
.eleman-badge         { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; background: #e2e8f0; color: #475569; }
.ebt-kolon            { background: #7c3aed18; color: #7c3aed; }
.ebt-perde            { background: #0891b218; color: #0891b2; }
.ebt-kiriş, .ebt-kiris { background: #f59e0b18; color: #b45309; }
.ebt-döşeme, .ebt-doseme { background: #10b98118; color: #059669; }
.ebt-temel            { background: #6b728018; color: #374151; }
.ebt-merdiven         { background: #8b5cf618; color: #7c3aed; }
.ebt-balkon           { background: #06b6d418; color: #0e7490; }
.ebt-diğer, .ebt-diger { background: #94a3b818; color: #64748b; }

/* Beton badge */
.beton-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid;
    white-space: nowrap;
}

/* Genel ortalama summary satırı */
.foy-tbl-genel-ort td {
    background: #f8fafc;
    border-top: 2px solid #e2e8f0;
    font-weight: 700;
}

/* Tablo satır — hafif alternatif renkler */
.foy-tbl-even { background: #fff; }
.foy-tbl-odd  { background: #fafafe; }

/* Auto karot badge */
.karot-oto-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ccfbf1;
    color: #0d9488;
    border: 1px solid #99f6e4;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

/* Rölöve card table */
.rolove-bilgi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 12px;
    font-size: 12px;
    padding: 6px 0;
}
.rolove-bilgi-grid dt {
    color: #64748b;
    font-size: 11px;
    text-align: right;
    padding-right: 4px;
}
.rolove-bilgi-grid dd {
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Genel not alanı */
.foy-genel-not {
    padding: 8px 16px;
    font-size: 12px;
    color: #64748b;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.foy-genel-not i { color: #f59e0b; flex-shrink: 0; margin-top: 1px; }

/* Boş veri mesajı */
.foy-no-data {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.foto-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.foto-badge:hover { background: #dbeafe; }

/* Fotoğraf görüntüleme modal grid */
.foto-goruntule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.foto-goruntule-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.foto-goruntule-label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ══════════════════════════════════════════
   İNLİNE ATAMA DROPDOWN (Raportöre/Lab ata)
══════════════════════════════════════════ */
.atama-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    /* Mobil: dokunma alanı genişliği garantisi */
    min-height: 28px;
}
/* Mobil: buton ve div tıklama alanını genişlet */
.atama-dropdown-wrap > button,
.atama-dropdown-wrap > div:first-child {
    touch-action: manipulation;  /* double-tap zoom'u devre dışı bırak */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
.atama-panel {
    position: fixed;      /* absolute yerine fixed — scroll bağımsız */
    z-index: 99999;       /* her şeyin üstünde */
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
    width: 260px;         /* sabit genişlik */
    max-width: calc(100vw - 24px);   /* mobilden taşmasın */
    overflow: hidden;
    overflow-y: auto;     /* uzun listede kaydırılabilir */
    max-height: 420px;
    animation: dropIn .15s ease;
    /* Mobil: panel içindeki dokunmaları yut, body'ye geçirme */
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}
@keyframes dropIn {
    from { opacity:0; transform: translateY(-8px) scale(.96); }
    to   { opacity:1; transform: translateY(0) scale(1); }
}
.atama-panel-header {
    padding: 11px 14px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
}
.atama-panel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;   /* mobilde daha geniş dokunma alanı */
    cursor: pointer;
    font-size: 13px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
    -webkit-tap-highlight-color: transparent;
}
.atama-panel-item:last-child { border-bottom: none; }
.atama-panel-item:hover,
.atama-panel-item:active { background: #f5f3ff; color: #7c3aed; }
/* Saha ekibi paneli */
.atama-panel[id^="sahaPanel_"] .atama-panel-header { background: linear-gradient(135deg, #1e40af, #1e3a8a); }
.atama-panel[id^="sahaPanel_"] .atama-panel-item:hover,
.atama-panel[id^="sahaPanel_"] .atama-panel-item:active { background: #dbeafe; color: #1e40af; }
.atama-panel-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ede9fe;
    color: #7c3aed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.atama-panel-empty {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

/* ══════════════════════════════════════════
   KOORDİNATÖR İŞ LİSTESİ — GELİŞMİŞ TABLO
══════════════════════════════════════════ */
.is-listesi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.is-listesi-table thead th {
    background: #1e293b;
    color: #e2e8f0;
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,.08);
    position: sticky;
    top: 0;
    z-index: 2;
}
.is-listesi-table thead th:last-child { border-right: none; }
.is-listesi-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
}
.is-listesi-table tbody tr:hover { background: #f8faff; }
.is-listesi-table tbody tr.row-itiraz { background: #fff5f5; }
.is-listesi-table tbody tr.row-itiraz:hover { background: #fee2e2; }
.is-listesi-table td {
    padding: 9px 12px;
    vertical-align: middle;
    color: #1e293b;
}
.is-no-cell {
    font-weight: 800;
    font-size: 13px;
    color: var(--primary);
    white-space: nowrap;
    text-transform: uppercase;
}
.is-adres-cell {
    font-size: 12px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    text-transform: uppercase;
}
.is-kisi-cell {
    font-size: 12px;
    white-space: nowrap;
    text-transform: uppercase;
}
.raporter-atanmis {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #7c3aed;
    font-weight: 600;
    font-size: 12px;
}
.raporter-atanmamis {
    color: #94a3b8;
    font-size: 11px;
    font-style: italic;
}
.is-aksiyon-cell {
    white-space: nowrap;
}

/* Aksiyon gerektirenler tablosu için özel iyileştirmeler */
.aksiyon-gerektiren-tablo {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.aksiyon-gerektiren-tablo th {
    background: linear-gradient(135deg, #92400e, #b45309);
    color: #fff;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}
.aksiyon-gerektiren-tablo td {
    padding: 8px 12px;
    border-bottom: 1px solid #fef3c7;
    vertical-align: middle;
}
.aksiyon-gerektiren-tablo tbody tr:hover { background: #fffbeb; }

/* ===== ARŞİV & EXCEL IMPORT ===== */

.arsiv-container { max-width: 1100px; }

.arsiv-header-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.arsiv-title { font-size: 22px; font-weight: 700; color: #1e293b; margin: 0 0 4px; }
.arsiv-title i { color: #6366f1; margin-right: 8px; }
.arsiv-subtitle { color: #64748b; font-size: 14px; margin: 0; }
.arsiv-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ADIM GÖSTERGESİ */
.arsiv-steps {
    display: flex; align-items: center; background: #fff;
    border-radius: 12px; padding: 20px 24px; box-shadow: 0 1px 6px #0001;
    margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.arsiv-step {
    display: flex; align-items: center; gap: 10px;
    opacity: 0.4; transition: opacity .3s;
}
.arsiv-step.active { opacity: 1; }
.arsiv-step.done { opacity: 0.75; }
.step-num {
    width: 32px; height: 32px; border-radius: 50%; background: #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #64748b; transition: all .3s;
}
.arsiv-step.active .step-num { background: #6366f1; color: #fff; box-shadow: 0 0 0 4px #6366f122; }
.arsiv-step.done .step-num { background: #059669; color: #fff; }
.step-label { font-size: 13px; font-weight: 600; color: #475569; white-space: nowrap; }
.arsiv-step.active .step-label { color: #1e293b; }
.step-connector { flex: 1; min-width: 20px; height: 2px; background: #e2e8f0; margin: 0 4px; }

/* BİLGİ KARTI */
.arsiv-info-card {
    display: flex; gap: 16px; background: #eff6ff; border: 1px solid #bfdbfe;
    border-radius: 12px; padding: 20px; margin-bottom: 20px;
}
.info-icon { font-size: 28px; color: #3b82f6; flex-shrink: 0; }
.info-content h4 { margin: 0 0 10px; color: #1e40af; font-size: 15px; }
.info-content ol { margin: 0; padding-left: 18px; color: #374151; font-size: 13px; line-height: 1.8; }

/* SÜTUN REF KARTI */
.arsiv-cols-card {
    background: #fff; border-radius: 12px; box-shadow: 0 1px 6px #0001;
    margin-bottom: 20px; overflow: hidden;
}
.arsiv-cols-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px; cursor: pointer; font-weight: 600; color: #1e293b;
    background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    user-select: none;
}
.arsiv-cols-header:hover { background: #f1f5f9; }
.arsiv-cols-header i { color: #6366f1; margin-right: 8px; }
.arsiv-cols-body {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}
.col-item {
    display: flex; gap: 10px; padding: 10px 12px;
    background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0;
}
.col-item.required { border-color: #fca5a5; background: #fff5f5; }
.col-num {
    width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0;
    font-size: 11px; font-weight: 700; color: #64748b;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.col-item.required .col-num { background: #fecaca; color: #dc2626; }
.col-details { font-size: 12px; line-height: 1.6; }
.col-label { font-weight: 600; color: #1e293b; }
.col-key code { background: #e2e8f0; padding: 1px 5px; border-radius: 4px; font-size: 11px; color: #6366f1; }
.col-opts { color: #64748b; }
.col-opts code { background: #f1f5f9; padding: 1px 4px; border-radius: 3px; font-size: 10px; }
.col-ex { color: #94a3b8; font-style: italic; }
.req-badge { background: #dc2626; color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 10px; margin-left: 4px; vertical-align: middle; }

/* DROP ZONE */
.arsiv-drop-zone {
    border: 2.5px dashed #cbd5e1; border-radius: 16px; background: #f8fafc;
    padding: 48px 24px; text-align: center; cursor: pointer;
    transition: all .3s; margin-bottom: 20px;
}
.arsiv-drop-zone:hover, .arsiv-drop-zone.drag-over {
    border-color: #6366f1; background: #eef2ff;
}
.arsiv-drop-zone i { font-size: 48px; color: #a5b4fc; margin-bottom: 12px; display: block; }
.arsiv-drop-zone p { color: #64748b; font-size: 15px; margin: 4px 0; }
.arsiv-drop-zone span { color: #94a3b8; font-size: 13px; display: block; margin: 6px 0; }
.arsiv-drop-zone .btn-outline { margin-top: 8px; }
.drop-hint { font-size: 12px !important; color: #b0bec5 !important; margin-top: 8px !important; }

/* ÖNİZLEME */
.preview-container { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 6px #0001; }
.preview-summary { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ps-card {
    flex: 1; min-width: 120px; padding: 14px 18px; border-radius: 10px;
    text-align: center; border: 2px solid transparent;
}
.ps-card.total  { background: #f1f5f9; border-color: #cbd5e1; }
.ps-card.ok     { background: #f0fdf4; border-color: #86efac; }
.ps-card.warn   { background: #fffbeb; border-color: #fcd34d; }
.ps-card.err    { background: #fef2f2; border-color: #fca5a5; }
.ps-num { font-size: 28px; font-weight: 800; color: #1e293b; }
.ps-card.ok .ps-num   { color: #059669; }
.ps-card.warn .ps-num { color: #d97706; }
.ps-card.err .ps-num  { color: #dc2626; }
.ps-label { font-size: 12px; font-weight: 600; color: #64748b; margin-top: 2px; }

.preview-warning-box {
    background: #fff7ed; border: 1px solid #fdba74; border-radius: 8px;
    padding: 12px 16px; margin-bottom: 14px; color: #9a3412; font-size: 13px;
}
.preview-warning-box i { margin-right: 6px; }

.preview-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pf-btn {
    padding: 6px 14px; border-radius: 20px; border: 1.5px solid #e2e8f0;
    background: #f8fafc; font-size: 13px; cursor: pointer; font-weight: 500;
    transition: all .2s; color: #475569;
}
.pf-btn.active, .pf-btn:hover { background: #6366f1; color: #fff; border-color: #6366f1; }
.pf-btn.warn-btn.active { background: #d97706; border-color: #d97706; }
.pf-btn.err-btn.active  { background: #dc2626; border-color: #dc2626; }

.preview-table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 16px; max-height: 450px; overflow-y: auto; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.preview-table th { background: #f1f5f9; padding: 10px 10px; text-align: left; white-space: nowrap; border-bottom: 2px solid #e2e8f0; font-weight: 600; color: #475569; position: sticky; top: 0; z-index: 2; }
.preview-table td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-table tr.row-ok:hover    td { background: #f0fdf4; }
.preview-table tr.row-warn:hover  td { background: #fffbeb; }
.preview-table tr.row-error:hover td { background: #fef2f2; }
.preview-table tr.row-error td { background: #fff5f5; }
.preview-table tr.row-warn  td { background: #fffdf5; }
.status-cell { text-align: center; font-size: 16px; }
.preview-cell { cursor: default; }
.empty-cell { color: #cbd5e1; }
.issues-count {
    background: #fef3c7; color: #92400e; font-size: 11px; padding: 2px 8px;
    border-radius: 10px; cursor: pointer; white-space: nowrap;
    border: 1px solid #fcd34d;
}
.issues-count:hover { background: #fde68a; }
.issues-cell { min-width: 100px; }

.preview-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid #e2e8f0; }

/* PROGRESS */
.import-progress-wrap { margin-bottom: 20px; }
.import-progress-card {
    background: #fff; border-radius: 12px; padding: 20px;
    box-shadow: 0 1px 6px #0001;
}
.ip-header { display: flex; align-items: center; gap: 10px; color: #1e293b; font-weight: 600; margin-bottom: 12px; }
.ip-header i { color: #6366f1; }
.ip-bar-bg { background: #e2e8f0; border-radius: 100px; height: 10px; overflow: hidden; margin-bottom: 8px; }
.ip-bar { background: linear-gradient(90deg, #6366f1, #818cf8); height: 100%; border-radius: 100px; transition: width .3s; }
.ip-current { font-size: 12px; color: #94a3b8; }

/* SONUÇ */
.import-result-card { padding: 20px; }
.import-result-inner { text-align: center; padding: 40px 20px; }
.ir-icon { font-size: 64px; margin-bottom: 16px; }
.ir-icon.ir-success { color: #059669; }
.ir-icon.ir-partial  { color: #d97706; }
.import-result-inner h3 { font-size: 24px; font-weight: 700; color: #1e293b; margin: 0 0 16px; }
.ir-stats { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.ir-stat { text-align: center; }
.ir-stat strong { display: block; font-size: 32px; font-weight: 800; }
.ir-stat.success strong { color: #059669; }
.ir-stat.error strong  { color: #dc2626; }
.ir-stat span { font-size: 13px; color: #64748b; }
.ir-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ===== PİNCH ZOOM GÖSTERGE ===== */
#_pzIndicator {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    padding: 6px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    z-index: 99999;
    transition: opacity 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    letter-spacing: 0.3px;
}

/* Pinch zoom sırasında hedef elemanın taşmasına izin ver */
.page-content.pz-active,
.modal.pz-active {
    overflow: visible !important;
}

/* ===== PERFORMANS OPTİMİZASYONLARI ===== */

/* GPU katmanına al — kaydırma ve geçiş sırasında jank azalt */
.sidebar          { will-change: transform; }
.modal-overlay    { will-change: opacity; }
.modal            { will-change: transform, opacity; }
.toast            { will-change: transform, opacity; }
.notif-panel      { will-change: opacity; }

/* İçerik alanı geçiş fade-in — anlık "blink" yerine yumuşak görünüm */
#pageContent {
    animation: _pageFadeIn 0.18s ease both;
}
/* Arka planda yenilenirken yeniden tetiklenmesini önle */
#pageContent.no-anim { animation: none !important; }

@keyframes _pageFadeIn {
    from { opacity: 0.6; }
    to   { opacity: 1; }
}

/* Tablo satırları — hover geçişini GPU'ya ver */
.frozen-table tbody tr {
    will-change: background-color;
    transition: background-color 0.1s;
}

/* Stat kartları hover GPU */
.stat-card {
    will-change: transform, box-shadow;
}

/* Butonlar — transition GPU */
.btn {
    will-change: auto; /* sadece gerektiğinde */
    backface-visibility: hidden;
}

/* Nav item hover GPU */
.nav-item {
    will-change: background-color;
}

/* Skeleton loader — içerik yüklenirken görsel yer tutucu */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: _skeletonShimmer 1.2s ease-in-out infinite;
    border-radius: 6px;
}
@keyframes _skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Loading spinner — daha küçük ve hızlı */
.loading .spinner {
    animation: spin 0.6s linear infinite;
}

/* Yenileniyor banner animasyonu */
#_refreshBanner {
    animation: _bannerIn 0.2s ease both;
}
@keyframes _bannerIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 0.85; transform: translateY(0); }
}

/* İçerik chunk render sırasında tbody fade-in */
#isListeTbody tr {
    animation: _rowIn 0.12s ease both;
}
@keyframes _rowIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Föy modal — hızlı açılış */
.modal-body-wide { will-change: scroll-position; }

/* ═══════════════════════════════════════════════════
   TEKLİFLER MODULE — MOBİL UYUMLULUK
══════════════════════════════════════════════════ */

/*
 * iOS Safari zoom-in fix — GLOBAL:
 * font-size < 16px olan her input/select/textarea'ya odaklanılınca
 * iOS Safari otomatik zoom-in yapar ve zoom-out olmaz.
 * Çözüm: SİTE GENELİNDE tüm form elemanlarını >= 16px yap.
 * touch-action:manipulation çift tık zoomunu da engeller.
 */
input,
select,
textarea {
    font-size: 16px !important;
    touch-action: manipulation;
}

/* Tekrar belirtmek gerekmez ama eski kurallar kalsın (fallback) */
#teklifFormOverlay input,
#teklifFormOverlay select,
#teklifFormOverlay textarea {
    font-size: 16px !important;
    touch-action: manipulation;
}

/* GG İş / İşveren seçim bottom-sheet overlay'leri — iOS scroll fix */
#ggIsSecimOverlay,
#ggIsverenSecimOverlay {
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
}
#ggIsSecimOverlay > div,
#ggIsverenSecimOverlay > div {
    -webkit-overflow-scrolling: touch;
}
#ggIsSecimOverlay #ggIsListe,
#ggIsverenSecimOverlay #ggIsverenListe {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
}
/* Genel modal overlay'leri için */
.modal-overlay, [id$="Overlay"], [id$="Modal"] {
    touch-action: manipulation;
}

/*
 * iOS Safari kritik scroll fix:
 * position:fixed overlay içinde scroll çalışması için
 * iç elemanda overflow-y:scroll + -webkit-overflow-scrolling:touch gerekir.
 * Overlay'in kendisi overflow:hidden OLMAMALI.
 */

/* Overlay wrapper'lar — touch geçirgen */
#teklifFormOverlay,
#teklifEditorOverlay,
#teklifOnizleOverlay {
    touch-action: manipulation;
}

/* Form modal — iç kart flex sütun + sabit yükseklik */
#teklifFormOverlay > div {
    display: flex;
    flex-direction: column;
    max-height: 92vh;
}

/* Form modal scrollable body */
#teklifFormOverlay > div > div[style*="overflow-y:scroll"],
#teklifFormOverlay > div > div[style*="overflow-y: scroll"] {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
}

/* Editör scroll alanı */
#teklifEditorScrollArea {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior: contain;
}

/* Önizleme scroll alanı */
#teklifOnizleScrollArea {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior: contain;
}

/* Buton etiketleri küçük ekranda gizle */
@media (max-width: 480px) {
    .btn-label { display: none; }
    
    /* Form grid tek sütun */
    #teklifBilgiForm .form-grid-2col {
        grid-template-columns: 1fr !important;
    }
    
    /* Teklif listesi butonlar küçük */
    .teklif-tablo-wrap button {
        padding: 5px 7px !important;
        font-size: 11px !important;
    }
}

/* Küçük-orta ekranda modal daha geniş */
@media (max-width: 600px) {
    #teklifFormOverlay > div {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100dvh !important; /* dynamic viewport height — iOS address bar aware */
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    /* Form body'si tam ekran scroll */
    #teklifFormOverlay > div > div[style*="overflow-y"] {
        max-height: calc(100dvh - 70px) !important; /* başlık yüksekliği çıkarılır */
    }
    
    #teklifEditorOverlay > div,
    #teklifOnizleOverlay > div {
        padding: 0 !important;
    }
    
    #teklifEditorOverlay > div > div:first-child,
    #teklifOnizleOverlay > div > div:first-child {
        border-radius: 0 !important;
    }
}

/* ===== PRINT STİLLERİ ===== */

/*
 * Teklif yazdırma artık ayrı sekmede gerçekleşiyor (_teklifYazdir fonksiyonu).
 * Ana RYT sayfasında Ctrl+P basılırsa uygulama UI gizlenir, sayfa içeriği yazdırılır.
 */

/* Normal Ctrl+P — RYT uygulama arayüzünü gizle, içeriği yazdır */
@media print {
    .sidebar, .topbar, .sidebar-overlay,
    .notif-panel, .modal-overlay,
    .demo-users { display: none !important; }

    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }

    .frozen-table-scroll { overflow: visible !important; max-height: none !important; }
    .frozen-table-wrap   { overflow: visible !important; border: none !important; }
    .frozen-table        { width: 100% !important; font-size: 11px !important; }
    .frozen-table th,
    .frozen-table td     { position: static !important; }

    .stat-card, .card { box-shadow: none !important; border: 1px solid #ccc !important; }
    body { background: white !important; }
}
