/* Native Chaos Holdings - Enterprise Design System
  * Ref: ai-foundaries-software-developer-platform
  * Dark theme · Neon lime (#BDFF00) · Refined violet (#A855F7) · GitHub-dark bg (#0D1117)
  * Type: Outfit (display) · Manrope (body) · Space Grotesk (labels) · JetBrains Mono (data) */

:root {
    --bg-primary: #0D1117;
    --bg-secondary: #161B22;
    --bg-card: #161B22;
    --bg-card-hover: #1C2333;
    --bg-surface: #21262D;
    --bg-input: #0D1117;
    --accent: #BDFF00;
    --accent-hover: #D0FF4D;
    --accent-dim: #6B9900;
    --secondary: #A855F7;
    --secondary-hover: #C084FC;
    --secondary-dim: #7C3AED;
    --text-primary: #F0F3F6;
    --text-secondary: #8B949E;
    --text-muted: #565F69;
    --border: #2E343B;
    --border-light: #3D444D;
    --success: #3FB950;
    --warning: #D29922;
    --danger: #F85149;
    --info: #58A6FF;
    --radius: 4px;
    --radius-lg: 10px;
    --shadow: 0 2px 10px rgba(1,4,9,0.5);
    --shadow-lg: 0 12px 40px rgba(1,4,9,0.6);
    --shadow-accent: 0 8px 30px rgba(189,255,0,0.12);
    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-body: 'Manrope', system-ui, sans-serif;
    --font-accent: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle film-grain overlay for depth (transparent to pointer, sits above flat fills) */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.main-content, .navbar, .footer { position: relative; z-index: 3; }

.main-content { flex: 1; padding-top: 64px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ─── Navbar ─── */
.navbar {
    background: rgba(13,17,23,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000; height: 64px;
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
    height: 100%;
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 3px;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
}

.nav-brand::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 24px; height: 2px;
    background: var(--accent);
}

.nav-menu { display: flex; list-style: none; gap: 0; align-items: center; }

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    font-family: var(--font-body);
    font-size: 0.78rem; font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: var(--transition);
    border-radius: var(--radius);
}

.nav-menu a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
}

.nav-cta {
    background: var(--accent) !important;
    color: #0D1117 !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: var(--radius) !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    margin-left: 0.5rem;
}
.nav-cta:hover { background: var(--accent-hover) !important; color: #0D1117 !important; }

.nav-menu a:active { color: var(--accent); }

/* ─── Dropdown Menus ─── */
.nav-dropdown { position: relative; }
.nav-dropdown > a { cursor: default; }
.dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-lg); min-width: 240px; max-height: 60vh;
    overflow-y: auto; z-index: 200; box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li { display: block !important; }
.dropdown-menu a {
    display: block; padding: 0.45rem 1.2rem; font-size: 0.8rem;
    color: var(--text-secondary); white-space: nowrap;
    letter-spacing: 0; text-transform: none;
}
.dropdown-menu a:hover { background: rgba(189,255,0,.08); color: var(--accent); }
.dropdown-header {
    padding: 0.55rem 1.2rem 0.2rem; font-size: 0.6rem;
    color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em;
    font-weight: 700; pointer-events: none; border-top: 1px solid var(--border);
}
.dropdown-header:first-child { border-top: none; }
.dropdown-menu a { font-size: 0.75rem; padding: 0.4rem 1.2rem; }

@media (max-width: 768px) {
    .dropdown-menu {
        position: static; box-shadow: none; border: none;
        max-height: none; background: rgba(255,255,255,.02);
        padding-left: 1rem; min-width: 0;
    }
    .nav-dropdown:hover .dropdown-menu { display: block; }
}

.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer; padding: 8px;
}

.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.25rem;
    }
    .nav-menu.active { display: flex; }
}

/* ─── Footer ─── */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

.footer p { color: var(--text-muted); font-size: 0.78rem; letter-spacing: 0.5px; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius);
    border: 2px solid var(--accent);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn:hover {
    background: var(--accent);
    color: #0D1117;
    border-color: var(--accent);
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-light);
    color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--text-secondary); color: var(--text-primary); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #0D1117; }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #0D1117;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #0D1117; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.7rem; letter-spacing: 0.5px; }

.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.card:hover { border-color: var(--border-light); }

.card-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title { font-family: var(--font-heading); font-size: 1rem; font-weight: 600; text-wrap: balance; }

/* ─── Hero ─── */
.hero {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border);
    padding: 6rem 2rem 4rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(189,255,0,0.06) 0%, transparent 60%),
                radial-gradient(circle at 70% 30%, rgba(168,85,247,0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.04;
    margin-bottom: 1.25rem;
    position: relative;
    text-wrap: balance;
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 56ch;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
}

@media (max-width: 768px) {
    .hero { padding: 4rem 1.5rem 3rem; }
    .hero h1 { font-size: 2rem; }
}

/* ─── Section Titles ─── */
.section-title {
    font-family: var(--font-accent);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--secondary);
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute; bottom: -1px; left: 0;
    width: 60px; height: 2px;
    background: var(--secondary);
}

