:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --secondary: #e0f2fe;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #ffffff;
    --surface: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--primary) !important;
    font-size: 1.5rem;
}

.btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.btn-secondary {
    background: var(--secondary);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-accent {
    background: var(--accent);
    border: none;
    color: white;
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
    color: white;
    border: none;
    padding: 32px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.stat-card p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.stat-card i {
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: var(--surface);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
    background: white;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-primary);
    padding: 16px;
}

.table tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--surface);
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-assigned {
    background: #dbeafe;
    color: #1e40af;
}

.badge-delivered {
    background: #d1fae5;
    color: #065f46;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.hero-section {
    background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 50%, #dbeafe 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width=\"100\" height=\"100\" xmlns=\"http://www.w3.org/2000/svg\"><defs><pattern id=\"grid\" width=\"40\" height=\"40\" patternUnits=\"userSpaceOnUse\"><path d=\"M 40 0 L 0 0 0 40\" fill=\"none\" stroke=\"rgba(2,132,199,0.05)\" stroke-width=\"1\"/></pattern></defs><rect width=\"100\" height=\"100\" fill=\"url(%23grid)\" /></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-section .lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.sidebar {
    background: white;
    border-right: 1px solid var(--border);
    min-height: 100vh;
    padding: 24px 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-menu li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: var(--secondary);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.dashboard-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    margin-bottom: 32px;
}

.wallet-card {
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 32px;
    text-align: center;
}

.wallet-card h2 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.referral-code-box {
    background: var(--surface);
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
}

.referral-code-box .code {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

.copy-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-dark);
}

.alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.image-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
    aspect-ratio: 4/3;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    font-size: 0.875rem;
    text-align: center;
}

.product-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.2);
    transform: translateY(-4px);
}

.product-card input[type="radio"]:checked ~ label {
    color: var(--primary);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 50%, #dbeafe 100%);
    padding: 20px;
}

.login-card {
    max-width: 450px;
    width: 100%;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 48px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 32px;
    color: var(--primary);
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .sidebar {
        min-height: auto;
    }
    
    .login-card {
        padding: 32px 24px;
    }
}
