:root {
    --primary: #1e60d5;
    --primary-gradient: linear-gradient(135deg, #1e60d5 0%, #3b82f6 100%);
    --secondary: #111827;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f97316;
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 1.5rem 1rem;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-logo {
    margin-bottom: 2rem;
    display: block;
    text-align: center;
    padding: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.75rem;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link i {
    width: 20px;
    font-size: 0.9rem;
    margin-right: 10px;
    text-align: center;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white !important;
}
.nav-link.active {
    background: linear-gradient(135deg, #1e60d5, #3b82f6);
    color: white !important;
    box-shadow: 0 4px 12px rgba(30, 96, 213, 0.4);
}

/* Main Content */
.main-content {
    padding: 1.5rem 2rem;
}

.header {
    margin-bottom: 1.5rem;
}

.header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Base Components */
.card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #f9fafb;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 96, 213, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(30, 96, 213, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(30, 96, 213, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}

tr:hover td {
    background-color: #f9fafb;
}

.badge {
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: inline-flex;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* Mobile Specifics */
.mobile-header {
    display: none;
    padding: 1.5rem;
    background: var(--bg);
    justify-content: space-between;
    align-items: center;
}

.balance-card {
    background: var(--primary-gradient);
    border-radius: 1.5rem;
    padding: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: 0 15px 30px rgba(30, 96, 213, 0.3);
}

.mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mini-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}
.mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.mobile-nav .nav-link {
    flex-direction: column;
    font-size: 0.65rem;
    padding: 0;
    margin: 0;
    background: none !important;
    color: var(--text-muted);
}

.mobile-nav .nav-link.active {
    color: var(--primary) !important;
}

.mobile-nav i {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.transaction-item {
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

/* Forms Special */
.upload-box {
    border: 2px dashed var(--border);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.upload-box:hover {
    border-color: var(--primary);
    background: rgba(30, 96, 213, 0.02);
}

@media (max-width: 768px) {
    .layout { display: block; }
    .sidebar { display: none; }
    .mobile-header { display: flex; }
    .mobile-nav { display: flex; }
    .main-content { padding: 1.5rem; padding-bottom: 100px; }
    
    .mini-stats-grid { grid-template-columns: 1fr 1fr; }
}

/* Sidebar user profile */
.user-profile { display: flex; align-items: center; margin-top: auto; padding: 0.5rem; border-top: 1px solid rgba(255,255,255,0.05); }
.user-info { margin-left: 0.65rem; }
.user-name { font-size: 0.8rem; font-weight: 600; color: white; }
.user-rank { font-size: 0.7rem; color: #9ca3af; }
.logout-btn {
    background: none; border: none;
    font-size: 0.65rem; cursor: pointer; padding: 0;
    font-weight: 700; margin-top: 2px; color: var(--danger);
    text-transform: uppercase; letter-spacing: 0.05em;
}

/* Auth / Login */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: "";
    position: absolute;
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(30, 96, 213, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.1);
}

.auth-card img {
    height: 65px;
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.auth-card p {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}
