:root {
    --primary: #374176;
    --secondary: #1c5d6d;
    --accent: #42a5f5;
    --text-light: #ffffff;
    --text-dark: #1e1e2d;
    --sidebar-bg: #141f52;
    --navbar-bg: linear-gradient(90deg, #141f52, #1e5866);
    --hover-bg: #000000;
    --active-bg: #000000;
    --card-bg: #ffffff;
    --background: #ffffff;
    --button-primary: #1e5866;
    --button-danger: #9e0300;

    /* Semantic mappings to existing variables */
    --primary-light: #42a5f5;
    /* Using accent for light variants */
    --primary-dark: #141f52;
    /* Using sidebar-bg for dark variants */
    --bg-page: var(--background);
    --bg-card: var(--card-bg);
    --text-primary: var(--text-dark);
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --success: var(--secondary);
    --warning: #f59e0b;
    --danger: var(--button-danger);
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* Modern Card Design */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: all 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    border-color: var(--primary-light);
}

/* Navbar Tuning */
.navbar-custom {
    background: #ffffff;
    border-bottom: 2px solid var(--border);
    padding: 0.75rem 0;
}

.brand-3d {
    font-weight: 800;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
}

/* Progress System */
.progress-3d {
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-3d {
    height: 100%;
    background: var(--primary);
    border-radius: 9999px;
    transition: width 0.6s ease;
}

/* Buttons */
.btn-premium {
    background: var(--button-primary);
    color: white !important;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-premium:hover {
    background: var(--primary);
    transform: scale(1.02);
}

/* Form Controls */
.form-control {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Utility classes for text visibility */
.text-white {
    color: white !important;
}

/* In this theme, "white" mapped to primary text */
.text-secondary {
    color: var(--text-secondary) !important;
}

.section-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.section-card {
    cursor: pointer;
    text-align: center;
    padding: 24px;
}

.section-card h5 {
    color: var(--primary);
    font-weight: 700;
}

/* Auth Page specific */

.logo-circle {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.extra-small {
    font-size: 0.75rem;
    font-weight: 600;
}

.fw-800 {
    font-weight: 800;
}

.fw-700 {
    font-weight: 700;
}

.fw-600 {
    font-weight: 600;
}

.brand-3d {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--primary) !important;
}

/* Portal Layout */
.portal-wrapper {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: white;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-content {
    flex-grow: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.4rem;
    transition: all 0.2s ease-in-out;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    transform: translateX(4px);
}

.sidebar-nav-link.active {
    background: var(--accent);
    color: white !important;
    box-shadow: 0 4px 20px rgba(66, 165, 245, 0.4);
}

.sidebar-section-label {
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.2px;
    padding: 0 1.25rem;
    margin-bottom: 0.8rem;
    margin-top: 1.8rem;
    display: block;
}

.sidebar-nav-link i {
    font-size: 1.25rem;
    margin-right: 1.1rem;
    width: 24px;
    text-align: center;
    opacity: 0.9;
}

.portal-main {
    flex-grow: 1;
    background: #f8fafc;
    padding: 2rem 3rem;
    overflow-x: hidden;
}

/* Sidebar Branding Adjustment */
.logo-mini {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    margin-right: 0.75rem;
}

/* Scrollbar styling for sidebar */
.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Adjust heading colors globally */
h1,
h2,
h3,
h4,
.text-primary {
    color: var(--primary) !important;
}