/* ─── Page Header ─── */
.page-header {
    padding: 3rem 0 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.012em;
    margin-bottom: 0.5rem;
    text-wrap: balance;
}

.page-header p { color: var(--text-secondary); font-size: 0.9rem; }

/* ─── Stats ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.stat-label {
    font-family: var(--font-accent);
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ─── Grids ─── */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ─── Category Cards ─── */
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.category-card p {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ─── Product Cards ─── */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-accent);
}

.product-card .card-body { padding: 1.5rem; }

.product-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.product-card .price {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0.5rem 0;
    font-variant-numeric: tabular-nums;
}

.product-card .badge { margin-bottom: 0.5rem; }

/* ─── Badges ─── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-family: var(--font-accent);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 2px;
}

.badge-success { background: rgba(63,185,80,0.15); color: var(--success); }
.badge-warning { background: rgba(210,153,34,0.15); color: var(--warning); }
.badge-danger { background: rgba(248,81,73,0.15); color: var(--danger); }
.badge-info { background: rgba(88,166,255,0.15); color: var(--info); }
.badge-primary { background: rgba(189,255,0,0.15); color: var(--accent); }
.badge-completed { background: rgba(63,185,80,0.15); color: var(--success); }
.badge-in_progress { background: rgba(88,166,255,0.15); color: var(--info); }
.badge-not_started { background: rgba(72,79,88,0.15); color: var(--text-muted); }
.badge-delivered { background: rgba(63,185,80,0.15); color: var(--success); }
.badge-active { background: rgba(63,185,80,0.15); color: var(--success); }

/* ─── Tables ─── */
.table-container { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

th {
    background: rgba(255,255,255,0.02);
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }
td a { color: var(--accent); text-decoration: none; }
td a:hover { text-decoration: underline; }

/* ─── Form ─── */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-accent);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(189,255,0,0.12);
}

.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }

.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

/* ─── Filters ─── */
.filter-section, .filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-section select, .filter-section input,
.filter-bar select, .filter-bar input {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
}

.filter-section select:focus, .filter-section input:focus,
.filter-bar select:focus, .filter-bar input:focus {
    border-color: var(--accent);
    outline: none;
}

.filter-section label {
    font-family: var(--font-accent);
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Pagination ─── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 2.5rem 0;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination a.active {
    background: var(--accent);
    color: #0D1117;
    border-color: var(--accent);
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}
.empty-state p { font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ─── Alerts / Toast ─── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.alert-success { background: rgba(63,185,80,0.1); color: var(--success); border-color: rgba(63,185,80,0.2); }
.alert-danger { background: rgba(248,81,73,0.1); color: var(--danger); border-color: rgba(248,81,73,0.2); }
.alert-warning { background: rgba(210,153,34,0.1); color: var(--warning); border-color: rgba(210,153,34,0.2); }

/* ─── Action Bar ─── */
.action-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* ─── Progress Bar ─── */
.progress-bar {
    background: var(--bg-surface);
    border-radius: 100px;
    height: 6px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--accent);
    border-radius: 100px;
    transition: width 0.5s ease;
}

/* ─── Timeline ─── */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px; top: 0; bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-item { position: relative; padding-bottom: 1.5rem; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem; top: 4px;
    width: 10px; height: 10px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    transform: translateX(-3px);
}

.timeline-date {
    font-family: var(--font-accent);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-content {
    padding: 0.5rem 0;
}

/* ─── Links ─── */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Utility ─── */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-secondary { color: var(--text-secondary); }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.flex-wrap { flex-wrap: wrap; }

.font-mono { font-family: var(--font-mono); }
.text-xs { font-size: 0.7rem; }
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-family: var(--font-heading); font-size: 1.5rem; }

.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; letter-spacing: 1px; }

.border-bottom { border-bottom: 1px solid var(--border); }
.border-top { border-top: 1px solid var(--border); }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Loading ─── */
.loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Modal ─── */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none; border: none;
    font-size: 1.5rem; cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover { color: var(--text-primary); }

/* ─── Priority ─── */
.priority-low { color: var(--text-muted); }
.priority-normal { color: var(--text-secondary); }
.priority-high { color: var(--warning); }
.priority-urgent { color: var(--danger); }

/* ─── Status Colors ─── */
.status-not_started { color: var(--text-muted); }
.status-in_progress { color: var(--info); }
.status-completed { color: var(--success); }
.status-on_hold { color: var(--warning); }
.status-cancelled { color: var(--danger); }

/* ─── Search ─── */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-bar .form-control { flex: 1; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── Selection ─── */
::selection { background: var(--accent); color: #0D1117; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .container { padding: 0 16px; }
    .page-header h1 { font-family: var(--font-heading); font-size: 1.5rem; }
    .filter-bar, .filter-section { flex-direction: column; }
    .filter-bar select, .filter-bar input,
    .filter-section select, .filter-section input { width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-value { font-size: 1.5rem; }
}

/* Tools index (renderTools) */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.tool-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.tool-card:hover,
.tool-card:focus-visible {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    outline: none;
}
.tool-card__label { font-weight: 600; }
.tool-card__arrow { color: var(--accent); font-weight: 700; }
