/* =============================================================
   İGK Gözetmen Sicil Sistemi — Modern UI (Red-dominant palette)
   Mevcut tüm class isimleri korunmuştur; şablonlar bozulmaz.
   ============================================================= */

/* =============== DESIGN TOKENS =============== */
:root {
    /* Kırmızı palet — baskın */
    --primary:       #DC2626;
    --primary-hover: #B91C1C;
    --primary-dark:  #991B1B;
    --primary-deep:  #7F1D1D;
    --primary-50:    #FEF2F2;
    --primary-100:   #FEE2E2;
    --primary-200:   #FECACA;
    --primary-300:   #FCA5A5;
    --primary-500:   #EF4444;
    --primary-600:   #DC2626;
    --primary-700:   #B91C1C;
    --primary-800:   #991B1B;
    --primary-900:   #7F1D1D;

    /* Nötr tonlar */
    --bg:            #F6F7FB;
    --bg-elev:       #FFFFFF;
    --surface:       #FFFFFF;
    --surface-muted: #F1F5F9;
    --surface-soft:  #F8FAFC;
    --border:        #E5E7EB;
    --border-strong: #CBD5E1;

    /* Yazı */
    --text:          #0F172A;
    --text-strong:   #0B1220;
    --text-muted:    #64748B;
    --text-subtle:   #94A3B8;
    --text-invert:   #FFFFFF;

    /* Durum */
    --success:    #15803D;
    --success-bg: #DCFCE7;
    --warning:    #B45309;
    --warning-bg: #FEF3C7;
    --info:       #1D4ED8;
    --info-bg:    #DBEAFE;
    --danger:     #B91C1C;
    --danger-bg:  #FEE2E2;

    /* Eski alias'lar (geri uyum) */
    --primary-color:   var(--primary);
    --secondary-color: var(--primary-hover);
    --accent-color:    var(--primary-500);
    --success-color:   var(--success);
    --warning-color:   var(--warning);
    --danger-color:    var(--danger);
    --light-bg:        var(--bg);
    --dark-text:       var(--text);
    --muted-text:      var(--text-muted);
    --border-color:    var(--border);
    --bg-secondary:    var(--surface-muted);

    /* Şekil */
    --radius-xs:   6px;
    --radius-sm:   8px;
    --radius:      12px;
    --radius-lg:   16px;
    --radius-xl:   20px;
    --radius-full: 9999px;

    /* Gölge */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow:    0 4px 12px rgba(15, 23, 42, .06), 0 2px 4px rgba(15, 23, 42, .04);
    --shadow-md: 0 8px 20px rgba(15, 23, 42, .08), 0 3px 6px rgba(15, 23, 42, .04);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, .10), 0 6px 12px rgba(15, 23, 42, .05);

    /* Layout */
    --sidebar-width: 272px;
    --topbar-height: 64px;

    /* Tipografi */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

/* =============== RESET & TABAN =============== */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-strong);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

a { color: var(--primary); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; }

::selection { background: var(--primary-100); color: var(--primary-900); }

/* =============== LOGIN =============== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(220, 38, 38, .35) 0%, transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(127, 29, 29, .6) 0%, transparent 60%),
        linear-gradient(135deg, #7F1D1D 0%, #450A0A 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><path fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1' d='M30 0v60M0 30h60'/></svg>");
    pointer-events: none;
}

.login-card {
    position: relative;
    background: var(--surface);
    padding: 2.25rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-logo { text-align: center; margin-bottom: 1.75rem; }
.login-logo img { max-width: 76px; margin-bottom: 0.75rem; }
.login-logo h1 {
    color: var(--primary);
    font-size: 1.4rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.login-logo p {
    color: var(--text-muted);
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

/* =============== SIDEBAR =============== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, #991B1B 0%, #7F1D1D 55%, #5B0F0F 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
    box-shadow: 2px 0 20px rgba(127, 29, 29, .15);
    transition: transform .3s var(--ease);
    color: #fff;
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(500px 200px at 0% 0%, rgba(239, 68, 68, .25), transparent 60%),
        radial-gradient(400px 200px at 100% 100%, rgba(0, 0, 0, .25), transparent 60%);
    pointer-events: none;
    opacity: .9;
}

.sidebar > * { position: relative; z-index: 1; }

.sidebar-header {
    padding: 1.1rem 1.1rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.12);
}

.sidebar-header img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 4px;
}

.sidebar-header h2 {
    color: #fff;
    font-size: 0.98rem;
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.sidebar-header p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.72rem;
    margin: 0.2rem 0 0;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Nav */
