/* QuinTrace Studio — spoločné štýly (login + konzola). Žiadne externé
   zdroje — všetko self-hosted (CSP default-src 'self'). */
:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1c2733;
    --muted: #64748b;
    --accent: #175ddc;
    --accent-dark: #124bb0;
    --border: #d8dee6;
    --error: #b3261e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

h1 { font-size: 1.4rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }

.muted { color: var(--muted); font-size: 0.9rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.error { color: var(--error); font-size: 0.9rem; }
.spacer { flex: 1; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
}

button {
    font: inherit;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}
button:hover { background: var(--accent-dark); }
button:disabled { opacity: 0.6; cursor: default; }
button.ghost {
    background: transparent;
    color: var(--accent);
}
button.ghost:hover { background: rgba(23, 93, 220, 0.08); }

input, select {
    font: inherit;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
}
input:focus, select:focus, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* ---- Login ---------------------------------------------------------------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.login-card {
    width: 100%;
    max-width: 22rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.login-card label { font-size: 0.85rem; margin-top: 0.5rem; }
.login-card button { margin-top: 1rem; }

/* ---- Konzola ---------------------------------------------------------------- */
.topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
.brand { font-weight: 600; }

.console-main {
    max-width: 72rem;
    margin: 1rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
#room-name { flex: 1; min-width: 12rem; }

.room-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.room-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.room-info {
    flex: 1;
    min-width: 10rem;
    display: flex;
    flex-direction: column;
}

/* Počas hovoru: panel miestností sa skryje (Miestnosti ho vráti) a embed
   dostane takmer celú výšku okna — nález akceptácie 24.9. (okno malé). */
.meet-head { margin-bottom: 0.5rem; }
.meet-panel { display: flex; flex-direction: column; }
#meet-container { height: 70vh; flex: 1; min-height: 20rem; }
body.in-meeting .console-main { max-width: none; }
body.in-meeting .meet-panel { height: calc(100vh - 6.5rem); }
#meet-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px;
}
#meet-container:fullscreen iframe { border-radius: 0; }

/* ---- Dialógy (zmena hesla, pomoc) ------------------------------------------ */
.dialog {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    max-width: 24rem;
    width: calc(100vw - 2rem);
    color: var(--text);
}
.dialog::backdrop { background: rgba(28, 39, 51, 0.45); }
.dialog h2 { margin-bottom: 0.75rem; }
.dialog form { display: flex; flex-direction: column; gap: 0.5rem; }
.dialog label { font-size: 0.85rem; margin-top: 0.5rem; }
.dialog-actions { justify-content: flex-end; margin-top: 1rem; }

.help-dialog { max-width: 34rem; }
.help-list dt { font-weight: 600; margin-top: 0.75rem; }
.help-list dd { margin: 0.25rem 0 0; color: var(--muted); }
