* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, sans-serif;
    margin: 0;
    background: #f3f4f6;
    color: #111827;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

h1 {
    margin-top: 0;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
}

input,
textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    font: inherit;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

textarea {
    min-height: 80px;
}

button {
    padding: 10px 14px;
    font: inherit;
    border: 0;
    border-radius: 8px;
    background: #1f2937;
    color: white;
    cursor: pointer;
}

button:hover {
    background: #374151;
}

button.danger {
    background: #991b1b;
}

button.danger:hover {
    background: #7f1d1d;
}

.item {
    border-top: 1px solid #e5e7eb;
    padding: 14px 0;
}

.item:first-of-type {
    border-top: 0;
}

.item p {
    margin: 6px 0 10px;
}

.called {
    background: #fff7ed;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #fed7aa;
}

.muted {
    color: #6b7280;
}

.room-row {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e5e7eb;
    padding: 10px 0;
}

.room-row:first-of-type {
    border-top: 0;
}

.free {
    color: #047857;
    font-weight: 700;
}

.busy {
    color: #b45309;
    font-weight: 700;
}

@media (max-width: 800px) {
    .grid {
        grid-template-columns: 1fr;
    }
}
.offline {
    color: #6b7280;
    font-weight: 700;
}

.item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.received {
    color: #047857;
    font-weight: 700;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.start-card {
    text-align: center;
    margin-top: 10vh;
}

.start-card button {
    font-size: 1.2rem;
    padding: 16px 24px;
}

.employee {
    margin-left: 8px;
    color: #6b7280;
    font-weight: normal;
}

.employee-form {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 12px;
    align-items: center;
}

.employee-form input {
    margin: 0;
}

.accordion-summary {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.accordion-content {
    margin-top: 16px;
}

body:has(.public-display) {
    overflow: hidden;
}

body:has(.public-display) main {
    max-width: none;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
}

body:has(.public-display) main > h1 {
    display: none;
}

.public-display {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto auto;
    place-items: center;
    gap: 3vh;
    padding: 5vh 6vw;
}

.current-call {
    width: min(90vw, 1400px);
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4vh 5vw;
    border-radius: 32px;
    background: white;
	box-shadow: 0 6px 32px rgba(0,0,0,0.2);
}


.call-label {
    font-size: 4vw;
    color: #4b5563;
    margin-bottom: 2vh;
}

.call-number {
    font-size: 22vw;
    font-weight: 900;
    line-height: 0.85;
	letter-spacing: -0.03em;
}

.call-room {
    font-size: 7vw;
    font-weight: 800;
    margin-top: 2vh;
}

.previous-calls {
    display: flex;
    justify-content: center;
    gap: 4vw;
    width: 100%;
}

.previous-call {
    background: white;
    border-radius: 24px;
    padding: 2vh 4vw;
    min-width: 18vw;
    text-align: center;
	opacity: 0.8;
}

.previous-call strong {
    display: block;
    font-size: 6vw;
    line-height: 1;
	font-weight: 700;
}

.previous-call span {
    display: block;
    font-size: 2.5vw;
    margin-top: 1vh;
}

.faded {
    opacity: 0.35;
}

.home-menu {
    display: grid;
    gap: 1rem;
    max-width: 28rem;
    margin: 2rem auto;
}

.big-button {
    display: block;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: #1f2937;
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
}

.big-button:hover {
    background: #111827;
}

.reception-console {
    display: grid;
    gap: 1rem;
}

.console-toolbar {
    background: white;
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.quick-add-form {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(12rem, 2fr) auto;
    gap: 0.5rem;
    align-items: end;
}

.console-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.console-panel {
    background: white;
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    min-height: 22rem;
}

.console-panel h2,
.console-rooms h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.console-list {
    display: grid;
    gap: 0.4rem;
}

.console-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border-radius: 0.5rem;
    background: #f8fafc;
    border-left: 0.25rem solid #94a3b8;
}

.console-row.called {
    border-left-color: #f59e0b;
}

.console-client {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.console-client strong {
    font-size: 1.05rem;
}

.console-client span {
    color: #475569;
    font-size: 0.9rem;
}

.small-button {
    padding: 0.45rem 0.7rem;
    font-size: 0.9rem;
}

.console-rooms {
    background: white;
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.room-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.room-status {
    display: grid;
    gap: 0.25rem;
    padding: 0.65rem;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.room-status strong {
    font-size: 0.95rem;
}

.room-status strong span {
    font-weight: normal;
}

.room-status em {
    font-style: normal;
    font-size: 0.9rem;
}

.room-free {
    background: #dcfce7;
    border: 1px solid #22c55e;
}

.room-busy {
    background: #fee2e2;
    border: 1px solid #ef4444;
}

.room-offline {
    background: #f1f5f9;
    border: 1px solid #94a3b8;
    opacity: 0.75;
}
@media (max-width: 800px) {
    .quick-add-form,
    .console-main,
    .room-status-grid {
        grid-template-columns: 1fr;
    }
}

.mini-room-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.mini-room {
    padding: 0.55rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
}

.mini-room-free {
    background: #dcfce7;
    border: 1px solid #22c55e;
}

.mini-room-busy {
    background: #fee2e2;
    border: 1px solid #ef4444;
}

.mini-room-offline {
    background: #f1f5f9;
    border: 1px solid #94a3b8;
    opacity: 0.75;
}

@media (max-width: 800px) {
    .quick-add-form,
    .console-main,
    .room-status-grid {
        grid-template-columns: 1fr;
    }

    .called-panel {
        order: 1;
    }

    .waiting-panel {
        order: 2;
    }
}
@media (max-width: 800px) {
    .employee-section {
        display: none;
    }
}
/* hidden by default (desktop) */
.mini-room-strip {
    display: none;
}

/* show only on mobile */
@media (max-width: 800px) {
    .mini-room-strip {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }
}

.compact-waiting-list {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.compact-waiting-row {
    display: grid;
    gap: 0.15rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.compact-waiting-row span {
    color: #475569;
    font-size: 0.9rem;
}