:root {
    --brand: #d71920;
    --brand-dark: #a90f16;
    --brand-light: #fde8e8;
    --ink: #20242c;
    --muted: #667085;
    --line: #d9dee7;
    --bg: #f3f5f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --ok: #19764b;
    --ok-bg: #e8f6ef;
    --ok-light: #b8e0cc;
    --danger: #a51818;
    --danger-bg: #fde9eb;
    --danger-light: #f5c8cb;
    --past-bg: #f0f1f3;
    --past-text: #8a8f9a;
    --shadow: 0 16px 38px rgba(32, 36, 44, 0.09);
    --shadow-soft: 0 8px 22px rgba(32, 36, 44, 0.08);
    --focus-ring: 0 0 0 3px rgba(215, 25, 32, 0.16);
    --radius: 8px;
    --transition: 0.25s ease;
    --col-horario: 78px;
    --col-sala: 1fr;
    --qtd-salas: 5;
    --gap: 5px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 0;
    box-shadow: var(--focus-ring);
}

/* ===== HEADER ===== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    min-height: 76px;
    padding: 10px clamp(14px, 3vw, 28px);
    background: #fff;
    border-bottom: 4px solid var(--brand);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.brand-link { display: inline-flex; align-items: center; min-width: 0; }
.brand-link img {
    width: clamp(150px, 24vw, 270px);
    max-height: 48px;
    object-fit: contain;
}

.nav-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}
.nav-tabs a,
.user-box a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.nav-tabs a:hover,
.nav-tabs a:focus,
.user-box a:hover,
.user-box a:focus {
    background: #f2f4f7;
    color: var(--brand-dark);
}

.user-box {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    color: var(--muted);
    font-size: 0.92rem;
}
.user-box span {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
}
.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
}

/* ===== MAIN ===== */
.app-main {
    flex: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 42px;
}
.app-footer {
    padding: 18px 20px;
    background: #1f2633;
    color: #d9dee7;
    text-align: center;
    font-size: 0.88rem;
}

