/* ==========================
   INPUTS / CAMPOS DE TEXTO
   ========================== */
input[readonly],
input[disabled] {
    background-color: #f0f0f0;
    color: #555;
    cursor: not-allowed;
}

.readonly-field {
    background-color: #e9ecef;
    color: #7694b1;
    border: 1px solid #ced4da;
    padding: 6px 12px;
    border-radius: 4px;
}

/* ==========================
   TABELAS
   ========================== */
.table-auditorio>tbody>tr>td {
    vertical-align: middle;
}

.tabela-wrapper {
    max-height: 500px;
    overflow-y: auto;
}

.tabela-reserva {
    border-collapse: separate;
    /* importante para sticky funcionar melhor */
    border-spacing: 0;
    width: 100%;
}

.tabela-reserva th,
.tabela-reserva td {
    padding: 8px;
    text-align: center;
    border: 1px solid #5bc0de;
    white-space: nowrap;
    background-color: #fff;
    /* evita transparência no sticky */
}

/* HEADER sticky */
.tabela-reserva thead th {
    position: sticky;
    top: 0;
    background-color: #5bc0de;
    z-index: 20;
    /* maior que a coluna */
}

/* PRIMEIRA COLUNA sticky */
.tabela-reserva .col-fixa {
    position: sticky;
    left: 0;
    background-color: #5bc0de;
    z-index: 15;
}

/* CÉLULA do header que também é col-fixa */
.tabela-reserva thead .col-fixa {
    z-index: 30;
    /* precisa ser maior que tudo */
}

.tabela-reserva-tv {
    border-collapse: collapse;
    width: 100%;
    overflow-x: auto;
    font-size: 16px;
    table-layout: fixed;
    margin-top: 0;
    margin-bottom: 3px;
}

.modo-single .tabela-reserva-tv {
    font-size: 18px;
}

/* modo multiplo */
.modo-multiplo .tabela-reserva-tv {
    font-size: 25px;
}

