/* ==========================================================================
   VizePro - D Vize ve Personel Evrak Yönetim Sistemi Kurumsal Tasarım
   ========================================================================== */

:root {
    --vize-navy: #0f2342;
    --vize-navy-light: #1b365d;
    --vize-accent: #2563eb;
    --vize-sky: #38bdf8;
    --vize-bg: #f4f6f9;
    --vize-surface: #ffffff;
    --vize-border: #e5e9f2;
    --vize-sidebar-w: 260px;
    --vize-sidebar-collapsed-w: 74px;
    --vize-topbar-h: 64px;
}

[data-bs-theme="dark"] {
    --vize-bg: #0f172a;
    --vize-surface: #1e293b;
    --vize-border: #334155;
}

body.vize-body {
    background-color: var(--vize-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    font-size: 0.925rem;
    overflow-x: hidden;
}

/* Auth Layout */
body.auth-body {
    background: radial-gradient(circle at top right, #1e3a8a 0%, #0f2342 55%, #091529 100%);
}
.auth-card {
    max-width: 440px;
    width: 100%;
}
.auth-card-header {
    background: linear-gradient(135deg, var(--vize-navy) 0%, var(--vize-navy-light) 100%);
}
.auth-logo-badge {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.18);
    color: var(--vize-sky);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.btn-navy {
    background-color: var(--vize-navy-light);
    border-color: var(--vize-navy-light);
    color: #fff;
}
.btn-navy:hover, .btn-navy:focus {
    background-color: var(--vize-navy);
    border-color: var(--vize-navy);
    color: #fff;
}
.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-body-color);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.btn-icon:hover {
    background: rgba(15, 35, 66, 0.08);
}
[data-bs-theme="dark"] .btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Layout Structure */
.vize-wrapper {
    display: flex;
    min-height: 100vh;
}

.vize-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--vize-sidebar-w);
    background: linear-gradient(180deg, var(--vize-navy) 0%, #132a4f 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width 0.2s ease, transform 0.25s ease;
    box-shadow: 2px 0 12px rgba(15, 35, 66, 0.12);
}

.sidebar-brand {
    height: var(--vize-topbar-h);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.18);
    color: var(--vize-sky);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.65rem;
}
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.42);
    padding: 0.85rem 0.75rem 0.3rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.58rem 0.8rem;
    margin-bottom: 0.18rem;
    border-radius: 0.55rem;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.85;
    flex-shrink: 0;
}
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}
.sidebar-link.active {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.22), rgba(37, 99, 235, 0.18));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--vize-sky);
}
.sidebar-link.active i {
    color: var(--vize-sky);
    opacity: 1;
}

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

/* Main Area */
.vize-main {
    flex: 1;
    margin-left: var(--vize-sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.2s ease;
}

/* Collapsed Desktop Sidebar */
.vize-wrapper.sidebar-collapsed .vize-sidebar {
    width: var(--vize-sidebar-collapsed-w);
}
.vize-wrapper.sidebar-collapsed .vize-main {
    margin-left: var(--vize-sidebar-collapsed-w);
}
.vize-wrapper.sidebar-collapsed .brand-text,
.vize-wrapper.sidebar-collapsed .nav-section-label,
.vize-wrapper.sidebar-collapsed .sidebar-link span,
.vize-wrapper.sidebar-collapsed .sidebar-footer span {
    display: none;
}
.vize-wrapper.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.65rem;
}

/* Top Navbar */
.vize-topbar {
    position: sticky;
    top: 0;
    height: var(--vize-topbar-h);
    background: var(--vize-surface);
    border-bottom: 1px solid var(--vize-border);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 1020;
}

.vize-content {
    flex: 1;
    padding: 1.5rem;
}

.vize-footer {
    padding: 0.9rem 1.5rem;
    border-top: 1px solid var(--vize-border);
    background: var(--vize-surface);
}

/* Global Search */
.global-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
}
.global-search-box input {
    border-radius: 10px;
    background-color: var(--vize-bg);
    border: 1px solid var(--vize-border);
    padding-top: 0.48rem;
    padding-bottom: 0.48rem;
}
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--vize-surface);
    border: 1px solid var(--vize-border);
    border-radius: 0.75rem;
    max-height: 360px;
    overflow-y: auto;
    z-index: 1050;
}
.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.9rem;
    text-decoration: none;
    color: var(--bs-body-color);
    border-bottom: 1px solid var(--vize-border);
    transition: background 0.12s;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item:hover {
    background: rgba(37, 99, 235, 0.06);
}

/* Notification Dropdown */
.notif-dropdown {
    width: 340px;
    max-width: 92vw;
}
.notif-dropdown-list {
    max-height: 320px;
    overflow-y: auto;
}
.notif-item {
    display: block;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--vize-border);
    text-decoration: none;
    color: var(--bs-body-color);
    transition: background 0.12s;
}
.notif-item.unread {
    background: rgba(37, 99, 235, 0.05);
}
.notif-item:hover {
    background: rgba(37, 99, 235, 0.09);
}

/* Avatars */
.avatar-circle-sm {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--vize-navy-light);
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.avatar-circle-lg {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vize-navy), var(--vize-accent));
    color: #fff;
    font-weight: 700;
    font-size: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Cards & KPI Tiles */
.card {
    background-color: var(--vize-surface);
    border-radius: 0.85rem;
}
.kpi-card {
    border: 1px solid var(--vize-border);
    border-radius: 0.85rem;
    background: var(--vize-surface);
    padding: 1rem 1.1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 35, 66, 0.08);
    color: inherit;
}
.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.kpi-value {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.15;
}
.kpi-label {
    font-size: 0.78rem;
    color: var(--bs-secondary-color);
    font-weight: 500;
}

/* Tables */
.table > :not(caption) > * > * {
    padding: 0.65rem 0.75rem;
}
.table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    color: var(--bs-secondary-color);
}

/* Stage Pill */
.stage-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

/* Mobile Responsive Sidebar */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1035;
}
@media (max-width: 991.98px) {
    .vize-sidebar {
        transform: translateX(-100%);
    }
    .vize-wrapper.sidebar-open .vize-sidebar {
        transform: translateX(0);
    }
    .vize-wrapper.sidebar-open .sidebar-backdrop {
        display: block;
    }
    .vize-main,
    .vize-wrapper.sidebar-collapsed .vize-main {
        margin-left: 0;
    }
    .vize-content {
        padding: 1rem;
    }
}