.sidebar-nav {
    padding: 0.5rem 0.6rem 1rem;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nav-section {
    padding: 0.9rem 0.75rem 0.4rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.6rem 0.8rem;
    margin: 0.15rem 0;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: background .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 10px;
    border-left: 0;
}

.nav-link i {
    width: 20px;
    margin-right: 10px;
    font-size: 0.95rem;
    opacity: 0.85;
    text-align: center;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-800);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link.active i { opacity: 1; color: var(--primary-700); }

/* Sidebar footer */
.sidebar-footer {
    flex-shrink: 0;
    padding: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.18);
}

.user-info {
    display: flex;
    align-items: center;
    color: #fff;
    margin-bottom: 0.65rem;
    gap: 0.65rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #EF4444, #B91C1C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.user-details { flex: 1; min-width: 0; }

.user-details strong {
    display: block;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.user-details small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.72rem;
    line-height: 1.3;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background .15s var(--ease);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

/* Sidebar scrollbar */
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

/* =============== MOBIL MENU =============== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    transition: transform .15s var(--ease);
}

.mobile-menu-toggle:hover { transform: translateY(-1px); }

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 999;
}

/* =============== TOPBAR =============== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--topbar-height);
    padding: 0 1.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    margin: -1.5rem -1.5rem 1.5rem;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.topbar-brand i { color: var(--primary); }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.6rem 0.35rem 0.35rem;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text);
}

.topbar-user .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    border: 0;
}

.topbar-user-name {
    font-weight: 600;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =============== ANA İÇERİK =============== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    min-height: 100vh;
    transition: margin-left .3s var(--ease);
}

.page-header {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.4rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-500), var(--primary-800));
}

.page-header h1 {
    font-size: 1.4rem;
    color: var(--text-strong);
    margin: 0 0 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header h1 i {
    color: var(--primary);
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    background: var(--primary-50);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.88rem;
}

/* =============== KARTLAR =============== */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}

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

.card-header {
    background: var(--surface);
    color: var(--text-strong);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.card-header::after {
    content: "";
    position: absolute;
    left: 1.25rem;
    bottom: -1px;
    width: 40px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.card-header h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    color: var(--text-strong);
    letter-spacing: -0.01em;
}

.card-header h3 i {
    color: var(--primary);
    font-size: 0.95rem;
}

/* card-header içindeki linkler (dashboard "Tümünü Gör →") */
.card-header a {
    color: var(--primary) !important;
    font-weight: 600;
}

/* card-header içindeki rozet/sayaç */
.card-header span[style*="rgba(255,255,255,0.2)"] {
    background: var(--primary-100) !important;
    color: var(--primary-800) !important;
    font-weight: 600;
}

.card-body { padding: 1.25rem; }

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

/* =============== FORM =============== */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 1rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--text-strong);
    font-size: 0.85rem;
}

.form-label i { color: var(--primary); font-size: 0.8rem; }

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.form-control::placeholder { color: var(--text-subtle); }

