/**
 * YasarLift / FormStudio Design System (Design Tokens & UI Styles)
 * Modern, prestijli ve tutarlı kurumsal tasarım dili.
 * Kurumsal renkler: Derin Kurumsal Lacivert (#0d3b66), Asansör Mavisi (#0284c7), Açık Gri (#f1f5f9)
 */

:root {
    /* --- Ana Renk Paleti (Primary & Brand Palette) --- */
    --yl-primary: #0d3b66;            /* Derin Kurumsal Lacivert */
    --yl-primary-dark: #07233f;       /* Gece Laciverti (Sidebar & Koyu Alanlar) */
    --yl-secondary: #0284c7;          /* Okyanus / Asansör Mavisi */
    --yl-secondary-hover: #0369a1;    /* Vurgulu Mavi (Hover) */
    --yl-accent-red: #c71b1b;         /* Teknik Uyarı & TO Seviye Kırmızısı */
    
    /* --- Nötr & Metin Renkleri (Neutral & Text) --- */
    --yl-text-main: #0f172a;          /* Ana Başlık & Vurgulu Metin */
    --yl-text-body: #1e293b;          /* Normal Gövde Metni */
    --yl-text-muted: #64748b;         /* Açıklama & İkincil Metinler */
    --yl-border: #e2e8f0;             /* Kart & Bileşen Çerçevesi */
    --yl-border-subtle: #f1f5f9;      /* İnce Ayrım Çizgisi */
    --yl-bg-app: #f1f5f9;             /* Sayfa Arka Planı (Hafif Soğuk Gri) */
    --yl-bg-card: #ffffff;            /* Kart Arka Planı */

    /* --- Durum Renkleri (Status Badges) --- */
    --yl-success-bg: #dcfce7;
    --yl-success-text: #15803d;
    --yl-info-bg: #e0f2fe;
    --yl-info-text: #0369a1;
    --yl-warning-bg: #fef3c7;
    --yl-warning-text: #b45309;
    --yl-danger-bg: #fee2e2;
    --yl-danger-text: #b91c1c;

    /* --- Tipografi & Ölçüler --- */
    --yl-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --yl-radius-sm: 6px;
    --yl-radius-md: 10px;
    --yl-radius-lg: 14px;
    --yl-shadow-card: 0 2px 6px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
    --yl-shadow-elevated: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

    /* --- Geriye Dönük Uyumluluk (Legacy Aliases) --- */
    --brand-primary: var(--yl-primary);
    --brand-secondary: var(--yl-text-body);
    --accent-blue: var(--yl-secondary);
    --accent-indigo: #0369a1;
    --surface-bg: var(--yl-bg-app);
    --card-shadow: var(--yl-shadow-elevated);
}

/* ============================================================== */
/* GLOBAL RESET & TYPOGRAPHY                                     */
/* ============================================================== */
body {
    background-color: var(--yl-bg-app) !important;
    font-family: var(--yl-font-family) !important;
    color: var(--yl-text-body);
    letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--yl-text-main);
    font-family: 'Outfit', var(--yl-font-family);
    letter-spacing: -0.025em;
    font-weight: 700;
}

