body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e2f;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

.container,
.container-sm {
    max-width: 1000px;
    margin: 25px auto;
    background: #2c2c3a;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.container-sm {
    max-width: 600px;
}

h2 {
    color: #fff;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    font-weight: 600;
}

.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-weight: 500;
}

.alert.success {
    background-color: #1e3d2f;
    color: #2ecc71;
    border: 1px solid #27ae60;
    margin-top: 15px;
}

.alert.error {
    background-color: #3d1e1e;
    color: #e74c3c;
    border: 1px solid #c0392b;
}

.alert.info {
    background-color: #1e2f3d;
    color: #3498db;
    border: 1px solid #2980b9;
    margin-top: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 6px;
    overflow: hidden;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #3a3a4a;
}

th {
    background-color: #3498db;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

tr:hover {
    background-color: #3a3a4a;
}

/* AJUSTE AQUI: Garante altura igual para links e botões */
.btn {
    padding: 10px 14px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    color: #fff;
    background-color: #444;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, background 0.3s;
    /* Ajustes para igualar altura, fonte e peso */
    box-sizing: border-box;
    line-height: 1.2;
    vertical-align: middle;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: #fff !important;
    text-decoration: none !important;
}

.btn-primary {
    background-color: #3498db;
}

.btn-update {
    background-color: #2ecc71;
}

.btn-delete {
    background-color: #e74c3c;
}

.ativo {
    color: #2ecc71;
    font-weight: bold;
}

.inativo {
    color: #e74c3c;
    font-weight: bold;
}

a {
    color: #3498db;
    font-weight: bold;
    transition: color 0.3s;
}

a:hover {
    color: #5dade2;
    text-decoration: underline;
}

form {
    margin-top: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #ccc;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #555;
    border-radius: 6px;
    box-sizing: border-box;
    background: #1e1e2f;
    color: #fff;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
textarea,
select {
    width: 400px !important;
}

.form-inline {
    display: inline;
    margin: 0;
    padding: 0;
}

.main-header {
    background-color: #111827;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.3s, color 0.3s;
}

.main-nav a:hover {
    background-color: #1f2937;
    color: #60a5fa;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 15px 0;
    border-top: 1px solid #333;
    color: #aaa;
    font-size: 0.9rem;
}

select#status_ativo {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #555;
    border-radius: 6px;
    box-sizing: border-box;
    background-color: #1e1e2f;
    color: #fff;
    font-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23ccc' d='M9.293 12.95l.707.707 5-5-1.414-1.414L10 10.828 6.414 7.242 5 8.656z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

select#status_ativo:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5);
}

select#status_ativo option {
    background-color: #2c2c3a;
    color: #e0e0e0;
}

select#status_ativo option[value="1"] {
    color: #2ecc71;
}

select#status_ativo option[value="0"] {
    color: #e74c3c;
}

/* --- Estilos da Página de Login --- */

.login-container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background: #2c2c3a;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.login-container h2 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 25px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #555;
    border-radius: 6px;
    box-sizing: border-box;
    background: #1e1e2f;
    color: #fff;
}

.login-container button {
    padding: 12px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #2e86c1;
}

.alert.error {
    background-color: #3d1e1e;
    color: #e74c3c;
    border: 1px solid #c0392b;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 6px;
}

.alert.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    margin-top: 15px;
}

/* --- Estilos do Menu Dropdown --- */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #111827;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.6);
    z-index: 100;
    border-radius: 6px;
    margin-top: 2px;
    overflow: hidden;
    border: 1px solid #1f2937;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: normal;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background-color: #1f2937;
    color: #60a5fa;
    text-decoration: none;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Ajuste para Dropdown dentro da Tabela */
td .dropdown-content {
    right: 0;
    text-align: left;
    top: 35px;
    margin-top: 0;
}

/* Técnica de segurança: cria uma área invisível para o mouse não "perder" o menu */
td .dropdown-content::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

td .dropdown-content a {
    font-weight: normal;
    text-decoration: none;
}

/* Garante que a tabela não corte o dropdown */
table {
    overflow: visible;
}

/* Estilização Geral para Selects (Status e Produto) */
select {
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #555;
    border-radius: 6px;
    box-sizing: border-box;
    background-color: #1e1e2f;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23ccc' d='M9.293 12.95l.707.707 5-5-1.414-1.414L10 10.828 6.414 7.242 5 8.656z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.5);
}

select option {
    background-color: #2c2c3a;
    color: #e0e0e0;
    padding: 10px;
}

select#status_ativo option[value="1"] {
    color: #2ecc71;
}

select#status_ativo option[value="0"] {
    color: #e74c3c;
}