:root {
    --ifac-blue: #003a70;
    --ifac-blue-dark: #002850;
    --accent: #0a7d3f;
    --bg: #f4f6f9;
    --card: #ffffff;
    --border: #e2e6ec;
    --text: #1c2530;
    --muted: #63707f;
    --danger: #b32020;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: var(--ifac-blue-dark);
    color: #cfe0f0;
    font-size: .78rem;
    padding: 4px 20px;
    letter-spacing: .3px;
}

.app-header {
    background: var(--ifac-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}

.brand { color: #fff; text-decoration: none; font-size: 1.25rem; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.user { font-size: .9rem; opacity: .9; }
.btn-link { color: #cfe0f0; text-decoration: none; font-size: .9rem; }
.btn-link:hover { text-decoration: underline; }

.container { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 28px 20px; }

h1 { color: var(--ifac-blue); margin: 0 0 6px; font-size: 1.6rem; }
h2 { margin: 0 0 4px; font-size: 1.15rem; color: var(--ifac-blue); }
h3 { margin: 0 0 4px; font-size: 1.05rem; }
.muted { color: var(--muted); margin: 4px 0; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }

.section-card {
    display: flex;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .15s;
}
.section-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); transform: translateY(-2px); }
.section-icon { font-size: 2rem; line-height: 1; }

.badge {
    display: inline-block;
    background: #eef2f7;
    color: var(--muted);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: .78rem;
    margin-top: 8px;
}
.badge.unavailable { background: #fbe9e9; color: var(--danger); }

.file-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 12px; }
.file-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.file-info { flex: 1; }

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary:hover { background: #0a6d37; }

.login-wrap { display: flex; justify-content: center; padding-top: 30px; }
.login-card { width: 100%; max-width: 400px; }
.login-card.center { text-align: center; }
.login-card form { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.login-card label { font-size: .85rem; font-weight: 600; margin-top: 8px; }
.login-card input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}
.login-card input:focus { outline: 2px solid var(--ifac-blue); border-color: transparent; }
.login-card .btn-primary { margin-top: 16px; }

.alert { background: #eef2f7; border-left: 4px solid var(--muted); padding: 10px 14px; border-radius: 6px; margin: 12px 0; }
.alert.error { background: #fbe9e9; border-left-color: var(--danger); color: var(--danger); }

.site-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 18px; }
