@charset "UTF-8";

/* ============================================================
   FRPHOLY · API RESELLER CONTROL
   style.css · Dark futurista / Glassmorphism / Rojo + Plata
   ============================================================ */

:root {
    --bg: #06070a;
    --bg-2: #0a0c11;
    --bg-3: #10121a;
    --panel: rgba(17, 19, 27, 0.68);
    --panel-strong: rgba(20, 22, 31, 0.9);
    --text: #eef1f7;
    --silver: #c9ced9;
    --silver-2: #a8b0bf;
    --muted: #8a92a2;
    --muted-2: #6f7686;
    --red: #ff2d4b;
    --red-soft: #ff6f84;
    --red-deep: #a80f27;
    --green: #2ee6a8;
    --yellow: #ffcc66;
    --stroke: rgba(255, 255, 255, 0.09);
    --stroke-strong: rgba(255, 255, 255, 0.17);
    --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Rajdhani', 'Inter', ui-sans-serif, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
    --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.32);
    --shadow-deep: 0 40px 120px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% -8%, rgba(255, 45, 75, 0.14), transparent 34rem),
        radial-gradient(circle at 92% 2%, rgba(196, 204, 220, 0.09), transparent 30rem),
        radial-gradient(circle at 50% 120%, rgba(255, 45, 75, 0.06), transparent 38rem),
        var(--bg);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

img,
svg {
    max-width: 100%;
}

::selection {
    background: rgba(255, 45, 75, 0.35);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #08090d;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3a3e49, #1c1f27);
    border: 2px solid #08090d;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b505d;
}

:focus-visible {
    outline: 2px solid rgba(255, 45, 75, 0.75);
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
}

.icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex: none;
    vertical-align: middle;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.is-hidden {
    display: none !important;
}

.mt-12 {
    margin-top: 12px;
}

.mt-14 {
    margin-top: 14px;
}

/* ------------------------------------------------------------
   Ambiente / fondo
   ---------------------------------------------------------- */
.ambient {
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(24px);
    opacity: 0.8;
}

.ambient-red {
    width: min(52vw, 760px);
    height: min(52vw, 760px);
    top: -24vw;
    right: -12vw;
    background: radial-gradient(circle, rgba(255, 35, 70, 0.28), transparent 67%);
    animation: floatA 17s ease-in-out infinite alternate;
}

.ambient-silver {
    width: min(46vw, 660px);
    height: min(46vw, 660px);
    bottom: -26vw;
    left: -16vw;
    background: radial-gradient(circle, rgba(188, 198, 217, 0.16), transparent 66%);
    animation: floatB 21s ease-in-out infinite alternate;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.52;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 74%);
    mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 74%);
}

.topbar,
.dashboard,
.login-shell,
.docs-wrap {
    position: relative;
    z-index: 1;
}

