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

/* ===== CSS Variables ===== */
:root {
    /* Kırmızı tonları */
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-200: #fecaca;
    --red-300: #fca5a5;
    --red-400: #f87171;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --red-800: #991b1b;
    --red-900: #7f1d1d;

    /* Nötr tonlar */
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-400: #a1a1aa;
    --gray-500: #71717a;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-800: #27272a;
    --gray-900: #18181b;

    /* Ana renkler */
    --primary: #dc2626;
    --primary-hover: #b91c1c;
    --primary-light: #fef2f2;
    --primary-gradient: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    --primary-gradient-hover: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);

    /* Arka plan */
    --bg-main: #f8f9fc;
    --bg-card: #ffffff;
    --bg-dark: #1a1a2e;
    --bg-dark-card: rgba(255, 255, 255, 0.05);

    /* Metin */
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --text-white: #ffffff;

    /* Gölgeler */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-red: 0 10px 25px -5px rgba(220, 38, 38, 0.25);

    /* Border */
    --border: #e4e4e7;
    --border-hover: #d4d4d8;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Geçiş */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* ===== Login Page ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(220, 38, 38, 0.08) 0%, transparent 50%);
    animation: loginBgPulse 8s ease-in-out infinite alternate;
}

@keyframes loginBgPulse {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(3deg); }
}

.login-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: loginCardSlide 0.6s ease-out;
}

@keyframes loginCardSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    box-shadow: var(--shadow-red);
}

.login-logo h1 {
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form label {
    display: block;
    color: var(--gray-300);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.login-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    transition: var(--transition);
    outline: none;
}

.login-form input::placeholder {
    color: var(--gray-500);
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.login-form .btn-login {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-red);
    margin-top: 0.5rem;
}

.login-form .btn-login:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(220, 38, 38, 0.3);
}

.login-form .btn-login:active {
    transform: translateY(0);
}

/* ===== Layout ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sidebar-brand h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.sidebar-brand span {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.sidebar-nav a.active {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: var(--shadow-red);
}

.sidebar-nav a .nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-subnav {
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1.5px dashed rgba(255, 255, 255, 0.15);
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.sidebar-subnav a.subnav-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.sidebar-subnav a.subnav-back:hover {
    color: var(--text-white);
}

.sidebar-subnav a.subnav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    padding: 0.5rem;
    color: var(--gray-300);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-subnav a.subnav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-white);
}

.sidebar-subnav a.subnav-item.active {
    background: rgba(220, 38, 38, 0.1);
    color: var(--red-200);
    font-weight: 600;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.sidebar-footer .user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.sidebar-footer .user-role {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.sidebar-footer .btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: var(--gray-300);
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
}

.sidebar-footer .btn-logout:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
    color: var(--red-300);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 2rem;
    animation: fadeInDown 0.4s ease-out;
}

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

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: 0.25rem;
}

.page-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.page-header .breadcrumb a {
    color: var(--text-secondary);
}

.page-header .breadcrumb a:hover {
    color: var(--primary);
}

.page-header .breadcrumb .separator {
    color: var(--gray-300);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: fadeInUp 0.4s ease-out;
}

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

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-header .badge {
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== Kuruluş Grid ===== */
.kurulus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.kurulus-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out both;
}

.kurulus-card:nth-child(1) { animation-delay: 0.05s; }
.kurulus-card:nth-child(2) { animation-delay: 0.1s; }
.kurulus-card:nth-child(3) { animation-delay: 0.15s; }
.kurulus-card:nth-child(4) { animation-delay: 0.2s; }

.kurulus-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
}

