/* ==== Reset & global ==== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background: #f4f7fa;
    color: #333;
    padding: 20px;
}

/* ==== Headings ==== */
h1, h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    font-size: 1.5em;
}

/* ==== Containers ==== */
.container {
    max-width: 900px;
    margin: 0 auto 40px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==== Tables ==== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background: #2c3e50;
    color: #fff;
    font-weight: 600;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

/* ==== Forms ==== */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
}

input:focus, select:focus {
    border-color: #007BFF;
    outline: none;
}

/* ==== Buttons ==== */
button {
    padding: 10px 20px;
    background: #007BFF;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #0056b3;
}

/* ==== Links as buttons ==== */
a.button {
    display: inline-block;
    padding: 10px 20px;
    background: #28a745;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
    margin-top: 10px;
}

a.button:hover {
    background: #1e7e34;
}

/* ==== Admin actions ==== */
td a {
    text-decoration: none;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

td a.delete {
    background: #dc3545;
}

td a.delete:hover {
    background: #c82333;
}

td a.edit {
    background: #ffc107;
    color: #333;
}

td a.edit:hover {
    background: #e0a800;
}

/* ==== Messages ==== */
p.error {
    color: #dc3545;
    font-weight: bold;
}

p.success {
    color: #28a745;
    font-weight: bold;
}

/* ==== Responsive ==== */
@media(max-width: 600px) {
    table, th, td {
        font-size: 0.9em;
    }

    .container {
        padding: 15px;
    }

    button, a.button {
        width: 100%;
        text-align: center;
    }
}