/* ===== TÍTULOS ===== */
.page-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.eyebrow {
    margin: 0 0 4px;
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
h1, h2 { margin: 0; color: var(--ink); }
h1 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
h2 { margin-bottom: 14px; font-size: 1.08rem; }
p { margin: 0.35rem 0 0; }
.text-muted, .empty-text { color: var(--muted); }

/* ===== CARDS ===== */
.card, .room-panel {
    margin-bottom: 18px;
    padding: clamp(14px, 2.2vw, 22px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: surfaceIn 0.22s ease both;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card-narrow {
    width: min(520px, 100%);
    margin-inline: auto;
}

@keyframes surfaceIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== LOGIN ===== */
.login-layout {
    min-height: calc(100vh - 190px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 30px;
    align-items: center;
}
.login-panel { padding: 20px 0; }
.login-panel h1 { font-size: clamp(2rem, 4vw, 3rem); }
.login-card { margin: 0; }
.login-links {
    display: flex;
    justify-content: flex-end;
    margin-top: -6px;
    font-size: 0.9rem;
    font-weight: 700;
}
.login-links a {
    color: var(--brand-dark);
}
.login-links a:hover,
.login-links a:focus {
    text-decoration: underline;
}

/* ===== FORMULÁRIOS ===== */
.form-stack, .form-grid { display: grid; gap: 14px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: 1 / -1; }

label, legend {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-weight: 700;
}
input, select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    transition: border var(--transition), box-shadow var(--transition), background var(--transition);
}
textarea {
    resize: vertical;
    font: inherit;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(215, 25, 32, 0.14);
}
input:hover,
select:hover,
textarea:hover {
    border-color: #aeb8c6;
}
input:disabled,
select:disabled,
textarea:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}
.btn:disabled:hover {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transform: none;
}
.password-field {
    position: relative;
}
.password-field input {
    padding-right: 92px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.password-toggle:hover,
.password-toggle:focus {
    background: #eef2f7;
    border-color: #b8c0cc;
    color: var(--brand-dark);
}
fieldset {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* ===== BOTÕES ===== */
.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}
.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 8px 18px rgba(215, 25, 32, 0.18);
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}
.btn-light {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}
.btn-light:hover,
.btn-light:focus {
    background: #f8fafc;
    border-color: #b8c0cc;
}
.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: #8c1414; border-color: #8c1414; }
.btn-small {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 0.86rem;
}

.button-row,
.form-actions,
.toolbar-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.toolbar-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.toolbar-form label { margin: 0; }
.toolbar-form input { width: auto; }

/* ===== LEGENDA ===== */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.92rem;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.dot-free { background: var(--ok); }
.dot-busy { background: var(--brand); }
.dot-past { background: #9ca3af; }

/* ===== NOTIFICAÇÕES ===== */
.notice {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 700;
}
.notice-sucesso {
    background: var(--ok-bg);
    border: 1px solid #a9dac1;
    color: var(--ok);
}
.notice-erro {
    background: var(--danger-bg);
    border: 1px solid #f4b6bc;
    color: #9f1239;
}
.notice-info {
    background: #eef2f7;
    border: 1px solid var(--line);
    color: var(--ink);
}

/* ===========================================================
   TIMELINE (Mapa de disponibilidade invertido)
   =========================================================== */
.timeline-wrapper {
    position: relative;
    max-height: 520px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-top: 12px;
    background: var(--surface);
    max-width: 100%;
}

.timeline-head {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--surface);
    border-bottom: 2px solid var(--brand);
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.timeline-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.timeline {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* FORÇA 5 COLUNAS EXATAS */
.timeline-row {
    display: grid;
    grid-template-columns: var(--col-horario) repeat(var(--qtd-salas, 5), minmax(0, 1fr));
    gap: var(--gap);
    max-width: 100%;
}

.timeline-row > strong,
.timeline-row > span {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 0.78rem;
    text-align: center;
    word-break: break-word;
    overflow: hidden;
}

.timeline-row > strong {
    justify-content: center;
    background: #edf1f6;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--ink);
}

.timeline-head strong,
.timeline-head span {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    font-weight: 700;
    font-size: 0.8rem;
}

/* ===== CÉLULAS ===== */
.timeline-row > span {
    width: calc(100% - 2px);
    justify-self: center;
}

.time-cell.free {
    background: var(--ok-bg);
    color: var(--ok);
    cursor: pointer;
    border: 1px solid rgba(25, 118, 75, 0.14);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.time-cell.free:hover {
    background: var(--ok-light);
    border-color: rgba(25, 118, 75, 0.28);
    box-shadow: 0 4px 12px rgba(25, 118, 75, 0.12);
    transform: translateY(-1px);
}
.time-cell.busy {
    background: var(--danger-bg);
    color: var(--danger);
    font-weight: 700;
    cursor: default;
    border: 1px solid rgba(165, 24, 24, 0.12);
}
.time-cell.past {
    background: var(--past-bg);
    color: var(--past-text);
    cursor: not-allowed;
    font-weight: 400;
    opacity: 0.7;
    border: 1px solid #e0e4ea;
}
.time-cell.past:hover { background: var(--past-bg); }

/* ===== LINHA TEMPORAL (left e width fixos) ===== */
.linha-tempo {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    min-width: 16px;
    height: 3px;
    background: #d71920;
    pointer-events: none;
    z-index: 3;
    box-shadow: 0 0 0 1px rgba(215, 25, 32, 0.12);
}

.linha-tempo::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d71920;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(215, 25, 32, 0.35);
}
/* ===== SALAS E RESERVAS ===== */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.room-panel { margin: 0; }
.room-panel header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}
.room-panel header p { color: var(--muted); }
.room-panel header .btn {
    width: 100%;
}

.booking-stack {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}
.booking-stack::-webkit-scrollbar { width: 6px; }
.booking-stack::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.booking-stack::-webkit-scrollbar-thumb {
    background: #c1c7cd;
    border-radius: 4px;
}
.booking-stack::-webkit-scrollbar-thumb:hover { background: #a0a7af; }

.booking-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border: 1px solid #f2b8bd;
    border-left: 5px solid var(--brand);
    border-radius: var(--radius);
    background: #fff8f8;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
}
.booking-card:hover {
    background: #fff;
    border-color: #ef9da4;
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}
.booking-card > div:first-child {
    min-width: 0;
}
.booking-card strong {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand-dark);
    font-size: 0.84rem;
}
.booking-card p { margin: 3px 0; }
.booking-card small {
    display: block;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.booking-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.booking-actions form {
    margin: 0;
}
.booking-actions .btn {
    width: 100%;
}

/* ===== PARTICIPANTES ===== */
.participants-box { max-height: none; }
.participant-search {
    margin-bottom: 12px;
    background: var(--surface-soft);
}
.check-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px;
    max-height: 330px;
    overflow: auto;
    padding: 2px;
}
.check-list label {
    min-height: 64px;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
    font-weight: 400;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.check-list label:hover {
    background: #eef2f7;
    border-color: #c2cad6;
    transform: translateY(-1px);
}
.check-list label:has(input:checked) {
    background: #fff8f8;
    border-color: #efb4b9;
    box-shadow: inset 4px 0 0 var(--brand);
}
.check-list input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    margin-top: 3px;
    flex: 0 0 auto;
}
.check-list label span {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.check-list small {
    color: var(--muted);
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}
.area-tag {
    display: inline-flex;
    width: fit-content;
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e8edf5;
    color: #475467;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ===== CALENDÁRIO MENSAL ===== */
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}
.month-grid > strong {
    padding: 8px;
    text-align: center;
    color: var(--muted);
}
.day-card {
    min-height: 86px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    transition: background var(--transition), border-color var(--transition);
}
.day-card.empty { border: 0; background: transparent; }
.day-card.day-busy {
    background: #fff8f8;
    border-color: #f2b8bd;
}
.day-card span { font-weight: 700; }
.day-card small { color: var(--muted); }

/* ===== TABELAS E USUÁRIOS ===== */
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.compact-title { align-items: center; }
.compact-title .participant-search {
    width: min(360px, 100%);
    margin-bottom: 0;
}
.user-list { display: grid; gap: 10px; }
.user-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.user-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}
.user-summary h3 {
    margin: 0;
    color: var(--ink);
    font-size: 1rem;
}
.user-summary p {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}
.user-badges {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475467;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}
.pill-ok {
    background: var(--ok-bg);
    color: var(--ok);
}
.pill-muted {
    background: #f2f4f7;
    color: var(--muted);
}
.user-actions {
    display: grid;
    grid-template-columns: auto minmax(180px, 260px) minmax(190px, 280px) minmax(190px, 280px);
    gap: 8px;
    align-items: center;
}
.user-actions form { margin: 0; }
.show-more-wrap {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}
.show-more-wrap .btn { min-width: 180px; }

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #fff;
}
th, td {
    padding: 10px 9px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
th {
    background: #f0f3f8;
    color: #344054;
    font-size: 0.86rem;
}
tr:last-child td { border-bottom: 0; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-action {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.inline-action input,
.inline-action select {
    width: 130px;
    min-height: 34px;
    padding: 6px 8px;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-card {
    background: #fff;
    border-radius: var(--radius);
    max-width: 560px;
    width: 100%;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.modal-header h2 { margin: 0; }
.btn-close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    transition: color var(--transition);
}
.btn-close-modal:hover { color: var(--brand); }

/* ===========================================================
   RESPONSIVO
   =========================================================== */
@media (max-width: 900px) {
    .app-header {
        grid-template-columns: auto auto;
        justify-content: space-between;
    }
    .menu-toggle { display: inline-flex; }
    .nav-tabs {
        grid-column: 1 / -1;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        transition: max-height 0.2s ease;
    }
    .nav-tabs.open { max-height: 260px; }
    .nav-tabs a {
        border: 1px solid var(--line);
        background: #fff;
    }
    .user-box {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: space-between;
    }
    .login-layout { grid-template-columns: 1fr; gap: 12px; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: 1; }
    .toolbar-card,
    .page-title { align-items: stretch; flex-direction: column; }
    .compact-title .participant-search { width: 100%; }
    .user-summary { flex-direction: column; }
    .user-badges { justify-content: flex-start; }
    .user-actions { grid-template-columns: 1fr; }
    .user-actions .inline-action {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .user-actions .inline-action input,
    .user-actions .inline-action select { width: 100%; }
    .toolbar-form input,
    .toolbar-form .btn,
    .page-title .btn,
    .form-actions .btn { width: 100%; }
}

@media (max-width: 640px) {
    .app-main {
        width: 100%;
        padding: 14px 12px 28px;
    }
    .app-header { padding: 8px 12px; }
    .brand-link img { width: min(180px, 62vw); }
    .card, .room-panel {
        padding: 14px;
        border-radius: 0;
    }
    .room-grid, .check-list { grid-template-columns: 1fr; }
    .room-panel header,
    .booking-card,
    .form-actions,
    .button-row { align-items: stretch; flex-direction: column; }
    .room-panel header .btn,
    .booking-card .btn { width: 100%; }
    .month-grid { gap: 4px; }
    .month-grid > strong {
        padding: 4px 2px;
        font-size: 0.72rem;
    }
    .day-card {
        min-height: 58px;
        padding: 6px;
        font-size: 0.78rem;
    }
    .day-card small { font-size: 0.68rem; }

    .timeline-row {
        grid-template-columns: 70px repeat(5, 1fr);
        gap: 3px;
    }
    .timeline-row > strong,
    .timeline-row > span {
        font-size: 0.65rem;
        min-height: 28px;
        padding: 2px 4px;
    }
    .timeline-wrapper { max-height: 400px; }
    table { min-width: 680px; }
    .modal-card { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
/* ===== LAYOUT: MAPA + CARDS LADO A LADO ===== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 18px;
    align-items: flex-start;
}

.mapa-coluna {
    min-width: 0;
}

.salas-coluna {
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 4px;
    scroll-behavior: smooth;
}

.salas-coluna .room-panel {
    margin: 0;
    flex-shrink: 0;
}
.salas-coluna::-webkit-scrollbar { width: 6px; }
.salas-coluna::-webkit-scrollbar-track {
    background: #edf1f6;
    border-radius: 4px;
}
.salas-coluna::-webkit-scrollbar-thumb {
    background: #b8c0cc;
    border-radius: 4px;
}
.salas-coluna::-webkit-scrollbar-thumb:hover {
    background: #98a2b3;
}

/* Responsivo */
@media (max-width: 760px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .mapa-coluna,
    .salas-coluna {
        width: 100%;
        max-height: none;
    }
    .salas-coluna {
        overflow-y: visible;
    }
}
