/* ─── Base ─────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --navy:       #12172b;
    --navy-mid:   #1e2640;
    --accent:     #4f6ef7;
    --accent-dim: #3a56d4;
    --surface:    #ffffff;
    --bg:         #f0f2f7;
    --border:     #e2e5ef;
    --text:       #1a1f36;
    --muted:      #6b7280;
    --danger:     #e5383b;
    --radius:     6px;
    --shadow:     0 2px 12px rgba(18,23,43,.10);
    --shadow-md:  0 4px 24px rgba(18,23,43,.14);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─── Typography ────────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--text);
}

/* ─── Navbar / Top bar ──────────────────────────────────────────────────────── */

.app-topbar {
    background: var(--navy);
    color: #fff;
    padding: 0 1.5rem;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-topbar .brand {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
}

.app-topbar .brand span {
    color: var(--accent);
}

.app-topbar nav a {
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 13px;
    padding: 0 .75rem;
    transition: color .15s;
}

.app-topbar nav a:hover { color: #fff; }

/* ─── Page wrapper ──────────────────────────────────────────────────────────── */

.app-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem;
}

/* ─── Cards ─────────────────────────────────────────────────────────────────── */

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .18s, transform .18s;
    background: var(--surface);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-img-top {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    background: var(--bg);
    border-radius: 0;
    margin: 0;
}

.card-body {
    padding: .75rem 1rem;
}

.card-body + .card-body {
    padding-top: 0;
    border-top: 1px solid var(--border);
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: .25rem;
    color: var(--text);
}

.card-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    margin-right: .75rem;
    transition: color .15s;
}

.card-link:hover { color: var(--accent-dim); }

/* ─── Badges ────────────────────────────────────────────────────────────────── */

.badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.bg-danger { background: var(--danger) !important; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: .01em;
    padding: .45rem 1.1rem;
    transition: background .15s, box-shadow .15s, transform .1s;
}

.btn:active { transform: scale(.98); }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 3px rgba(79,110,247,.25);
}

/* ─── Forms ─────────────────────────────────────────────────────────────────── */

.form-control, .form-select {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 13px;
    padding: .45rem .75rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79,110,247,.18);
    outline: none;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .35rem;
}

/* ─── Login page ────────────────────────────────────────────────────────────── */

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 2.25rem 2rem;
}

.login-card .login-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--navy);
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-card .login-logo span { color: var(--accent); }

/* ─── Search bar ────────────────────────────────────────────────────────────── */

.search-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.5rem;
    display: flex;
    gap: .75rem;
    align-items: center;
    position: sticky;
    top: 52px;
    z-index: 90;
    box-shadow: 0 1px 4px rgba(18,23,43,.06);
}

.search-bar .form-control {
    max-width: 340px;
}

/* ─── Utility ───────────────────────────────────────────────────────────────── */

.text-muted { color: var(--muted) !important; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 767.98px) {
    .card-body {
        padding: .5rem .6rem;
    }
    .card-title {
        font-size: 11px;
    }
}