:root {
    --bg-color: #f4f4f9;
    --header-footer-bg: #ffffff;
    --panel-bg: #ffffff;
    --primary-color: #00447d;
    --secondary-color: #3d3d3d;
    --text-color-light: #ffffff;
    --text-color-dark: #333333;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color-dark);
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

header, footer {
    height: 3cm;
    min-height: 80px;
    background-color: var(--header-footer-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px var(--shadow-color);
    z-index: 10;
}

header {
    justify-content: flex-start;
    gap: 20px;
}

header h1 {
    font-size: 2rem;
    color: var(--secondary-color);
}

#logo {
    height: 70%;
    width: auto;
}

footer {
    height: 100px;
    background-color: var(--header-footer-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 -2px 5px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.banner-container {
    width: 100%;
    height: 100%;
}

#banner-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease-in-out;
}

main {
    flex-grow: 1;
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: 450px; /* Altura mínima para caber os painéis com 10 itens */
    overflow: hidden;
}

.panel {
    background-color: var(--panel-bg);
    border-radius: 16px;
    box-shadow: 0 4px 12px var(--shadow-color);
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#latest-call {
    flex: 5; /* Maior proporção entre os 3 painéis */
    min-width: 500px; /* Evita encolher demais */
    max-width: 50vw; /* Não deixa passar de metade da tela */
    display: flex;
    flex-direction: column;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    justify-content: space-between;
    text-align: center;
    padding: 1rem;
    border-radius: 16px;
}

#latest-call .panel-header {
    font-size: clamp(1.5rem, 3vw, 3rem); /* Responsivo: aumenta em telas grandes, sem exagerar */
    font-weight: 700;
    opacity: 0.9;
}

/* Mantém o footer menor */
#latest-call .panel-footer {
    font-size: clamp(0.8rem, 1.4vw, 1.2rem); /* Mais sutil e proporcional */
    font-weight: 500;
    opacity: 0.7;
}

.pequeno-footer {
    font-size: 2vw !important; /* também aumentei o footer */
    opacity: 0.7;
    font-weight: 500;
}

#current-password {
    font-size: clamp(4rem, 12vw, 10rem); /* aumenta o tamanho mínimo e máximo */
    font-weight: 700;
    line-height: 1;
    flex-grow: 1;
    flex-shrink: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.new-call-animation {
    animation: newCallPulse 1s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes newCallPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Painéis laterais (Pedidos Anteriores e Produzindo) */
#history, #producing-panel {
    min-height: 404px; /* altura para caber 10 itens */
    overflow-y: auto;
    justify-content: flex-start;
    text-align: center;
}

#history .panel-header, #producing-panel .panel-header {
    font-size: 2vw;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

/* Listas em coluna para 10 itens */
.history-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-height: 100%;
}

/* Itens menores para caber 10 */
.password-display-small {
    background-color: var(--bg-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3vw;
    font-weight: 700;
    color: var(--secondary-color);
    padding: 6px 0;
    min-height: 35px;
    word-break: break-word;
}

#ad-panel {
    padding: 0;
    overflow: hidden;
}

#ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scrollable-panel {
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.scrollable-panel::-webkit-scrollbar {
    width: 8px;
}

.scrollable-panel::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}
footer, .banner-container {
    max-width: 100vw;
    overflow-x: hidden;
}
