:root {
    --primary-color: #2563eb;
    --secondary-color: #6c757d;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-bg: #1f2937;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f3f4f6;
    min-height: 100vh;
    margin: 0;
    padding-top: 56px;
}

/* Main layout wrapper */
.d-flex {
    display: flex;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #1f2937 !important;
    z-index: 100;
    padding: 1rem;
}

/* Main content area */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    min-height: calc(100vh - 56px);
    background-color: #f3f4f6;
    max-width: calc(100% - 250px);
    box-sizing: border-box;
}

.main-content .container-fluid {
    max-width: 100%;
    padding: 0;
}

/* Footer */
footer {
    margin-left: 250px;
    width: calc(100% - 250px);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
        width: 100%;
    }

    footer {
        margin-left: 0;
        width: 100%;
    }
}

.card {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
    background: white;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header {
    background-color: white;
    color: #1f2937;
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 20px;
}

.card-body {
    padding: 20px;
}

.stat-card {
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    background: white;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stat-card.success {
    border-top: 3px solid var(--success-color);
}

.stat-card.warning {
    border-top: 3px solid var(--warning-color);
}

.stat-card.danger {
    border-top: 3px solid var(--danger-color);
}

.stat-card.info {
    border-top: 3px solid var(--info-color);
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 8px 0;
}

.stat-card h6 {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.wallet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.wallet-card h6 {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.wallet-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.lucky-draw-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    transition: all 0.3s ease;
}

.lucky-draw-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

.lucky-draw-card h6 {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.lucky-draw-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

.table {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 0;
}

.table thead th {
    background-color: #f9fafb;
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
    padding: 12px 16px;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
}

.table-hover tbody tr:hover {
    background-color: #f9fafb;
    transition: background-color 0.2s ease;
}

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

/* Dashboard specific styles */
.dashboard-header h2 {
    color: #1f2937;
    font-weight: 700;
    font-size: 1.875rem;
}

.dashboard-header .text-muted {
    color: #6b7280 !important;
}

/* Empty state styling */
.text-center .fa-3x {
    opacity: 0.3;
}

.text-center p.text-muted {
    font-size: 0.95rem;
}

/* Link styling */
a.text-decoration-none {
    color: #2563eb;
}

a.text-decoration-none:hover {
    color: #1d4ed8;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.team-member-card {
    transition: transform 0.3s;
    cursor: pointer;
}

.team-member-card:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.lucky-draw-button {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    border: 5px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.winner-animation {
    animation: celebrate 1s ease-in-out;
}

@keyframes celebrate {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.2) rotate(-10deg);
    }
    75% {
        transform: scale(1.2) rotate(10deg);
    }
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-upload-input {
    position: absolute;
    font-size: 100px;
    opacity: 0;
    right: 0;
    top: 0;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -23px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-item:after {
    content: '';
    position: absolute;
    left: -19px;
    top: 15px;
    width: 2px;
    height: calc(100% - 10px);
    background-color: #dee2e6;
}

.timeline-item:last-child:after {
    display: none;
}

.status-active {
    color: var(--success-color);
}

.status-inactive {
    color: var(--secondary-color);
}

.status-pending {
    color: var(--warning-color);
}

.status-completed {
    color: var(--info-color);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Navbar Styling */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}


/* Icon Styling */
.stat-card i {
    opacity: 0.3;
    font-size: 3rem;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

/* Badge Styling */
.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.kyc-document-preview {
    max-width: 200px;
    max-height: 200px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    padding: 5px;
}
