/* ==================== CSS Variables (Matching Mockup) ==================== */
:root {
    --primary: #1a5f4a;
    --primary-dark: #134438;
    --primary-light: #2d8a6b;
    --primary-lighter: #e8f5f0;
    --background: #f8fafb;
    --surface: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-width: 260px;
}

/* ==================== Base Styles ==================== */
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background);
}

/* ==================== Sidebar Styles ==================== */
.sidebar-drawer {
    border-right: 1px solid var(--border) !important;
    background-color: var(--surface) !important;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.nav-badge {
    font-size: 0.6875rem !important;
    height: 20px !important;
    min-width: 20px !important;
}

/* ==================== Sidebar Footer ==================== */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}

.user-menu:hover {
    background: var(--background);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== Content Header ==================== */
.main-content {
    background: var(--background);
    min-height: 100vh;
}

.content-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.content-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.content-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
}

.header-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.content-body {
    padding: 2rem;
}

/* ==================== Cards ==================== */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ==================== Stats Row ==================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==================== Responsive ==================== */
@media (max-width: 959px) {
    .content-header {
        padding: 1rem;
    }
    .content-body {
        padding: 1rem;
    }
}

@media (max-width: 599px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== Auth Screens ==================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

/* ==================== Blazor Error Boundary ==================== */
.blazor-error-boundary {
    background: var(--error);
    padding: 1rem;
    color: white;
    border-radius: var(--radius-sm);
    margin: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ==================== MudBlazor Overrides ==================== */
.mud-nav-link {
    border-radius: var(--radius-sm) !important;
    margin: 2px 0 !important;
}

.mud-nav-link.active {
    background-color: var(--primary-lighter) !important;
    color: var(--primary) !important;
}

.mud-drawer {
    width: var(--sidebar-width) !important;
}

/* ==================== Utility Classes ==================== */
.w-100 {
    width: 100%;
}

.mt-4 {
    margin-top: 1rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.login-marketing-logo{
    width: 20% !important;
}
.main-marketing-logo {
    width: 90% !important;
}