﻿/* ==========================================================================
   1. ROOT VARIABLES & GLOBAL RESET
   ========================================================================== */
:root {
    /* Backgrounds */
    --bg-dark-sidebar: #071130;
    --bg-light-workspace: #f8fafc;
    --bg-light-gradient: radial-gradient(at 80% 20%, rgba(220, 225, 255, 0.6) 0px, transparent 50%), linear-gradient(135deg, #f5f7fa 0%, #e4ecfa 100%);
    /* Branding Colors */
    --primary-magenta: #c20078;
    --primary-magenta-hover: #9e0062;
    --primary-magenta-alpha: rgba(194, 0, 120, 0.08);
    /* Typography Colors */
    --text-dark: #1e293b;
    --text-dark-alt: #333333;
    --text-muted: #64748b;
    --text-muted-alt: #8d96a7;
    /* Structure */
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-light-workspace);
}

/* ==========================================================================
   2. KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.animate-scale-up {
    animation: scaleUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

/* ==========================================================================
   3. SOURCE 2: LOGIN PAGE LAYOUT & COMPONENTS
   ========================================================================== */
.container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Login Left Sidebar */
.sidebar {
    width: 33%;
    background-color: var(--bg-dark-sidebar);
    color: #ffffff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    /*margin-bottom: 4rem;*/
}

.logo-placeholder {
    width: 45px;
    height: 45px;
    background: #112554;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00d2ff;
    font-size: 1.2rem;
    border: 2px solid #1e3a7a;
}

.sidebar-header h3 {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.sidebar-header p {
    font-size: 0.75rem;
    color: var(--text-muted-alt);
}

.sidebar-content h1 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.sidebar-content .highlight {
    color: var(--primary-magenta);
}

.sidebar-content .description {
    font-size: 0.85rem;
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* Login Side Features */
.features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

    .feature-item:hover {
        background: rgba(255, 255, 255, 0.07);
        transform: translateX(5px);
    }

.feature-icon {
    width: 38px;
    height: 38px;
    background: rgba(194, 0, 120, 0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-magenta);
    font-size: 1rem;
}

.feature-item h4 {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.feature-item p {
    font-size: 0.75rem;
    color: #a0aec0;
}

/* Login Canvas (Right Panel) */
.main-content {
    width: 67%;
    background: var(--bg-light-gradient);
/*    background-image: radial-gradient(at 80% 20%, rgba(220, 225, 255, 0.6) 0px, transparent 50%), linear-gradient(135deg, #f5f7fa 0%, #e4ecfa 100%);*/
    background-image: linear-gradient(rgba(243, 246, 249, 0.75), rgba(243, 246, 249, 0.75)), url('images/ngc.png') !important;
    display: flex;
    /*    flex-direction: column;*/
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
    text-align: center;
}

.card-logo {
    width: 60px;
    height: 60px;
    background: #fdf2f8;
    border-radius: 12px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-magenta);
    font-size: 1.8rem;
    border: 2px dashed rgba(194, 0, 120, 0.2);
}

.login-card h2 {
    color: var(--text-dark-alt);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.login-card .subtitle {
    color: var(--text-muted-alt);
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

/* Login Forms & Inputs */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #a0aec0;
    font-size: 0.95rem;
}

.toggle-password {
    position: absolute;
    right: 14px;
    color: #a0aec0;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s;
}

    .toggle-password:hover {
        color: var(--text-dark-alt);
    }

.input-group input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.6rem !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    outline: none !important;
    transition: var(--transition-smooth) !important;
    color: var(--text-dark-alt) !important;
}

    .input-group input:focus {
        border-color: var(--primary-magenta) !important;
        box-shadow: 0 0 0 3px rgba(194, 0, 120, 0.1) !important;
    }

.forgot-pass {
    text-align: right;
    margin-top: -0.4rem;
}

    .forgot-pass a {
        font-size: 0.8rem;
        color: var(--primary-magenta);
        text-decoration: none;
        font-weight: 500;
    }

        .forgot-pass a:hover {
            text-decoration: underline;
        }

/* Buttons (Source 2) */
.btn {
    width: 100%;
    padding: 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--primary-magenta);
    color: #ffffff;
    border: none;
}

    .btn-primary:hover {
        background: var(--primary-magenta-hover);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(194, 0, 120, 0.2);
    }

.btn-secondary {
    background: transparent;
    color: var(--primary-magenta);
    border: 1px solid rgba(194, 0, 120, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-secondary:hover {
        background: rgba(194, 0, 120, 0.03);
        border-color: var(--primary-magenta);
    }

/* Auth Page Helpers */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted-alt);
    font-size: 0.75rem;
    margin: 0.5rem 0;
}

    .divider::before, .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid var(--border-color);
    }

    .divider span {
        padding: 0 10px;
        font-weight: 500;
    }

.signup-text {
    font-size: 0.8rem;
    color: var(--text-muted-alt);
    margin-top: 1.5rem;
}

    .signup-text a {
        color: var(--primary-magenta);
        text-decoration: none;
        font-weight: 600;
    }

        .signup-text a:hover {
            text-decoration: underline;
        }

.footer-privacy {
    position: absolute;
    bottom: 2rem;
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: #718096;
}

    .footer-privacy i {
        margin-right: 4px;
    }

    .footer-privacy .separator {
        color: #cbd5e1;
    }


/* ==========================================================================
   4. SOURCE 1: DASHBOARD PAGE LAYOUT & READABLE BREADCRUMBS
   ========================================================================== */
