/* ============================================================
   GAG DPP Platform — Global Styles
   ============================================================ */

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    overflow: hidden;
}

/* ============================================================
   App Shell Layout
   ============================================================ */
.app-shell {
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   Sidebar
   ============================================================ */
.app-sidebar {
    width: 240px;
    min-height: 100vh;
    background: #1a2035;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    flex-shrink: 0;
    overflow: hidden;
}

.app-sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 56px;
}

.brand-name {
    letter-spacing: 0.5px;
}

/* Nav items */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 2px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

.sidebar-nav .nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.sidebar-nav .nav-item.active {
    background: rgba(13,110,253,0.25);
    color: #4f9ff8;
    font-weight: 600;
}

.nav-section-label {
    font-size: 0.675rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.3);
    padding: 1rem 0.75rem 0.25rem;
    text-transform: uppercase;
}

.nav-section-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 0.75rem 0.25rem;
    font-size: 0.675rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: color 0.15s;
    text-align: left;
}

.nav-section-toggle:hover {
    color: rgba(255,255,255,0.6);
}

.nav-label {
    white-space: nowrap;
    overflow: hidden;
}

/* ============================================================
   Top Header
   ============================================================ */
.app-header {
    min-height: 56px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

/* ============================================================
   Main content area
   ============================================================ */
.app-content {
    min-width: 0;
}

.app-main {
    background: #f5f7fa;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-shell {
    overflow: hidden;
}

.login-brand {
    width: 420px;
    flex-shrink: 0;
    background: linear-gradient(145deg, #1a2035 0%, #0d6efd 100%);
}

.login-form-panel {
    background: #f5f7fa;
}

.login-card {
    border-radius: 16px !important;
}

/* ============================================================
   Cards and utilities
   ============================================================ */
.card {
    border-radius: 12px;
}

.icon-box {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================
   Validation and forms
   ============================================================ */
a, .btn-link {
    color: #0d6efd;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

/* ============================================================
   Blazor error UI
   ============================================================ */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #ffcc00;
    color: #333;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    z-index: 9999;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
    font-weight: bold;
}

/* ============================================================
   Scrollbar styling
   ============================================================ */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

.app-main::-webkit-scrollbar {
    width: 6px;
}
.app-main::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}
