/* ---- Navbar ---- */
.navbar { display: flex; align-items: center; justify-content: space-between; background: #2d3748; color: white; padding: 12px 20px; border-radius: 8px; margin-bottom: 20px; position: relative; }
.navbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.navbar-room-name { font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar-lock { font-size: 1rem; flex-shrink: 0; }
.navbar-right { display: flex; gap: 8px; flex-shrink: 0; }
.btn-nav { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.3); padding: 6px 12px; font-size: 0.85rem; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.btn-nav:hover { background: rgba(255,255,255,0.28); }
.btn-nav-danger { background: rgba(220,53,69,0.6); border-color: rgba(220,53,69,0.8); }
.btn-nav-danger:hover { background: rgba(220,53,69,0.85); }
.btn-hamburger { display: none; }

/* ---- Three-panel layout ---- */
.room-layout { display: flex; gap: 16px; flex: 1; align-items: stretch; min-height: 0; }
.panel-side { flex: 0 0 220px; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.panel-side > .card { flex: 1; display: flex; flex-direction: column; margin-bottom: 0; min-height: 0; overflow: hidden; }
.panel-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.panel-main > .card { margin-bottom: 0; }
.panel-content { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }

/* ---- Panel tabs ---- */
.panel-tabs { display: flex; flex-shrink: 0; border-bottom: 2px solid #e0e0e0; margin-bottom: 0; }
.panel-tab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; padding: 8px 18px; font-size: 0.88rem; cursor: pointer; color: #888; white-space: nowrap; }
.panel-tab:hover { color: #555; }
.panel-tab.active { color: #0d6efd; border-bottom-color: #0d6efd; font-weight: 600; }

/* ---- Responsive: tablet ---- */
@media (max-width: 900px) {
    .room-layout { flex-direction: column; flex: 1; min-height: 0; }
    .panel-side { flex: none; width: 100%; }
    .panel-side > .card { flex: none; }
    .panel-main { flex: 1; min-height: 0; }
    .members-list { flex: none; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none; }
    .member-entry { min-width: 160px; flex-shrink: 0; }
    .chat-card { height: auto; }
    .navbar-right { display: none; position: absolute; top: 100%; right: 0; z-index: 100; flex-direction: column; gap: 6px; background: #2d3748; border-radius: 0 0 8px 8px; padding: 10px 12px; min-width: 160px; box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
    .navbar-right.open { display: flex; }
    .navbar-right .btn-nav { width: 100%; text-align: left; }
    .btn-hamburger { display: block; background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.3); padding: 5px 10px; font-size: 1.1rem; border-radius: 4px; cursor: pointer; line-height: 1; }
    .panel-tabs { overflow-x: auto; }
    .tasks-card { height: auto; }
    .chat-msg-event { max-width: 100%; }
}

/* ---- Responsive: mobile ---- */
@media (max-width: 540px) {
    body { padding: 12px; }
    .room-hero { padding: 24px 14px; margin-bottom: 16px; }
    .room-hero h1 { font-size: 1.5rem; }
    .room-hero p { font-size: 0.92rem; }
    .saved-room-entry { flex-wrap: wrap; }
    .saved-room-info { width: 100%; }
    .saved-room-actions { width: 100%; justify-content: flex-end; }
}