.form-control:hover:not(:focus):not(:disabled) {
    border-color: var(--border-strong);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.form-control:disabled {
    background: var(--surface-muted);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control {
    cursor: pointer;
    min-height: 44px;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background .15s;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator:hover {
    background: var(--primary-50);
}

input[type="date"].form-control-lg {
    padding: 0.95rem 1.1rem;
    font-size: 1.02rem;
    min-height: 52px;
}

/* Checkbox / Radio */
.checkbox-label, .radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.checkbox-label input, .radio-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* =============== BUTONLAR =============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.62rem 1.1rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform .1s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
    white-space: nowrap;
    line-height: 1.2;
    letter-spacing: 0.005em;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.15);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    color: #fff;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-muted);
    border-color: var(--border-strong);
    transform: translateY(-1px);
    color: var(--text);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background: #166534;
    transform: translateY(-1px);
    color: #fff;
}

.btn-warning {
    background: #D97706;
    color: #fff;
}

.btn-warning:hover:not(:disabled) {
    background: #B45309;
    transform: translateY(-1px);
    color: #fff;
}

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

.btn-danger:hover:not(:disabled) {
    background: var(--primary-800);
    transform: translateY(-1px);
    color: #fff;
}

.btn-dark {
    background: #1F2937;
    color: #fff;
}

.btn-dark:hover:not(:disabled) {
    background: #111827;
    transform: translateY(-1px);
    color: #fff;
}

.btn-info {
    background: var(--info);
    color: #fff;
}

.btn-info:hover:not(:disabled) {
    background: #1E40AF;
    transform: translateY(-1px);
    color: #fff;
}

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

.btn-sm {
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
    border-radius: var(--radius-xs);
}

.btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary-200);
}

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

/* =============== İSTATİSTİK KARTLARI =============== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.95rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}

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

.stat-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
    opacity: 0.85;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.stat-icon.primary   { background: linear-gradient(135deg, #EF4444, #B91C1C); }
.stat-icon.success   { background: linear-gradient(135deg, #22C55E, #15803D); }
.stat-icon.warning   { background: linear-gradient(135deg, #F59E0B, #B45309); }
.stat-icon.danger    { background: linear-gradient(135deg, #F87171, #991B1B); }
.stat-icon.secondary { background: linear-gradient(135deg, #94A3B8, #475569); }
.stat-icon.info      { background: linear-gradient(135deg, #3B82F6, #1E40AF); }

.stat-content h3 {
    font-size: 1.55rem;
    color: var(--text-strong);
    margin: 0;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-content p {
    color: var(--text-muted);
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-content small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stat-content small a { font-weight: 600; }

/* =============== ALERT =============== */
.alert {
    padding: 0.95rem 1.15rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    line-height: 1.5;
}

.alert i { margin-top: 2px; font-size: 1rem; flex-shrink: 0; }

.alert-success {
    background: var(--success-bg);
    color: #14532D;
    border-color: #BBF7D0;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--primary-900);
    border-color: var(--primary-200);
}

.alert-warning {
    background: var(--warning-bg);
    color: #78350F;
    border-color: #FDE68A;
}

.alert-info {
    background: var(--info-bg);
    color: #1E3A8A;
    border-color: #BFDBFE;
}

/* =============== TABLOLAR =============== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
    background: var(--surface);
}

.data-table thead th {
    background: var(--surface-soft);
    font-weight: 700;
    color: var(--text-strong);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.75rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--primary-100);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.8rem 0.75rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: var(--primary-50);
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table td strong { color: var(--text-strong); font-weight: 600; }

/* =============== BADGE =============== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1.2;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.badge i { font-size: 0.7rem; }

.badge-primary   { background: var(--primary-100);  color: var(--primary-800);  border-color: var(--primary-200); }
.badge-success   { background: var(--success-bg);   color: #14532D;             border-color: #BBF7D0; }
.badge-warning   { background: var(--warning-bg);   color: #78350F;             border-color: #FDE68A; }
.badge-danger    { background: var(--danger-bg);    color: var(--primary-900);  border-color: var(--primary-200); }
.badge-secondary { background: #F1F5F9;             color: #475569;             border-color: #E2E8F0; }
.badge-info      { background: var(--info-bg);      color: #1E3A8A;             border-color: #BFDBFE; }

/* =============== BOŞ DURUM =============== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    color: var(--primary-200);
}

.empty-state h4 {
    margin: 0 0 0.5rem;
    color: var(--text-strong);
    font-size: 1.05rem;
    font-weight: 700;
}

.empty-state p {
    margin: 0;
    font-size: 0.88rem;
}

/* =============== ARAMA SONUÇLARI =============== */
.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s var(--ease);
}

.search-result-item:last-child { border-bottom: 0; }
.search-result-item:hover { background: var(--primary-50); }

.result-info { display: flex; flex-direction: column; gap: 0.15rem; }
.result-name { font-weight: 600; color: var(--text-strong); }
.result-details { font-size: 0.8rem; color: var(--text-muted); }

