:root {
    --verde: #2d8a42;
    --verde-escuro: #1b5e20;
    --amarelo: #f8db08;
    --branco: #ffffff;
    --bg: #f4f4f4;
    --borda: #ccc;
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

header {
    background-color: var(--verde);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 1001;
    width: 100%;
    box-sizing: border-box;
}

.brand {
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 900;
    font-style: italic;
    color: var(--amarelo);
}

.brand span {
    font-size: 22px;
    font-weight: 800;
    color: var(--branco);
}

.btn-menu {
    background: var(--amarelo);
    border: none;
    color: #000;
    font-size: 22px;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.time-box {
    text-align: right;
    line-height: 1.1;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
}

#data-hoje {
    font-size: 12px;
    font-weight: 800;
    color: white;
    display: block;
    margin-bottom: 2px;
}

#relogio {
    font-size: 22px;
    font-weight: 900;
    color: var(--amarelo);
    min-width: 90px;
}

.clima-desk {
    display: flex;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
    align-items: center;
}

.clima-card {
    background: rgba(0,0,0,0.3);
    padding: 4px 6px;
    border-radius: 5px;
    text-align: center;
    font-size: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 48px;
}

.clima-card b {
    display: block;
    color: var(--amarelo);
    font-size: 11px;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 4px solid var(--verde);
    border-radius: 15px;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 0 150px rgba(0,0,0,0.7);
    width: 95%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal h3 {
    color: var(--verde-escuro);
    text-align: center;
    border-bottom: 3px solid var(--amarelo);
    padding-bottom: 10px;
    margin-top: 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.info-label {
    font-size: 12px;
    font-weight: 900;
    color: #777;
    text-transform: uppercase;
}

.info-value {
    font-size: 14px;
    font-weight: 800;
    color: #222;
    text-align: right;
}

.btn-close {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #666;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.btn-close.verde {
    background: var(--verde);
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--verde);
    color: white;
    padding: 10px;
    border-radius: 8px;
}

.cal-header button {
    background: none;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
    margin-top: 10px;
}

.cal-day {
    padding: 8px 2px;
    border-radius: 5px;
    font-weight: 700;
    border: 1px solid #eee;
    cursor: pointer;
    min-height: 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.cal-domingo {
    background: #ffebee;
    color: #c62828;
}

.cal-feriado {
    background: #ffeb3b !important;
    color: #000 !important;
    border: 2px solid #fbc02d !important;
}

.cal-feriado span {
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 2px;
    display: block;
}

.cal-today {
    border: 2px solid var(--verde) !important;
}

.f-box {
    background: white;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 10px;
}

.destaque-caixa {
    background: #fff9db;
    border: 2px dashed #f1c40f;
}

.f-box label {
    font-size: 11px;
    font-weight: 900;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    box-sizing: border-box;
    background: #fff;
}

.destaque-arquivo {
    background: var(--amarelo);
    color: #000;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #000;
    text-align: center;
    font-size: 13px;
    font-weight: 900;
    word-break: break-all;
    margin-bottom: 5px;
    box-shadow: 0 4px 0 #000;
}

.file-label {
    background: #eee;
    color: #333;
    padding: 6px 12px;
    border-radius: 5px;
    text-align: center;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    border: 1px solid #bbb;
    width: fit-content;
    margin: 0 auto;
    display: block;
}

#inputExcel {
    display: none;
}

.btn-limpar {
    background: #eee;
    border: 1px solid #bbb;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    color: #444;
    width: 100%;
}

.wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

aside {
    width: 320px;
    background: #fdfdfd;
    padding: 20px;
    border-right: 2px solid #ddd;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: 0.3s;
    z-index: 1000;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
    z-index: 999;
    backdrop-filter: blur(2px);
}

.overlay.active {
    visibility: visible;
    opacity: 1;
}

main {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

#stats {
    margin-bottom: 12px;
    font-weight: 900;
    color: var(--verde-escuro);
}

.table-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    overflow-x: auto;
    border: 1px solid var(--borda);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th {
    background: #222;
    color: white;
    padding: 15px;
    text-align: left;
    border-bottom: 4px solid var(--verde);
    border-right: 1px solid #444;
    font-weight: 900;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--borda);
    border-right: 1px solid var(--borda);
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #fff176 !important;
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 50px;
    cursor: pointer;
    color: var(--verde-escuro);
    font-weight: 900;
    text-decoration: underline;
}

@media (max-width: 1000px) {
    .clima-desk {
        display: none;
    }
}

@media (max-width: 850px) {
    aside {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        width: 85%;
    }
    aside.open {
        transform: translateX(0);
    }
    .brand h1 {
        font-size: 18px;
    }
    .brand span {
        font-size: 16px;
    }
    #relogio {
        font-size: 18px;
        min-width: auto;
    }
    #data-hoje {
        font-size: 10px;
    }
    .btn-menu {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}