/* ============================================================
   ÖZADER Kurumsal Web Platformu & Yönetim ERP Tasarım Sistemi
   Kidoor_Demo UI/UX Standardı
   ============================================================ */

:root {
    --primary: #0056b3;
    --primary-dark: #003366;
    --primary-light: #e0f2fe;
    --primary-hover: #004494;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --success: #16a34a;
    --success-light: #dcfce7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --info: #0284c7;
    --info-light: #e0f2fe;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* ============================================================
   NAVBAR & HEADER
   ============================================================ */
.ozader-navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 72px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-dark);
    white-space: nowrap;
    padding-top: 4px;
}

.brand-logo span {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    list-style: none;
    padding-top: 4px;
}

.nav-menu .nav-item {
    display: flex;
    align-items: flex-start;
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: inline-block;
    line-height: 1.35;
    vertical-align: top;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-top: 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-ozader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary-ozader {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 86, 179, 0.25);
}

.btn-primary-ozader:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #002244 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.35);
}

.btn-secondary-ozader {
    background: #ffffff;
    color: var(--primary-dark);
    border-color: var(--border-color);
}

.btn-secondary-ozader:hover {
    background: var(--bg-main);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success-ozader {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
}

.btn-sm-ozader {
    padding: 6px 14px;
    font-size: 0.82rem;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-ozader {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    padding: 80px 0 60px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero-ozader-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 50px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    border: 1px solid rgba(0, 86, 179, 0.15);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-dark);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtext {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================================
   DASHBOARD & ERP LAYOUT
   ============================================================ */
.admin-layout, .erp-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    min-height: calc(100vh - 120px);
}

.sidebar-nav, .erp-sidebar {
    width: 280px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 95px);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: auto;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.sidebar-user-card {
    background: var(--primary-light);
    border: 1px solid rgba(0, 86, 179, 0.15);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    text-decoration: none;
}

.sidebar-nav-item:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.sidebar-nav-item.active {
    background: var(--primary);
    color: #ffffff !important;
    font-weight: 600;
}

.sidebar-nav-item.active i {
    color: #ffffff;
}

.erp-main-content {
    flex: 1;
    min-width: 0;
}

/* ============================================================
   CARDS & STATS
   ============================================================ */
.ozader-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

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

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon-blue { background: var(--primary-light); color: var(--primary); }
.stat-icon-green { background: var(--success-light); color: var(--success); }
.stat-icon-orange { background: var(--warning-light); color: var(--warning); }
.stat-icon-red { background: var(--danger-light); color: var(--danger); }

.stat-details h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-details .stat-number {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 4px;
}

/* ============================================================
   TABLES
   ============================================================ */
.ozader-table-container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    position: relative;
}

.ozader-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.ozader-table th {
    background: #f8fafc;
    padding: 14px 18px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ozader-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    vertical-align: middle;
}

.ozader-table tr:last-child td {
    border-bottom: none;
}

.ozader-table tr:hover td {
    background: #f8fafc;
}

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge-ozader {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.form-grup {
    margin-bottom: 18px;
}

.form-grup label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control-ozader {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.92rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-main);
    transition: all 0.15s ease;
}

.form-control-ozader:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.12);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop-ozader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content-ozader {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    padding: 28px;
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES & MOBILE ERP SYSTEM
   ============================================================ */

/* --- Mobile Topbar & Quick Access Bar --- */
.erp-mobile-topbar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.erp-mobile-brand-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.erp-mobile-brand-pill .module-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.erp-mobile-brand-pill .module-text {
    min-width: 0;
}

.erp-mobile-brand-pill .module-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-mobile-brand-pill .module-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Horizontal Scrollable Quick Tabs for Mobile */
.erp-mobile-quicktabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px 2px;
    margin-bottom: 14px;
    scrollbar-width: none; /* Firefox */
}

.erp-mobile-quicktabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.erp-quicktab-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.erp-quicktab-chip:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(0, 86, 179, 0.2);
}

.erp-quicktab-chip.active {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.3);
}

.erp-quicktab-chip.active i {
    color: #ffffff;
}