/* =============== FOTOĞRAF =============== */
.gozetmen-foto-mini {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    cursor: pointer;
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 1px var(--border);
}

.gozetmen-foto-mini:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 2px var(--primary), 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    position: relative;
}

.gozetmen-foto-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-subtle);
    border: 2px dashed var(--border-strong);
}

.gozetmen-foto-preview {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--primary);
    cursor: pointer;
    transition: transform .15s var(--ease);
    box-shadow: var(--shadow-md);
}

.gozetmen-foto-preview:hover { transform: scale(1.04); }

.foto-preview-container {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.foto-placeholder-large {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-subtle);
    border: 3px dashed var(--border-strong);
}

/* Foto modal */
.foto-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding-top: 50px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.foto-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius);
    animation: zoomIn .2s var(--ease);
}

@keyframes zoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.foto-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #F8FAFC;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color .15s var(--ease);
    line-height: 1;
}

.foto-modal-close:hover { color: var(--primary-300); }

.data-table td.foto-cell {
    width: 50px;
    padding: 0.3rem;
    text-align: center;
}

.data-table th.foto-cell {
    width: 50px;
    text-align: center;
}

/* =============== HIZLI ERİŞİM KARTLARI =============== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
}

.quick-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
    position: relative;
    overflow: hidden;
}

.quick-card::after {
    content: "\f061";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 1rem;
    color: var(--text-subtle);
    opacity: 0;
    transition: opacity .15s var(--ease), transform .15s var(--ease);
    transform: translateX(-4px);
}

.quick-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-200);
    box-shadow: var(--shadow);
    color: var(--text);
    background: var(--primary-50);
}

.quick-card:hover::after {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary);
}

.quick-card .quick-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
}

.quick-card .quick-icon.success { background: linear-gradient(135deg, #22C55E, #15803D); }
.quick-card .quick-icon.warning { background: linear-gradient(135deg, #F59E0B, #B45309); }
.quick-card .quick-icon.danger  { background: linear-gradient(135deg, #F87171, #991B1B); }
.quick-card .quick-icon.info    { background: linear-gradient(135deg, #3B82F6, #1E40AF); }
.quick-card .quick-icon.dark    { background: linear-gradient(135deg, #475569, #1F2937); }

.quick-card .quick-label { flex: 1; min-width: 0; }
.quick-card .quick-label small {
    display: block;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    margin-top: 2px;
}

/* =============== DETAY/INFO PATTERN =============== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px dashed var(--border);
}

.info-row:last-child { border-bottom: 0; }

.info-row > .info-label {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    flex-shrink: 0;
    min-width: 130px;
}

.info-row > .info-value {
    color: var(--text-strong);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: right;
    word-break: break-word;
}

/* Section başlıklar */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.section-title:first-child { margin-top: 0; }

.section-title i { color: var(--primary); font-size: 0.9rem; }

/* Yardım/açıklama metni */
.helper-text {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.4;
}

.helper-text i { color: var(--primary); margin-right: 0.25rem; }

/* Action bar — alta sabit aksiyon çubuğu */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin: 1.25rem -1.25rem -1.25rem;
}

.action-bar .spacer { flex: 1; }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-subtle); font-size: 0.7rem; }
.breadcrumb .current { color: var(--text-strong); font-weight: 600; }

/* Chip — tag/etiket */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    background: var(--surface-soft);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
}

.chip i { color: var(--primary); font-size: 0.72rem; }

/* Progress bar */
.progress {
    width: 100%;
    height: 8px;
    background: var(--surface-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-700));
    border-radius: inherit;
    transition: width .4s var(--ease);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

/* Kart içi sub-başlık */
.card-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
    font-weight: 400;
}

/* Step indicator — çok adımlı formlar için */
.steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    padding: 0.25rem 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.step .step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
}

.step.active {
    background: var(--primary-50);
    border-color: var(--primary-200);
    color: var(--primary-800);
}

