@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-dark: #07090e;
    --bg-surface: #0f131c;
    --card-bg: #141a26;
    --card-border: rgba(255, 255, 255, 0.12);
    --card-hover-border: rgba(16, 185, 129, 0.5);
    
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.35);
    
    --accent: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.3);
    
    --text-main: #ffffff;
    --text-muted: #e2e8f0; /* Ultra crisp high contrast readable text */
    --text-subtle: #cbd5e1;
    
    --sidebar-width: 265px;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* OVERRIDE BOOTSTRAP DARK/MUTED TEXT FOR MAXIMUM READABILITY */
.text-muted, .text-white-50, .text-secondary {
    color: #e2e8f0 !important;
    opacity: 1 !important;
}

.text-subtle-readable {
    color: #cbd5e1 !important;
}

p, span, label {
    color: #f1f5f9;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #07090e;
}
::-webkit-scrollbar-thumb {
    background: #1e2638;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Typography Utility */
.gradient-text {
    background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar Layout */
.sidebar {
    width: var(--sidebar-width);
    background: #0b0e14;
    border-right: 1px solid var(--card-border);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
    text-decoration: none;
}

.sidebar-logo img {
    height: 38px;
    width: auto;
    filter: brightness(0) invert(1);
}

.sidebar-logo .badge-tag {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: #e2e8f0;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.2s ease;
}

.nav-link-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.nav-link-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.nav-link-item i {
    font-size: 1.1rem;
    color: #cbd5e1;
    transition: color 0.2s ease;
}

.nav-link-item:hover i, .nav-link-item.active i {
    color: var(--primary);
}

.nav-logout {
    margin-top: auto;
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.nav-logout:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.nav-logout i {
    color: #f87171;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 35px 40px;
    flex: 1;
}

/* Mobile Nav Header */
.mobile-header {
    display: none;
    background: #0b0e14;
    border-bottom: 1px solid var(--card-border);
    padding: 16px 20px;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Cards & Containers */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    position: relative;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-hover-border);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.2);
}

.stat-card .label {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #e2e8f0 !important;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.stat-card .icon-bg {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 2.8rem;
    opacity: 0.12;
    color: #ffffff;
}

/* Custom Coupon Banner */
.coupon-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1.5px dashed var(--primary);
    border-radius: 20px;
    padding: 24px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15);
}

.coupon-code-badge {
    background: #07090e;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 900;
    padding: 10px 22px;
    border-radius: 12px;
    letter-spacing: 1.5px;
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Table Styling */
.table-custom {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.table-custom table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
}

.table-custom th {
    background: #0b0e14;
    padding: 16px 24px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #e2e8f0;
    border-bottom: 1px solid var(--card-border);
    text-align: left;
}

.table-custom td {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.92rem;
    color: #f1f5f9;
}

.table-custom tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.table-custom tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge-custom {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-approved { background: rgba(16, 185, 129, 0.22); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-pending { background: rgba(245, 158, 11, 0.22); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-rejected { background: rgba(239, 68, 68, 0.22); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    font-weight: 700;
    border: none;
    padding: 12px 26px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 22px rgba(16, 185, 129, 0.55);
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* High Contrast Form Controls */
.form-control, .form-select {
    color: #ffffff !important;
    background-color: #07090e !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
}

.form-control::placeholder {
    color: #94a3b8 !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3) !important;
}

.form-label {
    color: #e2e8f0 !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px !important;
}

/* Product Preview Card Text Contrast */
.product-preview-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.product-preview-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.15);
}

.product-preview-card h5 {
    color: #ffffff !important;
    font-weight: 800;
}

.product-preview-card p {
    color: #f1f5f9 !important; /* Extremely clear readable text */
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    margin-top: 8px !important;
}

/* Feature Card Text Contrast */
.feature-card p {
    color: #f1f5f9 !important; /* Extremely clear readable text */
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    line-height: 1.6 !important;
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 24px 16px;
    }
    .mobile-header {
        display: flex;
    }
}
