/* ========================================
   KAPI GROUP İK - Ana Stil Dosyası
   Kurumsal koyu mavi tema + glassmorphism
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===================== CSS DEĞİŞKENLER ===================== */
:root {
    /* Ana Renkler */
    --primary: #0a1628;
    --primary-light: #0f2140;
    --primary-lighter: #162d50;
    --accent: #d4a843;
    --accent-light: #e8c46a;
    --accent-dark: #b8912e;

    /* Durumlar */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #eab308;
    --warning-bg: rgba(234, 179, 8, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);

    /* Metin */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dark: #1e293b;

    /* Arka Plan */
    --bg-body: #060d18;
    --bg-sidebar: #0a1628;
    --bg-card: rgba(15, 33, 64, 0.6);
    --bg-card-hover: rgba(15, 33, 64, 0.8);
    --bg-input: rgba(15, 33, 64, 0.4);
    --bg-modal: rgba(6, 13, 24, 0.9);

    /* Sınırlar */
    --border: rgba(212, 168, 67, 0.15);
    --border-hover: rgba(212, 168, 67, 0.3);

    /* Gölgeler */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px rgba(212,168,67,0.15);

    /* Boyutlar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Geçişler */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ===================== RESET & BASE ===================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(212,168,67,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(59,130,246,0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

/* ===================== LOGIN SAYFASI ===================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: fadeInUp 0.6s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 16px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* ===================== LAYOUT ===================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ===================== SIDEBAR ===================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 12px;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--header-height);
}

.sidebar-header img {
    width: auto;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.sidebar-header .brand {
    display: flex;
    flex-direction: column;
}

.sidebar-header .brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.sidebar-header .brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-section {
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 12px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    margin: 2px 0;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(212,168,67,0.15), rgba(212,168,67,0.05));
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

.nav-item .icon {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--bg-card);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
    flex-shrink: 0;
}

.user-info .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info .user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ===================== MAIN CONTENT ===================== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===================== HEADER ===================== */
.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    position: relative;
}

.header-btn:hover {
    background: var(--bg-card);
    color: var(--accent);
}

.header-btn .notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

/* ===================== PAGE CONTENT ===================== */
.page-content {
    padding: 24px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===================== KARTLAR ===================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .icon {
    color: var(--accent);
}

/* Stat Card */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: var(--border-hover);
}

.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-icon.gold { background: rgba(212,168,67,0.15); color: var(--accent); }
.stat-icon.blue { background: rgba(59,130,246,0.15); color: var(--info); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.stat-info .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===================== GRID LAYOUTS ===================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ===================== FORM ELEMANLAR ===================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px; /* iOS zoom fix */
    transition: var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212,168,67,0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    -webkit-appearance: none;
    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 fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* ===================== BUTONLAR ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--primary);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212,168,67,0.3);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #16a34a; transform: translateY(-1px); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-warning { background: var(--warning); color: var(--primary); }

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

/* ===================== TABLO ===================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--primary-light);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-primary);
}

tr:hover td {
    background: rgba(212,168,67,0.03);
}

/* ===================== BADGE / ETİKET ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-gold { background: rgba(212,168,67,0.15); color: var(--accent); }

/* ===================== MODAL ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-modal);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ===================== TABS ===================== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab {
    padding: 12px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.tab:hover { color: var(--text-primary); }
.tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease forwards; opacity: 1; }

/* ===================== TOAST / BİLDİRİM ===================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast-icon { font-size: 1.2rem; }
.toast-message { flex: 1; font-size: 0.85rem; }

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px;
}

/* ===================== DOĞUM GÜNÜ KARTI ===================== */
.birthday-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(212,168,67,0.05);
    border: 1px solid rgba(212,168,67,0.1);
}

.birthday-card .cake-icon {
    font-size: 1.5rem;
}

.birthday-card .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.birthday-card .company {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state .title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state .desc {
    font-size: 0.85rem;
}

/* ===================== SEARCH BAR ===================== */
.search-bar {
    position: relative;
    max-width: 320px;
}

.search-bar input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-fast);
}

.search-bar input:focus {
    border-color: var(--accent);
}

.search-bar .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ===================== LOADING ===================== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===================== ANİMASYONLAR ===================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Staggered animations */
.animate-in {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.2s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex !important; }
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 15px rgba(0,0,0,0.5);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .stat-cards { grid-template-columns: 1fr; }
    .page-content { padding: 16px; }
    .login-card { margin: 16px; padding: 32px 24px; }
    
    .modal {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        border: none !important;
    }
    
    .modal-overlay {
        padding: 0 !important;
    }
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===================== IZIN TAKVIM ===================== */
.izin-bakiye-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.izin-bakiye-bar .bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.izin-bakiye-bar .bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--success), var(--accent));
    transition: width 0.5s ease;
}