/* ============================================================== */
/* 1. KARTLAR & PANELLER (CARDS & CONTAINERS)                    */
/* ============================================================== */
.yl-card, 
.premium-card,
.card:not(.bg-transparent):not(.stat-card) {
    background: var(--yl-bg-card);
    border: 1px solid var(--yl-border) !important;
    border-radius: var(--yl-radius-lg) !important;
    box-shadow: var(--yl-shadow-card) !important;
    overflow: hidden;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.yl-card:hover,
.premium-card:hover {
    border-color: #cbd5e1 !important;
    box-shadow: var(--yl-shadow-elevated) !important;
}

.yl-card-header,
.card-header {
    padding: 16px 20px !important;
    background: #ffffff !important;
    border-bottom: 1px solid var(--yl-border-subtle) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.yl-card-header h2, 
.yl-card-header h3,
.card-header h5,
.card-header h6 {
    font-size: 15px;
    font-weight: 700;
    color: var(--yl-text-main);
    margin: 0;
}

.yl-card-body,
.card-body {
    padding: 20px;
}

/* ============================================================== */
/* 2. DÜĞMELER (BUTTONS)                                          */
/* ============================================================== */
.yl-btn,
.btn-premium,
.btn {
    border-radius: var(--yl-radius-sm);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
}

.yl-btn-primary,
.btn-primary {
    background: var(--yl-secondary) !important;
    border-color: var(--yl-secondary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}
.yl-btn-primary:hover,
.btn-primary:hover {
    background: var(--yl-secondary-hover) !important;
    border-color: var(--yl-secondary-hover) !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
}

.btn-indigo {
    background: linear-gradient(135deg, var(--yl-primary) 0%, #1e3a8a 100%) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(13, 59, 102, 0.3) !important;
}
.btn-indigo:hover {
    background: linear-gradient(135deg, #07233f 0%, #172554 100%) !important;
    box-shadow: 0 5px 15px rgba(13, 59, 102, 0.4) !important;
    transform: translateY(-1px);
}

.yl-btn-secondary,
.btn-secondary,
.btn-light {
    background: #f8fafc !important;
    color: var(--yl-text-body) !important;
    border: 1px solid #cbd5e1 !important;
}
.yl-btn-secondary:hover,
.btn-secondary:hover,
.btn-light:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
}

.yl-btn-danger,
.btn-danger {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}
.yl-btn-danger:hover,
.btn-danger:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

.yl-btn-sm,
.btn-sm {
    padding: 4px 10px !important;
    font-size: 12px !important;
    border-radius: 5px !important;
}

/* ============================================================== */
/* 3. TABLOLAR (TABLES)                                          */
/* ============================================================== */
.yl-table,
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
    margin-bottom: 0;
}

.yl-table th,
.table thead th,
.table th {
    background: #f8fafc !important;
    color: var(--yl-text-muted) !important;
    font-weight: 700 !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--yl-border) !important;
    border-top: none;
    vertical-align: middle;
}

.yl-table td,
.table td {
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--yl-border-subtle) !important;
    color: var(--yl-text-body) !important;
    vertical-align: middle;
}

.yl-table tbody tr:hover,
.table tbody tr:hover {
    background-color: #f8fafc !important;
}

/* DataTables Overrides */
.dataTables_wrapper .dataTables_paginate .paginate_button.current, 
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--yl-secondary) !important;
    border-color: var(--yl-secondary) !important;
    color: #ffffff !important;
    border-radius: var(--yl-radius-sm);
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #cbd5e1;
    border-radius: var(--yl-radius-sm);
    padding: 6px 12px;
    outline: none;
    font-size: 13px;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--yl-secondary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ============================================================== */
/* 4. ROZETLER (BADGES)                                          */
/* ============================================================== */
.yl-badge,
.badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}
.yl-badge-info,
.badge.bg-info,
.badge.bg-info-subtle {
    background: var(--yl-info-bg) !important;
    color: var(--yl-info-text) !important;
}
.yl-badge-success,
.badge.bg-success,
.badge.bg-success-subtle,
.badge-active {
    background: var(--yl-success-bg) !important;
    color: var(--yl-success-text) !important;
    border: 1px solid #bbf7d0 !important;
}
.yl-badge-warning,
.badge.bg-warning,
.badge.bg-warning-subtle {
    background: var(--yl-warning-bg) !important;
    color: var(--yl-warning-text) !important;
}
.yl-badge-danger,
.badge.bg-danger,
.badge.bg-danger-subtle {
    background: var(--yl-danger-bg) !important;
    color: var(--yl-danger-text) !important;
}

/* ============================================================== */
/* 5. FORM ELEMANLARI (INPUTS & FORMS)                            */
/* ============================================================== */
.yl-form-label,
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #334155;
}

.yl-form-control, 
.yl-form-select,
.form-control,
.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: var(--yl-radius-sm);
    font-size: 13px;
    background-color: #ffffff;
    color: var(--yl-text-body);
    outline: none;
    transition: all 0.2s ease;
}

.yl-form-control:focus, 
.yl-form-select:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--yl-secondary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ============================================================== */
/* 6. MODAL & DİYALOGLAR (MODALS)                                */
/* ============================================================== */
.yl-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.yl-modal-overlay.active { display: flex; }

.yl-modal-card,
.modal-content {
    background: #ffffff;
    border-radius: var(--yl-radius-lg) !important;
    border: 1px solid var(--yl-border) !important;
    box-shadow: var(--yl-shadow-elevated) !important;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--yl-border-subtle);
    padding: 16px 20px;
}

.modal-footer {
    border-top: 1px solid var(--yl-border-subtle);
    padding: 14px 20px;
}

/* ============================================================== */
/* 7. SIDEBAR & NAVBAR GÜNCELLEMESİ                               */
/* ============================================================== */
.sidebar {
    background: #ffffff !important;
    border: 1px solid var(--yl-border) !important;
    box-shadow: var(--yl-shadow-card) !important;
}

.sidebar .nav-link {
    color: var(--yl-text-muted) !important;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background: #f1f5f9 !important;
    color: var(--yl-primary) !important;
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--yl-primary) 0%, var(--yl-primary-dark) 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 14px rgba(13, 59, 102, 0.25) !important;
}

.main-navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--yl-border) !important;
}

.main-navbar .navbar-brand {
    color: var(--yl-primary) !important;
}
