/* ==================== RESET E BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f0f8ff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 20px;
}

/* ==================== LOGIN ==================== */
.container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
    margin-top: 60px;
}

.container .logo img {
    max-width: 100px;
    height: auto;
    margin-bottom: 20px;
}

.container h1 {
    font-size: 24px;
    color: #0056b3;
    margin-bottom: 20px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 20px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #34495e;
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.5);
}

.container-pass {
    position: relative;
    margin-bottom: 20px;
}

.container-pass i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #34495e;
}

input[type="submit"] {
    background-color: #34495e;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #2c3e50;
}

/* ==================== TOPBAR COM TABS ==================== */
.topbar {
    width: 100%;
    background-color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    color: white;
}

.topbar .logo {
    display: flex;
    align-items: center;
}

.topbar .logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.topbar .tabs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.topbar .tablink {
    background-color: transparent;
    border: none;
    color: white;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.topbar .tablink:hover,
.topbar .tablink.active {
    background-color: #34495e;
}

/* Botão logout à direita com cor distinta */
.topbar .logout {
    margin-left: 20px;
    background-color: transparent;
    color: white;
    border: none;
    font-weight: bold;
    padding: 14px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.topbar .logout:hover {
    background-color: #e74c3c;
}

/* ==================== TABS CONTENT ==================== */
.tabcontent-container {
    margin-top: 80px;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
}

.tabcontent {
    display: none;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.tabcontent.active {
    display: block;
}

.tablink.active {
    background-color: #34495e;
    color: white;
}


/* ==================== MODAL POPUP ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.5);
    padding-top: 60px;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border-radius: 12px;
    width: 95%;
    max-width: 1100px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    position: relative;
}

.modal h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #e74c3c;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.tabela {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
}

.tabela th, .tabela td {
    padding: 14px 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.tabela th {
    background-color: #2c3e50;
    color: #fff;
}

.tabela tbody tr:nth-child(even) td {
    background-color: #f5f9fc;
}

.tabela tbody tr:hover td {
    background-color: #e6f0fa;
}

.lock-title {
    margin-top: 30px;
    font-size: 18px;
    color: #34495e;
    border-left: 5px solid #2c3e50;
    padding-left: 10px;
}

.btn-fechar {
    display: inline-block;
    margin-top: 30px;
    background-color: #34495e;
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-fechar:hover {
    background-color: #2c3e50;
}

/* Estilo geral dos campos no modal */
.form-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

/* Inputs com ícones */
.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: #34495e;
    font-size: 16px;
}

.input-with-icon input {
    padding-left: 35px;
    width: 100%;
}

/* Grupo de inputs */
.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.iconbtn {
    background-color: #2980b9;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.iconbtn:hover {
    background-color: #2471a3;
}

/* Radios agrupados lado a lado */
.radio-group {
    display: flex;
    gap: 20px;
    margin: 10px 0 20px 0;
    align-items: center;
}

.labelradio {
    margin-right: 20px;
    font-weight: normal;
    font-size: 15px;
    color: #34495e;
}

/* Date inputs */
.date-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}

.date-input:focus {
    outline: none;
    border-color: #34495e;
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.5);
}


/* ==================== Lista de Fechaduras ==================== */
.device-list {
    margin-bottom: 1rem;
}

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.device-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.device-option:hover {
    background-color: #eaf4ff;
    border-color: #2980b9;
}

.device-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2980b9;
    cursor: pointer;
}




/* ==================== Botões Submit (Enviar) ==================== */
button[type="submit"] {
    background-color: #34495e;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #2c3e50;
}

.btn-principal {
    background-color: #34495e;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-principal:hover {
    background-color: #2c3e50;
}

/* ==================== LISTAGEM DE FECHADURAS ==================== */
.input-pesquisa {
    padding: 10px 14px;
    width: 100%;
    max-width: 300px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-pesquisa:focus {
    border-color: #34495e;
    box-shadow: 0 0 4px rgba(0, 86, 179, 0.3);
    outline: none;
}

.tabela-dados {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.tabela-dados th,
.tabela-dados td {
    padding: 12px 14px;
    border: 1px solid #ddd;
    text-align: center;
}

.tabela-dados th {
    background-color: #2c3e50;
    color: #fff;
}

.tabela-dados tbody tr:nth-child(even) {
    background-color: #f5f9fc;
}

.tabela-dados tbody tr:hover {
    background-color: #e6f0fa;
}

.tabela-dados i {
    font-size: 18px;
    transition: color 0.2s;
}

.tabela-dados a:hover i {
    color: #2980b9 !important;
}
.linha-offline {
    background-color: #ffcccc !important; /* vermelho claro */
}

/* ==================== MENU HAMBURGUER ==================== */
.menu-toggle {
    display: none;
    background: transparent;
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
}

/* Estilo para tabs abertas em modo mobile */
.tabs.show {
    display: flex !important;
}

/* ==================== RESPONSIVO ==================== */
@media (max-width: 768px) {
    .topbar {
        flex-direction: row;       /* Mantém logo e botão na mesma linha */
        justify-content: space-between;
        height: 60px;
        align-items: center;
        padding: 0 15px;
    }

    /* Mostrar botão hamburguer */
    .menu-toggle {
        display: block;
    }

    /* Esconder tabs por padrão */
    .topbar .tabs {
        display: none;
        flex-direction: column;
        background-color: #2c3e50;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 9;
    }

    .topbar .tablink,
    .topbar .logout {
        width: 100%;
        text-align: left;
        padding: 12px 20px;
        border-top: 1px solid #34495e;
    }
}

/* Estilo para labels de formulários */
label {
    font-size: 15px;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 8px;
    display: block;
}

/* Estilo para selects */
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    font-size: 15px;
    color: #34495e;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='%2334495e' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus {
    outline: none;
    border-color: #34495e;
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.4);
}
.btn-copiar {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-copiar:hover {
    background-color: #34495e;
    transform: translateY(-1px);
}

.btn-copiar:active {
    background-color: #34495e;
    transform: translateY(0);
}


/*Estilo botão selecionar tudo */
.btn-selecionar-tudo {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
}

.btn-selecionar-tudo:hover {
    background-color: #2c3e50;
    transform: translateY(-1px);
}

.btn-selecionar-tudo:active {
    transform: translateY(0);
}