.izin-bakiye-bar .bar-fill.low {
    background: linear-gradient(90deg, var(--warning), var(--danger));
}

/* ===================== NOTIFICATION DROPDOWN ===================== */
.notif-dropdown {
    position: absolute;
    top: 100%;
    right: -10px;
    width: 360px;
    max-width: 90vw;
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.notif-dropdown.open {
    display: block;
    animation: fadeInUp 0.2s ease;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notif-item:hover {
    background: var(--bg-card);
}

.notif-item.unread {
    background: rgba(212,168,67,0.05);
    border-left: 3px solid var(--accent);
}

.notif-item .notif-text {
    flex: 1;
}

.notif-item .notif-title {
    font-size: 0.8rem;
    font-weight: 600;
}

.notif-item .notif-msg {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.notif-item .notif-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===================== CHECKLIST ===================== */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.checklist-item .check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.checklist-item .check.done {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.checklist-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.checklist-item .dept-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(59,130,246,0.1);
    color: var(--info);
}

/* ===================== İZİN DURUM RENKLERİ ===================== */
.durum-bekliyor { color: var(--warning); }
.durum-onaylandi { color: var(--success); }
.durum-reddedildi { color: var(--danger); }
.durum-iptal { color: var(--text-muted); }

/* ===================== TANIMLAR SAYFASI LAYOUT ===================== */
.tanim-layout {
    display: flex;
    gap: 24px;
    height: 100%;
}

.tanim-menu {
    width: 250px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.tanim-menu-item {
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.tanim-menu-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tanim-menu-item.active {
    background: rgba(212, 168, 67, 0.1);
    color: var(--accent);
    border-left-color: var(--accent);
}

.tanim-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ===================== MOBİL VE TABLET UYUMLULUĞU (RESPONSIVE) ===================== */

/* Tablet ve Küçük Ekranlar (max-width: 992px) */
@media (max-width: 992px) {
    .app-layout {
        grid-template-columns: 1fr; /* Sidebar'ı normal gridden çıkarıyoruz */
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--sidebar-width);
        z-index: 9999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        width: 100vw;
    }

    /* Mobil Menü Açıldığında Arka Planı Karartmak İçin Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        backdrop-filter: blur(4px);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Header İçindeki Mobil Menü Butonu */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-primary);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 8px;
        margin-right: 12px;
    }

    .header-title {
        display: flex;
        align-items: center;
    }
}

/* Mobil Telefonlar (max-width: 768px) */
@media (max-width: 768px) {
    .top-header {
        padding: 0 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Form Gridlerini Alt Alta Al (1 Sütun) */
    .form-row, .form-row-3, .form-row-4 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Modal Pencereyi Daralt */
    .modal {
        width: 95%;
        padding: 20px;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Tablolarda Sağa-Sola Kaydırma (Yatay Scroll) */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        white-space: nowrap;
    }

    /* Personel Profil Düzeni */
    .personel-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .personel-meta {
        justify-content: center;
        margin-top: 10px;
    }

    .personel-tabs {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding-bottom: 5px;
    }

    /* Sistem Tanımları Düzeni */
    .tanim-layout {
        flex-direction: column;
        gap: 15px;
    }

    .tanim-menu {
        width: 100%;
        height: auto;
        max-height: none;
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        white-space: nowrap;
    }

    .tanim-menu-item {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 8px 16px;
    }

    .tanim-menu-item.active {
        border-left: none;
        border-bottom-color: var(--accent);
    }

    /* Dashboard İstatistik Kartları */
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================== GUARANTEED MOBILE SIDEBAR OVERRIDES ===================== */
@media screen and (max-width: 992px) {
    body .app-layout .sidebar#sidebar { display: flex !important; position: fixed !important; top: 0 !important; left: 0 !important; bottom: 0 !important; width: 260px !important; background: #0a1628 !important; z-index: 9999 !important; transform: translateX(-100%) !important; transition: transform 0.3s ease !important; visibility: visible !important; opacity: 1 !important; }
    body .app-layout .sidebar#sidebar.open { transform: translateX(0) !important; }
    body .sidebar-overlay { z-index: 9997 !important; }
}
