.stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 116px;
    padding: 1.15rem 1.25rem;
    overflow: hidden;
    border: 1px solid var(--ac-line-accent);
    border-radius: 26px;
    background:
        radial-gradient(circle at 15% 12%, rgba(200, 255, 0, 0.16), transparent 36%),
        linear-gradient(145deg, rgba(22, 23, 30, 0.96), rgba(9, 10, 15, 0.96));
    box-shadow: var(--ac-shadow-sm);
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -34px;
    top: -34px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(200, 255, 0, 0.09);
}

.stat-card.is-cyan { border-color: rgba(0, 217, 255, 0.34); background: radial-gradient(circle at 15% 12%, rgba(0, 217, 255, 0.16), transparent 36%), linear-gradient(145deg, rgba(22, 23, 30, 0.96), rgba(9, 10, 15, 0.96)); }
.stat-card.is-pink { border-color: rgba(255, 61, 154, 0.34); background: radial-gradient(circle at 15% 12%, rgba(255, 61, 154, 0.16), transparent 36%), linear-gradient(145deg, rgba(22, 23, 30, 0.96), rgba(9, 10, 15, 0.96)); }

.stat-icon {
    z-index: 1;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #c8ff00, #ffe600);
    color: #0b0b0f;
    font-size: 1.5rem;
    box-shadow: 0 18px 34px rgba(200, 255, 0, 0.16);
}

.is-cyan .stat-icon { background: linear-gradient(135deg, #00d9ff, #00b3d9); box-shadow: 0 18px 34px rgba(0, 217, 255, 0.16); }
.is-pink .stat-icon { background: linear-gradient(135deg, #ff3d9a, #d81b60); color: #fff; box-shadow: 0 18px 34px rgba(255, 61, 154, 0.16); }

.stat-body { z-index: 1; min-width: 0; }
.stat-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ac-text-dim); }
.stat-value { font-family: var(--ac-font-display); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 950; letter-spacing: -0.04em; line-height: 1.05; color: var(--ac-lime); text-shadow: 0 0 24px rgba(200, 255, 0, 0.25); overflow-wrap: anywhere; }
.is-cyan .stat-value { color: var(--ac-cyan); text-shadow: 0 0 24px rgba(0, 217, 255, 0.25); }
.is-pink .stat-value { color: var(--ac-pink); text-shadow: 0 0 24px rgba(255, 61, 154, 0.25); }

.hero-panel {
    padding: 1.75rem;
    border: 1px solid var(--ac-line-accent);
    border-radius: var(--ac-r-hero);
    background:
        radial-gradient(circle at 14% 18%, rgba(200, 255, 0, 0.18), transparent 34%),
        radial-gradient(circle at 88% 16%, rgba(0, 217, 255, 0.1), transparent 32%),
        var(--ac-grad-panel);
    box-shadow: var(--ac-shadow-lg);
}

.hero-panel h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); letter-spacing: -0.04em; line-height: 1.05; }

.perm-module {
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--ac-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.025);
}

.perm-module + .perm-module { margin-top: 1rem; }
.perm-module-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.perm-module-title { margin: 0; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ac-lime); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.6rem; }

.perm-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    min-height: 56px;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--ac-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color var(--ac-ease), background var(--ac-ease);
}

.perm-item:hover { border-color: var(--ac-line-accent); background: rgba(200, 255, 0, 0.04); }
.perm-item.is-locked { cursor: not-allowed; opacity: 0.7; }
.perm-item .form-check-input { margin-top: 0.2rem; flex: 0 0 auto; }
.perm-item-text { line-height: 1.3; }
.perm-item-label { color: #fff; font-weight: 700; font-size: 0.9rem; }
.perm-item-key { color: var(--ac-text-faint); font-size: 0.72rem; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }

.settings-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ac-text-soft);
    font-weight: 700;
    border-radius: 14px;
    padding: 0.65rem 0.9rem;
}

.settings-nav .nav-link:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.settings-nav .nav-link.active { background: var(--ac-lime); color: var(--ac-on-lime); }

@media (max-width: 575.98px) {
    .perm-grid { grid-template-columns: 1fr; }
    .perm-item { min-height: 48px; }
    .stat-card { min-height: 96px; }
}