.step.active .step-num { background: var(--primary); color: #fff; }

.step.done {
    background: var(--success-bg);
    border-color: #BBF7D0;
    color: #14532D;
}

.step.done .step-num { background: var(--success); color: #fff; }

.step-sep {
    flex-shrink: 0;
    width: 20px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
}

/* Seçim kartı — radio/card seçici */
.select-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}

.select-card:hover {
    border-color: var(--primary-200);
    background: var(--primary-50);
}

.select-card.selected,
.select-card input:checked ~ .select-card-body,
.select-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-50);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.select-card input[type="radio"],
.select-card input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--primary);
}

.select-card .select-title {
    font-weight: 600;
    color: var(--text-strong);
    display: block;
    margin-bottom: 0.2rem;
}

.select-card .select-sub {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

/* Empty-state CTA */
.empty-state .btn { margin-top: 1rem; }

/* Sticky actions container — form altları */
.form-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.form-actions .spacer { flex: 1; }

/* Kbd key styling */
kbd {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.8em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: var(--surface-muted);
    color: var(--text-strong);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 4px;
}

/* =============== YARDIMCI =============== */
hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

code, pre {
    background: var(--surface-muted);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.88em;
    color: var(--primary-800);
}

/* Fade-in animasyonu */
.main-content > * { animation: fadeUp .3s var(--ease) both; }
.main-content > *:nth-child(2) { animation-delay: .02s; }
.main-content > *:nth-child(3) { animation-delay: .04s; }
.main-content > *:nth-child(4) { animation-delay: .06s; }

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

/* =============== MOBİL UYUM =============== */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15); }
    .sidebar.active { transform: translateX(0); }

    .mobile-menu-toggle { display: block; }
    .mobile-menu-overlay.active { display: block; }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 68px;
    }

    .topbar {
        margin: -1rem -1rem 1rem;
        padding: 0 1rem 0 60px;
    }

    .topbar-brand { display: none; }

    .page-header {
        padding: 1rem 1.1rem;
        border-radius: var(--radius);
    }

    .page-header h1 {
        font-size: 1.15rem;
    }

    .page-header h1 i {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

    .stat-card { padding: 0.9rem; gap: 0.75rem; }

    .stat-icon { width: 44px; height: 44px; font-size: 1.05rem; border-radius: 12px; }

    .form-row { flex-direction: column; gap: 0.5rem; }
    .form-group { min-width: 100%; }

    .card-body { padding: 1rem; }
    .card-header { padding: 0.85rem 1rem; }

    .btn {
        padding: 0.55rem 0.95rem;
        font-size: 0.85rem;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
        padding: 0.55rem 0;
    }
    .info-row > .info-label { min-width: 0; font-size: 0.78rem; }
    .info-row > .info-value { text-align: left; font-size: 0.92rem; }

    .form-actions { flex-direction: column; align-items: stretch; }
    .form-actions .spacer { display: none; }
    .form-actions .btn { width: 100%; }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem 1rem;
    }
    .action-bar .btn { width: 100%; justify-content: center; }
    .action-bar .spacer { display: none; }
}

@media (max-width: 576px) {
    body { font-size: 14.5px; }

    .login-card {
        padding: 1.5rem;
        margin: 0.5rem;
        border-radius: var(--radius-lg);
    }

    .login-logo h1 { font-size: 1.2rem; }

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

    .stat-content h3 { font-size: 1.3rem; }

    .data-table { font-size: 0.82rem; }

    .data-table thead th,
    .data-table tbody td { padding: 0.55rem 0.55rem; }

    .card-header h3 { font-size: 0.92rem; }

    .btn-sm { padding: 0.38rem 0.65rem; font-size: 0.74rem; }

    .page-header { margin-bottom: 1rem; padding: 0.9rem 1rem; }
    .page-header h1 { font-size: 1.05rem; }
    .page-header p { font-size: 0.8rem; }

    .topbar {
        padding: 0 0.75rem 0 58px;
        height: 58px;
    }

    .main-content { padding-top: 64px; }

    .topbar-user-name { display: none; }
    .topbar-logout-label { display: none; }
}

/* =============== YAZDIRMA =============== */
@media print {
    .sidebar,
    .topbar,
    .mobile-menu-toggle,
    .no-print { display: none !important; }

    body { background: #fff; }

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

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .page-header {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
