:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 68px;
    --sidebar-bg: #1a1f36;
    --sidebar-hover: #2d3561;
    --sidebar-active: #4361ee;
    --topbar-height: 60px;
    --primary: #4361ee;
}

/* ===== SIDEBAR LAYOUT ===== */
body.sidebar-layout {
    margin: 0;
    padding: 0;
    background: #f5f6fa;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    transition: width 0.3s ease;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    min-height: var(--topbar-height);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar-brand-text {
    white-space: nowrap;
    transition: opacity 0.3s;
}

.sidebar-logo-img {
    height: 48px;
    max-width: 180px;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    transition: max-width 0.3s, height 0.3s;
}

.sidebar.collapsed .sidebar-logo-img {
    height: 32px;
    max-width: 36px;
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .chevron-icon,
.sidebar.collapsed .sidebar-user-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Sidebar nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    border-radius: 0;
    font-size: 0.9rem;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
}

.nav-icon {
    font-size: 1.1rem;
    min-width: 1.2rem;
    text-align: center;
}

.submenu {
    background: rgba(0,0,0,0.15);
}

.submenu .nav-link {
    padding-left: 2.5rem;
    font-size: 0.85rem;
}

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

.avatar-circle {
    width: 36px;
    height: 36px;
    background: var(--sidebar-active);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ===== CARDS ===== */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ===== TABLES ===== */
.table-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}

.table thead th {
    background: #f8f9fa;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

/* ===== BADGES ===== */
.badge-taslak { background: #6c757d; }
.badge-onay { background: #ffc107; color: #000; }
.badge-onaylandi { background: #0dcaf0; }
.badge-uretim { background: #6f42c1; }
.badge-tamamlandi { background: #198754; }
.badge-iptal { background: #dc3545; }

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1f36 0%, #4361ee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    filter: brightness(0) saturate(1) invert(28%) sepia(90%) saturate(1500%) hue-rotate(218deg) brightness(95%) contrast(95%);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

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

    .main-content {
        margin-left: 0 !important;
    }
}

/* ===== LOADING BAR ===== */
#loadingBar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #0d6efd 0%, #0dcaf0 60%, #0d6efd 100%);
    background-size: 200% 100%;
    z-index: 10000;
    transition: width 0.25s ease, opacity 0.3s ease;
    opacity: 0;
    animation: loadingShimmer 1.2s linear infinite;
}
#loadingBar.active { opacity: 1; }

@keyframes loadingShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#pageOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(2px);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}
#pageOverlay.active { display: flex; }
#pageOverlay .ov-spinner {
    width: 48px; height: 48px;
    border: 4px solid #dee2e6;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
#pageOverlay .ov-text { color: #6c757d; font-size:.85rem; }

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

/* ===== HELP FAB ===== */
.help-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(13,110,253,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 1050;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.help-fab:hover { background: #0b5ed7; transform: scale(1.08); }

/* Help offcanvas content */
.help-section h6,
.help-section .help-title {
    color: #0d6efd;
    font-weight: 600;
    font-size: .9rem;
    margin-top: 1.1rem;
    margin-bottom: .3rem;
    display: flex;
    align-items: center;
    gap: .2rem;
}
.help-section .help-title:first-child { margin-top: 0; }
.help-section .help-desc {
    font-size: .85rem;
    color: #495057;
    margin-bottom: .4rem;
}
.help-section ul,
.help-section .help-list {
    padding-left: 1.2rem;
    margin-bottom: .5rem;
}
.help-section li,
.help-section .help-list li {
    margin-bottom: .3rem;
    font-size: .85rem;
    line-height: 1.45;
    color: #212529;
}
.help-section ol.help-list { list-style: decimal; }
.help-section .badge-tip { font-size: .72rem; vertical-align: middle; }

/* Adım kutuları */
.help-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .87rem;
    font-weight: 600;
    color: #212529;
    margin: .8rem 0 .25rem;
}
.help-step-no {
    background: #0d6efd;
    color: #fff;
    border-radius: 50%;
    width: 1.4rem;
    height: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== UTILITIES ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1f36;
    margin: 0;
}