/* ------------------------------------------------------------
   Marca
   ---------------------------------------------------------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    flex: none;
}

.brand-mark {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: none;
    background: linear-gradient(135deg, var(--red), #740b1d 56%, var(--silver));
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    filter: drop-shadow(0 0 14px rgba(255, 45, 75, 0.28));
}

.brand-mark::before {
    content: "";
    position: absolute;
    inset: 2px;
    clip-path: inherit;
    background: linear-gradient(145deg, #171923, #08090d 70%);
}

.brand-mark-inner {
    position: relative;
    z-index: 1;
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-shadow: 0 0 12px rgba(255, 45, 75, 0.7);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-text strong {
    font-family: var(--font-display);
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted-2);
    font-size: 0.55rem;
    letter-spacing: 0.22em;
}

.brand-large .brand-mark {
    width: 52px;
    height: 52px;
}

.brand-large .brand-text strong {
    font-size: 1.2rem;
}

.brand-large .brand-text small {
    font-size: 0.6rem;
}

/* ------------------------------------------------------------
   Botones
   ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn .icon {
    width: 17px;
    height: 17px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    border-color: rgba(255, 112, 132, 0.36);
    background: linear-gradient(135deg, #ff3553, #c8122e 68%, #8f0a20);
    box-shadow: 0 9px 26px rgba(255, 35, 70, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 13px 34px rgba(255, 35, 70, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    filter: brightness(1.06);
}

.btn-ghost {
    border-color: var(--stroke);
    background: rgba(255, 255, 255, 0.035);
    color: var(--silver);
}

.btn-ghost:hover {
    border-color: var(--stroke-strong);
    background: rgba(255, 255, 255, 0.065);
    color: #fff;
}

.btn-danger {
    border-color: rgba(255, 86, 112, 0.38);
    background: linear-gradient(135deg, #e01b38, #8f0a20);
    box-shadow: 0 9px 26px rgba(255, 35, 70, 0.2);
    color: #fff;
}

.btn-danger:hover {
    box-shadow: 0 13px 34px rgba(255, 35, 70, 0.3);
    filter: brightness(1.06);
}

.btn-danger-ghost {
    border-color: rgba(255, 45, 75, 0.34);
    background: rgba(255, 45, 75, 0.08);
    color: #ff9cab;
}

.btn-danger-ghost:hover {
    border-color: rgba(255, 45, 75, 0.5);
    background: rgba(255, 45, 75, 0.14);
    color: #ffd3da;
}

.btn-sm {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.76rem;
}

.btn-mini {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
}

.btn-block {
    width: 100%;
}

.btn.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    flex: none;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--silver-2);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover {
    border-color: rgba(255, 45, 75, 0.36);
    background: rgba(255, 45, 75, 0.08);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 45, 75, 0.12);
}

/* ------------------------------------------------------------
   Formularios
   ---------------------------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 17px;
}

.field > span {
    color: var(--muted);
    font-size: 0.69rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    background: rgba(5, 6, 10, 0.55);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap:focus-within {
    border-color: rgba(255, 45, 75, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 45, 75, 0.1), inset 0 0 22px rgba(255, 45, 75, 0.035);
}

.input-wrap input {
    width: 100%;
    height: 48px;
    min-width: 0;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
}

.input-wrap input::placeholder {
    color: #5d6473;
}

.input-icon {
    width: 44px;
    align-self: stretch;
    display: grid;
    place-items: center;
    flex: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--muted-2);
}

.input-prefix {
    width: 42px;
    align-self: stretch;
    display: grid;
    place-items: center;
    flex: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--red-soft);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
}

.input-action {
    width: 46px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: none;
    border: 0;
    background: transparent;
    color: var(--muted-2);
    cursor: pointer;
}

.input-action:hover {
    color: var(--text);
}

.input-action.is-active {
    background: rgba(255, 45, 75, 0.07);
    color: var(--red-soft);
}

.clipboard-helper {
    position: fixed;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.input-wrap input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.input-wrap input[type="number"]::-webkit-outer-spin-button,
.input-wrap input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    transition: background-color 9999s ease-in-out 0s;
}

.select-wrap {
    position: relative;
}

.select-wrap select {
    width: 100%;
    height: 48px;
    padding: 0 42px 0 14px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    outline: 0;
    background: rgba(5, 6, 10, 0.55);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.select-wrap select:focus {
    border-color: rgba(255, 45, 75, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 45, 75, 0.1);
}

.select-wrap > .icon {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--muted-2);
    pointer-events: none;
}

.form-hint {
    margin: -7px 0 17px;
    color: var(--muted-2);
    font-size: 0.72rem;
    line-height: 1.6;
}

.form-hint code,
code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    color: var(--silver);
}

.form-alert {
    display: none;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 45, 75, 0.32);
    border-radius: 12px;
    background: rgba(255, 45, 75, 0.09);
    color: #ffb3bf;
    font-size: 0.82rem;
    line-height: 1.5;
}

.form-alert.is-visible {
    display: flex;
}

.alert-symbol {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 50%;
    background: rgba(255, 45, 75, 0.2);
    color: #ff8da0;
    font-size: 0.72rem;
    font-weight: 700;
}

/* ------------------------------------------------------------
   Indicadores / avatares
   ---------------------------------------------------------- */
.status-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    flex: none;
    border-radius: 50%;
    background: var(--muted-2);
}

.status-dot.is-active {
    background: var(--green);
    box-shadow: 0 0 10px rgba(46, 230, 168, 0.65);
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255, 45, 75, 0.92), #8d0b20);
    box-shadow: 0 6px 18px rgba(255, 45, 75, 0.18);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.avatar-lg {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 1.1rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    flex: none;
    background: linear-gradient(90deg, var(--red), transparent);
}

/* ------------------------------------------------------------
   Login
   ---------------------------------------------------------- */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 3vw, 42px);
}

.login-shell {
    width: min(1200px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.82fr);
    gap: clamp(36px, 6vw, 92px);
    align-items: center;
}

.login-showcase {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 16px 0;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 45, 75, 0.2);
    border-radius: 999px;
    background: rgba(255, 45, 75, 0.055);
    color: #ff9cab;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.17em;
}

.login-showcase h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(3rem, 5.4vw, 5rem);
    font-weight: 700;
    line-height: 0.93;
    letter-spacing: -0.025em;
}

.login-showcase h1 span {
    color: transparent;
    background: linear-gradient(95deg, #fff 0%, var(--silver) 48%, #ff7286 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.login-lead {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
}

.feature-list {
    width: 100%;
    max-width: 560px;
    display: grid;
    gap: 13px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.012));
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.feature-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid rgba(255, 45, 75, 0.18);
    border-radius: 12px;
    background: rgba(255, 45, 75, 0.08);
    color: var(--red-soft);
}

