:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-main: #f8fafc;
    --bg-sidebar: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
    --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: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 700;
}

.logo span {
    color: var(--primary);
}

nav ul {
    list-style: none;
    flex-grow: 1;
}

nav li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s ease;
}

nav li i {
    width: 20px;
    height: 20px;
}

nav li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

nav li.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e293b;
}

.user-info .name {
    font-weight: 600;
    font-size: 14px;
}

.user-info .role {
    font-size: 12px;
    color: #94a3b8;
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 400px;
    gap: 12px;
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 16px;
}

.notification-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--secondary);
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn.sm {
    padding: 6px 12px;
    font-size: 12px;
}

.secondary-btn {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
}

/* Content Sections */
.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.welcome-header h2 span {
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.stat-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card .icon.blue { background: #eff6ff; color: #2563eb; }
.stat-card .icon.purple { background: #faf5ff; color: #9333ea; }
.stat-card .icon.green { background: #f0fdf4; color: #16a34a; }

.stat-info h3 { font-size: 24px; font-weight: 700; }
.stat-info p { color: var(--text-muted); font-size: 14px; }

.trend {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 12px;
    font-weight: 600;
}

.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }

/* Table Styling */
.data-grid {
    margin-top: 24px;
}

.recent-registrations {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

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

th {
    text-align: left;
    padding: 12px;
    color: var(--text-muted);
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 16px 12px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.badge {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.badge.active { background: #dcfce7; color: #166534; }
.badge.pending { background: #fef9c3; color: #854d0e; }

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* Form Styling */
.form-container {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.form-header {
    margin-bottom: 32px;
    text-align: center;
}

.form-header h2 { font-size: 24px; margin-bottom: 8px; }

.form-group {
    margin-bottom: 20px;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
