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

:root {
    --blue-hero-start : #1c3faa;
    --blue-hero-end   : #4361ee;
    --blue-accent     : #4361ee;
    --blue-light      : #e8edff;
    --blue-mid        : #c5d0ff;
    --navy             : #0d1b4b;
    --text-dark        : #1a1f36;
    --text-muted       : #6b7280;
    --bg               : #f4f6fc;
    --card-bg          : #ffffff;
    --border           : #e2e8f0;
    --green            : #16a34a;
    --green-bg         : #dcfce7;
    --yellow           : #b45309;
    --yellow-bg        : #fef3c7;
    --orange           : #c2410c;
    --orange-bg        : #ffedd5;
    --red              : #dc2626;
    --red-bg           : #fee2e2;
    --radius           : 12px;
    --radius-sm        : 8px;
    --shadow-card      : 0 2px 12px rgba(0, 0, 0, .07);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Top bar ─────────────────────────────────────────── */
.top-bar {
    background: var(--navy);
    padding: .55rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
}

.top-bar a {
    color: #c5d0ff;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .35rem;
    transition: color .2s;
}

.top-bar a:hover { color: #fff; }

/* ─── Hero ────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--blue-hero-start) 0%, var(--blue-hero-end) 100%);
    padding: 3.5rem 1.5rem 4rem;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    border: 1.5px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    padding: .3rem .95rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, .9);
}

.hero h1 {
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: .6rem;
}

.hero h1 span { color: #c5d0ff; }

.hero p {
    font-size: 1rem;
    color: rgba(255, 255, 255, .78);
    max-width: 520px;
    margin: 0 auto 2.2rem;
}

/* ─── Search card ─────────────────────────────────────── */
.search-wrap {
    max-width: 620px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.search-card {
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, .25);
    border-radius: var(--radius);
    padding: 1.4rem;
}

.search-row {
    display: flex;
    gap: .6rem;
}

.search-row input {
    flex: 1;
    padding: .78rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: .97rem;
    font-weight: 500;
    outline: none;
    transition: border-color .2s, background .2s;
}

.search-row input::placeholder { color: rgba(255, 255, 255, .55); }

.search-row input:focus {
    border-color: rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .25);
}

.search-row button {
    padding: .78rem 1.6rem;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--blue-accent);
    font-family: 'Inter', sans-serif;
    font-size: .92rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .15s, box-shadow .15s;
}

.search-row button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.search-row button:active { transform: translateY(0); }

.hint {
    margin-top: .65rem;
    font-size: .75rem;
    color: rgba(255, 255, 255, .55);
    text-align: center;
}

/* ─── Main ────────────────────────────────────────────── */
main {
    flex: 1;
    max-width: 760px;
    width: 100%;
    margin: 2rem auto 3rem;
    padding: 0 1.25rem;
}

/* ─── Error alert ─────────────────────────────────────── */
.alert {
    background: #fff;
    border-left: 4px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 1.1rem 1.3rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    box-shadow: var(--shadow-card);
    margin-bottom: 1.5rem;
}

.alert-icon { font-size: 1.3rem; flex-shrink: 0; }

.alert-body { font-size: .9rem; color: var(--text-dark); line-height: 1.5; }

/* ─── Status banner ───────────────────────────────────── */
.status-banner {
    border-radius: var(--radius);
    padding: 1.4rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 1.2rem;
}

.status-banner.valid    { background: var(--green-bg);  border-left: 5px solid var(--green);  }
.status-banner.warning  { background: var(--yellow-bg); border-left: 5px solid #d97706;       }
.status-banner.critical { background: var(--orange-bg); border-left: 5px solid var(--orange); }
.status-banner.expired  { background: var(--red-bg);    border-left: 5px solid var(--red);    }

.status-icon { font-size: 2rem; flex-shrink: 0; }

.status-text h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .2rem;
}

.status-banner.valid    .status-text h2 { color: var(--green);  }
.status-banner.warning  .status-text h2 { color: var(--yellow); }
.status-banner.critical .status-text h2 { color: var(--orange); }
.status-banner.expired  .status-text h2 { color: var(--red);    }

.status-text p { font-size: .88rem; color: var(--text-dark); }

/* ─── Detail cards ────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 520px) {
    .cards-grid { grid-template-columns: 1fr; }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    box-shadow: var(--shadow-card);
}

.card-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .45rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.card-label .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--blue-accent);
    display: inline-block;
}

.card-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    word-break: break-all;
}

.card-sub {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: .2rem;
}

.days-pill {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    margin-top: .4rem;
}

.days-pill.valid    { background: var(--green-bg);  color: var(--green);  }
.days-pill.warning  { background: var(--yellow-bg); color: var(--yellow); }
.days-pill.critical { background: var(--orange-bg); color: var(--orange); }
.days-pill.expired  { background: var(--red-bg);    color: var(--red);    }

/* ─── SANs card ───────────────────────────────────────── */
.card-full { grid-column: 1 / -1; }

.sans-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .5rem;
}

.san-tag {
    background: var(--blue-light);
    color: var(--blue-accent);
    border: 1px solid var(--blue-mid);
    border-radius: 6px;
    padding: .2rem .6rem;
    font-size: .78rem;
    font-weight: 500;
}

/* ─── Intro / features ────────────────────────────────── */
.intro-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.intro-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .6rem;
    color: var(--text-dark);
}

.intro-section p { font-size: .9rem; color: var(--text-muted); line-height: 1.65; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.feature {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 1.1rem;
    border: 1px solid var(--border);
}

.feature-icon { font-size: 1.6rem; margin-bottom: .5rem; }
.feature h4   { font-size: .88rem; font-weight: 700; margin-bottom: .25rem; }
.feature p    { font-size: .78rem; color: var(--text-muted); }

/* ─── Footer ──────────────────────────────────────────── */
footer {
    background: var(--navy);
    color: rgba(255, 255, 255, .5);
    text-align: center;
    padding: 1.2rem 1rem;
    font-size: .78rem;
}

footer a { color: var(--blue-mid); text-decoration: none; }
footer a:hover { color: #fff; }