.feature-list strong {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
}

.feature-list small {
    display: block;
    margin-top: 2px;
    color: var(--muted-2);
    font-size: 0.75rem;
}

.login-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #5f6675;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.meta-divider {
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, var(--red), transparent);
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 470px;
    justify-self: end;
    overflow: hidden;
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    background: linear-gradient(155deg, rgba(24, 26, 36, 0.84), rgba(8, 9, 14, 0.92));
    box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.075);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 70, 95, 0.9), transparent);
}

.login-card-glow {
    position: absolute;
    top: -120px;
    right: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 45, 75, 0.22), transparent 70%);
    filter: blur(30px);
    pointer-events: none;
}

.login-head {
    position: relative;
    margin-bottom: 26px;
}

.login-head > .brand {
    display: flex;
    width: fit-content;
    margin-bottom: 18px;
}

.login-head h2 {
    margin: 10px 0 8px;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.login-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.btn-login {
    margin-top: 6px;
}

.login-card-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #737b8c;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-shell-simple {
    grid-template-columns: 1fr;
    max-width: 520px;
}

.login-shell-simple .login-card {
    justify-self: center;
}

/* ------------------------------------------------------------
   Topbar
   ---------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--stroke);
    background: rgba(7, 8, 12, 0.74);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
}

.topbar-inner {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 13px clamp(18px, 3vw, 32px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid var(--stroke);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.024);
    color: var(--muted);
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pulse {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(46, 230, 168, 0.55);
    animation: pulse 2s infinite;
}

.admin-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 9px 4px 4px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.024);
}

.admin-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.admin-meta strong {
    max-width: 130px;
    overflow: hidden;
    color: var(--silver);
    font-size: 0.76rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-meta small {
    color: var(--muted-2);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ------------------------------------------------------------
   Dashboard
   ---------------------------------------------------------- */
.dashboard {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: clamp(24px, 3.5vw, 44px) clamp(18px, 3vw, 36px) 34px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 27px;
}

.page-head h1 {
    margin: 8px 0 5px;
    font-family: var(--font-display);
    font-size: clamp(2.05rem, 3.2vw, 3rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.012em;
}

.page-head h1 span {
    color: transparent;
    background: linear-gradient(90deg, #fff, #d8dce6 42%, #ff7186);
    -webkit-background-clip: text;
    background-clip: text;
}

.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.page-head-actions {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.028);
    color: var(--muted-2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.search-box:focus-within {
    border-color: rgba(255, 45, 75, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 45, 75, 0.075);
    color: var(--silver);
}

.search-box .icon {
    width: 16px;
    height: 16px;
}

.search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 500;
}

.search-box input::placeholder {
    color: #626978;
}

.alert-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
    padding: 15px 17px;
    border: 1px solid rgba(255, 45, 75, 0.28);
    border-radius: 15px;
    background: linear-gradient(90deg, rgba(255, 45, 75, 0.115), rgba(255, 45, 75, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.alert-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid rgba(255, 45, 75, 0.24);
    border-radius: 12px;
    background: rgba(255, 45, 75, 0.1);
    color: #ff8da0;
}

.alert-copy {
    flex: 1;
    min-width: 0;
}

.alert-copy strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
}

.alert-copy p {
    margin: 3px 0 0;
    color: #aa9097;
    font-size: 0.78rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 23px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 19px;
    border: 1px solid var(--stroke);
    border-radius: 19px;
    background: linear-gradient(150deg, rgba(24, 26, 35, 0.72), rgba(10, 11, 16, 0.68));
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.052);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 45, 75, 0.55), rgba(210, 216, 228, 0.25), transparent);
    opacity: 0.7;
}

