:root {
    --primary: #2563EB; /* Blue 600 */
    --primary-hover: #1D4ED8; /* Blue 700 */
    --secondary: #64748B; /* Slate 500 */
    --background: #F8FAFC; /* Slate 50 */
    --surface: #FFFFFF;
    --text: #0F172A; /* Slate 900 */
    --text-muted: #64748B;
    --border: #E2E8F0; /* Slate 200 */
    --danger: #EF4444; /* Red 500 */
    --success: #10B981; /* Emerald 500 */
    --warning: #F59E0B; /* Amber 500 */
    
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex-row { display: flex; gap: 1rem; }
.items-center { align-items: center; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger) !important; }
.text-xs { font-size: 0.75rem; }
.fw-bold { font-weight: 600; }
.mt-2 { margin-top: 0.5rem; }
.p-6 { padding: 1.5rem; }
.bg-light { background-color: var(--background); }
.w-full { width: 100%; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-outline {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text);
}
.btn-outline:hover { background-color: var(--background); border-color: var(--secondary); }

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-block { width: 100%; }
.btn-close { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--text-muted); }
.btn-icon { background: none; border: none; cursor: pointer; padding: 0.25rem; transition: opacity 0.2s; }
.btn-icon:hover { opacity: 0.7; }

/* Navbar */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-item { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.nav-item:hover, .nav-item.active { color: var(--primary); }

/* User Menu */
.user-menu { position: relative; }
.user-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 200px;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
}
.dropdown-header { padding: 0.5rem 1rem; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; }
.dropdown-item { padding: 0.5rem 1rem; text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.dropdown-item:hover { background-color: var(--background); }
.dropdown-divider { border-top: 1px solid var(--border); margin: 0.5rem 0; }

/* Hero */
.view-home { padding-bottom: 4rem; }
.hero { background: white; padding: 4rem 0; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero h1 { font-size: 3rem; line-height: 1.2; font-weight: 800; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.hero p { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 500px; }
.hero-actions { display: flex; gap: 1rem; }
.badge { display: inline-block; background: #DBEAFE; color: var(--primary); padding: 0.25rem 0.75rem; border-radius: 99px; font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; }
.img-fluid { max-width: 100%; height: auto; }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.features { padding: 4rem 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card { background: var(--surface); padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--border); transition: transform 0.2s; }
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.icon-box { width: 48px; height: 48px; background: #EFF6FF; color: var(--primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: 0.5rem; font-weight: 600; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Auth Forms */
.view-auth { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { background: var(--surface); width: 100%; max-width: 400px; padding: 2.5rem; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h2 { font-size: 1.75rem; font-weight: 700; }
.auth-header p { color: var(--text-muted); margin-top: 0.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.input-wrapper { position: relative; }
.input-wrapper i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-wrapper input { width: 100%; padding: 0.75rem 1rem 0.75rem 2.5rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.95rem; transition: border-color 0.2s; }
.input-wrapper input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #DBEAFE; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 500; }
.alert { padding: 0.75rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.875rem; background: #FEE2E2; color: #991B1B; }

/* Dashboard */
.view-dashboard { padding-top: 2rem; padding-bottom: 2rem; }
.dashboard-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.stat-title { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text); margin-top: 0.5rem; }

.content-card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.card-header { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.search-box { position: relative; width: 250px; }
.search-box i { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.875rem; }
.search-box input { width: 100%; padding: 0.5rem 0.75rem 0.5rem 2rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.875rem; }

.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 1rem 1.5rem; background: #F8FAFC; border-bottom: 1px solid var(--border); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 600; }
.data-table td { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }

.status-badge { display: inline-flex; padding: 0.25rem 0.75rem; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.status-active { background: #DCFCE7; color: #166534; }
.status-pending { background: #FEF3C7; color: #92400E; }
.status-completed { background: #DBEAFE; color: #1E40AF; }

/* Profile */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 2rem; margin-top: 2rem; }
.profile-sidebar { position: sticky; top: 80px; }
.profile-card { background: var(--surface); padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; }
.profile-avatar { width: 80px; height: 80px; background: var(--primary); color: white; font-size: 2rem; font-weight: 700; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.form-control { width: 100%; padding: 0.625rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.875rem; }
.form-control:disabled { background: #F1F5F9; color: var(--text-muted); }

/* Modal */
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--surface); width: 100%; max-width: 500px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: modalIn 0.2s ease-out; }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1.25rem 1.5rem; background: #F8FAFC; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 1rem; }

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

/* Footer */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 0; margin-top: auto; }
.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.footer-brand h4 { font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.footer-brand p { font-size: 0.875rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 0.75rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }

/* Utilities */
.loading-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: white; z-index: 200; display: flex; align-items: center; justify-content: center; }
.spinner { width: 40px; height: 40px; border: 4px solid #E2E8F0; border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview-banner { background: #FEF3C7; color: #92400E; text-align: center; padding: 0.5rem; font-size: 0.875rem; font-weight: 500; }

@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .hero p { margin: 0 auto 2rem; }
    .hero-actions { justify-content: center; }
    .profile-layout { grid-template-columns: 1fr; }
    .profile-sidebar { position: static; }
    .nav-links { gap: 1rem; }
    .nav-item { display: none; } /* Simplified mobile nav for demo */
    .user-menu, .btn-primary { display: flex; } /* Keep essential actions */
}