/* ===================================================
   DOĞUŞ TARLA TAKİP SİSTEMİ — PREMIUM DESIGN SYSTEM
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- RENK PALETİ & TASARIM TOKENLARI --- */
:root {
    /* Ana Renkler */
    --primary:        #EB1B23;
    --primary-dark:   #B2151B;
    --primary-light:  #FDE8E9;
    --primary-mid:    #CD181F;
    --primary-glow:   rgba(235, 27, 35, 0.25);
    --primary-glass:  rgba(235, 27, 35, 0.08);

    /* Yardımcı Renkler */
    --secondary:      #8D7249;
    --secondary-dark: #6A5333;
    --secondary-glow: rgba(141, 114, 73, 0.35);

    /* Nötr Renkler */
    --accent:         #1A1A2E;
    --bg:             #F5F6FA;
    --bg-alt:         #ECEEF6;
    --surface:        #FFFFFF;
    --surface-2:      #F8F9FC;
    --surface-glass:  rgba(255, 255, 255, 0.88);

    /* Metin */
    --text:           #1C2238;
    --text-light:     #7B8299;
    --text-muted:     #A8B0C5;

    /* Kenarlıklar */
    --border:         #E4E7F0;
    --border-strong:  #CDD1E0;

    /* Durum Renkleri */
    --success:        #10B981;
    --success-light:  #D1FAE5;
    --info:           #3B82F6;
    --info-light:     #DBEAFE;
    --warning:        #F59E0B;
    --warning-light:  #FEF3C7;
    --danger:         #EF4444;
    --danger-light:   #FEE2E2;

    /* Boyutlandırma */
    --radius-sm:      6px;
    --radius-md:      12px;
    --radius-lg:      16px;
    --radius-xl:      24px;
    --radius-2xl:     32px;

    /* Gölgeler */
    --shadow-xs:      0 1px 2px rgba(28, 34, 56, 0.04);
    --shadow-sm:      0 2px 8px rgba(28, 34, 56, 0.08);
    --shadow-md:      0 4px 16px rgba(28, 34, 56, 0.10);
    --shadow-lg:      0 8px 32px rgba(28, 34, 56, 0.12);
    --shadow-xl:      0 16px 48px rgba(28, 34, 56, 0.16);
    --shadow-primary: 0 4px 20px var(--primary-glow);
    --shadow-secondary: 0 4px 20px var(--secondary-glow);

    /* Geçişler */
    --transition-fast:   150ms ease;
    --transition-base:   250ms ease;
    --transition-slow:   400ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 70px;
    --container-max: 900px;
}

/* DARK THEME */
[data-theme="dark"] {
    --bg:             #0F1117;
    --bg-alt:         #1A1D2E;
    --surface:        #1E2235;
    --surface-2:      #252A40;
    --surface-glass:  rgba(30, 34, 53, 0.92);
    --text:           #EDF0F7;
    --text-light:     #8B95B0;
    --text-muted:     #5C6480;
    --border:         #2E3350;
    --border-strong:  #3E4466;
    --primary-light:  #3D1717;
    --primary-glass:  rgba(235, 27, 35, 0.12);
    --success-light:  #064E3B;
    --info-light:     #1E3A5F;
    --warning-light:  #451A03;
    --danger-light:   #4C1111;
}

/* --- TEMEL RESET & GLOBAL --- */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===================================================
   GİRİŞ EKRANI
   =================================================== */

#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #fdf2f2 0%, #fff5f5 40%, #fce4e4 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Dekoratif arka plan elementleri */
#login-screen::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(235,27,35,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatBlob 8s ease-in-out infinite alternate;
}
#login-screen::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -80px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(141,114,73,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatBlob 10s ease-in-out infinite alternate-reverse;
}

@keyframes floatBlob {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, -30px) scale(1.05); }
}

.login-card {
    background: var(--surface);
    padding: 48px 40px;
    border-radius: var(--radius-2xl);
    box-shadow:
        0 0 0 1px rgba(235,27,35,0.08),
        0 2px 4px rgba(28,34,56,0.04),
        0 20px 60px rgba(235,27,35,0.12);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: loginCardIn 0.6s var(--transition-slow) both;
    border-top: 4px solid var(--primary);
}

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