.tabela-reserva-tv th,
.tabela-reserva-tv td {
    text-align: center;
    /* max-height: 50px; */
    vertical-align: middle;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tabela-reserva-tv thead th {
    background-color: #c00;
    color: #ffffff;
}

.tabela-reserva-tv tbody td {
    white-space: normal;        /* permite quebrar linha */
    overflow: hidden;
    text-overflow: unset;       /* remove o ... */
    word-break: break-word;     /* quebra palavras grandes */
    overflow-wrap: anywhere;
}

td.fixa {
    width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================
   Painel de Controle
   ========================== */

.tabela-controle {
    background: #fff;
    border: 1px solid #ddd;
}

/* HEAD */
.tabela-controle thead th {
    background: #d9edf7; /* azul claro BS3 */
    text-align: center;
    font-weight: 600;
    color: #31708f;
    border-bottom: 2px solid #bce8f1;
}

/* STRIPED custom */
.tabela-controle tbody tr:nth-of-type(odd) {
    background-color: #f9fcff;
}

/* HOVER suave */
.tabela-controle tbody tr {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.tabela-controle tbody tr:hover {
    background-color: #eef7fb;
    box-shadow: inset 0 0 0 9999px rgba(0,0,0,0.02);
}

/* células */
.tabela-controle tbody tr td {
    vertical-align: middle;
    cursor: pointer;
}

/* badges (opcional melhorar contraste) */
.tabela-controle .badge {
    font-size: 11px;
}

/* ==========================
   LAYOUT GERAL
   ========================== */
html,
body {
    height: 100%;
    margin: 0;
}

#wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main {
    flex: 1;
}

.footer {
    height: auto;
    background-color: #f5f5f5;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e5e5e5;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ==========================
   FORMATAÇÃO E SEÇÕES
   ========================== */
.information {
    background-color: #5bc0de;
    color: white;
    text-align: center;
}

.valores_possiveis_format {
    padding-left: 20px;
    margin: 0;
}

.linha-1-3 {
    background-color: rgb(116, 241, 116);
}

.linha-2-3 {
    background-color: yellow;
}

.linha-3-3 {
    background-color: rgb(250, 133, 133);
}

.check_all {
    font-weight: normal;
}

.wp60 {
    width: 60%;
}

.full {
    width: 100%;
}

/* ==========================
   PÍLULAS / NAVEGAÇÃO
   ========================== */
.pills-group li {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pills-group li a {
    transition: background-color 0.3s ease, border 0.3s ease, color 0.3s ease;
    border: 1px solid transparent;
    border-radius: 6px;
}

.pills-group li:hover {
    transform: scale(1.05);
}

.pills-group:hover li:not(:hover) {
    opacity: 0.2;
    transform: scale(0.98);
}

.pills-group li a:hover {
    background-color: #e6f0ff;
    border-color: #99c2ff;
    color: #004080;
}

.pills-group li.active a {
    background-color: #cce0ff;
    border-color: #66a3ff;
    color: #003366;
    font-weight: bold;
}

.nav>li.nav-centered {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================
   ÍCONES E BADGES
   ========================== */
.ellipsis {
    display: inline-block;
    width: 1em;
    text-align: center;
    font-weight: bold;
}

.reserva-icon {
    position: relative;
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
}

.base-icon {
    font-size: 1.2em;
}

.overlay-icon {
    position: absolute;
    font-size: 0.6em;
    top: 70%;
    right: 0;
}

.icon-contrast {
    text-shadow:
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white;
}

.circle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #c00;
    color: #c00;
    font-size: 20px;
}

/* Ícones empilhados (comentário + user/admin) */
.icon-stack {
    position: relative;
    display: inline-block;
    width: 1.5em;
    height: 3em;
    vertical-align: middle;
}

.icon-stack .glyphicon {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1.2em;
    line-height: 1.5em;
}

.icon-stack .glyphicon-comment {
    color: #333;
}

.icon-stack .icon-user {
    color: green;
    font-size: 0.6em;
    bottom: -0.3em;
    left: -0.3em;
    top: 2.3em;
}

.icon-stack .icon-fire {
    color: red;
    font-size: 0.6em;
    bottom: -0.3em;
    left: 1.7em;
}

.icon-warning {
    margin-left: 4px;
    font-size: 0.85em;
    opacity: 0.7;
}

/* ==========================
   BOTÕES DE AÇÃO
   ========================== */
.btn-icon {
    background: none;
    border: none;
    padding: 0;
    margin: 0 5px;
    font-size: 20px;
}

.btn-icon:focus {
    outline: none;
}

.btn-icon>.glyphicon-remove.icon-auditorio:hover,
.btn-icon>.glyphicon-thumbs-down.icon-auditorio:hover {
    color: red;
}

.btn-icon>.glyphicon-ok.icon-auditorio:hover,
.btn-icon>.glyphicon-thumbs-up.icon-auditorio:hover {
    color: green;
}

.btn-icon>.glyphicon-thumbs-down.text-muted:hover {
    color: red;
}

.btn-icon>.glyphicon-thumbs-up.text-muted:hover,
.btn-icon>.glyphicon-time.text-muted:hover {
    color: green;
}

.btn-icon>.glyphicon-ok.text-muted:hover,
.btn-icon>.glyphicon-lock.text-muted:hover {
    color: blue;
}

.btn-icon>.glyphicon-th-list.text-muted:hover {
    color: yellow;
}

/* ==========================
   LEGENDAS / BADGES
   ========================== */
.legend .label {
    font-size: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    margin: 2px;
    display: inline-block;
}

.badge_fernet_key {
    background-color: #5cb85c;
    font-size: 14px;
    padding: 8px 12px;
    cursor: help;
}

/* Base */
.badge_status {
    display: inline-block;
    padding: 0.5em 1.2em;
    font-size: 1em;
    font-weight: 600;
    border-radius: 999px;
    /* pill */
    color: #fff;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
}

/* Específicos */
.badge_status.badge-Aguardando {
    background-color: #f0ad4e;
}

/* âmbar */
.badge_status.badge-Cancelada {
    background-color: #6c757d;
}

/* cinza */
.badge_status.badge-Aprovada {
    background-color: #28a745;
}

/* verde */
.badge_status.badge-Reprovada {
    background-color: #dc3545;
}

/* vermelho */

/* Genéricos reaproveitando Bootstrap semantics */
.badge_status.badge-success,
.badge.badge-success {
    background-color: #5cb85c;
}

.badge_status.badge-warning,
.badge.badge-warning {
    background-color: #f0ad4e;
}

.badge_status.badge-danger,
.badge.badge-danger {
    background-color: #d9534f;
}

.badge_status.badge-info,
.badge.badge-info {
    background-color: #5bc0de;
}

.badge_status.badge-secondary,
.badge.badge-secondary {
    background-color: #6c757d;
}

/* ==========================
   OUTROS
   ========================== */
table>tbody>tr>td.livre {
    background: #28a745;
}

table>tbody>tr>td.reservado {
    background: #dc3545;
    color: white;
    font-weight: bold;
}

table>tbody>tr>td.indisponivel {
    background: #e9ecef;
    cursor: not-allowed;
}


table>tbody>tr>td.reservado-fixo {
    cursor: help;
    box-shadow:
        inset 0 0 0 4px #c9dc1e,
        inset 0 0 10px rgba(201, 220, 30, 0.5);
    border-radius: 4px;
}



.slide {
    display: none;
}

.slide.active {
    display: block;
}

.disabled_a_click {
    pointer-events: none;
    color: gray;
}

.container_valores_automaticos {
    max-height: 200px;
    overflow-y: auto;
}

.hover-icon:hover {
    color: var(--hover-color, inherit);
}

.ui-blocker {
    display: none;
    position: fixed;
    inset: 0;
    /* top/right/bottom/left = 0 */
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
}

.ui-blocker-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
}

/* cores personalizadas para ícone de reserva */
.text-indefinido {
    color: #999;
}

.text-pegou-chave {
    color: #28a745;
}

.text-nao-pegou-chave {
    color: #dc3545;
}

.text-devolveu-chave {
    color: #17a2b8;
}

/* database header */
.section-badge {
    font-size: 7px;
    background: transparent;
    border: 1px solid #810feb;
    color: #999;
    margin-right: 2px;
    padding: 2px 4px;
}

.nav-pills>li.active .section-badge {
    border-color: #d64242;
}

.navbar-date {
    display: flex;
    align-items: center;
    /* alinha verticalmente */
    gap: 10px;
    /* espaço entre texto e ícone */
    margin-top: 0;
    margin-bottom: 0;
}

/* ===== LOG PANEL ===== */

.log-container {
    margin-top: 15px;
    max-height: 400px;
    overflow: auto;
    font-family: monospace;
    background: #1e1e1e;
    color: #dcdcdc;
    border-radius: 4px;
}

/* Cada linha */
.log-line {
    white-space: pre-wrap;
}

/* ERROR */
.log-error {
    color: #ff6b6b;
    font-weight: bold;
}

/* WARNING */
.log-warning {
    color: #f0ad4e;
}

/* Badge quando tem erro */
.badge-error {
    background-color: #d9534f;
}

/* Badge OK */
.badge-ok {
    background-color: #5cb85c;
}

/* utils */
.pre-wrap {
    white-space: pre-wrap;
}