/* Global reset & typography */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    background: #f4f6f8;
    color: #333;
    line-height: 1.5;
}

h1, h2, h3 {
    font-weight: 600;
    color: #222;
    margin-bottom: 1rem;
}

a {
    color: #007bff;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header bar */
.header {
    background: #2c3e50;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header .user {
    font-weight: bold;
}
.header a.logout {
    color: #fff;              /* ensures text is white */
    text-decoration: none;
    background: #c00;         /* red background */
    padding: 6px 12px;
    border-radius: 4px;
}

.header a.logout:hover {
    background: #900;         /* darker red on hover */
    color: #fff;              /* keep text white on hover too */
}

/* Login box */
.login-box {
    background: #fff;
    padding: 2rem;
    width: 320px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin: auto;
    margin-top: 10vh;
}
.login-box h2 {
    text-align: center;
    margin-bottom: 1rem;
}
.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="email"] {
    width: 100%;
    padding: 10px;
    margin: 0.5rem 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.login-box input[type="submit"] {
    width: 100%;
    padding: 10px;
    margin-top: 1rem;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.login-box input[type="submit"]:hover {
    background: #0056b3;
}

/* Tables */
table.archive {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
table.archive th,
table.archive td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}
table.archive th {
    background: #f9fafb;
    font-weight: 600;
}
table.archive tr:hover {
    background: #f1f1f1;
}

/* Pagination */
.pagination {
    margin-top: 1rem;
    text-align: center;
}
.pagination a,
.pagination .current {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 12px;
    background: #007bff;
    color: #fff;
    border-radius: 4px;
}
.pagination a:hover {
    background: #0056b3;
}
.pagination .current {
    background: #6c757d;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}
.btn-view {
    background: #007bff;
    color: #fff;
}
.btn-view:hover { background: #0056b3; }
.btn-edit {
    background: #28a745;
    color: #fff;
}
.btn-edit:hover { background: #1e7e34; }
.btn-delete {
    background: #dc3545;
    color: #fff;
}
.btn-delete:hover { background: #a71d2a; }

/* Forms (edit/add pages) */
.form-container {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    border-radius: 8px;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
textarea { min-height: 80px; }
.form-container input[type="submit"] {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
}
.form-container input[type="submit"]:hover {
    background: #1e7e34;
}

/* Messages */
.success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    margin: 1rem auto;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    max-width: 600px;
}
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    margin: 1rem auto;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    max-width: 600px;
}

/* Action links row (back + edit) */
.artifact-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}
.artifact-actions a {
    font-weight: bold;
}