/* Mobile Offcanvas Drawer Custom Styles */
.erp-offcanvas {
    max-width: 320px;
    width: 85%;
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.erp-offcanvas .offcanvas-header {
    background: linear-gradient(135deg, #002B5B 0%, #0056B3 100%);
    color: #ffffff;
    padding: 16px 20px;
}

.erp-offcanvas .offcanvas-body {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.erp-offcanvas-category {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 14px 4px;
}

/* Responsive Breakpoints */
@media (max-width: 991.98px) {
    .admin-layout {
        display: block !important;
        gap: 0 !important;
    }
    
    .sidebar-nav#erpSidebarNav {
        display: none !important;
    }
    
    .erp-main-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
    }
    
    .hero-ozader-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .ozader-card {
        padding: 16px !important;
        border-radius: var(--radius-md) !important;
        margin-bottom: 16px !important;
    }
}

@media (max-width: 767.98px) {
    .panel-tab-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    
    .panel-tab-header > div:first-child {
        width: 100%;
    }
    
    .panel-tab-header .panel-tab-actions,
    .panel-tab-header > div:last-child {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
    }
    
    .panel-tab-header .panel-tab-actions .btn,
    .panel-tab-header > div:last-child .btn {
        flex: 1 1 auto !important;
        text-align: center !important;
        justify-content: center !important;
        font-size: 0.82rem !important;
        padding: 8px 12px !important;
    }

    /* Filter rows & form toolbars */
    .filter-bar-responsive {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }
    
    .filter-bar-responsive > * {
        width: 100% !important;
    }
}

@media (max-width: 575.98px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }
    
    .stat-box {
        padding: 12px 10px !important;
        gap: 10px !important;
        border-radius: var(--radius-md) !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .stat-icon-wrapper {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem !important;
        border-radius: var(--radius-sm) !important;
    }
    
    .stat-details h4 {
        font-size: 0.72rem !important;
        margin-bottom: 2px !important;
    }
    
    .stat-details .stat-number {
        font-size: 1.25rem !important;
    }

    /* Table Compact Mobile Styles */
    .ozader-table th, 
    .ozader-table td {
        padding: 10px 12px !important;
        font-size: 0.84rem !important;
    }
    
    /* Ensure action buttons in table don't wrap awkwardly */
    .ozader-table .btn-group,
    .ozader-table td .btn {
        white-space: nowrap !important;
    }

    /* Mobile Modals */
    .modal-dialog {
        margin: 8px !important;
        max-width: calc(100% - 16px) !important;
    }
    
    .modal-content {
        border-radius: 16px !important;
    }
    
    .modal-header {
        padding: 14px 16px !important;
    }
    
    .modal-body {
        padding: 14px 16px !important;
        max-height: calc(100vh - 140px) !important;
        overflow-y: auto !important;
    }
    
    .modal-footer {
        padding: 12px 16px !important;
        flex-direction: column-reverse !important;
        gap: 8px !important;
    }
    
    .modal-footer .btn {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* ============================================================
   KVKK ONAY KARTI & ÖZEL İŞARETLEME BUTONU (CHECKBOX)
   ============================================================ */
.kvkk-approval-card {
    background: #f0fdf4;
    border: 2px solid #16a34a !important;
    border-radius: 16px;
    padding: 22px 24px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.12);
    cursor: pointer;
    position: relative;
}

.kvkk-approval-card:hover {
    background: #ecfdf5;
    border-color: #15803d !important;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.2);
}

.kvkk-checkbox-custom {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    border: 2.5px solid #16a34a !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    cursor: pointer !important;
    accent-color: #16a34a !important;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25) !important;
    transition: all 0.2s ease !important;
    margin-top: 2px !important;
}

.kvkk-checkbox-custom:focus {
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.25) !important;
}

.kvkk-checkbox-custom:checked {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}

.kvkk-modal-body {
    max-height: 480px;
    overflow-y: auto;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #334155;
}

.kvkk-modal-body h5 {
    color: #0f172a;
    font-weight: 700;
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 1rem;
}

.kvkk-modal-body ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

/* ============================================================
   ÖZADER BADGE & STATUS UTILITIES
   ============================================================ */
.bg-orange {
    background-color: #ea580c !important;
    color: #ffffff !important;
}
.bg-purple {
    background-color: #7c3aed !important;
    color: #ffffff !important;
}
.bg-pink {
    background-color: #db2777 !important;
    color: #ffffff !important;
}
.badge {
    font-weight: 600;
}
.ozader-countdown {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ============================================================
   MODAL SCROLLABLE & PINNED FOOTER FIXES
   ============================================================ */
.modal-dialog-scrollable {
    max-height: calc(100vh - 2rem) !important;
}
.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 2rem) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
.modal-dialog-scrollable .modal-content > form {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
}
.modal-dialog-scrollable .modal-header {
    flex-shrink: 0 !important;
}
.modal-dialog-scrollable .modal-body {
    overflow-y: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}
.modal-dialog-scrollable .modal-footer {
    flex-shrink: 0 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* ============================================================
   MOBILE SPECIFIC TOUCH & ELEMENT POLISH
   ============================================================ */
@media (max-width: 767.98px) {
    #map, .leaflet-container {
        height: 380px !important;
        min-height: 340px !important;
        border-radius: var(--radius-md) !important;
    }
    
    #aiChatBox {
        height: calc(100vh - 270px) !important;
        min-height: 280px !important;
    }

    .chart-container-responsive {
        height: 260px !important;
        position: relative;
    }
}

/* Touch Scrollable Indicator */
.touch-scrollable {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}



