/* 
   ==========================================================================
   SMART LABEL PRO - LAYOUT
   - Sidebar, Main Content, Sidebar Navigation
   ========================================================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid var(--border-color);
    padding: 0 15px 18px 15px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: 64px;
    padding: 0px;
}

.sidebar-toggle {
    position: absolute;
    top: 50%;
    right: -12px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 101;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
}

.sidebar-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* --- Main Content Area --- */
.main-content {
    margin-left: 220px;
    flex: 1;
    padding: 0 18px 18px 18px;
    min-width: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.sidebar-collapsed {
    margin-left: 64px;
}


/* --- Sidebar Brand & Nav --- */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    height: 26px;
    margin: 14px 0;
    color: var(--text-muted);
    overflow: hidden;
    white-space: nowrap;
    padding: 0 12px;
}

.sidebar.collapsed .brand { justify-content: center; padding: 0; }
.sidebar.collapsed .brand .sl-icon { width: 18px !important; height: 18px !important; }
.sidebar.collapsed .brand span:not(.sl-icon) { display: none; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 600;
    height: 32px;
    margin-bottom: 8px;
    transition: .2s;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary-light);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

.sidebar.collapsed .nav-link { justify-content: center; padding: 8px 0; margin: 0 8px 8px 8px; }
.sidebar.collapsed .nav-link span:not(.sl-icon) { display: none; }

/* --- User Section --- */
.user-info {
    margin-top: auto;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    transition: .2s;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-muted);
}

.user-info:hover {
    background: var(--primary-light);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

.sidebar.collapsed .user-info { justify-content: center; padding: 8px 0; margin: auto 8px 0 8px; }
.sidebar.collapsed .user-details { display: none; }

.avatar {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 0.75rem;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-avatar-img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.user-name { font-weight: 700; font-size: 0.75rem; }
.user-role { font-weight: 500; font-size: 0.65rem; opacity: 0.8; }

/* --- Login Screen --- */
#login-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #64748b 0%, #0f172a 100%);
    z-index: 11000;
    backdrop-filter: blur(8px);
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 48px 40px 24px 40px;
    border-radius: 32px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
}

.simulation-divider { display: flex; align-items: center; gap: 20px; }
.divider-line { flex: 1; height: 1px; background: var(--border-color); }
.divider-text { font-size: 0.75rem; font-weight: 600; color: #94a3b8; }

