/* ═══════════════════════════════════════════════
   SessionFlow Admin — Layout
   Login, Sidebar, Main Content, Top Bar
   ═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════ */
#login-screen {
    height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    padding: 48px 40px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.logo-icon {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.logo-icon svg {
    width: 64px;
    height: 64px;
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #818cf8, #6366f1, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-muted);
    margin-top: 4px;
}

.error-msg {
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #f87171;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.login-bg-shapes {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: #6366f1;
    top: -200px;
    right: -100px;
    animation: drift 20s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    bottom: -150px;
    left: -100px;
    animation: drift 25s ease-in-out infinite reverse;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-bg 8s ease-in-out infinite;
}

/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */
#dashboard-screen {
    height: 100vh;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .admin-details {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .admin-info {
    justify-content: center;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.sidebar-header {
    height: var(--topbar-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-light);
    color: var(--accent-hover);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--danger);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: var(--font);
}

.sidebar-badge.hidden {
    display: none;
}

.sidebar-footer {
    height: var(--topbar-height);
    padding: 0 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #818cf8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.admin-details {
    display: flex;
    flex-direction: column;
}

.admin-details span:first-child {
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    flex: 1;
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Top Bar */
.top-bar {
    height: var(--topbar-height);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.top-bar-left h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-box input {
    padding: 8px 14px 8px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    width: 220px;
    transition: var(--transition);
    outline: none;
    color: var(--text-primary);
}

.search-box input:focus {
    border-color: var(--accent);
    width: 280px;
}

.notification-bell {
    position: relative;
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid var(--bg-secondary);
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 24px 28px;
    overflow-y: auto;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

.page-header-actions {
    display: flex;
    gap: 10px;
}