.metric-card::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 45, 75, 0.09), transparent 70%);
    pointer-events: none;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.19);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.metric-label {
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.metric-icon {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid rgba(255, 45, 75, 0.16);
    border-radius: 11px;
    background: rgba(255, 45, 75, 0.08);
    color: var(--red-soft);
}

.metric-icon .icon {
    width: 17px;
    height: 17px;
}

.metric-value {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 2.4vw, 2.45rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.metric-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: #7b8292;
    font-size: 0.7rem;
}

.metric-foot-split {
    justify-content: space-between;
    flex-wrap: wrap;
}

.price-form {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    min-height: 40px;
    overflow: hidden;
    border: 1px solid var(--stroke);
    border-radius: 10px;
    background: rgba(3, 4, 7, 0.52);
}

.price-input:focus-within {
    border-color: rgba(255, 45, 75, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 45, 75, 0.075);
}

.price-input span {
    padding-left: 12px;
    color: var(--red-soft);
    font-family: var(--font-display);
    font-weight: 700;
}

.price-input input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 9px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.price-card .metric-foot {
    margin-top: 9px;
    font-size: 0.64rem;
}

/* ------------------------------------------------------------
   Panel / tabla
   ---------------------------------------------------------- */
.panel {
    overflow: hidden;
    border: 1px solid var(--stroke);
    border-radius: 23px;
    background: linear-gradient(160deg, rgba(16, 18, 25, 0.78), rgba(8, 9, 14, 0.72));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-head h2 {
    margin: 5px 0 0;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.panel-head-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    flex-wrap: wrap;
}

.count-pill {
    min-width: 32px;
    height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 45, 75, 0.22);
    border-radius: 999px;
    background: rgba(255, 45, 75, 0.08);
    color: #ff8da0;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
}

.panel-hint {
    color: var(--muted-2);
    font-size: 0.68rem;
    letter-spacing: 0.03em;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.resellers-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.resellers-table th {
    padding: 13px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted-2);
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.resellers-table .th-actions,
.resellers-table td:last-child {
    text-align: right;
}

.resellers-table td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    font-size: 0.84rem;
    vertical-align: middle;
}

.resellers-table tbody tr {
    transition: background 0.2s ease;
}

.resellers-table tbody tr:hover {
    background: rgba(255, 45, 75, 0.032);
}

.resellers-table tbody tr:last-child td {
    border-bottom: 0;
}

.reseller-id {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reseller-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.reseller-meta strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    text-overflow: ellipsis;
}

.reseller-meta small {
    color: var(--muted-2);
    font-size: 0.67rem;
}

.credits-value {
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.muted-value {
    color: #858c9c;
    font-variant-numeric: tabular-nums;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
}

.pill-neutral {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--silver);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.status-pill.is-active {
    border-color: rgba(46, 230, 168, 0.22);
    background: rgba(46, 230, 168, 0.07);
    color: #79f0c6;
}

.status-pill.is-active .status-dot {
    background: var(--green);
    box-shadow: 0 0 8px rgba(46, 230, 168, 0.6);
}

.status-pill.is-inactive {
    border-color: rgba(255, 45, 75, 0.22);
    background: rgba(255, 45, 75, 0.07);
    color: #ff9cab;
}

.status-pill.is-inactive .status-dot {
    background: var(--red);
    box-shadow: 0 0 8px rgba(255, 45, 75, 0.6);
}

.status-pill:hover {
    filter: brightness(1.15);
}

.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.row-btn {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
    color: #8d94a4;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.row-btn .icon {
    width: 15px;
    height: 15px;
}

.row-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.row-btn-add:hover {
    border-color: rgba(46, 230, 168, 0.35);
    background: rgba(46, 230, 168, 0.08);
    color: #79f0c6;
}

.row-btn-sub:hover {
    border-color: rgba(255, 204, 102, 0.3);
    background: rgba(255, 204, 102, 0.07);
    color: #ffd27a;
}

.row-btn-danger:hover {
    border-color: rgba(255, 45, 75, 0.35);
    background: rgba(255, 45, 75, 0.08);
    color: #ff8da0;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 62px 20px;
    text-align: center;
}

.empty-state.compact {
    padding: 30px 18px 20px;
}

.empty-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin-bottom: 5px;
    border: 1px solid rgba(255, 45, 75, 0.18);
    border-radius: 16px;
    background: rgba(255, 45, 75, 0.08);
    color: var(--red-soft);
}

.empty-icon .icon {
    width: 24px;
    height: 24px;
}

.empty-state h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.24rem;
}

.empty-state p {
    max-width: 360px;
    margin: 0 0 11px;
    color: var(--muted);
    font-size: 0.8rem;
}

.empty-row:hover {
    background: transparent !important;
}

.empty-row td {
    padding: 0 !important;
    border: 0 !important;
}

.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 26px 0 0;
    color: #5f6675;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    flex-wrap: wrap;
}

.app-footer a {
    color: #8d94a4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-footer a:hover {
    color: var(--red-soft);
}

.footer-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #4d5361;
}

/* ------------------------------------------------------------
   Modales
   ---------------------------------------------------------- */
body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal.open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 3, 6, 0.8);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease;
}

.modal-card {
    position: relative;
    width: min(540px, 100%);
    max-height: min(88vh, 920px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(25, 27, 37, 0.98), rgba(9, 10, 15, 0.985));
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.065);
    animation: modalIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    z-index: 3;
    background: linear-gradient(90deg, transparent, rgba(255, 70, 95, 0.8), transparent);
    pointer-events: none;
}

