/* bgp.gibir.net.tr — site styles (on top of Bootstrap 4.3) */
:root {
    --brand: #f08a00;
    --brand-dark: #c96f00;
    --brand-soft: #fff4e5;
    --navy: #1b2550;
    --navy-2: #27347a;
    --ink: #1d2433;
    --muted: #6b7385;
    --bg: #f4f6fb;
    --card: #ffffff;
    --line: #e5e8f1;
    --ok: #16935a;
    --ok-soft: #e3f6ec;
    --bad: #d13b3b;
    --bad-soft: #fde8e8;
    --none: #7a8194;
    --none-soft: #eef0f5;
    --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .06);
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }
a { color: var(--navy-2); }
a:hover { color: var(--brand-dark); text-decoration: none; }
.mono, code { font-family: var(--mono); }
code { color: var(--navy-2); background: var(--none-soft); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
.text-muted { color: var(--muted) !important; }
.small-caps { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* ---------- header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.site-header .navbar { padding: .55rem 0; }
.site-header .navbar-brand img { height: 38px; width: auto; }
.site-header .navbar-brand .brand-sub { font-size: .7rem; font-weight: 700; color: var(--muted); letter-spacing: .12em; margin-left: .5rem; vertical-align: middle; }
.site-header .nav-link { color: var(--ink) !important; font-weight: 500; padding: .5rem .75rem !important; border-radius: 8px; }
.site-header .nav-link:hover, .site-header .nav-link.active { background: var(--brand-soft); color: var(--brand-dark) !important; }
.site-header .nav-link i { color: var(--brand); margin-right: .35rem; }
.navbar-toggler { border: 1px solid var(--line); }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(29,36,51,.8)' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }

.lang-menu .dropdown-toggle { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .6rem; color: var(--ink); background: #fff; font-weight: 600; font-size: .85rem; }
.lang-menu .dropdown-menu { border-radius: 10px; border-color: var(--line); box-shadow: var(--shadow); }
.lang-menu .dropdown-item.active { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- search ---------- */
.search-box { position: relative; }
.search-box .input-group { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.search-box input { border: 0 !important; box-shadow: none !important; font-size: .95rem; }
.search-box .btn { border: 0; background: var(--brand); color: #fff; padding: 0 1rem; }
.search-box .btn:hover { background: var(--brand-dark); }
.header-search { width: 300px; margin: 0 .75rem; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 1050; display: none; overflow: hidden; }
.suggest a { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem .8rem; color: var(--ink); border-bottom: 1px solid var(--line); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.active { background: var(--brand-soft); }
.suggest .s-label { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.suggest .s-detail { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(240,138,0,.25), transparent 60%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding: 2.5rem 0 3rem; }
.hero h1 { font-weight: 800; font-size: 2rem; letter-spacing: -.02em; }
.hero p.lead { color: rgba(255,255,255,.8); font-size: 1.05rem; }
.hero .search-box .input-group { border: 0; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hero .search-box input { height: 54px; font-size: 1.05rem; padding-left: 1.1rem; }
.hero .search-box .btn { padding: 0 1.5rem; font-weight: 600; }
.hero .examples { margin-top: .75rem; font-size: .85rem; color: rgba(255,255,255,.7); }
.hero .examples a { color: #ffd59a; margin-right: .6rem; font-family: var(--mono); }
.hero-overlap { margin-top: -1.75rem; }

/* page header */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 1.6rem 0 1.2rem; }
.page-head h1 { font-size: 1.65rem; font-weight: 800; margin: 0; letter-spacing: -.01em; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.page-head h1 .mono { color: var(--navy-2); }
.page-head .subtitle { color: var(--muted); margin-top: .35rem; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.breadcrumb-lite { font-size: .82rem; color: var(--muted); margin-bottom: .4rem; }
.breadcrumb-lite a { color: var(--muted); }
.site-shot { width: 180px; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ---------- cards ---------- */
.cardx { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.cardx > .cardx-head { padding: .9rem 1.15rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.cardx > .cardx-head h2, .cardx > .cardx-head h3 { font-size: 1rem; font-weight: 700; margin: 0; }
.cardx > .cardx-head h2 i, .cardx > .cardx-head h3 i { color: var(--brand); margin-right: .45rem; }
.cardx > .cardx-body { padding: 1.1rem 1.15rem; }
.cardx > .table-responsive { border-radius: 0 0 var(--radius) var(--radius); }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; height: 100%; }
.stat .value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat .hint { color: var(--muted); font-size: .78rem; margin-top: .2rem; }
.stat i.stat-icon { float: right; font-size: 1.3rem; color: var(--brand); opacity: .85; }
.stat.ok .value { color: var(--ok); }
.stat.bad .value { color: var(--bad); }

/* key/value rows */
.kv { display: grid; grid-template-columns: minmax(140px, 32%) 1fr; margin: 0; }
.kv dt, .kv dd { padding: .6rem 1.15rem; border-bottom: 1px solid var(--line); margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; font-size: .88rem; }
.kv dd { word-break: break-word; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
@media (max-width: 575px) { .kv { grid-template-columns: 1fr; } .kv dt { border-bottom: 0; padding-bottom: 0; } }

/* tables */
.table-clean { margin: 0; font-size: .92rem; }
.table-clean thead th { background: #f8f9fc; color: var(--muted); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; border-top: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-clean td { vertical-align: middle; border-top: 1px solid var(--line); }
.table-clean tbody tr:hover { background: #fafbfe; }
.table-clean .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-clean .bar { position: relative; min-width: 90px; }
.table-clean .bar span { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--brand), #ffbf66); }
.table-scroll { max-height: 640px; overflow: auto; }
.sort-link { color: var(--muted); }
.sort-link:hover, .sort-link.active { color: var(--brand-dark); }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; }

/* tabs */
.tabs-x { border-bottom: 1px solid var(--line); padding: 0 .75rem; display: flex; flex-wrap: wrap; gap: .15rem; }
.tabs-x .nav-link { border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; padding: .8rem .8rem .65rem; border-radius: 0; }
.tabs-x .nav-link.active, .tabs-x .nav-link:hover { color: var(--ink); border-bottom-color: var(--brand); background: transparent; }
.tabs-x .count { background: var(--none-soft); color: var(--muted); border-radius: 20px; padding: 0 .45rem; font-size: .75rem; margin-left: .3rem; }

/* chips & badges */
.as-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.as-path i { color: #b5bccc; font-size: .75rem; }
.as-chip { font-family: var(--mono); font-size: .82rem; background: var(--none-soft); color: var(--navy-2); border-radius: 6px; padding: .1rem .45rem; border: 1px solid transparent; }
.as-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.as-chip.prepend { opacity: .55; }
.pill { display: inline-flex; align-items: center; gap: .35rem; border-radius: 20px; padding: .2rem .65rem; font-size: .8rem; font-weight: 600; background: var(--none-soft); color: var(--ink); border: 1px solid var(--line); }
.pill i { color: var(--brand); }
.pill.up { background: #e8eefc; color: #2d4ac2; border-color: #d3ddf7; }
.pill.down { background: #fff1e0; color: #b36200; border-color: #fbe0bd; }
.pill.peer { background: #f1eafe; color: #6d28d9; border-color: #e2d5fb; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: #c5ead7; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: #f6caca; }
.badge-rpki { display: inline-block; border-radius: 20px; padding: .12rem .55rem; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.rpki-valid { background: var(--ok-soft); color: var(--ok); }
.rpki-invalid { background: var(--bad-soft); color: var(--bad); }
.rpki-not-found, .rpki-unknown { background: var(--none-soft); color: var(--none); }
.flag { border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.06); vertical-align: -4px; }
.cc { font-family: var(--mono); font-size: .75rem; background: var(--none-soft); border-radius: 4px; padding: 0 .3rem; }

/* distribution bars */
.dist { list-style: none; padding: 0; margin: 0; }
.dist li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.dist li:last-child { border-bottom: 0; }
.dist .track { grid-column: 1 / -1; height: 6px; background: var(--none-soft); border-radius: 3px; overflow: hidden; }
.dist .track span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-2), #5b74e8); }
.rpki-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--none-soft); }
.rpki-bar span { display: block; height: 100%; }
.rpki-bar .v { background: var(--ok); } .rpki-bar .i { background: var(--bad); } .rpki-bar .n { background: #b9bfcc; }

/* graph & map */
#as-graph { height: 520px; background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f3f5fb 100%); border-radius: 0 0 var(--radius) var(--radius); }
.graph-legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); }
.graph-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; background: var(--c); }
.map-frame { width: 100%; height: 260px; border: 0; border-radius: 0 0 var(--radius) var(--radius); display: block; }

/* pagination */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding: .9rem 1.15rem; border-top: 1px solid var(--line); }
.pagination { margin: 0; }
.page-link { color: var(--navy-2); border-color: var(--line); }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); }

/* footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 2.2rem 0 1.4rem; margin-top: 2.5rem; font-size: .9rem; }
.site-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; margin-bottom: .8rem; }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: #ffd59a; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 1.5rem; padding-top: 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .82rem; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.25); margin-right: .4rem; vertical-align: 1px; }

.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty i { font-size: 2rem; color: #c6cbd8; display: block; margin-bottom: .6rem; }

@media (max-width: 991px) {
    .header-search { width: 100%; margin: .5rem 0; }
    .hero h1 { font-size: 1.55rem; }
    .site-shot { display: none; }
}

.stale-notice { background: #fff4e5; border-bottom: 1px solid #fbe0bd; color: #8a4b00; padding: .6rem 0; font-size: .9rem; }
.stale-notice i { color: var(--brand); margin-right: .35rem; }

/* load more under long tables */
.load-more { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem 1.15rem; border-top: 1px solid var(--line); background: #fafbfe; border-radius: 0 0 var(--radius) var(--radius); }
.load-more .btn { margin-left: .35rem; }

/* keep the menu on one line between lg and xl */
.site-header .nav-link { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1199px) {
    .site-header .navbar-brand .brand-sub { display: none; }
    .site-header .nav-link { padding: .5rem .5rem !important; }
    .header-search { width: 200px; }
}
