:root {
    --primary: #007bff;
    --primary-hover: #0056b3;
    --danger: #dc3545;
    --danger-hover: #c82333;
    --success: #28a745;
    --bg: #f4f6f8;
    --text: #333;
    --border: #d0d4da;
}

* { box-sizing: border-box; }

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.topbar .brand { font-weight: bold; font-size: 1.05rem; }
.topbar nav a { margin-right: 14px; }

.user-chip {
    display: inline-block;
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 6px;
    margin-right: 10px;
    font-size: 0.9rem;
}

.container {
    max-width: 960px;
    margin: 30px auto;
    padding: 0 20px;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
}

.center-card {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    max-width: 360px;
    margin: 80px auto;
}

label { display: block; margin: 0.6rem 0 0.3rem; font-weight: 600; font-size: 0.92rem; }

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 9px 11px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
    background: #fff;
}

input:focus, select:focus { outline: none; border-color: var(--primary); }

button, .btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
}
button:hover, .btn:hover { background: var(--primary-hover); }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }

.btn-secondary {
    background: #6c757d;
}
.btn-secondary:hover { background: #5a6268; }

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.alert-error { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }
.alert-success { background: #d1e7dd; color: #0a3622; border: 1px solid #badbcc; }

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 0.94rem;
}
th { background: #f0f2f5; font-weight: 600; }
tr:last-child td { border-bottom: none; }

.flex-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: #777; font-size: 0.88rem; }
.tag-admin { background: #ffeaa7; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; }
.tag-user  { background: #dfe6e9; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; }
form.inline { display: inline; margin: 0; }
