/* xnight admin — «Premium» tab */

.aprem { --aprem-c: #55a4df; container-type: inline-size; display: flex; flex-direction: column; gap: 16px; padding: 4px 0 24px; }
.aprem * { box-sizing: border-box; }

.aprem-card { padding: 20px; border: 1px solid var(--border-color); border-radius: 22px; background: var(--card-bg); min-width: 0; }
.aprem-card.is-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 6px 18px;
    align-items: center;
    border-color: color-mix(in srgb, var(--aprem-c) 40%, var(--border-color));
    background:
        radial-gradient(70% 120% at 0% 0%, color-mix(in srgb, var(--aprem-c) 20%, transparent), transparent 65%),
        var(--card-bg);
}
.aprem-hero-star {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: var(--aprem-c);
    background: color-mix(in srgb, var(--aprem-c) 15%, transparent);
}
.aprem-hero-star svg { width: 38px; height: 38px; filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--aprem-c) 55%, transparent)); }
.aprem-kicker { color: var(--aprem-c); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.aprem-card h4 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--text-main); font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif; }
.aprem-lead { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.aprem-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.aprem-stat { padding: 12px 14px; border-radius: 16px; background: var(--input-bg); border: 1px solid var(--border-color); }
.aprem-stat span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.aprem-stat b { display: block; margin-top: 2px; font-size: 21px; font-weight: 800; color: var(--text-main); font-variant-numeric: tabular-nums; }

.aprem-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@container (min-width: 860px) { .aprem-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }

.aprem-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.aprem-head h5 { margin: 0; font-size: 16px; font-weight: 800; color: var(--text-main); }

.aprem-input {
    width: 100%;
    padding: 10px 13px;
    border-radius: 13px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    transition: border-color .15s;
}
.aprem-input:focus { border-color: var(--aprem-c); }
.aprem-input.is-num { font-variant-numeric: tabular-nums; }
.aprem-input.is-search { width: 190px; padding: 8px 13px; border-radius: 999px; }

.aprem-plan-head, .aprem-plan { display: grid; grid-template-columns: minmax(0, 1.4fr) 76px 110px 78px; gap: 8px; align-items: center; }
.aprem-plan-head { padding: 0 2px 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.aprem-plans { display: flex; flex-direction: column; gap: 8px; }
.aprem-plan.is-off .aprem-input { opacity: .5; }
.aprem-plan-tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.aprem-icon { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-color); background: transparent; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.aprem-icon:hover { color: #f4212e; border-color: #f4212e; }
.aprem-row-end { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.aprem-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--text-muted); }
.aprem-row-end .aprem-hint { margin: 0; color: #f59e0b; font-weight: 700; }

.aprem-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.aprem-chips button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-color); background: transparent; color: var(--text-main); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; }
.aprem-chips button:hover { border-color: var(--aprem-c); }
.aprem-chips button.is-on { background: var(--aprem-c); border-color: var(--aprem-c); color: #fff; }
.aprem-custom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.aprem-custom .aprem-input { width: 110px; }

.aprem-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border-radius: 999px; border: none; background: var(--text-main); color: var(--bg-color, #000); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; transition: opacity .15s, transform .1s; white-space: nowrap; }
.aprem-btn:hover { opacity: .88; }
.aprem-btn:active { transform: scale(.97); }
.aprem-btn:disabled { opacity: .45; cursor: not-allowed; }
.aprem-btn svg { width: 16px; height: 16px; }
.aprem-btn.is-ghost { background: transparent; color: var(--text-main); border: 1px solid var(--border-color); }
.aprem-btn.is-ghost:hover { background: rgba(128, 128, 128, .12); opacity: 1; }
.aprem-btn.is-danger { background: rgba(244, 33, 46, .12); color: #f4212e; }
.aprem-btn.is-accent { background: var(--aprem-c); color: #fff; }
.aprem-btn.is-sm { padding: 7px 13px; font-size: 13px; }
.aprem-btn.is-wide { width: 100%; height: 46px; }

.aprem-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--text-main); user-select: none; }
.aprem-switch input { display: none; }
.aprem-switch i { position: relative; width: 42px; height: 25px; border-radius: 99px; background: var(--border-color); transition: background .2s; flex: none; }
.aprem-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.16, 1, .3, 1); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.aprem-switch input:checked + i { background: #00ba7c; }
.aprem-switch input:checked + i::after { transform: translateX(17px); }
.aprem-switch.is-sm i { width: 36px; height: 21px; }
.aprem-switch.is-sm i::after { width: 15px; height: 15px; }
.aprem-switch.is-sm input:checked + i::after { transform: translateX(15px); }

.aprem-members { display: flex; flex-direction: column; gap: 4px; max-height: 520px; overflow-y: auto; }
.aprem-member { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; transition: background .15s; }
.aprem-member:hover { background: rgba(128, 128, 128, .07); }
.aprem-member.is-off { opacity: .6; }
.aprem-ava { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--input-bg); color: var(--text-main); font-weight: 800; }
.aprem-ava img { width: 100%; height: 100%; object-fit: cover; }
.aprem-who { flex: 1; min-width: 0; }
.aprem-who b { display: flex; align-items: center; gap: 5px; font-size: 14.5px; font-weight: 800; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aprem-who small { font-size: 12.5px; color: var(--text-muted); }
.aprem-star svg { width: 14px; height: 14px; display: block; }
.aprem-tag { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--input-bg); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.aprem-tag.is-on { background: color-mix(in srgb, var(--aprem-c) 15%, transparent); color: var(--aprem-c); }
.aprem-tag.is-forever { background: rgba(245, 158, 11, .15); color: #f59e0b; }
.aprem-member-tools { display: flex; gap: 6px; flex: none; }
@container (max-width: 560px) {
    .aprem-member { flex-wrap: wrap; }
    .aprem-member-tools { width: 100%; justify-content: flex-end; }
    .aprem-card.is-hero { grid-template-columns: auto 1fr; }
    .aprem-card.is-hero .aprem-switch { grid-column: 1 / -1; }
    .aprem-plan-head, .aprem-plan { grid-template-columns: minmax(0, 1fr) 62px 86px 70px; }
    .aprem-input.is-search { width: 140px; }
}

.aprem-log { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.aprem-log-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; font-size: 13px; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
.aprem-log-row:last-child { border-bottom: none; }
.aprem-log-row b { color: var(--text-main); }
.aprem-log-row span:nth-child(2) { flex: 1; min-width: 0; }
.aprem-log-row time { flex: none; font-size: 12px; font-variant-numeric: tabular-nums; }
.aprem-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-muted); }
.aprem-dot.is-buy { background: #00ba7c; }
.aprem-dot.is-grant { background: var(--aprem-c); }
.aprem-dot.is-revoke { background: #f4212e; }
.aprem-empty { padding: 20px 4px; color: var(--text-muted); text-align: center; font-size: 14px; }
