:root {
    --navy: #071b2d;
    --navy2: #0c2941;
    --blue: #126c91;
    --cyan: #23b9c7;
    --bg: #f3f7fa;
    --white: #ffffff;
    --text: #152b3b;
    --muted: #6f8190;
    --green: #21a77a;
    --orange: #e7a338;
    --red: #d95a5a;
    --border: #dce6ec;
}

* {
    box-sizing: border-box;
}

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

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    padding: 34px 24px;
    background: linear-gradient(180deg, var(--navy), #0b314a);
    color: white;
}

.brand {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.brand span {
    color: var(--cyan);
}

.subtitle {
    color: #9eb8c8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 45px;
}

.nav a {
    display: block;
    padding: 13px 14px;
    margin: 7px 0;
    color: #d9e7ee;
    text-decoration: none;
    border-radius: 10px;
}

.nav a:hover,
.nav a.active {
    background: rgba(255,255,255,.10);
    color: white;
}

.main {
    margin-left: 250px;
    padding: 42px;
    max-width: 1450px;
}

h1 {
    font-size: 32px;
    margin: 0 0 6px;
}

.lead {
    color: var(--muted);
    margin-bottom: 32px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat,
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 7px 24px rgba(20,55,75,.06);
}

.stat {
    padding: 22px;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
}

.stat-label {
    color: var(--muted);
    margin-top: 5px;
}

.green { color: var(--green); }
.orange { color: var(--orange); }
.red { color: var(--red); }
.blue { color: var(--blue); }

.card {
    padding: 26px;
    margin-bottom: 22px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    display: inline-block;
    border: 0;
    background: var(--cyan);
    color: #062536;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

th {
    text-align: left;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .7px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid #edf2f5;
}

.badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.valid {
    color: #137453;
    background: #e4f6ef;
}

.badge.warning {
    color: #94600c;
    background: #fff2d9;
}

.badge.expired {
    color: #a23c3c;
    background: #fde6e6;
}

.badge.unknown {
    color: #667784;
    background: #edf2f5;
}

form {
    max-width: 800px;
}

label {
    display: block;
    font-weight: 700;
    margin: 17px 0 7px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font: inherit;
    background: white;
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.compliance-box {
    padding: 22px;
    background: #eef9fa;
    border-radius: 14px;
    border: 1px solid #c8e9ec;
}

@media(max-width: 850px) {
    .sidebar {
        position: relative;
        width: 100%;
    }

    .main {
        margin-left: 0;
        padding: 22px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .grid2 {
        grid-template-columns: 1fr;
    }
}

.page-heading {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin-bottom:28px;
}

.flash {
    padding:14px 18px;
    border-radius:12px;
    margin-bottom:20px;
}

.flash.success {
    background:#e3f5ed;
    color:#126b4d;
}

.flash.danger {
    background:#fde6e6;
    color:#9a3737;
}

.flash.info {
    background:#e8f3f8;
    color:#225c78;
}

.login-page {
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:
        linear-gradient(
            135deg,
            #061827,
            #0b334c
        );
}

.login-card {
    width:min(440px, calc(100% - 40px));
    background:white;
    border-radius:24px;
    padding:38px;
    box-shadow:
        0 20px 70px rgba(0,0,0,.25);
}

.login-card .brand {
    color:#071b2d;
}

.login-card .subtitle {
    margin-bottom:30px;
}

.btn-full {
    width:100%;
}

.secondary {
    background:#e7f2f6;
    color:#0a4b68;
}

.danger-button {
    padding:11px 16px;
    background:#fff;
    color:#bb4444;
    border:1px solid #e6bcbc;
    border-radius:10px;
    cursor:pointer;
}

.detail-grid {
    display:grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap:28px;
}

.detail-grid > div {
    display:flex;
    flex-direction:column;
    gap:8px;
}

.detail-label {
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.7px;
    color:var(--muted);
}

.filterbar {
    display:grid;
    grid-template-columns:
        2fr 1fr auto;
    gap:12px;
    max-width:none;
}

.empty-state {
    text-align:center;
    padding:45px 20px;
}

a {
    color:var(--blue);
    text-decoration:none;
}

hr {
    border:0;
    border-top:1px solid var(--border);
    margin:28px 0;
}

@media(max-width:850px) {

    .page-heading {
        align-items:flex-start;
        flex-direction:column;
    }

    .detail-grid {
        grid-template-columns:1fr 1fr;
    }

    .filterbar {
        grid-template-columns:1fr;
    }
}
