body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f7fa;
    color: #222;
}

.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 220px;
    height: 100vh;
    background: #f5f8fb;
    color: #133968;
    box-shadow: 2px 0 18px #0002;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: left 0.35s;
    border-right: 2px solid #d4e3ef;
}
.sidebar-logo {
    font-size: 1.7em;
    font-weight: bold;
    padding: 22px 24px 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #2196f3;
    letter-spacing: 0.03em;
}
.sidebar a {
    color: #133968;
    padding: 15px 28px;
    text-decoration: none;
    font-size: 1.14em;
    border-left: 3px solid transparent;
    transition: background 0.2s, border 0.2s, color 0.18s;
    font-weight: 500;
}
.sidebar a:hover, .sidebar a.active {
    background: #e8f1fd;
    border-left: 3px solid #2196f3;
    color: #2196f3;
}
.menu-hamburger {
    display: none;
    font-size: 2.3em;
    color: #2196f3;
    cursor: pointer;
    margin: 17px 0 0 17px;
}
.menu-close {
    font-size: 1.5em;
    cursor: pointer;
    display: none;
    color: #133968;
}
.main-content {
    margin-left: 220px;
    padding: 38px 28px 20px 28px;
    min-height: 100vh;
    transition: margin 0.3s;
    background: #f4f7fa;
}
.btn {
    padding: 8px 22px;
    border-radius: 7px;
    border: none;
    background: linear-gradient(90deg, #2196f3 40%, #3ee4fa 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    margin: 10px 0;
    text-decoration: none;
    box-shadow: 0 2px 8px #2196f369;
    transition: background 0.18s, color 0.18s;
}
.btn:hover {
    background: #133968;
    color: #3ee4fa;
}
.btn-voltar { display: inline-block; margin: 16px 0; }
.form-login {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    padding: 28px 24px;
    border-radius: 9px;
    box-shadow: 0 2px 16px #0001;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-login input[type="text"], .form-login input[type="password"] {
    padding: 10px 8px;
    border: 1px solid #c3c6d1;
    border-radius: 6px;
    font-size: 1em;
}
.form-login button { margin-top: 6px; }

.flash-messages { margin-bottom: 18px; }
.flash { padding: 13px 20px; border-radius: 7px; margin-bottom: 9px; font-weight: 500; }
.flash.success { background: #e3f4fe; color: #1767b3; }
.flash.danger  { background: #ffe3e3; color: #a20000; }
.flash.warning { background: #fff6db; color: #b58900; }

@media (max-width: 950px) {
    .sidebar { width: 180px; }
    .main-content { margin-left: 180px; }
}
@media (max-width: 700px) {
    .sidebar {
        left: -100vw;
        width: 75vw;
        min-width: 185px;
        max-width: 93vw;
        box-shadow: 2px 0 16px #0003;
        background: #f5f8fb;
    }
    .sidebar.active {
        left: 0;
        transition: left 0.32s;
    }
    .menu-hamburger {
        display: block;
        position: fixed;
        top: 18px; left: 17px;
        z-index: 2001;
        background: none;
        border: none;
    }
    .main-content {
        margin-left: 0;
        padding: 74px 8px 18px 8px;
        min-width: 0;
    }
    .sidebar-logo .menu-close { display: block; }
}

/* === MODAL DE IMAGENS === */
#modal-imagem {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.25s ease-in-out;
}

#modal-imagem img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 4px 20px #0008;
}

/* Animação */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === Botões e container do Gerenciar Downloads === */
.btn-tab {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(90deg, #2196f3 40%, #3ee4fa 100%);
    margin-right: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
    display: inline-block;
}

.btn-tab:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px #2196f3aa;
}

.btn-tab.active {
    background: #133968;
    color: #fff;
}

.container-downloads {
    background: #fff;
    padding: 20px 25px;
    border-radius: 10px;
    box-shadow: 0 2px 12px #0001;
    max-width: 800px;
}

/* === EXPLORER DE ARQUIVOS === */
.explorer-upload {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0001;
}

.explorer-upload input[type="file"] {
    flex: 1;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.95em;
    background: #f9f9f9;
}

.explorer-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px #0001;
}

.explorer-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.explorer-list li:last-child {
    border-bottom: none;
}

.explorer-list li:hover {
    background: #f5f9ff;
}

.explorer-list span {
    font-weight: 500;
    color: #333;
}

.btn-danger {
    background: #e53935;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #c62828;
}