.dashboard-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#mobile-nav-toggle {
    display: none;
}

.hamburger-menu-label {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 1.25rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 100;
}

    .hamburger-menu-label:hover {
        background-color: #f1f3f5;
        color: #0d6efd;
    }

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Dashboard Left Corporate Sidebar */
.sidebar-panel {
    width: 280px;
    background-color: var(--bg-dark-sidebar);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
    transition: var(--transition-smooth);
    z-index: 95;
}

.sidebar-branding {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-logo-container {
    width: 55px;
    height: 55px;
    background: #112554;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-magenta);
    font-size: 1.6rem;
    border: 2px solid rgba(194, 0, 120, 0.2);
}

.sidebar-branding h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
/*    background: linear-gradient(135deg, #ffffff 60%, #ffffff 100%);*/
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.nav-category-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #475569;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    margin-top: 1rem;
}

.nav-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none !important;
    transition: var(--transition-smooth);
    border-left: 4px solid transparent;
}

    .nav-link-item i {
        width: 20px;
        font-size: 0.95rem;
    }

    .nav-link-item:hover {
        background: rgba(255, 255, 255, 0.02);
        color: #ffffff;
    }

    .nav-link-item.active {
        background: linear-gradient(90deg, rgba(194, 0, 120, 0.1) 0%, rgba(194, 0, 120, 0) 100%);
        color: #ffffff;
        border-left-color: var(--primary-magenta);
        font-weight: 500;
    }

/* Dashboard Workspace Area Canvas */
.workspace-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

.workspace-topbar {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    flex-shrink: 0;
    gap: 1rem;
}

/* Optimized Breadcrumb Layout Engine */
.breadcrumb-container {
    display: flex;
    align-items: center;
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    line-height: 1.5;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

    .breadcrumb-link:hover {
        color: var(--primary-magenta);
    }

.breadcrumb-icon {
    font-size: 0.85rem;
    opacity: 0.8;
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    color: #cbd5e1;
    font-size: 0.75rem;
    padding: 0 0.25rem;
    user-select: none;
}

.breadcrumb-item.current-node {
    color: var(--text-dark);
    font-weight: 600;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    flex-shrink: 0;
}

    .user-profile-widget i {
        color: var(--primary-magenta);
    }

.workspace-canvas {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Dashboard Component Styles */
.welcome-card-showcase {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

    .welcome-card-showcase h3 {
        margin-top: 0;
        font-size: 1.5rem;
        color: var(--text-dark);
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .welcome-card-showcase p {
        margin-bottom: 0;
        color: var(--text-muted);
        font-size: 0.9rem;
        line-height: 1.6;
    }

/* Dashboard Workspace Utility Footer */
.workspace-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

    .workspace-footer a {
        color: var(--primary-magenta);
        text-decoration: none;
        transition: var(--transition-smooth);
    }

        .workspace-footer a:hover {
            color: var(--primary-magenta-hover);
            text-decoration: underline;
        }

.footer-meta-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-danger {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: left;
}

.validation-msg {
    color: #dc2626;
    font-size: 0.75rem;
    text-align: left;
    margin-top: 2px;
    display: block;
}

.remember-me-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-dark);
    cursor: pointer;
}

.required-field {
    color: #F44336 !important;
    font-weight: bold !important;
}

.sticky-column {
    position: sticky !important;
    right: 0 !important;
    z-index: 2 !important;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.08); /* Optional separator shadow */
}

/* 1. Header background */
th.sticky-column {
    background-color: var(--mud-palette-surface) !important;
}

/* 2. Even row background (Default surface color) */
tr:nth-child(even) td.sticky-column {
    background-color: var(--mud-palette-surface) !important;
}

/* 3. Odd row background (Striped row color) */
tr:nth-child(odd) td.sticky-column {
    background-color: rgba(250, 250, 250) !important; /* Matches MudBlazor Striped row */
}

/* 4. Row Hover state (Keeps sticky cell matching when hovering over a row) */
tr:hover td.sticky-column {
    background-color: var(--mud-palette-action-default-hover) !important;
}

/* ==========================================================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 991px) {
    /* Login Page Mobile Responsive Changes */
    .sidebar {
        display: none;
    }

    .main-content {
        width: 100%;
    }

    /* Dashboard Mobile Sidebar Drawer Changes */
    .hamburger-menu-label {
        display: flex;
    }

    .sidebar-panel {
        position: fixed;
        top: 0;
        left: -280px;
        bottom: 0;
    }

    .workspace-topbar {
        padding: 0 1.25rem;
    }

    .workspace-footer {
        padding: 0.85rem 1.25rem;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    /* Active States when Checkbox is Triggered */
    #mobile-nav-toggle:checked ~ .sidebar-panel {
        left: 0;
        box-shadow: 10px 0 30px rgba(7, 17, 48, 0.15);
    }

    #mobile-nav-toggle:checked ~ .sidebar-overlay {
        display: block;
        opacity: 1;
    }
}

@media (max-width: 576px) {
    .workspace-canvas {
        padding: 1.25rem;
    }

    .welcome-card-showcase {
        padding: 1.75rem;
    }

        .welcome-card-showcase h3 {
            font-size: 1.25rem;
        }

    /* Mobile Breadcrumb Visibility System overrides */
    .breadcrumb-item.parent-node,
    .breadcrumb-separator {
        display: none !important;
    }

    .breadcrumb-item.current-node {
        font-size: 0.95rem;
    }
}
