/* Admin portal — standalone styles */
:root {
    --primary: #1e3a5f;
    --accent: #19c6b7;
    --bg: #eef2f7;
    --surface: #ffffff;
    --border: #dde4ec;
    --text: #3d4f63;
    --muted: #6b7c93;
    --danger: #c0392b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Full-screen login */
body.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(145deg, #1e3a5f 0%, #2d5a8e 50%, #1a3352 100%);
}

.login-panel {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.login-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-brand h1 {
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.login-brand p {
    color: var(--muted);
    font-size: 0.92rem;
}

.login-brand .badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.65rem;
    border-radius: 99px;
    margin-bottom: 0.75rem;
}

.login-logo {
    display: block;
    max-width: 200px;
    width: 100%;
    height: auto;
    margin: 0 auto 0.75rem;
    object-fit: contain;
}

/* App layout */
.app-header {
    background: var(--primary);
    color: #fff;
    padding: 0.85rem 1.25rem;
}

.app-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-brand { color: #fff; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.app-brand span { color: var(--accent); }
.app-brand-logo { border-radius: 6px; object-fit: contain; flex-shrink: 0; }

.app-nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.app-nav a { color: rgba(255,255,255,0.9); font-size: 0.9rem; }
.app-nav a:hover { color: #fff; }

.app-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(21,37,54,0.05);
}

.card h1, .card h2 { color: #152536; font-size: 1.3rem; margin-bottom: 0.75rem; }
.card p { color: var(--muted); margin-bottom: 1rem; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.tile {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: 0.2s;
}

.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile h3 { color: var(--primary); font-size: 1rem; margin-bottom: 0.3rem; }
.tile p { font-size: 0.85rem; color: var(--muted); margin: 0; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }

.pin-input { letter-spacing: 0.3em; text-align: center; font-size: 1.2rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; }

.login-footer-links { text-align: center; margin-top: 1.25rem; font-size: 0.9rem; color: var(--muted); }
.login-footer-links a { font-weight: 600; }

.alert { padding: 0.85rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.92rem; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-success { background: #d4edda; color: #155724; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; }
th, td { padding: 0.7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

@media (max-width: 600px) {
    .login-panel { padding: 1.5rem 1.25rem; }
    .app-header-inner { flex-direction: column; align-items: flex-start; }
}
