/* Modern Theme Variables */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --info-color: #4895ef;
    --warning-color: #f72585;
    --danger-color: #e63946;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #2b2d42;
    --text-secondary: #8d99ae;
    --sidebar-bg: #1e1e2d;
    --sidebar-active: #2d2d44;
    --border-radius: 12px;
    --card-shadow: 0 4px 20px 0 rgba(0,0,0,0.05);
    --hover-shadow: 0 10px 25px 0 rgba(0,0,0,0.1);
}

body {
    background-color: #f3f5f9;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Dokuzgen Logo */
.dokuzgen-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
}

/* Card Styling */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    background-color: var(--card-bg);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 56px; /* Navbar height */
    left: 0;
    bottom: 0;
    width: 240px;
    background: linear-gradient(135deg, #0049af 0%, #003d8f 25%, #0055c7 50%, #002d6b 75%, #0049af 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    box-shadow: 4px 0 10px rgba(0,0,0,0.05);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.sidebar-sticky {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar .nav-link {
    color: #ffffff;
    padding: 12px 20px;
    margin: 4px 15px;
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.sidebar .nav-link i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.05);
    transform: translateX(5px);
}

    .sidebar .nav-link.active {
        color: #fff;
        background: linear-gradient(45deg, var(--primary-color), #86b7fe);
        box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    }

.sidebar-heading {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
}

/* Navbar Styling */
.navbar {
    background-color: var(--card-bg) !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04) !important;
    padding: 0.8rem 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 56px;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.4rem;
    background: transparent !important;
    box-shadow: none !important;
}

.navbar .nav-link {
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
}

.navbar .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Badges & Buttons */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 6px;
}

.badge.bg-success { background-color: rgba(76, 201, 240, 0.15) !important; color: #00b4d8; }
.badge.bg-warning { background-color: rgba(247, 37, 133, 0.15) !important; color: #f72585; }
.badge.bg-danger { background-color: rgba(230, 57, 70, 0.15) !important; color: #e63946; }
.badge.bg-info { background-color: rgba(72, 149, 239, 0.15) !important; color: #4895ef; }
.badge.bg-secondary { background-color: rgba(108, 117, 125, 0.15) !important; color: #6c757d; }

.btn {
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
    background: #e9ecef;
    color: var(--text-primary);
    border: none;
}

.btn-secondary:hover {
    background: #dee2e6;
    color: var(--text-primary);
}

/* Table Styling */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.02);
}

/* Dashboard Widgets */
.stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.stat-icon.primary { background: rgba(67, 97, 238, 0.1); color: var(--primary-color); }
.stat-icon.success { background: rgba(76, 201, 240, 0.1); color: var(--success-color); }
.stat-icon.warning { background: rgba(247, 37, 133, 0.1); color: var(--warning-color); }
.stat-icon.danger { background: rgba(230, 57, 70, 0.1); color: var(--danger-color); }

.stat-details h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    color: white;
    top: -2px;
    right: -2px;
    padding: 3px 6px;
    border-radius: 50%;
    font-size: 10px;
    background: var(--danger-color);
    border: 2px solid #fff;
}

/* Login Page */
.login-body {
    background: linear-gradient(135deg, #0049af 0%, #003d8f 25%, #0055c7 50%, #002d6b 75%, #0049af 100%);
    background-size: 400% 400%;
    animation: loginGradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes loginGradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    background-color: #f8f9fa;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

/* Select2 Customization */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: 8px;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    background-color: #f8f9fa;
}

.select2-container--bootstrap-5 .select2-selection--single {
    height: auto;
}

/* Main Content Layout */
.main-content {
    margin-left: 240px;
    margin-top: 56px; /* Navbar height */
    padding: 1.5rem;
    min-height: calc(100vh - 56px);
    background-color: #f3f5f9;
}

/* Footer Styling */
.footer {
    margin-left: 240px;
    background-color: #fff;
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    position: relative;
    z-index: 100;
}

/* Responsive Design */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        margin-top: 56px;
    }
    .footer {
        margin-left: 0;
    }
}

/* Modern AI-Style Dashboard */
.dashboard-header {
    position: relative;
    padding-bottom: 1rem;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4361ee, transparent);
    opacity: 0.3;
}

/* AI Stat Cards */
.ai-stat-card {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
}

.ai-stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.ai-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.ai-stat-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.ai-stat-card:hover .ai-stat-glow {
    opacity: 1;
}

.ai-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    transition: all 0.4s;
}

.ai-stat-card:hover .ai-stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.ai-card-primary .ai-stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.ai-card-warning .ai-stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(245, 87, 108, 0.4);
}

.ai-card-success .ai-stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.4);
}

.ai-card-danger .ai-stat-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(250, 112, 154, 0.4);
}

.ai-stat-content {
    position: relative;
    z-index: 1;
}

.ai-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2b2d42 0%, #4361ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.ai-card-primary .ai-stat-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-card-warning .ai-stat-value {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-card-success .ai-stat-value {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-card-danger .ai-stat-value {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* AI Glass Cards */
.ai-glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s;
    overflow: hidden;
}

.ai-glass-card:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.ai-card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
}

.ai-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.ai-link-btn {
    display: inline-flex;
    align-items: center;
    color: #4361ee;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.ai-link-btn:hover {
    color: #3f37c9;
    transform: translateX(4px);
}

.ai-card-body {
    padding: 2rem;
}

.ai-table {
    border-collapse: separate;
    border-spacing: 0;
}

.ai-table thead th {
    background: transparent;
    border: none;
    padding: 1rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
}

.ai-table tbody td {
    padding: 1.25rem 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    vertical-align: middle;
}

.ai-table tbody tr {
    transition: all 0.3s;
}

.ai-table tbody tr:hover {
    background: rgba(67, 97, 238, 0.05);
    transform: translateX(4px);
}

.ai-chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-primary { background: #4361ee; }
.legend-warning { background: #f6c23e; }
.legend-success { background: #1cc88a; }

