/* =========================================================
   Vizra Teklif — Ana Uygulama CSS
   Bootstrap 5 üzerine inşa edilmiştir
========================================================= */

:root {
    --sidebar-width: 260px;
    --topbar-height: 58px;
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: rgba(79, 70, 229, 0.15);
    --sidebar-active-text: #a5b4fc;
    font-family: 'Inter', system-ui, sans-serif;
}

/* =====================================
   BODY / LAYOUT
===================================== */
body {
    background: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =====================================
   SIDEBAR
===================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform .25s ease;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.brand-name {
    color: #f1f5f9;
    font-size: 15px;
    font-weight: 700;
    display: block;
}

.brand-sub {
    color: var(--sidebar-text);
    font-size: 11px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #475569;
    padding: 0 10px;
    margin-bottom: 6px;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all .15s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-active-text);
    font-weight: 600;
}

.nav-item i {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-name {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    display: block;
}

.user-role {
    color: var(--sidebar-text);
    font-size: 11px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

/* =====================================
   MAIN CONTENT
===================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================================
   TOPBAR
===================================== */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-title {
    font-size: 14px;
}

.content-area {
    flex: 1;
}

/*.sidebar-toggle { display: none; } */

/* =====================================
   STAT CARDS
===================================== */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    border-left: 4px solid transparent;
    transition: transform .15s, box-shadow .15s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.stat-primary {
    border-left-color: var(--primary);
}

.stat-primary .stat-icon {
    background: rgba(79, 70, 229, .12);
    color: var(--primary);
}

.stat-warning {
    border-left-color: #f59e0b;
}

.stat-warning .stat-icon {
    background: rgba(245, 158, 11, .12);
    color: #f59e0b;
}

.stat-success {
    border-left-color: #10b981;
}

.stat-success .stat-icon {
    background: rgba(16, 185, 129, .12);
    color: #10b981;
}

.stat-info {
    border-left-color: #06b6d4;
}

.stat-info .stat-icon {
    background: rgba(6, 182, 212, .12);
    color: #06b6d4;
}

/* =====================================
   CARDS
===================================== */
.card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 1px solid #e9ecef;
}

/* =====================================
   TABLES
===================================== */
.table> :not(caption)>*>* {
    vertical-align: middle;
}

/* =====================================
   LOGIN PAGE
===================================== */
.login-page {
    background: #0f172a;
    overflow: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .3;
}

.login-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(var(--primary), transparent);
    top: -200px;
    left: -150px;
}

.login-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(#7c3aed, transparent);
    bottom: -150px;
    right: -100px;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, .97);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, .4);
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
}

/* =====================================
   BUTTONS
===================================== */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* =====================================
   RESPONSIVE
===================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* =====================================
   MISC
===================================== */
.x-small {
    font-size: 11px;
}

.badge.bg-success-subtle {
    background: rgba(16, 185, 129, .15) !important;
}