/* css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #4A90E2;
    --secondary-color: #50E3C2;
    --accent-color: #FFC107;
    --background-color: #f4f7f6;
    --text-color: #333;
    --border-color: #ddd;
    --danger-color: #dc3545;
    --success-color: #28a745;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 0;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

header h1 {
    margin: 0;
    font-size: 2em;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    background-color: #3a7bd5; /* Um tom mais escuro para a navegação */
    border-radius: 0 0 8px 8px;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.form-group {
    margin-bottom: 15px;
}

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

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* Garante que padding e border não aumentem o width */
    margin-top: 5px;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

button,
.button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover,
.button:hover {
    background-color: #367ac8;
}

button.danger,
.button.danger {
    background-color: var(--danger-color);
}

button.danger:hover,
.button.danger:hover {
    background-color: #c82333;
}

.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-weight: 600;
}

.message.success {
    background-color: #d4edda;
    color: var(--success-color);
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: var(--danger-color);
    border: 1px solid #f5c6cb;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden; /* Garante que bordas arredondadas funcionem com overflow */
}

table thead {
    background-color: var(--primary-color);
    color: #fff;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:nth-child(even) {
    background-color: #f8f8f8;
}

table tbody tr:hover {
    background-color: #f1f1f1;
}

table td .actions a {
    margin-right: 10px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

table td .actions a:hover {
    text-decoration: underline;
}

table td .actions button {
    padding: 5px 10px;
    font-size: 0.9em;
}

/* Login Page Specific Styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
}

.login-container .form-group {
    text-align: left;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    color: #666;
    font-size: 0.9em;
}

/* Modal Styling (for delete confirmation) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
