/* =========================================
   CORE LAYOUT
========================================= */

.csuk-app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TOP BAR */
.csuk-topbar {
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
	border-bottom: 3px solid var(--csuk-accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
}

/* BODY AREA */
.csuk-body {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

.csuk-left-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.csuk-interface-logo {
    height: 36px !important;
    width: auto !important;
    object-fit: contain !important;
}

.csuk-logo-text {
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
}

/* =============================
   USER INFO (Top Right)
============================= */

.csuk-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.csuk-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid var(--csuk-accent);
}

.csuk-user-name {
    font-weight: 600;
    font-size: 14px;
}


/* =============================
   PLATFORM ICON LINKS (Center)
============================= */

.csuk-platform-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.csuk-platform-icon img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.csuk-platform-icon:hover img {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* =========================================
   SIDEBAR BASE
========================================= */

.csuk-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: var(--csuk-accent);
    opacity: 0.1;
}

.csuk-sidebar {
    width: 72px;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    transition: width 0.25s ease;
    overflow: hidden;
	align-items: stretch;
    position: relative;
    z-index: 30;
}

/* EXPANDED (hover) OR DOCKED */
.csuk-app.expanded .csuk-sidebar,
.csuk-app.docked .csuk-sidebar {
    width: 240px;
}

.csuk-nav-area {
    position: relative;
    display: flex;
    z-index: 20;
}

/* =========================================
   ICON ROW
========================================= */

.csuk-top-icon {
    height: 60px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.csuk-top-icon:hover {
    background: #e2e8f0;
    transform: translateX(2px);
	border-bottom: 3px solid var(--csuk-accent);
}

.csuk-top-icon.active {
    background: color-mix(in srgb, var(--csuk-accent) 15%, white);
    border-right: 3px solid var(--csuk-accent);
}

.csuk-top-icon.active .csuk-icon-text {
    color: #1e3a8a;
    font-weight: 600;
}

/* COLLAPSED STATE (DEFAULT) */
.csuk-app:not(.expanded):not(.docked) .csuk-top-icon {
    justify-content: flex-start;
    padding: 20px;
}

/* EXPANDED OR DOCKED STATE */
.csuk-app.expanded .csuk-top-icon,
.csuk-app.docked .csuk-top-icon {
    justify-content: flex-start;
    padding: 0 20px;
    gap: 15px;
}

/* =========================================
   ICON
========================================= */

.csuk-menu-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.csuk-sidebar ul,
.csuk-sidebar ol {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

/* =========================================
   TEXT
========================================= */

.csuk-icon-text {
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
    color: #334155; /* slate-700 */
    font-size: 14px;
    font-weight: 500;
}

/* SHOW TEXT WHEN EXPANDED OR DOCKED */
.csuk-app.expanded .csuk-icon-text,
.csuk-app.docked .csuk-icon-text {
    opacity: 1;
}

/* =========================================
   LEVEL 1 PUSH PANEL
========================================= */

.csuk-panel-level-1 {
    width: 0;
    background: #1f2937;
    overflow: hidden;
    transition: width 0.25s ease;
    flex-shrink: 0;
}

.csuk-panel-level-1.active {
    width: 240px;
}

.csuk-panel-level-1 .csuk-slide-link {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* =========================================
   MAIN CONTENT
========================================= */

.csuk-main {
    flex: 1;
    overflow-y: auto;
    background: #f8fafc;
}

.csuk-content {
    padding: 40px;
}

/* =========================================
   OVERLAY PANELS (LEVEL 2+)
========================================= */

.csuk-overlay-panel {
    position: absolute;
    top: 0;
    left: 240px;
    width: 260px;
    height: 100%;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -4px 0 12px rgba(0,0,0,0.05);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 5;
    border-left: 1px solid #e2e8f0;
    box-shadow: -8px 0 20px rgba(0,0,0,0.04);
}

.csuk-overlay-panel.active {
    transform: translateX(0);
}

.csuk-overlay-panel .csuk-slide-link {
    padding: 12px 16px;
}

/* =========================================
   LINKS
========================================= */

.csuk-slide-link {
    padding: 10px 12px;
    margin-bottom: 6px;
    color: #334155;
    cursor: pointer;
}

.csuk-slide-link:hover {
    background: #f1f5f9;
	border-bottom: 3px solid var(--csuk-accent);
}


.csuk-parent-header {
    font-weight: 600;
    padding: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #ffffff;
}

.csuk-parent-header.clickable {
    cursor: pointer;
}

.csuk-parent-header.clickable:hover {
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
}

/* =========================================
   DOCK MODE
========================================= */

.csuk-dock-toggle {
    color: var(--csuk-accent);
    cursor: pointer;
}

.csuk-app.docked .csuk-sidebar {
    width: 240px;
    align-items: flex-start;
    padding-left: 15px;
}

.csuk-app.docked .csuk-top-icon {
    justify-content: flex-start;
    gap: 15px;
}