.kurulus-card:hover {
    border-color: var(--red-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

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

.kurulus-card .card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.kurulus-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.kurulus-card .address {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
}

.kurulus-card .engelli-count {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1rem;
    padding: 0.375rem 0.875rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* ===== Tables ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead {
    background: var(--gray-50);
}

thead th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

tbody tr {
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--gray-100);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--primary-light);
}

tbody td {
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    vertical-align: middle;
}

tbody tr.clickable-row {
    cursor: pointer;
}

tbody tr.clickable-row:hover {
    background: var(--red-50);
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-gray {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-red {
    background: var(--red-100);
    color: var(--red-700);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: var(--shadow-red);
}

.btn-primary:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(220, 38, 38, 0.3);
    color: var(--text-white);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

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

.btn-danger:hover {
    background: var(--red-700);
    transform: translateY(-1px);
}

.btn-success {
    background: #16803d;
    color: var(--text-white);
}

.btn-success:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* ===== Forms ===== */
.form-container {
    max-width: 640px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2371717a'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.form-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

/* ===== Harçlık Detay ===== */
.harclik-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
}

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

.summary-card .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.summary-card .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    font-weight: 600;
}

/* ===== Admin Tabs ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.875rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    margin-bottom: -2px;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 0.375rem;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.tab-btn.active .tab-count {
    background: var(--red-100);
    color: var(--red-700);
}

.tab-content {
    display: none;
    animation: fadeInUp 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* ===== Stats Row ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
    animation: fadeInUp 0.4s ease-out both;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

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

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card .stat-icon.red {
    background: var(--red-100);
    color: var(--red-600);
}

.stat-card .stat-icon.orange {
    background: #ffedd5;
    color: #c2410c;
}

.stat-card .stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-card .stat-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.stat-card .stat-icon.purple {
    background: #f3e8ff;
    color: #7c3aed;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ===== Engelli Info Header ===== */
.engelli-info-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.4s ease-out;
}

.engelli-avatar {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.engelli-details h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.engelli-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.375rem;
    flex-wrap: wrap;
}

.engelli-meta span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ===== Flash Messages ===== */
.flash-messages {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
}

.flash-message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: flashSlideIn 0.4s ease-out, flashFadeOut 0.4s ease-in 4.6s forwards;
    backdrop-filter: blur(10px);
}

@keyframes flashSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes flashFadeOut {
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

.flash-success {
    background: rgba(22, 163, 74, 0.95);
    color: white;
}

.flash-error {
    background: rgba(220, 38, 38, 0.95);
    color: white;
}

.flash-warning {
    background: rgba(217, 119, 6, 0.95);
    color: white;
}

.flash-info {
    background: rgba(37, 99, 235, 0.95);
    color: white;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    max-width: 360px;
    margin: 0 auto;
}

/* ===== Toolbar ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar .search-box {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.toolbar .search-box input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
    background: var(--bg-card);
}

.toolbar .search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.toolbar .search-box .search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Ayrilmis Badge ===== */
tr.ayrilmis {
    opacity: 0.65;
}

tr.ayrilmis td:first-child {
    position: relative;
}

tr.ayrilmis td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--red-400);
    border-radius: 0 2px 2px 0;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .harclik-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .mobile-menu-btn {
        display: flex !important;
    }
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 101;
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1.25rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-red);
}

/* ===== Overlay ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.show {
    display: block;
}

/* ===== Usulsuzluk Highlight ===== */
.usulsuzluk-row {
    background: var(--red-50) !important;
}

.usulsuzluk-row td {
    color: var(--red-700) !important;
    font-weight: 600;
}

/* ===== Dogrulama Badges ===== */
.dogrulama-beklemede {
    background: var(--gray-100);
    color: var(--gray-600);
}

.dogrulama-dogrulanmis {
    background: #dcfce7;
    color: #15803d;
}

.dogrulama-sahte {
    background: #fee2e2;
    color: #b91c1c;
}

.dogrulama-yanlis-alici {
    background: #fef3c7;
    color: #92400e;
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Confirm Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.modal p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ===== Scroll Custom ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ===== Print ===== */
@media print {
    .sidebar, .toolbar, .flash-messages, .mobile-menu-btn {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
}
