:root {
    --navy: #16233a;
    --navy-light: #223251;
    --orange: #e8571f;
    --bg: #f4f5f7;
    --white: #ffffff;
    --text: #1c2430;
    --muted: #667085;
    --border: #e2e5eb;
    --green: #1a7f4e;
    --red: #c0392b;
    --radius: 8px;
}

* { box-sizing: border-box; }

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

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

h1 { font-size: 1.7rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 0.4rem; color: var(--navy); }

/* --- Auth / install pagina --- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
}
.auth-box {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 360px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.auth-box h1 { color: var(--navy); }
.subtitle { color: var(--muted); margin-top: -0.5rem; margin-bottom: 1.5rem; }
.auth-box form { display: flex; flex-direction: column; gap: 1rem; }
.auth-box label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
.footer-link { margin-top: 1.5rem; font-size: 0.9rem; }

input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
}

button {
    background: var(--orange);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 600;
}
button:hover { background: #cf4c17; }
button.small { padding: 0.35rem 0.7rem; font-size: 0.85rem; font-weight: 500; }
button.danger { background: var(--white); color: var(--red); border: 1px solid var(--red); }
button.danger:hover { background: #fdecea; }

.error { color: var(--red); font-weight: 600; }
.success { color: var(--green); font-weight: 600; }
.warning { color: #a15c00; font-weight: 600; }

/* --- Admin layout --- */
.topnav {
    background: var(--navy);
    color: var(--white);
}
.topnav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 56px;
}
.brand { font-weight: 700; letter-spacing: 0.02em; }
.topnav nav { display: flex; gap: 1.25rem; flex: 1; }
.topnav nav a { color: #c9d2e0; font-size: 0.95rem; }
.topnav nav a.active, .topnav nav a:hover { color: var(--white); text-decoration: none; }
.nav-right { font-size: 0.85rem; color: #9aa8c0; }
.nav-right a { color: #c9d2e0; }

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.cards { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.4rem;
    display: flex;
    flex-direction: column;
    min-width: 180px;
}
.card-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.card-value { font-size: 1.8rem; font-weight: 700; color: var(--navy); margin-top: 0.2rem; }

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.table th, .table td {
    text-align: left;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
    vertical-align: middle;
}
.table th { background: #fafbfc; color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.02em; }
.table tr:last-child td { border-bottom: none; }

.badge { padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.badge-active { background: #e6f6ee; color: var(--green); }
.badge-inactive { background: #f1f2f4; color: var(--muted); }

.actions { display: flex; gap: 0.5rem; }

.inline-form { display: inline-flex; gap: 0.4rem; align-items: center; margin: 0; }
.row-form { display: flex; gap: 1.25rem; align-items: flex-end; flex-wrap: wrap; }
.row-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }

.checkbox-label {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--text);
    flex-wrap: wrap;
}
.checkbox-label input { margin: 0; }
.checkbox-label .hint { margin: 0; font-size: 0.85rem; }

.button {
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    padding: 0.55rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}
.button:hover { background: var(--navy-light); text-decoration: none; }

.hint { color: var(--muted); font-size: 0.88rem; }
.empty-state { color: var(--muted); font-style: italic; padding: 1rem 0; }

.textblok {
    width: 100%;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
}

.textblok-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.textblok-grid h3 {
    font-size: 0.9rem;
    margin: 0 0 0.4rem;
    color: var(--muted);
    font-weight: 600;
}
.textblok-grid h3 a { font-weight: 400; }
@media (max-width: 700px) {
    .textblok-grid { grid-template-columns: 1fr; }
}

code {
    background: #f1f2f4;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
}
