/* ===== Login Page ===== */
.login-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f7fa;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px 36px;
    width: min(420px, 100%);
    box-shadow: var(--shadow-lg);
}

.login-logo {
    font-size: 48px;
    text-align: center;
    margin-bottom: 12px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
}

/* ===== Topbar ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.topbar-brand {
    font-size: 17px;
    font-weight: 700;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===== Dashboard ===== */
.dashboard-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px;
}

.sessions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.sessions-header h2 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sessions-sort select {
    padding: 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--surface);
    cursor: pointer;
    outline: none;
}

.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.session-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.session-item.has-unread { border-color: var(--primary); background: #f0f7ff; }

.session-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.session-info { flex: 1; min-width: 0; overflow: hidden; }

.session-name {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.session-nick {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 13px;
}

.session-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.session-time {
    font-size: 12px;
    color: var(--text-muted);
}

.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.status-pending { background: #fef9c3; color: #854d0e; }
.status-active  { background: #dcfce7; color: #166534; }

.session-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-danger-ghost {
    background: transparent;
    color: var(--danger);
    border: 1px solid #fecaca;
}
.btn-danger-ghost:hover { background: #fef2f2; }

.avatar-pending {
    background: #d1d5db;
    color: #6b7280;
}

.is-pending { opacity: .85; }

.room-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f0f7ff;
    border-radius: var(--radius-sm);
}

.room-name-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.room-name-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.modal-box-sm { max-width: 380px; }

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 15px;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .login-card { padding: 28px 20px; }
    .topbar { padding: 0 14px; }
    .dashboard-main { padding: 16px 12px; }
    .session-actions { flex-direction: column; gap: 4px; }
    .session-actions .btn { font-size: 12px; padding: 5px 8px; }
}
