* { box-sizing: border-box; }

:root {
    --brand: #083A85;
    --brand-dark: #062a63;
    --bg: #f4f5f7;
    --border: #dcdfe4;
    --text: #1b1b18;
    --muted: #666;
    --success-bg: #e6f4ea;
    --success-text: #1e7e34;
    --error-bg: #fdecea;
    --error-text: #b3261e;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--brand); }

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--brand);
    color: #fff;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
}

.brand-logo {
    height: 32px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav a:hover { opacity: 1; text-decoration: underline; }

.logout-form button {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.logout-form button:hover { background: rgba(255,255,255,0.15); }

.content-wrap {
    flex: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
    width: 100%;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 16px;
}

h1 { margin-top: 0; font-size: 1.4rem; }
h2 { font-size: 1.15rem; }

.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-success { background: var(--success-bg); color: var(--success-text); }
.alert-error { background: var(--error-bg); color: var(--error-text); }
.alert-error ul { margin: 0; padding-left: 18px; }

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9rem;
}

th, td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

th { background: #f0f1f4; font-weight: 600; }

tr:hover td { background: #fafbfc; }

.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

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

.btn-secondary {
    background: #fff;
    color: var(--brand);
    border: 1px solid var(--brand);
}

.btn-danger {
    background: #fff;
    color: var(--error-text);
    border: 1px solid var(--error-text);
}

.btn-sm { padding: 4px 10px; font-size: 0.8rem; }

form.inline { display: inline; }

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

label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-row .form-group { flex: 1; min-width: 160px; }

.login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px;
    text-align: center;
}

.login-card img { height: 40px; display: block; }

.logo-chip {
    background: var(--brand);
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    background: #eef1f7;
    color: var(--brand);
}

.text-muted { color: var(--muted); font-size: 0.85rem; }
