/* MS Assessment NextGen - Main Styles */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #f8fafc;
    --accent-color: #764ba2;
    --text-primary: #1A1A1A;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --info-color: #3B82F6;
    --background: #FFFFFF;
    --sidebar-bg: #F8FAFC;
    --sidebar-text: #374151;
    --sidebar-hover: #E5E7EB;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

/* Remove focus outlines from non-interactive elements */
h1,
h2,
h3,
h4,
h5,
h6,
p,
div,
span {
    outline: none !important;
}

h1:focus,
h2:focus,
h3:focus,
h4:focus,
h5:focus,
h6:focus,
p:focus,
div:focus,
span:focus {
    outline: none !important;
    border: none !important;
}

html,
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--secondary-color);
    color: var(--text-primary);
}

h1 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    outline: none;
    border: none;
}

h1:focus,
h1:focus-visible {
    outline: none;
    border: none;
}

h2 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    outline: none;
    border: none;
}

h2:focus,
h2:focus-visible {
    outline: none;
    border: none;
}

h3 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    outline: none;
    border: none;
}

h3:focus,
h3:focus-visible {
    outline: none;
    border: none;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

.page {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .top-row {
    background-color: var(--primary-color);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .logo {
    height: 65px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

.sidebar .nav-item {
    margin: 0.25rem 0.5rem;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 8px;
    color: var(--sidebar-text);
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link .oi {
    margin-right: 12px;
}

main {
    margin-left: 280px;
    flex: 1;
    overflow-y: auto;
}

.top-row {
    background-color: var(--background);
    border-bottom: 1px solid var(--border-color);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.user-info {
    color: var(--text-secondary);
    font-weight: 500;
}

.content {
    padding: 2rem;
    max-width: 1400px;
}

/* Cards */
.card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 1rem 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid var(--secondary-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Progress Bar */
.progress {
    height: 24px;
    background-color: var(--secondary-color);
    border-radius: 12px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Logout Button */
.logout-button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: var(--error-color);
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.3);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar .top-row {
        height: 60px;
    }

    .sidebar .logo {
        height: 32px;
    }

    main {
        margin-left: 0;
        width: 100%;
    }

    .page {
        flex-direction: column;
        height: auto;
    }

    .content {
        padding: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .top-row {
        padding: 0 12px;
    }
}

/* Logo Styling */
.sidebar .logo {
    height: 90px;
    object-fit: contain;
}

.navbar-brand {
    padding: 0;
    margin: 0;
}

.sidebar .top-row {
    padding: 12px;
}