@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #16a34a;
    --success-dark: #15803d;
    --admin: #7c3aed;
    --admin-dark: #6d28d9;
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9;
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Login Page Styles */
.login-container {
    width: 100%;
    max-width: 500px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    box-shadow: 0 0 50px rgba(0,0,0,0.1);
}

.login-card {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.login-logo {
    width: 80px;
    margin-bottom: 1.5rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 0.35rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.login-tab {
    flex: 1;
    padding: 0.6rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    color: var(--text-muted);
}

.login-tab.active {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    color: var(--primary);
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
    font-size: 1.25rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3.25rem;
    border: 1.5px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.05);
}

.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    letter-spacing: 0.5px;
}

.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-success { background: var(--success); color: white; box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2); }
.btn-success:hover { background: var(--success-dark); transform: translateY(-1px); }
.btn-admin { background: var(--admin); color: white; box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2); }
.btn-admin:hover { background: var(--admin-dark); transform: translateY(-1px); }

.app-wrapper {
    width: 100%;
    max-width: 500px; /* Mobile app container size on desktop */
    min-height: 100vh;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0,0,0,0.1);
    position: relative;
}

/* Mobile App Header */
.top-nav {
    background: white;
    padding: 1.25rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-nav h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.main-content {
    padding: 1.25rem;
    padding-bottom: 5rem; /* Space for bottom nav */
    flex: 1;
}

/* Enhanced Cards */
.card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    margin-bottom: 1.25rem;
    border: 1px solid rgba(0,0,0,0.02);
}

.stat-card {
    border-radius: 1.25rem;
    padding: 1.25rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -10%;
    top: -10%;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-icon {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* Bottom Navigation */
.bottom-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0.5rem 1.5rem 0.5rem;
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.3s;
    flex: 1;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.nav-item span {
    font-size: 0.65rem;
    font-weight: 600;
}

/* Quick Actions Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.menu-item {
    background: white;
    padding: 1rem 0.5rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.03);
}

.menu-item i {
    font-size: 1.5rem;
    color: var(--primary);
    background: #eff6ff;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.menu-item span {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
}

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

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

th {
    background: #f8fafc;
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

td {
    padding: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-primary { background: #eff6ff; color: #2563eb; }

.btn-page {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.btn-page:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
