:root {
    --ink: #10243e;
    --ink-soft: #52647a;
    --navy: #0b1f3a;
    --blue: #176bff;
    --blue-dark: #0756df;
    --blue-pale: #edf4ff;
    --mint: #37d6b0;
    --orange: #ff9f43;
    --surface: #ffffff;
    --canvas: #f6f8fc;
    --line: #e3e9f2;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(19, 45, 84, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { color: var(--ink); background: var(--surface); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
.min-w-0 { min-width: 0; }
.skip-link { position: fixed; z-index: 2000; top: 1rem; left: 1rem; background: #fff; padding: .75rem 1rem; border-radius: 8px; }
.btn { border-radius: 10px; font-weight: 700; padding: .65rem 1rem; }
.btn-primary { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: var(--blue-dark); --bs-btn-hover-border-color: var(--blue-dark); box-shadow: 0 8px 20px rgba(23, 107, 255, .18); }
.form-control, .form-select, .input-group-text { border-color: #d9e1ec; border-radius: 10px; min-height: 46px; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 .22rem rgba(23, 107, 255, .12); }
.form-label { font-weight: 700; color: #243a56; }

.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(227,233,242,.85); backdrop-filter: blur(16px); }
.navbar { min-height: 76px; }
.navbar-brand, .footer-brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); font-size: 1.08rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; color: #fff; background: linear-gradient(140deg, var(--blue), #6845e8); box-shadow: 0 8px 22px rgba(23,107,255,.24); }
.navbar-nav .nav-link { color: #53657b; font-size: .94rem; font-weight: 650; padding: .65rem .75rem !important; border-radius: 9px; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--blue); background: var(--blue-pale); }
.btn-language { color: #465970; background: #f3f6fa; border: 1px solid var(--line); box-shadow: none; font-size: .88rem; }
.dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .45rem; }
.dropdown-item { border-radius: 8px; padding: .55rem .75rem; }
.dropdown-item.active { background: var(--blue); }
.flash-stack { position: fixed; top: 90px; right: 1rem; max-width: 480px; z-index: 1025; }

.hero-section { position: relative; overflow: hidden; padding: 7.5rem 0 7rem; color: #fff; background: linear-gradient(124deg, #071a34 0%, #0e386b 56%, #176bff 145%); }
.hero-section h1 { max-width: 780px; margin: 1rem 0 1.25rem; font-size: clamp(2.75rem, 6vw, 5.1rem); font-weight: 850; letter-spacing: -.055em; line-height: .98; }
.hero-lead { max-width: 650px; color: #c8d9ed; font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.7; }
.eyebrow, .section-kicker { display: inline-flex; align-items: center; gap: .5rem; color: #66e4c4; font-size: .77rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .35; pointer-events: none; }
.hero-orb-one { width: 480px; height: 480px; right: -180px; top: -210px; background: radial-gradient(circle, #4bd8ff, transparent 67%); }
.hero-orb-two { width: 340px; height: 340px; left: 38%; bottom: -270px; background: radial-gradient(circle, #37d6b0, transparent 68%); }
.search-box { display: flex; align-items: center; gap: .85rem; max-width: 680px; margin-top: 2.2rem; padding: .5rem .55rem .5rem 1.15rem; background: #fff; border-radius: 15px; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.search-box > i { color: #7d8da1; font-size: 1.15rem; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); font-size: 1rem; }
.search-box button { display: inline-flex; align-items: center; gap: .5rem; flex: 0 0 auto; border: 0; border-radius: 10px; padding: .85rem 1.25rem; color: #fff; background: var(--blue); font-weight: 750; }
.hero-stat-card { display: flex; align-items: center; justify-content: center; gap: 2rem; padding: 2.25rem; border: 1px solid rgba(255,255,255,.16); border-radius: 24px; background: rgba(255,255,255,.08); box-shadow: 0 24px 70px rgba(0,0,0,.16); backdrop-filter: blur(16px); }
.hero-stat-card div:not(.stat-divider) { display: flex; flex-direction: column; gap: .35rem; }
.hero-stat-card strong { font-size: 2.7rem; letter-spacing: -.05em; line-height: 1; }
.hero-stat-card span { color: #bfd0e4; font-size: .85rem; }
.stat-divider { width: 1px; height: 62px; background: rgba(255,255,255,.2); }

.section-space { padding: 6rem 0; }
.section-tint { background: var(--canvas); }
.section-heading { margin-bottom: 2.25rem; }
.section-heading .section-kicker { color: var(--blue); margin-bottom: .65rem; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); font-weight: 820; letter-spacing: -.045em; }
.section-heading p { max-width: 650px; margin: .7rem 0 0; color: var(--ink-soft); line-height: 1.7; }
.text-link { align-items: center; gap: .5rem; color: var(--blue); font-weight: 750; text-decoration: none; white-space: nowrap; }
.category-card { display: flex; align-items: center; gap: 1rem; height: 100%; min-height: 108px; padding: 1.25rem; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.category-card:hover { color: var(--ink); transform: translateY(-4px); border-color: #bfd1ec; box-shadow: var(--shadow); }
.category-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 15px; color: var(--blue); background: var(--blue-pale); font-size: 1.35rem; }
.category-content { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: .2rem; }
.category-content strong { font-size: 1.03rem; }
.category-content small { color: #78889b; }
.category-content > span { margin: .35rem 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.55; }
.category-arrow { color: #9aa8b8; transition: transform .2s ease; }
.category-card:hover .category-arrow { color: var(--blue); transform: translate(2px,-2px); }
.category-card-large { min-height: 220px; align-items: flex-start; }
.category-card-large .category-icon { width: 58px; height: 58px; flex-basis: 58px; }

.link-card { display: flex; flex-direction: column; padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 25px rgba(19,45,84,.035); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.link-card:hover { transform: translateY(-5px); border-color: #c3d4ed; box-shadow: var(--shadow); }
.link-icon, .detail-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; flex: 0 0 54px; border-radius: 15px; color: var(--blue); background: linear-gradient(145deg, var(--blue-pale), #f3efff); font-size: 1.45rem; }
.category-label { display: block; margin-bottom: .25rem; color: var(--blue); font-size: .72rem; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; }
.link-card h3 { margin: 0 0 .2rem; font-size: 1.18rem; font-weight: 800; letter-spacing: -.025em; }
.link-card h3 a { color: var(--ink); text-decoration: none; }
.domain { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; color: #8190a2; font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card > p { flex: 1; margin: 1.2rem 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.65; }
.link-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid #edf0f5; }
.link-card-footer span { display: inline-flex; gap: .4rem; color: #718197; font-size: .82rem; }
.link-card-footer a { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 750; text-decoration: none; }

.page-hero { position: relative; padding: 6rem 0; color: #fff; background: linear-gradient(125deg, #081c38, #104f94); overflow: hidden; }
.page-hero.compact { padding: 5.4rem 0; }
.page-hero:after { content: ""; position: absolute; width: 420px; height: 420px; top: -280px; right: 4%; border-radius: 50%; background: radial-gradient(circle, rgba(55,214,176,.4), transparent 67%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { max-width: 850px; margin: .8rem 0 0; font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 850; letter-spacing: -.05em; }
.page-hero p { max-width: 700px; margin: 1rem 0 0; color: #c9d9eb; font-size: 1.08rem; line-height: 1.7; }
.search-box-light { max-width: 640px; margin-top: 1.7rem !important; }
.empty-state { display: flex; align-items: center; flex-direction: column; max-width: 650px; margin: 2rem auto; padding: 4rem 2rem; text-align: center; border: 1px dashed #cbd6e5; border-radius: 22px; background: var(--canvas); }
.empty-state > i { margin-bottom: 1.2rem; color: var(--blue); font-size: 2.5rem; }
.empty-state h1, .empty-state h2 { font-weight: 800; letter-spacing: -.035em; }
.empty-state p { color: var(--ink-soft); }
.pagination-wrap { margin-top: 3.5rem; }
.page-link { color: var(--ink); border-color: var(--line); }
.active > .page-link { background: var(--blue); border-color: var(--blue); }

.detail-hero { padding: 4.5rem 0 5.5rem; background: var(--canvas); }
.back-link { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.5rem; color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.detail-panel { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: start; padding: clamp(1.5rem, 4vw, 3.25rem); background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.detail-icon { width: 78px; height: 78px; flex-basis: 78px; border-radius: 21px; font-size: 2rem; }
.detail-main h1 { margin: .25rem 0 .8rem; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 850; letter-spacing: -.05em; }
.detail-main p { max-width: 720px; color: var(--ink-soft); line-height: 1.75; }
.detail-actions { display: flex; min-width: 190px; flex-direction: column; gap: .75rem; }
.detail-actions form, .detail-actions button { width: 100%; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 1.25rem 1.5rem; color: #6c7d91; font-size: .88rem; }
.detail-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.form-shell { max-width: 760px; }
.form-shell.wide { max-width: 1050px; }
.form-card, .admin-panel { border: 1px solid var(--line) !important; border-radius: var(--radius); }
.content-card { max-width: 850px; padding: clamp(1.5rem, 5vw, 3.75rem); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); font-size: 1.05rem; line-height: 1.85; }
.content-card p:last-child { margin-bottom: 0; }

.site-footer { padding: 5rem 0 0; background: #081a31; color: #fff; }
.site-footer .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
.site-footer .footer-brand { color: #fff; }
.footer-copy { max-width: 430px; color: #9fb2ca !important; line-height: 1.7; }
.footer-heading { margin: 0 0 1rem; color: #dce7f4; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.site-footer .col-6 a { display: block; margin-bottom: .7rem; color: #9fb2ca; text-decoration: none; }
.site-footer .col-6 a:hover { color: #fff; }
.footer-bottom { margin-top: 4rem; padding: 1.35rem 0; color: #7890aa; border-top: 1px solid rgba(255,255,255,.09); font-size: .82rem; }

.admin-area { background: var(--canvas); }
.admin-area .site-header { position: relative; }
.admin-heading { padding: 3.5rem 0 2.5rem; }
.admin-heading .section-kicker { color: var(--blue); }
.admin-heading h1 { margin: .45rem 0 0; font-size: clamp(2.15rem, 4vw, 3.4rem); font-weight: 850; letter-spacing: -.05em; }
.admin-heading p { color: var(--ink-soft); }
.admin-content { padding: 0 0 5rem; }
.admin-panel { overflow: hidden; background: #fff; box-shadow: 0 10px 28px rgba(19,45,84,.045); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.35rem 1.5rem; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.panel-heading p { margin: .25rem 0 0; color: var(--ink-soft); font-size: .85rem; }
.panel-toolbar { padding: 1.15rem 1.5rem; border-bottom: 1px solid var(--line); }
.admin-table { margin: 0; }
.admin-table thead th { padding: .9rem 1.25rem; color: #78889b; background: #fafbfd; border-bottom-color: var(--line); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.admin-table tbody td { padding: 1rem 1.25rem; border-color: #edf0f5; }
.admin-table td small { display: block; margin-top: .2rem; color: #8290a1; }
.table-actions { display: flex; align-items: center; gap: .45rem; white-space: nowrap; }
.status-badge { display: inline-flex; padding: .32rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 750; }
.status-badge.approved { color: #08795d; background: #e3f8f1; }
.status-badge.pending { color: #a35a05; background: #fff0dd; }
.panel-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; min-height: 230px; color: #8796a8; }
.panel-empty i { margin-bottom: .75rem; color: var(--mint); font-size: 2rem; }
.stat-card { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; padding: 1.35rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(19,45,84,.04); }
.stat-icon { display: inline-flex; grid-row: 1 / 3; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; font-size: 1.25rem; }
.stat-icon.green { color: #078464; background: #dff8f0; }.stat-icon.orange { color: #b66408; background: #fff0de; }.stat-icon.blue { color: var(--blue); background: var(--blue-pale); }.stat-icon.purple { color: #6845e8; background: #f0ebff; }
.stat-card strong { font-size: 1.55rem; line-height: 1; }.stat-card > span:last-child { color: var(--ink-soft); font-size: .78rem; }
.category-mini-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-right: .55rem; border-radius: 9px; color: var(--blue); background: var(--blue-pale); }
.admin-footer { padding: 1.2rem 0; color: #8392a4; border-top: 1px solid var(--line); background: #fff; font-size: .8rem; }
.admin-login-section { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 4rem 0; background: radial-gradient(circle at 50% 0%, #e8f1ff, transparent 46%); }
.login-card { max-width: 460px; padding: clamp(1.6rem, 5vw, 3rem); background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.code-area { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .85rem; line-height: 1.55; }

.install-page { min-height: 100vh; background: radial-gradient(circle at 50% 0%, #deebff, var(--canvas) 45%); }
.install-shell { max-width: 800px; }
.install-shell .card { border-radius: 20px; }
.requirement-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem; padding: .7rem .8rem; border-radius: 10px; background: var(--canvas); font-size: .88rem; }
.requirement-row small { font-weight: 750; }.requirement-row.is-ready i, .requirement-row.is-ready small { color: #078464; }.requirement-row.is-missing i, .requirement-row.is-missing small { color: #c34040; }
.error-code { color: #cbd7e7; font-size: clamp(4rem, 14vw, 8rem); font-weight: 900; letter-spacing: -.08em; line-height: 1; }

@media (max-width: 991.98px) {
    .navbar-collapse { margin-top: .75rem; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
    .navbar-nav { align-items: stretch !important; }
    .hero-section { padding: 5rem 0; }
    .hero-stat-card { max-width: 520px; }
    .detail-panel { grid-template-columns: auto 1fr; }
    .detail-actions { grid-column: 1 / -1; flex-direction: row; }
    .detail-actions > * { flex: 1; }
}

@media (max-width: 575.98px) {
    .navbar { min-height: 68px; }
    .navbar-brand { max-width: calc(100% - 65px); font-size: .98rem; }
    .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
    .hero-section { padding: 4.2rem 0; }
    .hero-section h1 { font-size: 2.7rem; }
    .search-box { display: grid; grid-template-columns: auto 1fr; padding: .8rem; }
    .search-box button { grid-column: 1 / -1; justify-content: center; }
    .hero-stat-card { gap: 1.2rem; padding: 1.6rem; }
    .hero-stat-card strong { font-size: 2.15rem; }
    .section-space { padding: 4rem 0; }
    .page-hero.compact { padding: 4rem 0; }
    .category-card-large { min-height: 180px; }
    .detail-panel { grid-template-columns: 1fr; }
    .detail-icon { width: 64px; height: 64px; }
    .detail-actions { grid-column: auto; flex-direction: column; }
    .detail-meta { gap: .75rem 1.2rem; padding-left: .25rem; }
    .flash-stack { left: .75rem; right: .75rem; top: 78px; }
    .stat-card { padding: 1rem; column-gap: .7rem; }
    .stat-icon { width: 40px; height: 40px; }
    .stat-card strong { font-size: 1.3rem; }
    .panel-heading { align-items: flex-start; flex-direction: column; }
    .panel-heading .btn { width: 100%; }
    .footer-bottom { margin-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
