/* ==========================================
   CONFIGURAÇÕES GLOBAIS
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f4f6f9;
    color: #333;
    min-height: 100vh;
}

/* ==========================================
   ESTRUTURA DO PAINEL (DASHBOARD)
   ========================================== */
.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    width: 250px;
    min-width: 250px; /* Garante que o menu não vai espremer */
    background: #2c3e50;
    color: #fff;
    padding: 20px;
}

.sidebar h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 20px;
    letter-spacing: 1px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li a {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    background: #34495e;
    padding-left: 20px;
}

.main-content {
    flex: 1;
    padding: 30px;
    background: #f4f6f9;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

/* ==========================================
   FORMULÁRIOS E COMPONENTES
   ========================================== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
}

.btn-primary { background: #3498db; }
.btn-success { background: #2ecc71; }
.btn-danger { background: #e74c3c; }
.btn-secondary { background: #95a5a6; }

/* ==========================================
   TABELAS E ACOES
   ========================================== */
.table-responsive {
    margin-top: 25px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background: #f8f9fa;
    color: #2c3e50;
}

.actions {
    display: flex;       
    flex-direction: row;
    align-items: center; 
    justify-content: flex-start;
    gap: 6px;            
    white-space: nowrap;
}

/* Garante que qualquer botão ou link dentro da coluna de ações fique na mesma linha sem quebrar */
.actions .btn,
.actions a,
.actions span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.scanner-box {
    background: #e8f4fd;
    border-left: 5px solid #3498db;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}
.alert-danger { background: #f8d7da; color: #721c24; }

/* ==========================================
   TELA DE LOGIN EXCLUSIVA 
   (Aplica o Flexbox apenas quando a classe .login-page estiver ativa)
   ========================================== */
.login-page {
    background: #2c3e50 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
}

.login-container {
    background: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #2c3e50;
    text-align: center;
    font-size: 24px;
}

.login-container .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}
.login-container .btn-primary:hover {
    background: #2980b9;
}