:root {
    --ink: #183153;
    --ink-soft: #45688f;
    --accent: #ff7a18;
    --accent-soft: #ffd8b6;
    --bg: #f6f8fc;
    --card: #ffffff;
    --ok: #0d9b6c;
    --warn: #d97706;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 5% 0%, #fff5eb 0%, transparent 25%),
        radial-gradient(circle at 95% 10%, #eef5ff 0%, transparent 20%),
        var(--bg);
}

.app-navbar {
    background: linear-gradient(90deg, #183153 0%, #274f79 55%, #2f6ca4 100%);
    box-shadow: 0 8px 24px rgba(24, 49, 83, 0.18);
}

.navbar-brand {
    color: #fff;
    letter-spacing: 0.02rem;
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: #fff;
}

.brand-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px rgba(255, 122, 24, 0.22);
}

.nav-link {
    color: rgba(255, 255, 255, 0.86);
    border-radius: 0.6rem;
    padding: 0.5rem 0.72rem;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
}

.app-card {
    border: 0;
    border-radius: 1rem;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(24, 49, 83, 0.08);
}

.stat-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: auto -25% -35% auto;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 122, 24, 0.12);
    z-index: -1;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #2b5c8d, #183153);
}

.table thead th {
    font-size: 0.78rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.04rem;
}

.badge-soft {
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.76rem;
}

.badge-soft.ok {
    color: var(--ok);
    background: rgba(13, 155, 108, 0.13);
}

.badge-soft.warn {
    color: var(--warn);
    background: rgba(217, 119, 6, 0.15);
}

.badge-soft.danger {
    color: var(--danger);
    background: rgba(220, 38, 38, 0.14);
}

.form-control,
.form-select {
    border-radius: 0.72rem;
    border-color: #d9e0ea;
    padding: 0.58rem 0.78rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #87a9cf;
    box-shadow: 0 0 0 0.2rem rgba(76, 131, 186, 0.2);
}

.btn {
    border-radius: 0.75rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2f6ca4 0%, #234b71 100%);
    border: 0;
}

.btn-outline-secondary {
    border-color: #c5d0df;
    color: #3c597a;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.1rem;
}

.login-card {
    max-width: 430px;
    width: 100%;
    border: 0;
    border-radius: 1.15rem;
    background: #fff;
    box-shadow: 0 20px 36px rgba(22, 44, 73, 0.18);
}

.small-muted {
    color: #6c87a8;
    font-size: 0.85rem;
}

.search-form-wrap {
    width: 100%;
    max-width: 560px;
}

.search-suggest-wrap {
    position: relative;
    flex: 1 1 280px;
}

.search-suggestions {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 1050;
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 0.75rem;
    box-shadow: 0 10px 24px rgba(24, 49, 83, 0.14);
    max-height: 240px;
    overflow-y: auto;
}

.search-suggestions.show {
    display: block;
}

.search-suggestion-item {
    width: 100%;
    text-align: left;
    background: #fff;
    border: 0;
    padding: 0.58rem 0.78rem;
}

.search-suggestion-item + .search-suggestion-item {
    border-top: 1px solid #eef2f8;
}

.search-suggestion-item:hover,
.search-suggestion-item.active {
    background: #f2f7ff;
}

@media (max-width: 767.98px) {
    .table-responsive {
        border-radius: 0.75rem;
    }

    .stat-card h3 {
        font-size: 1.35rem;
    }

    .search-form-wrap {
        max-width: 100%;
    }
}