.logo-img {
    width: 150px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(235,27,35,0.15));
}

/* ===================================================
   FORM ELEMANLARi
   =================================================== */

.input-group {
    margin-bottom: 18px;
    width: 100%;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glass), 0 0 0 1px var(--primary);
    background: var(--surface);
}

.input-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    gap: 10px;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 4px;
}

/* ===================================================
   BUTONLAR
   =================================================== */

.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 14px var(--primary-glow);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, transparent 100%);
    pointer-events: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    filter: brightness(1.05);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--primary-glow);
    filter: brightness(0.95);
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-strong);
    color: var(--text-light);
    box-shadow: none;
}

.btn-outline::after {
    display: none;
}

.btn-outline:hover {
    border-color: var(--secondary);
    color: var(--secondary-dark);
    background: var(--secondary-glow);
    box-shadow: none;
}

.btn-outline.outline-danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-light);
}

/* ===================================================
   HEADER
   =================================================== */

header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(235, 27, 35, 0.10);
    box-shadow: 0 2px 20px rgba(28, 34, 56, 0.07);
}

[data-theme="dark"] header {
    background: rgba(30, 34, 53, 0.94);
    border-bottom-color: rgba(235, 27, 35, 0.15);
}

.header-logo {
    height: 38px;
    filter: drop-shadow(0 2px 4px rgba(235,27,35,0.15));
}

.header-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    margin-top: 2px;
}

.header-clock {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

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

.header-actions button {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.header-actions button:hover {
    background: var(--primary-glass);
    color: var(--primary);
}

/* ===================================================
   LAYOUT / CONTAINER
   =================================================== */

.container {
    padding: 28px 20px 120px;
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

#app-screen {
    background: var(--bg);
    min-height: 100vh;
}

/* ===================================================
   YIL TABLARi
   =================================================== */

.year-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.year-tabs::-webkit-scrollbar { display: none; }

.year-btn {
    padding: 9px 22px;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    background: var(--surface);
    color: var(--text-light);
    font-weight: 600;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
}

.year-btn:hover {
    border-color: var(--primary-mid);
    color: var(--primary);
    background: var(--primary-glass);
}

.year-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-primary);
    transform: scale(1.02);
}

/* ===================================================
   ANALİZ ÇUBUĞU
   =================================================== */

.analysis-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.analysis-btn {
    padding: 16px 10px;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

.analysis-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: rgba(255,255,255,0.12);
    pointer-events: none;
}

.analysis-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.analysis-btn:active {
    transform: translateY(-1px);
}

.analysis-btn i {
    font-size: 20px;
}

.btn-stats   { background: linear-gradient(135deg, var(--secondary-dark), var(--secondary)); box-shadow: 0 4px 16px var(--secondary-glow); }
.btn-map     { background: linear-gradient(135deg, var(--primary), var(--primary-mid)); box-shadow: 0 4px 16px var(--primary-glow); }
.btn-archive { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); box-shadow: 0 4px 16px var(--secondary-glow); }
.btn-depo    { background: linear-gradient(135deg, var(--primary-dark), var(--primary-mid)); box-shadow: 0 4px 16px rgba(178,21,27,0.30); }

/* ===================================================
   EXCEL BUTON GRUBU
   =================================================== */

.excel-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.btn-excel-all,
.btn-excel-season {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: 1.5px solid;
    background: var(--surface);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
    width: 100%;
}

.btn-excel-all {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-excel-all:hover {
    background: var(--primary-glass);
    box-shadow: var(--shadow-primary);
}

.btn-excel-season {
    color: var(--success);
    border-color: var(--success);
}

.btn-excel-season:hover {
    background: var(--success-light);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* ===================================================
   FİRMA KARTLARI
   =================================================== */

#tarla-listesi > .company-card + .company-card {
    animation-delay: 60ms;
}

.company-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    animation: cardIn 0.4s var(--transition-slow) both;
    position: relative;
    overflow: hidden;
}

.company-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-glass) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.company-card:hover {
    transform: translateY(-3px) translateX(2px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary-dark);
}

.company-card:hover::after {
    opacity: 1;
}

.company-card:active {
    transform: scale(0.99);
}

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

.cc-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-glass) 100%);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--primary-glass);
}

.cc-info {
    flex: 1;
    min-width: 0;
}

