/* Tivimate Panel - Centralized Stylesheet */

/* ── Base ── */
[x-cloak] { display: none !important; }
body { background: #0a0a0a; color: #e2e8f0; }

/* ── Sidebar ── */
.sidebar-link {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.75rem; border-radius: 0.375rem;
    font-size: 0.8rem; font-weight: 500; color: #a0a0a0;
    transition: all 0.15s; min-width: 0;
}
.sidebar-link:hover { background: rgba(243,156,18,0.1); color: #4f0e5f; }
.sidebar-link.active { background: rgba(243,156,18,0.15); color: #6e0d77; }

/* ── Sidebar dropdown ── */
.sidebar-dropdown {
    margin-left: 1.25rem; padding-left: 0.625rem;
    border-left: 1px solid #1e1e1e;
}
.sidebar-sublink {
    display: block; padding: 0.3rem 0.625rem; border-radius: 0.25rem;
    font-size: 0.75rem; color: #888; transition: all 0.15s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-sublink:hover { color: #f87171; background: rgba(220,38,38,.10); }
.sidebar-sublink.active { color: #ef4444; background: rgba(220,38,38,.16); }

/* ══ MARVEL REBRANDS — CARDS ══════════════════════════════════════════ */
:root{
  --mv-red:#dc2626; --mv-red-2:#ef4444; --mv-red-dk:#b91c1c;
  --mv-gold:#f59e0b; --mv-green:#22c55e; --mv-blue:#3b82f6;
  --mv-sur:#161618; --mv-sur-2:#1c1c1f; --mv-line:rgba(255,255,255,.08);
  --mv-line-2:rgba(255,255,255,.14);
}

.card{
  position:relative; background:linear-gradient(180deg,#18181b 0%,#141416 100%);
  border:1px solid var(--mv-line); border-radius:16px;
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.35);
  transition:border-color .2s, transform .2s, box-shadow .2s;
}
.card::before{                      /* thin brand rule along the top edge */
  content:''; position:absolute; inset:0 0 auto 0; height:2px; border-radius:16px 16px 0 0;
  background:linear-gradient(90deg,var(--mv-red),var(--mv-gold)); opacity:.85;
}
.card:hover{border-color:var(--mv-line-2); box-shadow:0 1px 0 rgba(255,255,255,.05) inset,0 16px 40px rgba(0,0,0,.5)}
.card-flat::before{display:none}
.card-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding:16px 18px; border-bottom:1px solid var(--mv-line);
}
.card-title{font-size:14px;font-weight:800;letter-spacing:.02em;color:#fff;display:flex;align-items:center;gap:9px}
.card-title i{color:var(--mv-red);font-size:17px}
.card-body{padding:18px}

.stat-card{
  position:relative; overflow:hidden;
  background:linear-gradient(180deg,#18181b 0%,#141416 100%);
  border:1px solid var(--mv-line); border-radius:16px; padding:20px;
  transition:border-color .2s, transform .2s;
}
.stat-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--st-accent,var(--mv-red))}
.stat-card:hover{border-color:var(--mv-line-2); transform:translateY(-2px)}
.stat-card.is-gold {--st-accent:var(--mv-gold)}
.stat-card.is-green{--st-accent:var(--mv-green)}
.stat-card.is-blue {--st-accent:var(--mv-blue)}
.stat-label{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8e8e9e}
.stat-value{font-size:30px;font-weight:900;line-height:1.1;margin-top:8px;color:#fff}
.stat-sub{font-size:12px;color:#8e8e9e;margin-top:6px}

/* ══ MARVEL REBRANDS — BUTTONS ════════════════════════════════════════
   One base class (.btn) plus a variant. Old .btn-primary/.btn-secondary/
   .btn-danger names keep working so existing markup is untouched.       */
.btn,.btn-primary,.btn-secondary,.btn-danger,.btn-soft,.btn-outline,.btn-ghost,
.btn-success,.btn-gold,.btn-wa{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px; font-size:13.5px; font-weight:700; font-family:inherit;
  border-radius:10px; border:1px solid transparent; cursor:pointer;
  text-decoration:none; white-space:nowrap; line-height:1.2;
  transition:background .16s, border-color .16s, color .16s, transform .12s, box-shadow .16s;
}
.btn:active,.btn-primary:active,.btn-secondary:active,.btn-danger:active{transform:translateY(1px)}
.btn:disabled,.btn-primary:disabled,.btn-secondary:disabled,.btn-danger:disabled{opacity:.5;cursor:not-allowed}
.btn:focus-visible,.btn-primary:focus-visible,.btn-secondary:focus-visible,.btn-danger:focus-visible{
  outline:none; box-shadow:0 0 0 3px rgba(220,38,38,.35)}

.btn-primary{background:var(--mv-red);color:#fff;box-shadow:0 4px 14px rgba(220,38,38,.28)}
.btn-primary:hover{background:var(--mv-red-dk);color:#fff;box-shadow:0 6px 18px rgba(220,38,38,.38)}

.btn-secondary{background:#1e1e22;color:#d6d6de;border-color:var(--mv-line-2)}
.btn-secondary:hover{background:#26262c;color:#fff;border-color:rgba(255,255,255,.24)}

.btn-danger{background:transparent;color:#f87171;border-color:rgba(220,38,38,.4)}
.btn-danger:hover{background:rgba(220,38,38,.14);color:#fca5a5}

.btn-soft{background:rgba(220,38,38,.12);color:#f87171;border-color:rgba(220,38,38,.3)}
.btn-soft:hover{background:rgba(220,38,38,.2);color:#fff}

.btn-outline{background:transparent;color:#d6d6de;border-color:var(--mv-line-2)}
.btn-outline:hover{border-color:var(--mv-red);color:#fff}

.btn-ghost{background:transparent;color:#9b9ba8;border-color:transparent}
.btn-ghost:hover{background:rgba(255,255,255,.06);color:#fff}

.btn-success{background:var(--mv-green);color:#04240f;box-shadow:0 4px 14px rgba(34,197,94,.25)}
.btn-success:hover{background:#16a34a;color:#04240f}

.btn-gold{background:var(--mv-gold);color:#2a1a00;box-shadow:0 4px 14px rgba(245,158,11,.25)}
.btn-gold:hover{background:#d97706;color:#2a1a00}

.btn-wa{background:#25D366;color:#052e13;box-shadow:0 4px 14px rgba(37,211,102,.25)}
.btn-wa:hover{background:#1eb457;color:#052e13}

.btn-sm{padding:7px 12px;font-size:12.5px;border-radius:9px}
.btn-lg{padding:14px 22px;font-size:15px;border-radius:12px}
.btn-block{width:100%}
.btn-icon{padding:10px;width:40px;height:40px;border-radius:10px}
.btn-group{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:640px){ .btn-group{display:grid;grid-template-columns:1fr 1fr} .btn-group > *{width:100%} }

/* pills / badges */
.mv-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:20px;
  font-size:11.5px;font-weight:800;letter-spacing:.03em}
.mv-badge.ok{background:rgba(34,197,94,.12);border:1px solid rgba(34,197,94,.3);color:#4ade80}
.mv-badge.warn{background:rgba(245,158,11,.12);border:1px solid rgba(245,158,11,.3);color:#fbbf24}
.mv-badge.bad{background:rgba(220,38,38,.12);border:1px solid rgba(220,38,38,.3);color:#f87171}
.mv-badge.info{background:rgba(59,130,246,.12);border:1px solid rgba(59,130,246,.3);color:#60a5fa}

/* ── Form inputs ── */
.form-input {
    width: 100%; padding: 0.625rem 1rem;
    background: #111; border: 1px solid #1e1e1e;
    border-radius: 0.5rem; color: #e2e8f0;
    font-size: 0.875rem; outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: #dc2626; box-shadow: 0 0 0 2px rgba(220,38,38,.22); }
.form-label {
    display: block; font-size: 0.875rem; font-weight: 500;
    color: #a0a0a0; margin-bottom: 0.375rem;
}
select.form-input { appearance: auto; }

/* ── Tabs ── */
.tab-link {
    padding: 0.75rem 1rem; font-size: 0.875rem; font-weight: 500;
    border-bottom: 2px solid transparent; color: #777;
    transition: all 0.2s; text-decoration: none;
}
.tab-link:hover { color: #540e63; border-bottom-color: #2a2a2a; }
.tab-link.active { color: #5d0964; border-bottom-color: #5b045e; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; }
table thead { background: #111; }
table th {
    padding: 0.75rem 1.5rem; text-align: left;
    font-size: 0.75rem; font-weight: 600; color: #777;
    text-transform: uppercase; letter-spacing: 0.05em;
}
table td {
    padding: 0.75rem 1.5rem; font-size: 0.875rem;
    color: #ccc; border-top: 1px solid #1a1a1a;
}
table tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
table tbody tr:hover { background: rgba(243,156,18,0.05); }

/* ── Animations ── */
.fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Login page specifics ── */
.login-input {
    width: 100%; padding: 0.75rem 1rem;
    background: rgba(17,17,17,0.9); border: 1px solid rgba(30,30,30,0.8);
    border-radius: 0.75rem; color: #e2e8f0;
    font-size: 0.875rem; outline: none; transition: all 0.2s;
}
.login-input:focus { border-color: #5b125e; box-shadow: 0 0 0 3px rgba(243,156,18,0.15); }

/* ── Captcha centering & scaling ── */
.captcha-wrap { display: flex; justify-content: center; }
.captcha-wrap > div { transform-origin: center top; width: 100%; }
.captcha-wrap .g-recaptcha > div,
.captcha-wrap .h-captcha > div { margin: 0 auto; }
.captcha-wrap .cf-turnstile { width: 100%; }
.captcha-wrap .cf-turnstile iframe { width: 100% !important; }
.slide-up { animation: slideUp 0.6s ease-out; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Profile dropdown ── */
.profile-dropdown {
    position: absolute; right: 0; top: 100%; margin-top: 0.5rem;
    width: 14rem; background: #161616; border: 1px solid #1e1e1e;
    border-radius: 0.75rem; box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    z-index: 50; overflow: hidden;
}
.profile-dropdown a, .profile-dropdown button {
    display: flex; align-items: center; gap: 0.5rem;
    width: 100%; padding: 0.625rem 1rem;
    font-size: 0.875rem; color: #a0a0a0;
    transition: all 0.15s; text-decoration: none;
    background: none; border: none; cursor: pointer; text-align: left;
}
.profile-dropdown a:hover, .profile-dropdown button:hover {
    background: rgba(243,156,18,0.1); color: #650d88;
}

/* ── Toggle switch (peer-based, works with Tailwind peer) ── */
.toggle-switch input:checked + div { background: #570750; }
.toggle-switch input:checked + div + div { transform: translateX(1.25rem); }

/* ── Store ── */
.store-header {
    background: #111; border-bottom: 1px solid #1e1e1e;
    padding: 1.5rem 2rem; text-align: center;
}
.store-header h2 {
    font-size: 1.5rem; font-weight: 800; color: #fff;
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
}

.store-tabs {
    display: flex; flex-wrap: wrap; gap: 0.625rem;
    justify-content: center; padding: 1rem 1rem 1.5rem;
}
.store-tab {
    border: 1px solid #2a2a2a; background: #161616; color: #ccc;
    padding: 0.5rem 0.875rem; border-radius: 0.5rem;
    font-weight: 600; font-size: 0.875rem; cursor: pointer;
    user-select: none; transition: all 0.15s;
}
.store-tab:hover { border-color: #76148a; color: #6a0e7c; }
.store-tab.active { background: #630c6b; border-color: #830983; color: #111; }

.store-status {
    margin: 0.625rem 1rem; padding: 0.75rem 1rem;
    border-radius: 0.5rem; background: rgba(255,255,255,0.06);
    color: #ccc; text-align: center; font-size: 0.875rem;
}
.store-status-error { background: rgba(220,53,69,0.15); color: #f87171; }

.store-grid {
    display: grid; gap: 1.25rem; padding: 0 1rem 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.store-col { display: flex; }

.store-card {
    background: #161616; border: 1px solid #1e1e1e;
    border-radius: 0.75rem; overflow: hidden;
    width: 100%; display: flex; flex-direction: column;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    cursor: pointer;
}
.store-card:hover {
    transform: translateY(-2px); border-color: #740774;
    box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

.store-card-img {
    position: relative; width: 100%; height: 200px;
    background: #0a0a0a; overflow: hidden;
}
.store-card-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.store-card-no-img {
    width: 100%; height: 100%; display: flex;
    align-items: center; justify-content: center; color: #2a2a2a;
}

.store-badge {
    position: absolute; top: 0.5rem; left: 0.5rem;
    padding: 0.25rem 0.625rem; border-radius: 0.375rem;
    background: rgba(0,0,0,0.65); color: #fff;
    font-size: 0.7rem; font-weight: 600;
    border: 1px solid rgba(255,255,255,0.12);
}
.store-details-btn {
    position: absolute; top: 0.5rem; right: 0.5rem;
    width: 2rem; height: 2rem; border-radius: 0.375rem;
    background: rgba(0,0,0,0.65); border: 1px solid rgba(255,255,255,0.15);
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1rem; transition: background 0.15s;
}
.store-details-btn:hover { background: rgba(243,156,18,0.4); }

.store-card-body {
    padding: 0.875rem 1rem; flex: 1;
    display: flex; flex-direction: column; gap: 0.375rem;
}
.store-name { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; }
.store-sub { font-size: 0.7rem; color: #777; }
.store-desc {
    font-size: 0.8rem; color: #aaa; white-space: pre-line;
    line-height: 1.35; max-height: 3.5rem; overflow: hidden;
}

.store-card-footer {
    background: rgba(255,255,255,0.04); border-top: 1px solid #1e1e1e;
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.625rem; padding: 0.625rem 0.75rem;
}
.store-price { font-size: 1.125rem; font-weight: 800; color: #fff; }
.store-actions { display: flex; align-items: center; gap: 0.5rem; }

.store-action-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; border-radius: 0.375rem;
    background: #1e1e1e; border: 1px solid #2a2a2a; color: #ccc;
    font-size: 0.875rem; transition: all 0.15s; text-decoration: none;
}
.store-action-btn:hover { background: #2a2a2a; color: #4d0a68; border-color: #6a1472; }

.store-buy-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.375rem 0.75rem; border-radius: 0.375rem;
    background: #600b7a; color: #63096e; font-size: 0.8rem; font-weight: 700;
    text-decoration: none; transition: background 0.15s;
}
.store-buy-btn:hover { background: #811081; }

/* Store Modal */
.store-modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    z-index: 100; display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.store-modal-content {
    background: #0a0a0a; border: 1px solid #1e1e1e;
    border-radius: 0.75rem; width: 100%; max-width: 64rem;
    max-height: calc(100vh - 2rem); overflow: hidden;
    display: flex; flex-direction: column;
}
.store-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; border-bottom: 1px solid #1e1e1e;
}
.store-modal-head h3 { font-size: 1.125rem; font-weight: 700; color: #fff; margin: 0; }
.store-modal-close-btn {
    background: none; border: none; color: #777; font-size: 1.5rem;
    cursor: pointer; padding: 0.25rem; line-height: 1; transition: color 0.15s;
}
.store-modal-close-btn:hover { color: #fff; }

.store-modal-body {
    display: flex; gap: 1.25rem; padding: 1.25rem;
    overflow: hidden; flex: 1;
}

.store-modal-main {
    flex: 1; min-width: 0; overflow-y: auto;
    padding-right: 0.5rem; max-height: calc(100vh - 10rem);
}
.store-modal-main::-webkit-scrollbar { width: 8px; }
.store-modal-main::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 8px; }
.store-modal-main::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }

.store-modal-media {
    border: 1px solid #1e1e1e; background: #111;
    border-radius: 0.75rem; padding: 0.5rem; overflow: hidden;
}
.store-modal-media-img {
    width: 100%; height: 320px; object-fit: contain;
    border-radius: 0.5rem; display: block; background: #0e0e0e;
}
.store-modal-media-iframe {
    width: 100%; height: 320px; border: 0;
    border-radius: 0.5rem; display: block;
}
.store-modal-no-media {
    width: 100%; height: 320px; display: flex;
    align-items: center; justify-content: center;
    background: #0e0e0e; border-radius: 0.5rem; color: #2a2a2a;
}

.store-modal-thumbs {
    display: flex; gap: 0.5rem; margin-top: 0.625rem;
    overflow-x: auto; padding-bottom: 0.25rem;
}
.store-modal-thumbs img {
    width: 5rem; height: 3.25rem; object-fit: cover;
    border-radius: 0.5rem; cursor: pointer;
    border: 2px solid #1e1e1e; transition: border-color 0.15s;
    flex: 0 0 auto;
}
.store-modal-thumbs img:hover { border-color: #777; }
.store-modal-thumbs img.active { border-color: #530653; }

.store-features { margin-top: 1rem; padding-top: 0.875rem; border-top: 1px solid #1e1e1e; }
.store-features-title { font-weight: 800; font-size: 0.95rem; color: #fff; margin-bottom: 0.625rem; }
.store-features-body { font-size: 0.85rem; line-height: 1.5; color: #bbb; }
.store-features-list { margin: 0; padding-left: 1.125rem; }
.store-features-list li { margin: 0.375rem 0; }

.store-features-body {
    max-height: clamp(200px, calc(100vh - 560px), 480px);
    overflow-y: auto; padding-right: 0.625rem;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) rgba(255,255,255,0.04);
}

.store-modal-aside {
    width: 300px; flex: 0 0 300px;
    border-left: 1px solid #1e1e1e; padding-left: 1.25rem;
}

.store-side-card {
    background: #161616; border: 1px solid #1e1e1e;
    border-radius: 0.75rem; padding: 0.875rem; margin-bottom: 0.875rem;
}
.store-side-card-title {
    display: flex; align-items: center; gap: 0.5rem;
    font-weight: 800; font-size: 0.85rem; color: #fff; margin-bottom: 0.625rem;
}
.store-side-card-title .dot {
    width: 0.5rem; height: 0.5rem; border-radius: 50%;
    background: #610b72; display: inline-block;
}
.store-side-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.625rem; padding: 0.625rem 0; border-top: 1px solid #1a1a1a;
}
.store-side-row .k { opacity: 0.65; font-size: 0.8rem; color: #aaa; }
.store-side-row .v { font-weight: 700; font-size: 0.8rem; color: #fff; text-align: right; }
.store-side-row .v.price { color: #660d66; font-size: 1.125rem; font-weight: 900; }

.store-pricing-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.625rem; }
.store-price-chip {
    flex: 1; min-width: 6rem; background: #0a0a0a;
    border: 1px solid #1e1e1e; border-radius: 0.625rem; padding: 0.625rem 0.75rem;
}
.store-chip-label { font-size: 0.7rem; color: #777; }
.store-chip-value { font-size: 0.95rem; font-weight: 900; color: #fff; }

.store-modal-btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 0.5rem; width: 100%; padding: 0.75rem;
    border-radius: 0.625rem; font-weight: 700; font-size: 0.85rem;
    border: 1px solid transparent; cursor: pointer;
    text-decoration: none; transition: all 0.15s; margin-bottom: 0.5rem;
}
.store-modal-btn-buy { background: rgba(243,156,18,0.15); border-color: rgba(243,156,18,0.4); color: #6b096e; }
.store-modal-btn-buy:hover { background: rgba(243,156,18,0.25); color: #fff; }
.store-modal-btn-yt { background: rgba(255,255,255,0.05); border-color: #1e1e1e; color: #ccc; }
.store-modal-btn-yt:hover { background: rgba(255,255,255,0.08); color: #fff; }
.store-modal-btn-close { background: rgba(220,53,69,0.15); border-color: rgba(220,53,69,0.4); color: #f87171; }
.store-modal-btn-close:hover { background: rgba(220,53,69,0.25); color: #fff; }
.store-modal-btn-tg { background: rgba(255,255,255,0.05); border-color: #1e1e1e; color: #ccc; }
.store-modal-btn-tg:hover { background: rgba(255,255,255,0.08); color: #fff; }

@media (max-width: 768px) {
    .store-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .store-card-img { height: 160px; }
    .store-modal-body { flex-direction: column; }
    .store-modal-main { max-height: none; overflow: visible; padding-right: 0; }
    .store-modal-aside { width: 100%; flex: 0 0 auto; border-left: 0; padding-left: 0; border-top: 1px solid #1e1e1e; padding-top: 0.875rem; }
    .store-modal-media-img, .store-modal-media-iframe, .store-modal-no-media { height: 220px; }
}

/* ── Utility classes ── */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Dashboard skeleton loading ── */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton { background: linear-gradient(90deg, #1e1e1e 25%, #2a2a2a 50%, #1e1e1e 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
.dash-loading .skeleton-text { height: 32px; width: 60%; margin-bottom: 4px; }
.dash-loading .skeleton-sub { height: 14px; width: 80%; }

/* ── Dashboard map ── */
#map { width: 100%; height: 100%; min-height: 320px; border-radius: 0.5rem; }
.jvectormap-tip { background: #161616 !important; border: 1px solid #1e1e1e !important; color: #e2e8f0 !important; font-size: 0.75rem !important; padding: 0.5rem 0.75rem !important; border-radius: 0.375rem !important; }
.jvectormap-zoomin, .jvectormap-zoomout { background: #1e1e1e !important; color: #ccc !important; border: 1px solid #2a2a2a !important; }

/* ══════════════════════════════════════════════════════════════
   MODULE PAGE — Shared styles (breadcrumbs, tabs, sections)
   ══════════════════════════════════════════════════════════════ */

/* ── Page header (breadcrumb + title) ── */
.page-header { margin: -1.5rem -1.5rem 1.5rem; padding: 1.25rem 1.5rem; background: #111; }

/* ── Tab bar (main tab row) ── */
.tab-bar {
    display: flex; gap: 0; border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0 16px; overflow-x: auto;
}

/* ── Sub-tabs (pill-style for multi-page hubs) ── */
.subtab-bar {
    display: flex; gap: 4px; padding: 12px 16px;
    background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.06);
}
.subtab {
    padding: 6px 16px; font-size: 13px; font-weight: 500; color: #666;
    cursor: pointer; border-radius: 6px; transition: all 0.2s;
}
.subtab:hover { color: #aaa; background: rgba(255,255,255,0.04); }
.subtab.active { color: var(--color-primary-400, #62086e); background: rgba(249,168,37,0.08); }

/* ── Tab panels (show/hide) ── */
.tab-panel-hidden { display: none; }

/* ── Module sections (dashed-border containers) ── */
.module-section {
    border: 1px dashed rgba(255,255,255,0.12); border-radius: 10px;
    margin-bottom: 20px; overflow: hidden;
}
.module-section-title {
    font-size: 14px; font-weight: 600; color: var(--color-primary-400, #680e7a);
    text-transform: uppercase; letter-spacing: 0.03em;
    padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.module-section-body { padding: 20px; }

/* ── VPN section (solid border variant) ── */
.vpn-section {
    border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
    margin-bottom: 24px; overflow: hidden;
}
.vpn-section-title {
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--color-primary-400, #6f1177);
    padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vpn-section-body { padding: 20px; }
.vpn-layout { display: grid; grid-template-columns: 380px 1fr; gap: 24px; }
@media (max-width: 1024px) { .vpn-layout { grid-template-columns: 1fr; } }

/* ── Toggle switch (label-based) ── */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #333; border-radius: 24px; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #888; border-radius: 50%; transition: 0.3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--color-primary-400, #780683); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: #fff; }

/* ── Iframe embed ── */
.iframe-embed { width: 100%; border: none; min-height: 500px; background: transparent; }

/* ── Editor grid (QR editor / settings with live preview) ── */
.editor-grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .editor-grid { grid-template-columns: 1fr; } }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type="color"] { width: 36px; height: 36px; border: 1px solid #333; border-radius: 8px; cursor: pointer; background: transparent; padding: 2px; flex-shrink: 0; }
.color-row input[type="text"] { flex: 1; }
.preview-frame { border: 1px solid #333; border-radius: 12px; overflow: hidden; position: sticky; top: 20px; }
.preview-bar { background: #222; padding: 8px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #333; }
.preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.preview-url { flex: 1; background: #111; border-radius: 4px; padding: 4px 10px; font-size: 11px; color: #666; font-family: monospace; }
.preview-body { height: 560px; overflow: hidden; }
.preview-tabs { display: flex; gap: 4px; padding: 8px 12px 0; background: #1a1a1a; }
.preview-tab {
    padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
    cursor: pointer; border: 1px solid #333; background: transparent; color: #999; transition: all .15s;
}
.preview-tab.active { background: #72147a; color: #000; border-color: #63084f; }
.logo-choice { display: flex; gap: 8px; margin-bottom: 12px; }
.logo-choice-btn {
    flex: 1; padding: 10px; border: 1px solid #333; border-radius: 8px;
    background: transparent; color: #999; font-size: 13px; cursor: pointer; text-align: center; transition: all .15s;
}
.logo-choice-btn.active { border-color: #791162; color: #751575; background: rgba(249,168,37,0.05); }
.logo-section { display: none; }
.logo-section.active { display: block; }
.current-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.current-logo img { height: 36px; border-radius: 6px; border: 1px solid #333; padding: 2px; background: #111; }

/* ── Radio card grid (webview selections) ── */
.radio-card-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.radio-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.08); cursor: pointer; transition: all 0.2s; }
.radio-card:hover { border-color: rgba(255,255,255,0.15); }
.radio-card.selected { border-color: var(--color-primary-500, #7a0971); background: rgba(249,168,37,0.05); }
.radio-card input[type="radio"] { margin-top: 3px; accent-color: var(--color-primary-500, #8a0b83); }
.inline-settings { margin-bottom: 20px; }
.settings-iframe { width: 100%; border: none; min-height: 700px; border-radius: 10px; background: transparent; }
@media (max-width: 768px) { .radio-card-row { grid-template-columns: 1fr; } }

/* ── Sport preview cards ── */
.sport-preview-card { display: flex; flex-direction: column; border-radius: 12px; border: 2px solid rgba(255,255,255,0.08); cursor: pointer; transition: all 0.2s; overflow: hidden; background: rgba(255,255,255,0.02); }
.sport-preview-card:hover { border-color: rgba(255,255,255,0.18); }
.sport-preview-card.selected { border-color: var(--color-primary-500, #94168e); background: rgba(249,168,37,0.06); }
.sport-preview-frame { width: 100%; height: 160px; overflow: hidden; position: relative; background: #0a0a0a; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sport-preview-frame iframe { width: 400%; height: 400%; border: none; transform: scale(0.25); transform-origin: top left; pointer-events: none; }
.sport-preview-info { padding: 12px 14px; }

/* ── Announcement thumbnail ── */
.aa-thumb { width: 48px; height: 36px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(255,255,255,0.08); background: #111; }

/* ── Global settings two-column grid ── */
.global-section { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { .global-section { grid-template-columns: 1fr; } }