/* WBKIB Admin Panel — Gradient Design System */

/* ─── Global Background ──────────────────────────────────────── */
body {
    background: linear-gradient(160deg, #f0f7ff 0%, #f5f8ff 50%, #eef3ff 100%);
    min-height: 100vh;
}

/* ─── Sidebar Navigation ──────────────────────────────────────── */
.nav-item.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(99,102,241,0.1) 100%);
    color: #60A5FA;
}

.nav-item.active svg {
    fill: #60A5FA;
}

.nav-item:hover {
    background-color: rgba(30, 58, 138, 0.25);
}

.hover\:bg-graydark:hover {
    background-color: rgba(30, 58, 138, 0.25);
}

/* ─── Body Text Colors ───────────────────────────────────────── */
.text-bodydark1 {
    color: #DBEAFE;
}

.text-bodydark2 {
    color: #94A3B8;
}

/* ─── Sidebar Scrollbar ──────────────────────────────────────── */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, 0.3) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 3px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.3);
    border-radius: 99px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.55);
}

/* ─── Blazor Loading ─────────────────────────────────────────── */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 5rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #3b82f6;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    left: calc(50% - 16px);
    top: calc(50% + 48px);
    color: #6b7280;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* ─── Global ──────────────────────────────────────────────────── */
a {
    text-decoration: none;
}

button:focus,
a:focus {
    outline: none;
}

/* ─── Modal Panel Sizes ───────────────────────────────────────── */
.admin-modal-panel-sm  { max-width: 32rem; }
.admin-modal-panel-md  { max-width: 40rem; }
.admin-modal-panel-lg  { max-width: 56rem; }
.admin-modal-panel-xl  { max-width: 72rem; }

/* ─── Timeline ─────────────────────────────────────────────────── */
.admin-timeline::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    bottom: 0.75rem;
    width: 1px;
    background: linear-gradient(to bottom, #DBEAFE, #C7D2FE);
}

.admin-timeline-item {
    position: relative;
    padding-left: 3rem;
}

.admin-timeline-marker {
    position: absolute;
    left: 0;
    top: 0.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* ─── Page Transition ─────────────────────────────────────────── */
@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-content {
    animation: page-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Sidebar Navigation Tree ─────────────────────────────────── */

/* Section label */
.nav-section-label {
    padding: 0 12px 6px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.6);
}

/* Standalone direct nav link (Dashboard) */
.nav-direct-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94A3B8;
    border-radius: 10px;
    border-left: 2px solid transparent;
    transition: all 0.18s ease;
    width: 100%;
}

.nav-direct-link:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #BFDBFE;
}

.nav-direct-active {
    background: linear-gradient(135deg, rgba(59,130,246,0.18) 0%, rgba(99,102,241,0.12) 100%) !important;
    color: #ffffff !important;
    border-left-color: #60A5FA !important;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.12) inset;
}

/* Group trigger button */
.nav-group-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94A3B8;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
}

.nav-group-trigger:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #BFDBFE;
}

.nav-group-active {
    color: #BFDBFE !important;
}

.nav-group-icon {
    color: rgba(148, 163, 184, 0.5);
    width: 16px;
    text-align: center;
    transition: color 0.18s ease;
}

.nav-group-trigger:hover .nav-group-icon,
.nav-group-active .nav-group-icon {
    color: #93C5FD;
}

/* Chevron rotation */
.nav-chevron {
    color: rgba(148, 163, 184, 0.4);
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), color 0.18s ease;
}

.nav-chevron.open {
    transform: rotate(90deg);
    color: #93C5FD;
}

/* Collapsible group body */
.nav-group-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 22px;
    border-left: 1px solid rgba(96, 165, 250, 0.12);
    padding-left: 4px;
}

.nav-group-body.open {
    max-height: 480px;
}

/* Child nav items */
.nav-child-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px 7px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748B;
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition: all 0.15s ease;
    margin-bottom: 1px;
    width: 100%;
}

.nav-child-item:hover {
    background: rgba(59, 130, 246, 0.07);
    color: #93C5FD;
    border-left-color: rgba(96, 165, 250, 0.3);
}

.nav-child-active {
    background: linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(99,102,241,0.08) 100%) !important;
    color: #ffffff !important;
    border-left-color: #60A5FA !important;
}

.nav-child-active i {
    color: #93C5FD !important;
}

