:root {
    --cor-body: #dcdcdc;
    --cor-one: #c0c0c0;
    --cor-two: #a9a9a9;
    --cor-three: #808080;
    --cor-four: #757575;
    --cor-five: #838996;
    --cor-six: #848482;
    --cor-seven: #c4aead;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--cor-body);
    margin: 0;
    padding: 0;
}

.topbar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg, #757575, #c0c0c0);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 10;
}

.hamburger {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

.logo {
    font-weight: bold;
    letter-spacing: 0.04em;
}

.container {
    padding: 20px;
}

.card {
    background-color: var(--cor-one);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px auto;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.label-index {
    font-size: 18px;
    font-weight: bold;
}

.input-index {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--cor-two);
    border-radius: 4px;
    box-sizing: border-box;
}

.secondary-link {
    color: #1f3f74;
    text-decoration: none;
    font-weight: bold;
}

.status-message {
    color: #333;
    font-size: 0.95rem;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.item-card {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-info h3 {
    margin: 0;
    font-size: 1rem;
}

.concluidos-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.concluido-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.concluido-card h3 {
    margin: 0;
    font-size: 1rem;
    color: #1f3f74;
}

.concluido-card p {
    margin: 0;
    color: #333;
    line-height: 1.4;
}

.concluido-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.concluido-meta span {
    display: block;
    font-size: 0.94rem;
    color: #4b4b4b;
}

.concluido-chip {
    display: inline-block;
    background: #d1e7dd;
    color: #0f5132;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

@media (max-width: 640px) {
    .concluido-meta {
        grid-template-columns: 1fr;
    }
}

.item-info p {
    margin: 0;
    font-size: 0.92rem;
}

.btn-concluir,
.btn-adicionar-vaga,
.btn-vaga {
    background: #2d7d46;
    color: #fff;
    border: none;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-concluir:hover,
.btn-adicionar-vaga:hover,
.btn-vaga:hover {
    background: #23643a;
}

.btn-limpar-concluidos {
    position: relative;
    z-index: 20;
}

.vaga-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
    max-height: min(68vh, 520px);
    overflow-y: auto;
    padding-right: 4px;
}

.vaga-column {
    display: grid;
    gap: 8px;
}

.btn-vaga {
    min-height: 52px;
    text-align: center;
    word-break: break-word;
}

.modal-large {
    max-width: 900px;
    width: min(900px, 100%);
    max-height: calc(100vh - 60px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.empty-state {
    padding: 16px;
    border-radius: 6px;
    background: #efefef;
    text-align: center;
}

.csv-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.csv-result-info {
    color: #333;
    font-size: 0.95rem;
    margin-top: 12px;
}

#csv-table-container {
    overflow-x: auto;
    width: 100%;
    margin-top: 14px;
}

.csv-result-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    table-layout: fixed;
}

.csv-result-table th,
.csv-result-table td {
    border: 1px solid #d1d1d1;
    padding: 10px;
    text-align: left;
    word-break: break-word;
    white-space: normal;
}

.csv-result-table th {
    background: #e8e8e8;
}

.nav-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100%;
    background: #f5f5f5;
    box-shadow: 2px 0 14px rgba(0,0,0,0.15);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: left 0.26s ease;
    z-index: 15;
}

.nav-menu.open {
    left: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(255,255,255,0.8);
    transition: background 0.2s ease;
}

.nav-menu a:hover {
    background: #e0e0e0;
}

.menu-close {
    align-self: flex-end;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 12;
}

.menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 640px) {
    .item-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-concluir {
        width: 100%;
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 30;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: min(420px, 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-box h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.modal-box p {
    margin: 0 0 16px;
    color: #444;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary,
.btn-confirm {
    border: none;
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-secondary {
    background: #e5e5e5;
    color: #333;
}

.btn-confirm {
    background: #2d7d46;
    color: #fff;
}

.json-output {
    background: #1f1f1f;
    color: #f5f5f5;
    padding: 14px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.qr-card {
    align-items: stretch;
}

.qr-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qr-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.qr-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.lt-display {
    font-size: 1.15rem;
    font-weight: bold;
    letter-spacing: 0.06em;
    color: #1f3f74;
}

.qr-image {
    width: min(220px, 100%);
    height: auto;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}