.cc-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-info p {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.cc-badge {
    color: var(--text-muted);
    font-size: 14px;
    margin-left: 12px;
    transition: transform var(--transition-base), color var(--transition-base);
    flex-shrink: 0;
}

.company-card:hover .cc-badge {
    transform: translateX(4px);
    color: var(--primary);
}

/* ===================================================
   BOŞ DURUM
   =================================================== */

#empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

#empty-state i {
    font-size: 64px;
    opacity: 0.25;
    display: block;
    margin-bottom: 16px;
}

#empty-state p {
    font-size: 15px;
    font-weight: 500;
}

/* ===================================================
   MODALLAR
   =================================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 30, 0.65);
    z-index: 200;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 16px;
}

/* Z-Index hiyerarşisi */
#general-map-modal  { z-index: 215 !important; }
#archive-map-modal  { z-index: 220 !important; }
#detail-modal       { z-index: 250 !important; }
#urgent-modal       { z-index: 900 !important; }
#img-modal          { z-index: 950 !important; }
#loading-overlay    { z-index: 999 !important; }
#depo-modal         { z-index: 212 !important; }
#stok-detay-modal   { z-index: 214 !important; }
#stok-ekle-modal    { z-index: 216 !important; }
#notif-modal        { z-index: 910 !important; }

.modal-content {
    background: var(--surface);
    width: 100%;
    max-width: 520px;
    padding: 28px;
    border-radius: var(--radius-xl);
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    color: var(--text);
    box-shadow: 0 32px 80px rgba(10, 14, 30, 0.30), 0 0 0 1px rgba(255,255,255,0.08);
    animation: modalIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) both;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.modal-content::-webkit-scrollbar { width: 4px; }
.modal-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.94) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.close {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), color var(--transition-fast);
    line-height: 1;
}

.close:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* ===================================================
   HARİTA STİLLERİ
   =================================================== */

.map-wrapper {
    position: relative;
    width: 100%;
    height: 360px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
}

#map-add, #map-detail {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-gps-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 400;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    color: var(--accent);
    box-shadow: 0 4px 16px rgba(28,34,56,0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.map-gps-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(28,34,56,0.3);
}

.map-gps-btn:active {
    transform: scale(0.92);
    background: #f5f5f5;
}

/* KML Yükleme Kutusu */
.kml-upload-box {
    border: 2px dashed var(--border-strong);
    padding: 28px 20px;
    text-align: center;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    background: var(--bg);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-base);
}

.kml-upload-box:hover {
    border-color: var(--primary);
    background: var(--primary-glass);
    transform: scale(1.01);
}

/* Harita Pin */
.custom-map-pin {
    width: 16px;
    height: 16px;
    border-radius: 50% 50% 50% 0;
    background: var(--secondary);
    position: relative;
    transform: rotate(-45deg);
    box-shadow: 2px 2px 6px rgba(0,0,0,0.5);
    border: 2px solid white;
}

.custom-map-pin::after {
    content: '';
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.map-label-modern {
    background: rgba(10, 14, 30, 0.80);
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: 700;
    font-size: 10px;
    padding: 3px 7px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    white-space: nowrap;
    margin-top: -32px !important;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    letter-spacing: 0.2px;
}

.map-zoomed-in .map-label-modern { opacity: 1 !important; }

/* ===================================================
   FLOATING ACTION BUTTON (FAB)
   =================================================== */

.fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: #1A0A00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    box-shadow: 0 8px 28px var(--secondary-glow);
    cursor: pointer;
    z-index: 99;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    animation: fabPop 0.5s var(--transition-slow) both;
}

@keyframes fabPop {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

.fab::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--secondary-dark);
    opacity: 0;
    animation: fabPulse 2.5s ease-in-out infinite;
}

@keyframes fabPulse {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.5); }
}

.fab:hover {
    transform: scale(1.1) rotate(45deg);
    box-shadow: 0 12px 40px var(--secondary-glow);
}

.fab:active {
    transform: scale(0.96) rotate(45deg);
}

/* ===================================================
   DETAY TABLARi
   =================================================== */

.detail-tabs {
    display: flex;
    background: var(--bg);
    padding: 5px;
    border-radius: var(--radius-md);
    margin-bottom: 22px;
    gap: 4px;
    border: 1px solid var(--border);
}

