/* Raja Talha Traders - Premium UI */
:root {
    --primary-color: #0d6efd;
    --primary-gradient: linear-gradient(135deg, #0d6efd 0%, #0043a8 100%);
    --secondary-color: #6c757d;
    --light-bg: #f3f6f9;
    /* Softer gray/blue bg */
    --sidebar-bg: #1e293b;
    /* Modern dark slate */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--light-bg);
    font-family: 'Poppins', sans-serif;
    color: #334155;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background: var(--primary-gradient) !important;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    position: fixed;
    top: 56px;
    left: 0;
    width: 250px;
    padding-top: 25px;
    background-color: var(--sidebar-bg);
    color: white;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar h5 {
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding-left: 15px;
    margin-bottom: 15px;
}

.sidebar a {
    padding: 12px 20px;
    text-decoration: none;
    font-size: 15px;
    color: #cbd5e1;
    display: block;
    border-left: 3px solid transparent;
    transition: all 0.2s ease-in-out;
}

.sidebar a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 25px;
    /* Slight movement effect */
}

.sidebar a.active {
    background-color: rgba(13, 110, 253, 0.2);
    color: #60a5fa;
    border-left: 3px solid #60a5fa;
}

.sidebar i {
    width: 25px;
    text-align: center;
}

.main-content {
    margin-left: 250px;
    padding: 30px;
    margin-top: 56px;
    transition: margin-left 0.3s ease;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.stat-card .card-body {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Add subtle texture to stat cards */
.stat-card.bg-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.stat-card.bg-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}

.stat-card.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
}

.stat-card.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.3);
    transition: transform 0.1s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #00378a 100%);
    box-shadow: 0 6px 8px rgba(13, 110, 253, 0.4);
}

/* Tables */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table td {
    vertical-align: middle;
}

/* Login Page Specifics */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.form-control:focus {
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
    border-color: #3b82f6;
}

/* Responsive */
/* Responsive - Force Desktop View */
/* Responsive - Force Desktop View (Except Login) */
@media (max-width: 768px) {

    /* Main App Body - Forced Desktop */
    body:not(.login-body) {
        min-width: 1024px;
        overflow-x: auto;
    }

    body:not(.login-body) .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        height: 100vh;
        width: 250px;
    }

    body:not(.login-body) .main-content {
        margin-left: 250px;
    }

    /* Login Page - Fully Responsive & Centered */
    .login-body {
        min-width: 100vw !important;
        overflow-x: hidden !important;
        padding: 20px;
    }

    .login-container {
        width: 90% !important;
        max-width: 400px;
        padding: 30px 20px;
    }
}

/* 3D Background for Login */
.login-body {
    background: url('../img/bg-3d.png') no-repeat center center fixed;
    background-size: cover;
    /* Fallback/Overlay */
    box-shadow: inset 0 0 0 2000px rgba(13, 110, 253, 0.1);
}