:root {
    --primary: #4F46E5; /* Indigo */
    --primary-hover: #4338CA;
    --secondary: #10B981; /* Emerald */
    --danger: #EF4444; /* Red */
    --background: #0F172A; /* Slate 900 */
    --surface: rgba(30, 41, 59, 0.7); /* Slate 800 with opacity */
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-main: #F8FAFC; /* Slate 50 */
    --text-muted: #94A3B8; /* Slate 400 */
    --glass-blur: 12px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--background);
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.3) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.2) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
}

.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1, h2, h3 {
    margin-top: 0;
    font-weight: 600;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-4 { gap: 1rem; }

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

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

.btn-block {
    display: block;
    width: 100%;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--surface-border);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
}
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
}

/* Map Container */
#map {
    height: 400px;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    margin-top: 1rem;
    border: 1px solid var(--surface-border);
    z-index: 1; /* fix leaflet stacking context */
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.navbar .container {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    .glass-panel {
        padding: 1.5rem;
    }
}

/* Modern CSS Logo */
.logo-container {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
    user-select: none;
    margin: 0 auto;
}
.logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
}
.logo-text span {
    color: #ef4444; /* Red color for Türk */
}
.logo-line {
    width: 100%;
    height: 12px;
    display: flex;
}
.logo-line-left {
    flex: 1;
    background: conic-gradient(#000 90deg, transparent 90deg 180deg, #000 180deg 270deg, transparent 270deg);
    background-size: 12px 12px;
    background-color: #ffcc00;
}
.logo-line-right {
    flex: 1;
    background: conic-gradient(#b30000 90deg, transparent 90deg 180deg, #b30000 180deg 270deg, transparent 270deg);
    background-size: 12px 12px;
    background-color: #ef4444;
}

/* Dashboard Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 0 15px 30px -10px rgba(79, 70, 229, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