.detail-tab-btn {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.detail-tab-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.detail-tab-btn:hover:not(.active) {
    background: var(--primary-glass);
    color: var(--primary);
}

.detail-content { display: none; animation: fadeIn 0.3s ease; }
.detail-content.active { display: block; }

/* ===================================================
   TARLA LISTE - FİELD ITEM
   =================================================== */

.field-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 15px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.field-item:hover {
    background: var(--primary-glass);
    border-color: var(--primary-mid);
    transform: translateX(3px);
}

.field-badge {
    background: white;
    color: var(--primary);
    font-weight: 800;
    font-size: 12px;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-right: 14px;
    border: 1.5px solid var(--primary-light);
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

.fi-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.fi-info p {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===================================================
   HAVA DURUMU KARTI
   =================================================== */

.weather-card {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 50%, #0A2F6E 100%);
    color: white;
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(21,101,192,0.4);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.weather-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

/* ===================================================
   BİLDİRİMLER
   =================================================== */

.notif-item {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
    gap: 12px;
}

.notif-item:hover { background: var(--bg); }

.notif-item.unread { background: var(--info-light); }
[data-theme="dark"] .notif-item.unread { background: #1E2D47; }

.notif-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.notif-bg-success { background: linear-gradient(135deg, #66BB6A, #388E3C); }
.notif-bg-info    { background: linear-gradient(135deg, #42A5F5, #1565C0); }
.notif-bg-warning { background: linear-gradient(135deg, #FFA726, #E65100); }
.notif-bg-danger  { background: linear-gradient(135deg, #EF5350, #B71C1C); }

.notif-content h4  { margin: 0 0 3px 0; font-size: 13px; font-weight: 700; color: var(--text); }
.notif-content p   { margin: 0; font-size: 12px; color: var(--text-light); line-height: 1.5; }
.notif-time        { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ===================================================
   DEPO & STOK
   =================================================== */

.depo-tab-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 6px;
    background: var(--bg);
    border-radius: var(--radius-md);
    -ms-overflow-style: none;
    scrollbar-width: none;
    border: 1px solid var(--border);
}

.depo-tab-container::-webkit-scrollbar { display: none; }

.depo-tab-btn {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 12px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.depo-tab-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.depo-tab-content      { display: none; animation: fadeIn 0.3s ease; }
.depo-tab-content.active { display: block; }

.stock-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 15px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

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

.stock-card:active { transform: scale(0.99); }

.stock-icon-area {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin-right: 14px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.skt-expired { border-left: 4px solid var(--danger); animation: pulseRed 2s ease-in-out infinite; }
.skt-critical { border-left: 4px solid var(--warning); }
.skt-safe    { border-left: 4px solid var(--success); }
.skt-long    { border-left: 4px solid var(--success); }

@keyframes pulseRed {
    0%, 100% { background-color: var(--surface); }
    50%       { background-color: #FFF5F5; }
}

[data-theme="dark"] .skt-expired:is(.stock-card) {
    animation: pulseRedDark 2s ease-in-out infinite;
}

@keyframes pulseRedDark {
    0%, 100% { background-color: var(--surface); }
    50%       { background-color: #2D1515; }
}

.stock-info h4 { margin: 0 0 3px 0; font-size: 14px; color: var(--text); font-weight: 700; }
.stock-meta    { font-size: 11px; color: var(--text-light); display: flex; flex-direction: column; gap: 2px; }
.stock-amount  { font-size: 15px; font-weight: 800; color: var(--text); text-align: right; margin-left: auto; min-width: 70px; }

.skt-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 3px;
    width: fit-content;
    letter-spacing: 0.2px;
}

/* ===================================================
   ARŞİV İSTATİSTİK ÇUBUĞU
   =================================================== */

.archive-stats-bar {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    padding: 12px 16px;
    white-space: nowrap;
    overflow-x: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    border-bottom: 2px solid var(--secondary-dark);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.archive-stats-bar::-webkit-scrollbar { display: none; }

.stat-chip {
    background: rgba(255,255,255,0.08);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: #CBD5E1;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.stat-chip:hover { background: rgba(255,255,255,0.14); }
.stat-chip i { color: var(--text-muted); }

.stat-chip.total {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 700;
    border: none;
    box-shadow: 0 2px 12px rgba(198,40,40,0.5);
    padding: 8px 16px;
}

.stat-chip.total i { color: rgba(255,255,255,0.8); }
.stat-val { font-weight: 800; color: var(--secondary); margin-left: 2px; }
.stat-chip.total .stat-val { color: white; }

/* ===================================================
   BÖLGE SEÇİM BUTONLARI
   =================================================== */

.region-select-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.region-btn {
    padding: 22px 20px;
    border-radius: var(--radius-lg);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 0.3px;
}

.region-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.region-btn:active { transform: scale(0.98); }

.region-hatay { background: linear-gradient(135deg, #2E7D32, #1B5E20); box-shadow: 0 6px 20px rgba(46,125,50,0.35); }
.region-konya { background: linear-gradient(135deg, #1565C0, #0D47A1); box-shadow: 0 6px 20px rgba(21,101,192,0.35); }

.region-header {
    background: linear-gradient(135deg, var(--primary-glass) 0%, transparent 100%);
    padding: 12px 16px;
    text-align: center;
    font-weight: 800;
    color: var(--primary);
    margin: 0 0 16px 0;
    border-radius: var(--radius-md);
    letter-spacing: 1px;
    border-bottom: 2px solid var(--primary-light);
    text-transform: uppercase;
    font-size: 13px;
}

.back-to-regions-btn {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-2);
    color: var(--text-light);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-base);
}

.back-to-regions-btn:hover {
    background: var(--primary-glass);
    border-color: var(--primary);
    color: var(--primary);
}

/* ===================================================
   KULLANICI LİSTESİ
   =================================================== */

.user-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: box-shadow var(--transition-fast);
}

.user-list-item:hover {
    box-shadow: var(--shadow-sm);
}

.user-list-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-list-name {
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-list-meta {
    font-size: 12px;
    color: var(--text-light);
}

/* ===================================================
   LOADING OVERLAY
   =================================================== */

#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 50%, #fff8e1 100%);
    z-index: 999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 16px;
}

/* ===================================================
   ANİMASYONLAR
   =================================================== */

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

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

/* ===================================================
   RESPONSIVE UTILITIES
   =================================================== */
.input-grid-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}
.admin-tabs-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-tabs-flex > button {
    flex: 1 1 100%;
}

/* ===================================================
   DASHBOARD CUSTOM GRID & HEADER
   =================================================== */
.dashboard-grid-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.dashboard-header-flex {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
    gap: 10px;
}
.dashboard-header-flex .btn {
    width: 100%;
}

/* ===================================================
   DESKTOP LAYOUT (768px +)
   =================================================== */

@media (min-width: 768px) {
    .input-grid-box {
        grid-template-columns: 1fr 1fr;
    }
    .admin-tabs-flex > button {
        flex: 1;
    }
    .dashboard-grid-box {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-header-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0;
    }
    .dashboard-header-flex .btn {
        width: auto;
    }
    .container {
        padding: 32px 28px 100px;
    }

    .analysis-bar {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }

    .analysis-btn {
        padding: 20px 14px;
        font-size: 12px;
    }

    .analysis-btn i {
        font-size: 22px;
    }

    .excel-btns {
        flex-direction: row;
        gap: 12px;
    }

    .btn-excel-all,
    .btn-excel-season {
        flex: 1;
    }

    .company-card {
        padding: 22px 24px;
    }

    .company-card:hover {
        transform: translateY(-4px) translateX(3px);
    }

    .modal-content {
        padding: 36px;
        border-radius: var(--radius-2xl);
    }

    .map-wrapper {
        height: 400px;
    }
}

@media (min-width: 1024px) {
    #app-screen {
        display: grid;
        grid-template-rows: var(--header-height) 1fr;
        min-height: 100vh;
    }

    header {
        grid-column: 1 / -1;
        padding: 0 40px;
    }

    .container {
        max-width: 900px;
        margin: 0 auto;
        padding: 36px 32px 80px;
    }

    .analysis-bar {
        gap: 16px;
    }

    .year-tabs {
        gap: 10px;
    }

    .year-btn {
        padding: 10px 28px;
        font-size: 14px;
    }

    .modal-content {
        max-width: 600px;
    }

    /* Dashboard modal için geniş ekran */
    #dashboard-modal .modal-content {
        max-width: 800px;
    }
}

/* ===================================================
   VERİM ANALİZİ KARTI
   =================================================== */

.yield-calculator-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

@media print {
    body * { visibility: hidden; }
    #detail-modal, #detail-modal * { visibility: visible; }
    #detail-modal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
        box-shadow: none;
    }
    .no-print, .close, .detail-tabs { display: none !important; }
    .detail-content { display: block !important; }
    header { display: none !important; }
}

/* ===================================================
   LOGİN EKRANI YAN ŞERİT BANNER
   =================================================== */

#login-screen {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    min-height: 100vh;
    height: 100vh;
    background: linear-gradient(135deg, #fdf2f2 0%, #fff5f5 40%, #fce4e4 100%);
    padding: 0;
    overflow: hidden;
}

/* Yan şerit paneller - mobilde gizli */
.login-side-strip {
    display: none;
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    background: #0D1637;
}

/* img'yi döndürerek dikey şeridi doldur */
.login-side-strip img {
    display: block;
    position: absolute;
    /* Görseli 90° döndür - yatayı dikeye çevir */
    transform: rotate(90deg);
    transform-origin: center center;
    /* Döndürülünce boyutlar yer değiştirir */
    width: 100vh;    /* döndürülmüş yükseklik = ekran yüksekliği */
    height: 280px;   /* döndürülmüş genişlik = şerit genişliği */
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Kenarda yumuşak geçiş */
.login-strip-left::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 50px;
    background: linear-gradient(to right, transparent, rgba(253,242,242,0.8));
    pointer-events: none;
    z-index: 2;
}

.login-strip-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 50px;
    background: linear-gradient(to left, transparent, rgba(253,242,242,0.8));
    pointer-events: none;
    z-index: 2;
}


/* Tablet+ (900px): şeritleri göster */
@media (min-width: 900px) {
    .login-side-strip {
        display: block;
    }
    #login-screen {
        padding: 0;
    }
    #login-screen .login-card {
        margin: 20px 40px;
    }
}

/* Büyük ekran: şeritler daha geniş */
@media (min-width: 1400px) {
    .login-side-strip {
        max-width: 420px;
    }
}

/* ===================================================
   ANLIQ GPS — PULSE DOT & AKTİF BUTON
   =================================================== */

.gps-pulse-dot {
    width: 18px;
    height: 18px;
    background: #C8102E;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.7);
    animation: gpsPulse 1.6s ease-out infinite;
}

@keyframes gpsPulse {
    0%   { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.7); }
    70%  { box-shadow: 0 0 0 14px rgba(200, 16, 46, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}

.map-gps-btn.gps-active {
    background: linear-gradient(135deg, #C8102E, #9B0D22);
    color: white;
    box-shadow: 0 4px 16px rgba(200,16,46,0.4);
    animation: gpsButtonPulse 2s ease-in-out infinite;
}

@keyframes gpsButtonPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(200,16,46,0.4); }
    50%       { box-shadow: 0 4px 24px rgba(200,16,46,0.7); }
}

/* ===================================================
   POLİGON ÇİZİM TOOLBAR  —  Doğuş Marka Paleti
   Kırmızı #C8102E · Altın #F5A623 · Bronz #8B6914
   =================================================== */

.draw-toolbar {
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #1a0505 0%, #2d0a0a 100%);
    border: none;
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 12px;
    box-shadow: 0 4px 18px rgba(200,16,46,0.18), 0 1px 4px rgba(0,0,0,0.18);
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

/* Altın şerit — logo güneş motifi */
.draw-toolbar::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, transparent 0%, #F5A623 30%, #C8102E 70%, transparent 100%);
    opacity: 0.9;
}

/* Ortak buton tabanı */
.draw-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.75);
    font-size: 11.5px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.draw-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
    border-color: rgba(245,166,35,0.5);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Çizim Modu — vurgulu ana buton */
.draw-btn-primary {
    background: rgba(200,16,46,0.18);
    border-color: rgba(200,16,46,0.5);
    color: #ff8a9a;
}

.draw-btn-primary:hover {
    background: rgba(200,16,46,0.3);
    border-color: #C8102E;
    color: #fff;
}

/* Aktif çizim durumu — parlak kırmızı */
.draw-btn-primary.active {
    background: linear-gradient(135deg, #C8102E 0%, #9B0D22 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(200,16,46,0.45);
    animation: drawPulse 2s ease-in-out infinite;
}

@keyframes drawPulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(200,16,46,0.45); }
    50%       { box-shadow: 0 4px 22px rgba(200,16,46,0.7), 0 0 0 3px rgba(200,16,46,0.2); }
}

/* Temizle butonu */
.draw-btn-danger {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.3);
    color: #fca5a5;
}

.draw-btn-danger:hover {
    background: rgba(239,68,68,0.25);
    border-color: #ef4444;
    color: #fff;
}

/* Nokta sayacı chip */
.draw-info-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    background: rgba(245,166,35,0.12);
    border: 1px solid rgba(245,166,35,0.35);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: #F5A623;
    letter-spacing: 0.3px;
}

/* ===================================================
   SÜRÜKLENEBİLİR VERTEX HANDLE — Harita üzerindeki köşe noktaları
   =================================================== */

/* Normal vertex */
.vertex-handle {
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2.5px solid #C8102E;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 1px 6px rgba(0,0,0,0.4);
    transition: transform 0.12s, box-shadow 0.12s;
}

.vertex-handle:hover {
    transform: scale(1.45);
    border-color: #F5A623;
    box-shadow: 0 0 0 4px rgba(245,166,35,0.35), 0 2px 8px rgba(0,0,0,0.35);
    cursor: grab;
}

.vertex-handle:active {
    cursor: grabbing;
    transform: scale(1.6);
    border-color: #F5A623;
    box-shadow: 0 0 0 6px rgba(245,166,35,0.25), 0 3px 12px rgba(0,0,0,0.4);
}

/* İlk vertex — altın renkli (başlangıç noktası) */
.vertex-handle-first {
    width: 16px;
    height: 16px;
    margin: -1px; /* iconAnchor telafisi */
    background: linear-gradient(135deg, #F5A623, #D97706);
    border: 2.5px solid #92400E;
    box-shadow: 0 1px 8px rgba(245,166,35,0.5), 0 2px 6px rgba(0,0,0,0.3);
}

.vertex-handle-first:hover {
    transform: scale(1.4);
    box-shadow: 0 0 0 5px rgba(245,166,35,0.3), 0 3px 10px rgba(0,0,0,0.35);
}

/* Son eklenen vertex — hafif vurgu (canlı çizim) */
.vertex-handle-last {
    border-color: #8B6914;
    background: #fff8e6;
}



/* ===================================================
   DETAY MODALİ — MODERN REDESIGN
   =================================================== */

.detail-modal-modern {
    max-width: 580px !important;
    max-height: 92vh !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    border-radius: 20px !important;
}

/* Gradient header banner */
.detail-header-banner {
    background: linear-gradient(135deg, #C8102E 0%, #7B1919 100%);
    padding: 20px 20px 0 20px;
    position: relative;
    flex-shrink: 0;
}

.detail-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.detail-close-btn:hover {
    background: rgba(255,255,255,0.35);
}

.detail-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.detail-firm-badge {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.detail-firm-name {
    font-size: 18px;
    font-weight: 800;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.detail-firm-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin: 2px 0 0 0;
}

/* Tab bar (içeride) */
.detail-tabs-modern {
    display: flex;
    gap: 0;
    margin-top: 4px;
}

.detail-tabs-modern .detail-tab-btn {
    flex: 1;
    padding: 10px 8px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.detail-tabs-modern .detail-tab-btn:hover {
    color: rgba(255,255,255,0.85);
}

.detail-tabs-modern .detail-tab-btn.active {
    color: white;
    border-bottom-color: #F5A623;
    background: rgba(255,255,255,0.1);
}

/* Scroll edilebilir gövde */
.detail-scroll-body {
    overflow-y: auto;
    flex: 1;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

.detail-scroll-body::-webkit-scrollbar { width: 4px; }
.detail-scroll-body::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 2px; }

/* Bölüm kartları */
.detail-section-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #F1F5F9;
}

.detail-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Bilgi satırları */
.detail-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #F1F5F9;
    font-size: 14px;
}

.detail-info-row:last-child {
    border-bottom: none;
}

.detail-info-label {
    color: #94A3B8;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===================================================
   NOT EKLEME KUTUSU — YENİ TASARIM
   =================================================== */

.detail-add-note-box {
    background: white;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1.5px solid #FEE2E2;
}

.detail-note-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 10px;
}

.detail-note-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #1E293B;
    background: #F8FAFC;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 10px;
}

.detail-note-textarea:focus {
    border-color: #C8102E;
    background: white;
}

.detail-note-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #FFF7ED;
    border: 1.5px solid #FED7AA;
    border-radius: 8px;
    color: #EA580C;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.detail-photo-btn:hover {
    background: #FFEDD5;
    transform: translateY(-1px);
}

.detail-send-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #C8102E, #9B0D22);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(200,16,46,0.3);
    transition: all 0.2s;
}

.detail-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(200,16,46,0.4);
}

.detail-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===================================================
   TİMELİNE — GEÇMİŞ KAYITLARI
   =================================================== */

.timeline-container {
    position: relative;
    padding-left: 20px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #C8102E, #F5A623, #E2E8F0);
    border-radius: 2px;
}

.timeline-card {
    position: relative;
    margin-bottom: 14px;
    animation: timelineIn 0.3s ease both;
}

@keyframes timelineIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.timeline-dot {
    position: absolute;
    left: -17px;
    top: 14px;
    width: 12px;
    height: 12px;
    background: #C8102E;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #C8102E;
}

.timeline-card-body {
    background: white;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid #F1F5F9;
    transition: box-shadow 0.2s;
}

.timeline-card-body:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.timeline-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.timeline-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #C8102E, #9B0D22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.timeline-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timeline-user {
    font-size: 13px;
    font-weight: 700;
    color: #1E293B;
}

.timeline-date {
    font-size: 11px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.timeline-note {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    background: #F8FAFC;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #C8102E;
    margin-bottom: 8px;
}

.timeline-del-btn {
    background: none;
    border: none;
    color: #CBD5E1;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.timeline-del-btn:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.timeline-empty {
    text-align: center;
    padding: 40px;
    color: #CBD5E1;
}

.timeline-empty i {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

.timeline-empty p {
    font-size: 14px;
    font-weight: 500;
}

/* ===================================================
   FOTO GALERİSİ — HOVER İNDİR OVERLAYİ
   =================================================== */

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.photo-thumb-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.photo-thumb-wrap:hover .photo-thumb {
    transform: scale(1.08);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-thumb-wrap:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay button,
.photo-overlay a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #1E293B;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}

.photo-overlay button:hover,
.photo-overlay a:hover {
    background: white;
    transform: scale(1.15);
}

/* ===================================================
   YAZDIRMA
   =================================================== */
@media print {
    .detail-header-banner { display: none !important; }
    .detail-scroll-body { overflow: visible !important; }
    .no-print { display: none !important; }
    .print-only-header { display: flex !important; }
    .detail-section-card { box-shadow: none; border: 1px solid #ddd; }
}

/* ===================================================
   MODERN İŞLEM EKLE (SOHBET TARZI)
   =================================================== */
.modern-add-note-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.modern-add-note-box:hover {
    box-shadow: var(--shadow-md);
}

.modern-note-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.mnh-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-glass);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

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

.modern-note-body {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 15px;
    border: 1px solid var(--border);
}

.modern-note-textarea {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    resize: none;
    outline: none;
    min-height: 50px;
}

.modern-note-textarea::placeholder {
    color: var(--text-muted);
}

.modern-photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-strong);
}

.modern-thumb-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    animation: thumbIn 0.3s ease;
}

@keyframes thumbIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.modern-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modern-thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: background 0.2s;
}

.modern-thumb-remove:hover {
    background: var(--danger);
}

.modern-note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
    .hide-mobile { display: none; }
}

/* ===================================================
   MOBİL (RESPONSIVE) BUTONLAR
   =================================================== */
@media (max-width: 768px) {
    .btn {
        padding: 12px 18px;
        font-size: 13px;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .btn-outline {
        padding: 12px 18px;
    }

    .analysis-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analysis-btn {
        padding: 12px 8px;
        font-size: 10px;
    }

    .excel-btns {
        flex-direction: column;
    }
}