.modal-card.modal-wide {
    width: min(980px, 100%);
}

.modal-card.modal-sm {
    width: min(440px, 100%);
}

.modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(14, 15, 22, 0.93);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.modal-head h3 {
    margin: 5px 0 0;
    font-family: var(--font-display);
    font-size: 1.48rem;
    font-weight: 700;
}

.modal-subtitle {
    margin: 5px 0 0;
    color: var(--muted-2);
    font-size: 0.73rem;
}

.modal-body {
    padding: 20px 22px 22px;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 21px;
    flex-wrap: wrap;
}

.target-chip {
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    color: #9da5b4;
    font-size: 0.79rem;
}

.confirm-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 45, 75, 0.22);
    border-radius: 14px;
    background: rgba(255, 45, 75, 0.1);
    color: #ff8da0;
}

.confirm-icon .icon {
    width: 24px;
    height: 24px;
}

.confirm-message {
    margin: 0;
    color: #a6adba;
    font-size: 0.86rem;
    line-height: 1.65;
}

.security-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.security-note .feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.security-note p {
    margin: 0;
    color: #8f97a7;
    font-size: 0.77rem;
    line-height: 1.55;
}

/* ------------------------------------------------------------
   Historial
   ---------------------------------------------------------- */
.history-body {
    padding-top: 18px;
}

.history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 21px;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.022);
    flex-wrap: wrap;
}

.history-identity {
    display: flex;
    align-items: center;
    gap: 13px;
}

.history-kpis {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.mini-kpi {
    min-width: 92px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
}

.mini-kpi span {
    display: block;
    color: #767e8f;
    font-size: 0.57rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mini-kpi strong {
    display: block;
    margin-top: 2px;
    font-family: var(--font-display);
    font-size: 1.03rem;
    font-weight: 700;
}

.timeline {
    position: relative;
    padding-left: 18px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(180deg, rgba(255, 45, 75, 0.45), rgba(255, 255, 255, 0.06) 30%, rgba(255, 255, 255, 0.03));
}

.timeline-item {
    position: relative;
    padding-bottom: 15px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -17px;
    top: 12px;
    z-index: 1;
    width: 11px;
    height: 11px;
    border: 2px solid var(--bg-2);
    border-radius: 50%;
    background: var(--silver);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 14px rgba(255, 45, 75, 0.28);
}

.timeline-dot.op-frp {
    background: var(--red);
    box-shadow: 0 0 0 1px rgba(255, 45, 75, 0.3), 0 0 16px rgba(255, 45, 75, 0.5);
}

.timeline-dot.op-fdl {
    background: var(--silver);
    box-shadow: 0 0 0 1px rgba(200, 206, 220, 0.25), 0 0 14px rgba(200, 206, 220, 0.3);
}

.timeline-dot.op-add {
    background: var(--green);
    box-shadow: 0 0 0 1px rgba(46, 230, 168, 0.25), 0 0 14px rgba(46, 230, 168, 0.4);
}

.timeline-dot.op-sub {
    background: var(--yellow);
    box-shadow: 0 0 0 1px rgba(255, 204, 102, 0.25), 0 0 14px rgba(255, 204, 102, 0.35);
}

.timeline-card {
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.011));
}

.timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.timeline-tags {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.timeline-top time {
    color: var(--muted-2);
    font-size: 0.66rem;
    white-space: nowrap;
}

.op-badge {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.op-badge.op-frp {
    border-color: rgba(255, 45, 75, 0.2);
    background: rgba(255, 45, 75, 0.1);
    color: #ff9cab;
}

.op-badge.op-fdl {
    border-color: rgba(200, 206, 220, 0.16);
    background: rgba(200, 206, 220, 0.08);
    color: #d4d9e4;
}

.op-badge.op-add {
    border-color: rgba(46, 230, 168, 0.18);
    background: rgba(46, 230, 168, 0.08);
    color: #79f0c6;
}

.op-badge.op-sub {
    border-color: rgba(255, 204, 102, 0.18);
    background: rgba(255, 204, 102, 0.08);
    color: #ffd27a;
}

.op-badge.op-neutral {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #aab1c0;
}

.source-tag {
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 5px;
    color: var(--muted-2);
    font-size: 0.57rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mini-tag {
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    color: #8d94a4;
    font-size: 0.6rem;
    letter-spacing: 0.08em;
}

.timeline-metrics {
    display: flex;
    gap: 22px;
    margin-top: 9px;
    flex-wrap: wrap;
}

.timeline-metric small {
    display: block;
    color: #717989;
    font-size: 0.57rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.timeline-metric strong {
    display: block;
    margin-top: 2px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
}

.device-box {
    margin-top: 11px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.device-box summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    color: #8e96a7;
    font-size: 0.7rem;
    list-style: none;
    cursor: pointer;
}

.device-box summary::-webkit-details-marker {
    display: none;
}

.device-box summary span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.device-box summary .icon {
    width: 14px;
    height: 14px;
    color: var(--red-soft);
}

.summary-action {
    color: var(--muted-2);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.device-box[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.device-content {
    padding: 10px 11px 11px;
}

.device-content pre {
    max-height: 230px;
    margin: 0;
    padding: 11px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    color: #b8c0ce;
    font-family: var(--font-mono);
    font-size: 0.69rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.device-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.truncated-note {
    color: var(--muted-2);
    font-size: 0.63rem;
}

.history-note {
    margin: 16px 0 0;
    color: var(--muted-2);
    font-size: 0.68rem;
    text-align: center;
}

.history-loading {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

.skeleton-line.is-title {
    width: 38%;
    height: 18px;
}

.skeleton-line.is-short {
    width: 62%;
}

.skeleton-card {
    height: 92px;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

/* ------------------------------------------------------------
   Toasts
   ---------------------------------------------------------- */
.toast-container {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
    max-width: min(380px, calc(100vw - 28px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    background: rgba(17, 19, 26, 0.96);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
    color: var(--silver);
    font-size: 0.8rem;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    pointer-events: auto;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast.is-leaving {
    opacity: 0;
    transform: translateX(12px);
}

.toast-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 50%;
    background: rgba(46, 230, 168, 0.15);
    color: #79f0c6;
    font-size: 0.68rem;
    font-weight: 700;
}

.toast-error {
    border-color: rgba(255, 45, 75, 0.3);
}

.toast-error .toast-icon {
    background: rgba(255, 45, 75, 0.18);
    color: #ff9cab;
}

.toast-info .toast-icon {
    background: rgba(200, 206, 220, 0.12);
    color: var(--silver);
}

/* ------------------------------------------------------------
   Documentación / resumen.php
   ---------------------------------------------------------- */
.docs-wrap {
    width: min(1380px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 4vw, 52px) clamp(18px, 3vw, 36px) 38px;
}

.docs-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 27px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.docs-hero h1 {
    margin: 9px 0 9px;
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 4vw, 3.7rem);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: -0.015em;
}

.docs-hero h1 span {
    color: transparent;
    background: linear-gradient(90deg, #fff, #d8dce6 45%, #ff7186);
    -webkit-background-clip: text;
    background-clip: text;
}

.docs-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.75;
}

.docs-hero-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    flex: none;
}

.docs-layout {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 27px;
    align-items: start;
}

.docs-nav {
    position: sticky;
    top: 84px;
    padding: 17px;
    border: 1px solid var(--stroke);
    border-radius: 17px;
    background: rgba(16, 18, 25, 0.62);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.docs-nav strong {
    display: block;
    margin: 0 0 10px 4px;
    color: var(--muted-2);
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.docs-nav a {
    display: block;
    padding: 8px 9px;
    border-left: 2px solid transparent;
    border-radius: 7px;
    color: #98a0af;
    font-size: 0.77rem;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.docs-nav a:hover {
    border-left-color: var(--red);
    background: rgba(255, 45, 75, 0.06);
    color: #fff;
}

.docs-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.doc-section {
    scroll-margin-top: 92px;
}

.doc-section-head {
    margin-bottom: 13px;
}

.doc-section-head h2 {
    margin: 5px 0 0;
    font-family: var(--font-display);
    font-size: 1.78rem;
    font-weight: 700;
}

.doc-section-head p {
    max-width: 850px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.7;
}

.doc-card {
    min-width: 0;
    padding: 21px;
    border: 1px solid var(--stroke);
    border-radius: 17px;
    background: linear-gradient(155deg, rgba(20, 22, 31, 0.7), rgba(9, 10, 15, 0.66));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.doc-section > .doc-card + .doc-card,
.doc-section > .doc-grid + .doc-card {
    margin-top: 13px;
}

.doc-card h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 9px;
    font-family: var(--font-display);
    font-size: 1.23rem;
    font-weight: 700;
}

.doc-card h3 .icon {
    color: var(--red-soft);
}

.doc-card p,
.doc-card li {
    color: #9aa2b1;
    font-size: 0.82rem;
    line-height: 1.7;
}

.doc-card p:last-child {
    margin-bottom: 0;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.file-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.022);
}

.file-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.file-badge {
    padding: 3px 7px;
    border: 1px solid rgba(255, 45, 75, 0.18);
    border-radius: 6px;
    background: rgba(255, 45, 75, 0.07);
    color: #ff9cab;
    font-family: var(--font-mono);
    font-size: 0.64rem;
}

.file-type {
    color: var(--muted-2);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.file-card h3 {
    margin: 0 0 5px;
    color: var(--silver);
    font-family: var(--font-mono);
    font-size: 0.94rem;
    font-weight: 500;
}

.file-card p {
    margin: 0;
    color: #8c94a3;
    font-size: 0.75rem;
    line-height: 1.6;
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 11px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 0 7px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    color: #9ba3b2;
    font-size: 0.58rem;
}

.tag-red {
    border-color: rgba(255, 45, 75, 0.18);
    background: rgba(255, 45, 75, 0.06);
    color: #ff9cab;
}

.data-list {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 11px;
}

.data-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-row:last-child {
    border-bottom: 0;
}

.data-row span {
    color: #727a8a;
    font-size: 0.74rem;
}

.data-row strong,
.data-row code {
    color: var(--silver);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.data-row .secret-mask {
    color: #8d94a4;
    letter-spacing: 0.12em;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 11px;
}

.schema-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.schema-table th {
    padding: 9px 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted-2);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-align: left;
    text-transform: uppercase;
}

.schema-table td {
    padding: 9px 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #9aa2b1;
    font-size: 0.72rem;
    vertical-align: top;
    word-break: break-word;
}

.schema-table tr:last-child td {
    border-bottom: 0;
}

.schema-table td:first-child {
    color: var(--silver);
    font-family: var(--font-mono);
    white-space: nowrap;
}

.code-block {
    margin: 11px 0 0;
    padding: 13px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.35);
    color: #b7c0ce;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.7;
    white-space: pre;
}

.callout {
    display: flex;
    gap: 11px;
    margin: 11px 0 0;
    padding: 12px 13px;
    border: 1px solid rgba(255, 45, 75, 0.24);
    border-radius: 11px;
    background: rgba(255, 45, 75, 0.07);
    color: #c7a7ad;
    font-size: 0.78rem;
    line-height: 1.65;
}

.callout .icon {
    flex: none;
    margin-top: 1px;
    color: #ff8da0;
}

.callout strong {
    color: #ffb3bf;
}

.callout-info {
    border-color: rgba(200, 206, 220, 0.14);
    background: rgba(200, 206, 220, 0.045);
    color: #9aa3b2;
}

.callout-info .icon {
    color: var(--silver);
}

.callout-info .alert-symbol {
    background: rgba(200, 206, 220, 0.12);
    color: var(--silver);
}

.callout-info strong {
    color: var(--silver);
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step-list li {
    position: relative;
    padding: 11px 13px 11px 47px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.02);
    color: #99a1b0;
    font-size: 0.79rem;
    line-height: 1.6;
    counter-increment: step;
}

.step-list li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: 11px;
    left: 13px;
    color: var(--red-soft);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 23px;
    color: #9ca4b2;
    font-size: 0.79rem;
    line-height: 1.6;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    color: var(--green);
    font-weight: 700;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 9px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.22);
}

.method-badge {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 0 7px;
    border: 1px solid rgba(46, 230, 168, 0.2);
    border-radius: 5px;
    background: rgba(46, 230, 168, 0.1);
    color: #79f0c6;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 600;
}

.endpoint code {
    color: #c3cbd8;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    word-break: break-word;
}

.doc-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.doc-card p code,
.doc-card li code {
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #d3d9e3;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.docs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 30px;
    padding-top: 21px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--muted-2);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-wrap: wrap;
}

.docs-footer a {
    color: var(--silver-2);
    text-decoration: none;
}

.docs-footer a:hover {
    color: var(--red-soft);
}

/* ------------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 1180px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-head {
        align-items: flex-start;
    }
}

@media (max-width: 1080px) {
    .live-pill {
        display: none;
    }

    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-nav {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px;
    }

    .docs-nav strong {
        grid-column: 1 / -1;
    }

    .docs-nav a {
        border-left: 0;
        border-bottom: 2px solid transparent;
    }

    .docs-nav a:hover {
        border-left: 0;
        border-bottom-color: var(--red);
    }
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 540px;
        gap: 28px;
    }

    .login-showcase {
        align-items: center;
        gap: 16px;
        padding: 0;
        text-align: center;
    }

    .login-showcase h1 {
        font-size: clamp(2.25rem, 8vw, 3.3rem);
    }

    .login-lead,
    .feature-list,
    .login-meta {
        display: none;
    }

    .login-card {
        justify-self: center;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .page-head {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .page-head-actions {
        width: 100%;
    }

    .search-box {
        flex: 1;
        min-width: 0;
    }

    .docs-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 820px) {
    .topbar-inner {
        padding: 12px 16px;
    }

    .topbar-actions {
        gap: 7px;
    }

    .admin-meta {
        display: none;
    }

    .admin-chip {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .table-wrap {
        padding: 13px;
        overflow: visible;
    }

    .resellers-table {
        display: block;
        min-width: 0;
    }

    .resellers-table thead {
        display: none;
    }

    .resellers-table tbody {
        display: grid;
        gap: 10px;
    }

    .resellers-table tr {
        display: block;
        padding: 12px 14px;
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 14px;
        background: linear-gradient(150deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.011));
    }

    .resellers-table tbody tr:hover {
        background: linear-gradient(150deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.011));
    }

    .resellers-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 8px 0;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.055);
        text-align: right !important;
        font-size: 0.8rem;
    }

    .resellers-table td::before {
        content: attr(data-label);
        color: #727a8a;
        font-size: 0.59rem;
        font-weight: 600;
        letter-spacing: 0.11em;
        text-align: left;
        text-transform: uppercase;
    }

    .resellers-table td:last-child {
        padding-top: 10px;
        border-bottom: 0;
    }

    .resellers-table td[data-label="Reseller"] {
        display: block;
        padding-top: 0;
        text-align: left !important;
    }

    .resellers-table td[data-label="Reseller"]::before {
        display: none;
    }

    .reseller-id {
        justify-content: flex-start;
        text-align: left;
    }

    .row-actions {
        margin-left: auto;
    }

    .resellers-table .empty-row {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .resellers-table .empty-row td {
        display: block;
        padding: 0 !important;
    }

    .resellers-table .empty-row td::before {
        display: none;
    }

    .empty-state {
        padding: 42px 16px;
    }

    .panel-head {
        padding: 18px;
    }

    .app-footer {
        font-size: 0.58rem;
    }
}

@media (max-width: 700px) {
    .doc-grid,
    .docs-grid,
    .doc-two-col {
        grid-template-columns: 1fr;
    }

    .docs-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .docs-wrap {
        padding-top: 24px;
    }

    .data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .data-row strong,
    .data-row code {
        text-align: left;
    }
}

@media (max-width: 620px) {
    .topbar .brand-text small {
        display: none;
    }

    .topbar .brand-mark {
        width: 36px;
        height: 36px;
    }

    .topbar .brand-text strong {
        font-size: 0.9rem;
    }

    .hide-sm {
        display: none;
    }

    .topbar .btn {
        min-height: 40px;
        padding: 0 10px;
    }

    .topbar .icon-btn {
        width: 38px;
        height: 38px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .page-head-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .page-head-actions .btn,
    .search-box {
        width: 100%;
    }

    .alert-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .alert-banner .btn {
        width: 100%;
    }

    .panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .panel-head-meta {
        justify-content: flex-start;
    }

    .panel-hint {
        display: none;
    }

    .history-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .history-kpis {
        width: 100%;
    }

    .mini-kpi {
        flex: 1;
        min-width: 0;
    }

    .input-wrap input,
    .input-wrap select,
    .select-wrap select,
    .search-box input {
        font-size: 16px;
    }

    .modal {
        align-items: flex-end;
        padding: 10px;
    }

    .modal-card {
        max-height: 92vh;
        border-radius: 20px;
    }

    .modal-head {
        padding: 17px 18px 14px;
    }

    .modal-body {
        padding: 17px 18px 19px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .toast-container {
        right: 14px;
        bottom: 14px;
        left: 14px;
        max-width: none;
    }

    .toast {
        width: 100%;
    }

    .login-page {
        padding: 15px;
    }

    .login-card {
        padding: 26px 20px;
        border-radius: 22px;
    }

    .login-head h2 {
        font-size: 1.72rem;
    }

    .login-showcase h1 {
        font-size: clamp(2rem, 10vw, 2.7rem);
    }

    .docs-nav {
        padding: 13px;
    }

    .doc-card {
        padding: 17px;
    }

    .docs-hero h1 {
        font-size: 2.25rem;
    }

    .docs-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .topbar .brand-text {
        display: none;
    }

    .admin-chip {
        display: none;
    }

    .topbar-actions {
        margin-left: auto;
    }

    .dashboard {
        padding-top: 22px;
    }

    .page-head h1 {
        font-size: 2rem;
    }

    .metric-card {
        padding: 17px;
    }

    .history-kpis {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mini-kpi {
        padding: 8px;
    }

    .timeline-metrics {
        gap: 14px;
    }

    .timeline-top time {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ------------------------------------------------------------
   Animaciones
   ---------------------------------------------------------- */
@keyframes floatA {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(-34px, 28px, 0) scale(1.06);
    }
}

@keyframes floatB {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(26px, -22px, 0) scale(1.05);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 230, 168, 0.5);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(46, 230, 168, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 230, 168, 0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
