/*
 * Cabal Latino — shared cyberpunk/HUD design system.
 * Linked from every page so the whole site draws from one palette/type
 * scale/component set instead of each page inventing its own. Tokens below
 * extend the --bg-deep/--accent-primary/--accent-secondary variables that
 * already existed identically in index.php, legal/_layout.php and
 * User/Basic/dashboard.php — this file does not rename anything, it adds
 * the gold/magenta accents the site's native-client launcher uses and a
 * reusable HUD component set (corner-bracket panels, skewed buttons,
 * terminal tags, segmented bars) plus the fluid/compact-viewport scale
 * proven in webshop/shop.php for the in-game 886x466 WebView2 panel.
 */

:root {
    --bg-deep: #020408;
    --text-dim: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);

    --accent-primary: #00f2ff;   /* cyan   — already the site's primary accent */
    --accent-secondary: #7000ff; /* purple — already the site's secondary accent */
    --accent-gold: #fbbf24;      /* new — launcher's "START" button / tag color */
    --accent-magenta: #ec4899;   /* new — launcher's secondary HUD trim color */
    --accent-green: #10b981;
    --accent-red: #ef4444;

    /* Admin "card" system, consolidated from admin_webshop.php / admin_panel.php */
    --card-bg: #1a1b2e;
    --input-bg: #252745;
    --admin-border: #343761;

    /* Fluid type scale — same approach as webshop/shop.php, reusable anywhere.
       Shrinks smoothly on short/embedded viewports without a hard breakpoint. */
    --fs-hero: clamp(1.4rem, 4vh + 1vw, 3rem);
    --fs-h2: clamp(1rem, 3vh + 0.4vw, 1.5rem);
    --fs-body: clamp(0.75rem, 1.6vh + 0.2vw, 0.95rem);
}

/* ---------- Shared type ---------- */
.font-display { font-family: 'Space Grotesk', sans-serif; }
.font-body { font-family: 'Plus Jakarta Sans', sans-serif; }

/* ---------- //TERMINAL tags ---------- */
.tag-terminal {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-family: 'Space Grotesk', monospace, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-primary);
}
.tag-terminal::before { content: '//'; opacity: 0.6; }
.tag-terminal.gold { color: var(--accent-gold); }
.tag-terminal.magenta { color: var(--accent-magenta); }

/* ---------- Cut-corner panels/tags ----------
   index.php already proved this exact shape (its .tag-angular / .btn-cabal-start
   use this same 6-point polygon) — generalized here as a shared, size-tunable
   utility so every other page can reuse the identical cut instead of a
   competing shape. --clip-cut controls the corner size. */
.clip-cut {
    --clip-cut: 8px;
    clip-path: polygon(
        var(--clip-cut) 0, 100% 0, 100% calc(100% - var(--clip-cut)),
        calc(100% - var(--clip-cut)) 100%, 0 100%, 0 var(--clip-cut)
    );
}

/* ---------- HUD corner-bracket frame ----------
   Decorative L-shaped brackets at two opposite corners, cyan + magenta,
   echoing the launcher's angular panel trim. Pure overlay (::before/::after),
   so it never clips/affects the panel's own content, blur or overflow — use
   this on panels where content shouldn't be clipped (forms, tables); use
   .clip-cut on tags/buttons/image cards where clipping is safe. */
.hud-frame {
    position: relative;
}
.hud-frame::before,
.hud-frame::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 1;
}
.hud-frame::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--accent-primary);
    border-left: 2px solid var(--accent-primary);
}
.hud-frame::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--accent-magenta);
    border-right: 2px solid var(--accent-magenta);
}

/* ---------- HUD buttons (the launcher's "START" button look) ----------
   Same cut-corner shape as .clip-cut, sized for a button, plus the solid
   offset shadow the launcher's button has. */
.btn-hud {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.85em 1.75em;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #000;
    background: var(--accent-gold);
    border: none;
    cursor: pointer;
    --clip-cut: 10px;
    clip-path: polygon(
        var(--clip-cut) 0, 100% 0, 100% calc(100% - var(--clip-cut)),
        calc(100% - var(--clip-cut)) 100%, 0 100%, 0 var(--clip-cut)
    );
    transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-hud::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #000;
    clip-path: inherit;
    transform: translate(4px, 4px);
    z-index: -1;
    opacity: 0.55;
}
.btn-hud:hover { filter: brightness(1.1); transform: translate(-1px, -1px); }
.btn-hud:active { transform: translate(1px, 1px); }

.btn-hud-outline {
    background: rgba(0, 242, 255, 0.06);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 242, 255, 0.4);
}
.btn-hud-outline::before { background: transparent; }
.btn-hud-outline:hover { background: rgba(0, 242, 255, 0.14); }

/* ---------- Segmented / blocky progress bar ---------- */
.bar-segmented {
    height: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}
.bar-segmented-fill {
    height: 100%;
    background-image: repeating-linear-gradient(
        90deg,
        var(--bar-color, var(--accent-primary)) 0,
        var(--bar-color, var(--accent-primary)) 6px,
        transparent 6px,
        transparent 9px
    );
    background-color: color-mix(in srgb, var(--bar-color, var(--accent-primary)) 35%, transparent);
    transition: width 0.4s ease;
}

/* ---------- Shared admin "card" system ----------
   Same classes already used by admin_webshop.php — formalized here so every
   admin page (admin_panel, admin_insight, admin_max_system, ...) shares one
   definition instead of redefining :root locally. */
.dashboard-card { background: var(--card-bg); border: 1px solid var(--admin-border); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.form-input, .form-select, .form-textarea {
    width: 100%; background: var(--input-bg); border: 1px solid var(--admin-border);
    border-radius: 6px; padding: 10px; color: #fff; margin-bottom: 12px;
    box-sizing: border-box; font-family: inherit;
}
.form-textarea { resize: vertical; min-height: 60px; }
.form-btn { padding: 12px 20px; border-radius: 6px; border: none; font-weight: bold; cursor: pointer; color: #fff; transition: opacity 0.2s; }
.form-btn:hover { opacity: 0.85; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
}

.items-table { width: 100%; border-collapse: collapse; }
.items-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; padding: 10px; border-bottom: 1px solid var(--admin-border); }
.items-table td { padding: 10px; border-bottom: 1px solid var(--admin-border); vertical-align: middle; font-size: 0.9rem; }

/* ---------- Compact-viewport pattern ----------
   Reference breakpoint for the embedded in-game WebView2 panel (886x466).
   Pages that need it should add their own rules under this query — kept
   here only as shared, documented convention, not applied globally. */
@media (max-height: 560px) {
    .hide-on-compact { display: none !important; }
}
