:root {
    --bg: #0b0c10;
    --surface: #111318;
    --surface-2: #1a1d24;
    --text: #f0f2f5;
    --text-dim: #9aa3b2;
    --accent: #00d4ff;
    --accent-2: #ff2d7b;
    --success: #00e676;
    --error: #ff5252;
    --radius: 18px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a, a:hover, a:focus, a:active {
    text-decoration: none;
}

.home-app h1,
.home-app h2,
.home-app p,
.home-app span,
.home-app a,
.home-app strong {
    text-decoration: none;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.12) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    pointer-events: none;
    z-index: 0;
    transition: background 0.8s ease;
}

.app {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 60px);
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Home */
.hero {
    text-align: center;
    margin-bottom: 50px;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

.hero.compact {
    margin-bottom: 34px;
}

.hero.compact h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero.compact p {
    max-width: 620px;
}

.hero.small {
    margin-bottom: 34px;
}

.hero.small h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
}

.platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.platforms.home-platforms {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 50px;
}

.platforms.home-platforms .platform-card {
    border: none;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px);
}

.platform-card {
    position: relative;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 28px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    color: var(--text);
    font-family: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

.platform-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.platform-card.ig::before {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.15), rgba(88, 81, 219, 0.15));
}

.platform-card.fb::before {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.15), rgba(66, 103, 178, 0.15));
}

.platform-card.loc::before {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.12), rgba(0, 212, 255, 0.12));
}

.platform-card.loc .platform-icon {
    color: #00e676;
}

.platform-card.wa::before {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(18, 140, 126, 0.15));
}

.platform-card.wa .platform-icon {
    color: #25d366;
}

.platform-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: rgba(255, 255, 255, 0.18);
}

.platforms.home-platforms .platform-card:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.06);
}

.platform-card:hover::before {
    opacity: 1;
}

.platform-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.platform-card.ig .platform-icon {
    color: #e1306c;
}

.platform-card.fb .platform-icon {
    color: #1877f2;
}

.platform-icon svg {
    width: 26px;
    height: 26px;
}

.platform-card h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.platform-card p {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.platform-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    transition: all 0.25s ease;
    text-align: center;
    margin-top: auto;
}

.platform-card:hover .platform-btn {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.2);
}

.platform-card .arrow {
    display: none;
}

/* Yencel header */
.sim-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 34px;
    flex-wrap: wrap;
    gap: 14px;
}

.back-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-dim);
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
}

.brand-logo {
    height: 34px;
    width: auto;
    flex-shrink: 0;
}

.hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hero-brand h1 {
    margin-bottom: 0;
}

.hero-logo {
    width: 64px;
    height: auto;
    flex-shrink: 0;
    border-radius: 14px;
}

@media (max-width: 640px) {
    .hero-brand {
        gap: 10px;
    }
    .hero-logo {
        width: 48px;
    }
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Steps */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.input-card {
    max-width: 460px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 42px;
    text-align: center;
    box-shadow: var(--shadow);
}

.input-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.06);
}

.input-icon svg {
    width: 36px;
    height: 36px;
}

.input-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.input-card > p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.input-label {
    display: block;
    text-align: left;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.country-select {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: var(--text);
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 16px;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa3b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.country-select:focus {
    border-color: var(--accent);
}

.input-wrap {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}

.input-wrap:focus-within {
    border-color: var(--accent);
}

.input-prefix {
    padding: 0 12px 0 16px;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 1.1rem;
}

.input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 1rem;
    padding: 14px 0;
    font-family: inherit;
}

.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    min-height: 20px;
    margin-bottom: 14px;
}

.primary-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.25);
}

.primary-btn.external {
    margin-top: 10px;
    background: linear-gradient(135deg, #4285f4, #34a853);
}

/* Terminal */
.terminal-card {
    background: #050608;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    margin-left: 10px;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
    padding: 18px;
    height: 260px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 6px;
    color: #a8b2c1;
}

.terminal-line.success { color: var(--success); }
.terminal-line.warn { color: #ffbd2e; }
.terminal-line.info { color: var(--accent); }

/* Metrics */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px;
}

.metric-label {
    display: block;
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-weight: 700;
    font-size: 1.3rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 4px;
    transition: width 0.2s linear;
}

/* Charts */
.charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.chart {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.chart canvas {
    width: 100%;
    height: 120px;
}

.chart span {
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Results */
.result-card {
    max-width: 520px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 42px;
    text-align: center;
    box-shadow: var(--shadow);
}

.success-animation {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 230, 118, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    border: 2px solid var(--success);
}

.checkmark {
    color: var(--success);
    font-size: 2.2rem;
    font-weight: 700;
}

.result-profile-image {
    width: 76px;
    height: 76px;
    border: 2px solid var(--success);
    border-radius: 50%;
    object-fit: cover;
}

.hidden {
    display: none !important;
}

.result-card h2 strong {
    color: var(--accent);
}

.result-card h2 {
    font-size: 1.7rem;
    margin-bottom: 8px;
}

.result-subtitle {
    color: var(--text-dim);
    margin-bottom: 30px;
}

.result-data {
    text-align: left;
    margin-bottom: 28px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.data-row span {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.data-row strong {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-dim);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

/* Theme variations */
body.theme-instagram {
    --accent: #f77737;
    --accent-2: #e1306c;
}

body.theme-instagram .bg-glow {
    background: radial-gradient(circle, rgba(225, 48, 108, 0.14) 0%, transparent 70%);
}

body.theme-facebook {
    --accent: #1877f2;
    --accent-2: #42b72a;
}

body.theme-facebook .bg-glow {
    background: radial-gradient(circle, rgba(24, 119, 242, 0.16) 0%, transparent 70%);
}

body.theme-localizador {
    --accent: #00e676;
    --accent-2: #00d4ff;
}

body.theme-localizador .input-icon {
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.4);
    box-shadow: 0 0 22px rgba(0, 230, 118, 0.28);
}

body.theme-localizador .bg-glow {
    background: radial-gradient(circle, rgba(0, 230, 118, 0.14) 0%, transparent 70%);
}

body.theme-whatsapp {
    --accent: #25d366;
    --accent-2: #128c7e;
}

body.theme-whatsapp .bg-glow {
    background: radial-gradient(circle, rgba(37, 211, 102, 0.16) 0%, transparent 70%);
}

body.theme-whatsapp .input-icon {
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.4);
    box-shadow: 0 0 22px rgba(37, 211, 102, 0.28);
}

/* Guía SEO del localizador */
.loc-guide {
    margin-top: 36px;
    padding: 30px 6px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.loc-guide h2 {
    font-size: 24px;
    color: #f1f5f9;
    line-height: 1.3;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.loc-guide h2 strong {
    color: #00e676;
}

.loc-guide h3 {
    font-size: 18px;
    color: #f1f5f9;
    margin: 26px 0 10px;
    letter-spacing: -0.005em;
}

.loc-guide h4 {
    font-size: 15px;
    color: #e5e7eb;
    margin: 16px 0 6px;
    font-weight: 600;
}

.loc-guide p {
    color: #9ca3af;
    font-size: 14.5px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.loc-guide p strong {
    color: #e5e7eb;
    font-weight: 700;
}

.loc-guide ul {
    margin: 0 0 12px;
    padding-left: 20px;
    color: #9ca3af;
    font-size: 14.5px;
    line-height: 1.75;
}

.loc-guide ul li {
    margin-bottom: 3px;
}

.loc-guide ul li strong {
    color: #e5e7eb;
    font-weight: 700;
}

.loc-guide ul li strong:first-child {
    color: #00e676;
}

.loc-guide ol {
    margin: 0 0 12px;
    padding-left: 22px;
    color: #9ca3af;
    font-size: 14.5px;
    line-height: 1.75;
}

.loc-guide ol li {
    margin-bottom: 3px;
}

.loc-guide ol li strong {
    color: #e5e7eb;
    font-weight: 700;
}

.loc-guide ol li strong:first-child {
    color: #00e676;
}

.loc-guide code {
    background: #0d1117;
    border: 1px solid rgba(0, 230, 118, 0.25);
    color: #00e676;
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    padding: 1px 6px;
    border-radius: 6px;
}

.loc-guide .loc-table-wrap {
    overflow-x: auto;
    margin: 10px 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.loc-guide .loc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    color: #9ca3af;
    min-width: 520px;
}

.loc-guide .loc-table th,
.loc-guide .loc-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.loc-guide .loc-table th {
    color: #f1f5f9;
    font-weight: 600;
    background: #0d1117;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.loc-guide .loc-table tr:last-child td {
    border-bottom: none;
}

.loc-guide .loc-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.loc-guide .loc-table td:first-child strong {
    color: #00e676;
}

.loc-guide .loc-cta {
    margin-top: 22px;
    padding: 14px 18px;
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: 12px;
    background: rgba(0, 230, 118, 0.05);
    color: #c7d1db;
    font-size: 14.5px;
    line-height: 1.6;
}

.loc-guide .loc-cta p {
    margin-bottom: 0;
}

.loc-guide .loc-cta strong {
    color: #00e676;
}

.loc-guide a {
    color: #00d9c0;
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 217, 192, 0.4);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.loc-guide a:hover,
.loc-guide a:focus {
    color: #00e676;
    border-bottom-style: solid;
}

.loc-guide a strong {
    color: inherit;
}

.loc-guide hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 26px 0;
}

@media (max-width: 640px) {
    .loc-guide {
        padding: 24px 4px 4px;
    }
    .loc-guide h2 {
        font-size: 20px;
    }
    .loc-guide h3 {
        font-size: 16px;
    }
    .loc-guide p,
    .loc-guide ul {
        font-size: 14px;
    }
}
}

/* Motion section (home) */
.motion-section {
    margin-top: 20px;
    overflow: hidden;
}

.marquee {
    width: 100%;
    overflow: hidden;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 34px;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 60px;
    width: max-content;
    animation: marquee 28s linear infinite;
}

.marquee-track span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--text-dim);
    white-space: nowrap;
    opacity: 0.7;
}

.marquee-track span:nth-child(odd) {
    color: var(--accent);
    opacity: 0.9;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.stats-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 40px;
}

.stat-bubble {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 24px;
    min-width: 160px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-bubble:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-bubble strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
}

.stat-bubble span {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.feature-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
}

.flow-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.flow-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
    animation: pulse 2s infinite;
}

.flow-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 2px;
    opacity: 0.5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 1024px) {
    .platforms.home-platforms {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .platforms.home-platforms {
        grid-template-columns: 1fr;
    }

    .platform-card {
        min-height: auto;
        flex-direction: row;
        align-items: center;
        gap: 18px;
        padding: 20px;
    }

    .platform-top {
        flex: 1;
    }

    .platform-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 12px;
    }

    .platform-card h2 {
        font-size: 1.1rem;
    }

    .platform-card p {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .platform-btn {
        width: auto;
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .feature-flow {
        flex-direction: column;
        gap: 16px;
    }

    .flow-line {
        width: 2px;
        height: 24px;
        background: linear-gradient(180deg, var(--accent), var(--accent-2));
    }

    .stat-bubble {
        min-width: 130px;
        padding: 14px 18px;
    }
}

@media (max-width: 520px) {
    .app {
        padding: 24px 16px;
    }
    .input-card, .result-card {
        padding: 28px 22px;
    }
    .terminal-body {
        height: 220px;
    }
}

body.wa-clone-page {
    min-height: 100vh;
    overflow: hidden;
}

.wa-clone {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100vh;
    background: #0b1110;
    position: relative;
}

.wa-clone-sidebar {
    background: #111816;
    border-right: 1px solid rgba(37, 211, 102, 0.12);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wa-clone-side-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #25d366;
}

.wa-clone-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 0 10px #25d366;
}

.wa-clone-search {
    margin: 12px 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #6b7c76;
    font-size: 0.85rem;
}

.wa-clone-contacts {
    overflow: auto;
    flex: 1;
}

.wa-clone-contact {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.wa-clone-contact.active {
    background: rgba(37, 211, 102, 0.08);
}

.wa-clone-contact span {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1c2b24;
    color: #25d366;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.wa-clone-contact strong {
    display: block;
    font-size: 0.92rem;
}

.wa-clone-contact small {
    color: #7d8c86;
}

.wa-clone-chat {
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 211, 102, 0.08), transparent 28%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 8px, transparent 8px 16px),
        #0e1614;
}

.wa-clone-chat-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 18px;
    background: #111816;
    border-bottom: 1px solid rgba(37, 211, 102, 0.12);
}

.wa-clone-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1c2b24;
    color: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.wa-clone-chat-head span {
    display: block;
    color: #7d8c86;
    font-size: 0.78rem;
}

.wa-clone-messages {
    flex: 1;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
}

.wa-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.35;
}

.wa-bubble.in {
    align-self: flex-start;
    background: #1a2421;
    color: #d7e4de;
}

.wa-bubble.out {
    align-self: flex-end;
    background: #0f3d2e;
    color: #e8fff4;
}

.wa-bubble.media {
    padding: 6px;
}

.wa-media {
    width: 210px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-media.loading {
    background: linear-gradient(90deg, #1a2a24 25%, #24352e 50%, #1a2a24 75%);
    background-size: 200% 100%;
    animation: waLoad 1s linear infinite;
    color: #8ea69c;
    font-size: 0.78rem;
}

.wa-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wa-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 8px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #e8fff4;
    background:
        linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55)),
        linear-gradient(135deg, #1b5e46, #0d3b2c 55%, #163028);
}

.wa-audio {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    padding: 4px 6px;
}

.wa-audio i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #25d366;
    position: relative;
}

.wa-audio i::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    border: 6px solid transparent;
    border-left-color: #04110c;
}

.wa-audio b {
    flex: 1;
    height: 3px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.25);
}

.wa-bubble {
    animation: waIn 0.25s ease;
}

@keyframes waIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@keyframes waLoad {
    to { background-position: -200% 0; }
}

.wa-clone-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 7, 0.28);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.wa-clone-overlay[hidden] {
    display: none;
}

.wa-gate {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: #0b1412;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wa-gate[hidden] {
    display: none;
}

.wa-gate-card {
    width: min(420px, 100%);
    background: #121a18;
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: 22px;
    padding: 34px 28px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.wa-gate-card h2 {
    color: #25d366;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.wa-gate-card p {
    color: #9aaba4;
    margin-bottom: 14px;
    line-height: 1.6;
}

.wa-gate-card .primary-btn {
    display: inline-block;
    margin-top: 6px;
}

.wa-clone-modal {
    width: min(420px, 100%);
    background: #121a18;
    border: 1px solid rgba(37, 211, 102, 0.22);
    border-radius: 22px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.wa-clone-modal h2 {
    color: #25d366;
    margin-bottom: 10px;
    font-size: 1.45rem;
}

.wa-clone-modal p {
    color: #9aaba4;
    margin-bottom: 18px;
}

.wa-clone-modal input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0b1110;
    color: #fff;
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 1rem;
}

.wa-clone-modal .primary-btn {
    margin-top: 8px;
}

.wa-clone-secondary {
    background: linear-gradient(135deg, #128c7e, #25d366);
}

.wa-guide-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(4, 8, 7, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wa-guide-overlay[hidden] {
    display: none;
}

.wa-guide-modal {
    position: relative;
    width: min(640px, 100%);
    background: #121a18;
    border: 1px solid rgba(37, 211, 102, 0.28);
    border-radius: 22px;
    padding: 36px 32px 28px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.wa-guide-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #cfe7dc;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.wa-guide-modal h2 {
    color: #25d366;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    margin: 0 28px 8px;
}

.wa-guide-modal > p {
    color: #d7e4de;
    margin-bottom: 22px;
    font-size: 1.02rem;
}

.wa-guide-steps {
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 0 24px;
    padding: 0;
}

.wa-guide-steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    color: #e8fff4;
    line-height: 1.45;
}

.wa-guide-steps span {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #25d366;
    color: #04110c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.wa-guide-steps strong {
    color: #fff;
}

@media (max-width: 640px) {
    .wa-guide-modal {
        padding: 28px 18px 20px;
        border-radius: 18px;
    }
    .wa-guide-steps li {
        font-size: 0.92rem;
    }
}

.wa-wait-overlay,
.wa-verify-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(3, 6, 5, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wa-wait-overlay[hidden],
.wa-verify-overlay[hidden] {
    display: none;
}

.wa-wait-spinner {
    width: 64px;
    height: 64px;
    border: 5px solid rgba(37, 211, 102, 0.2);
    border-top-color: #25d366;
    border-radius: 50%;
    animation: waSpin 0.8s linear infinite;
}

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

.wa-verify-modal {
    width: min(560px, 100%);
    background: #121a18;
    border: 1px solid rgba(37, 211, 102, 0.28);
    border-radius: 22px;
    padding: 36px 28px;
    text-align: center;
}

.wa-verify-modal h2 {
    color: #25d366;
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.wa-verify-modal p {
    color: #d7e4de;
    line-height: 1.5;
    margin-bottom: 14px;
}

.wa-verify-bar {
    width: 100%;
    height: 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin: 18px 0 10px;
}

.wa-verify-bar div {
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, #128c7e, #25d366);
}

.wa-verify-modal strong {
    color: #25d366;
}

.wa-last-clones {
    max-width: 460px;
    margin: 18px auto 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wa-last-clone {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(37, 211, 102, 0.28);
    background: rgba(255, 255, 255, 0.04);
    color: #d7e4de;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
}

.wa-last-clone:hover {
    border-color: #25d366;
    color: #fff;
}

button.wa-last-clone {
    width: 100%;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

body.theme-instagram .wa-last-clone {
    border-color: rgba(225, 48, 108, 0.35);
}

body.theme-instagram .wa-last-clone:hover {
    border-color: #e1306c;
}

body.theme-facebook .wa-last-clone {
    border-color: rgba(24, 119, 242, 0.4);
}

body.theme-facebook .wa-last-clone:hover {
    border-color: #1877f2;
}

.social-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(4, 8, 7, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.social-lock-overlay[hidden] {
    display: none;
}

.social-lock-modal {
    width: min(420px, 100%);
    background: #121418;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: 22px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.social-lock-modal h2 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.45rem;
}

.social-lock-modal p {
    color: #9aa3ad;
    margin-bottom: 18px;
}

.social-lock-modal input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0b0d10;
    color: #fff;
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 1rem;
}

.social-lock-modal .primary-btn {
    margin-top: 8px;
}

.social-admin-modal {
    width: min(440px, 100%);
    position: relative;
}

.social-admin-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(0, 230, 118, 0.12);
    border: 2px solid var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    overflow: hidden;
}

.social-admin-photo .checkmark {
    font-size: 2.4rem;
}

.social-admin-photo .result-profile-image {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 50%;
}

.social-admin-desc {
    margin-bottom: 20px;
}

.social-admin-modal .primary-btn.external {
    display: block;
    width: 100%;
    text-decoration: none;
    text-align: center;
}

.social-admin-data {
    margin-top: 26px;
    text-align: left;
}

.social-admin-data h3 {
    color: var(--accent);
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.social-admin-data .data-row span {
    color: var(--success);
}

.social-admin-data .data-row strong.success-text {
    color: var(--text);
}

.social-admin-data .data-row .success-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--text);
}

.social-admin-data .data-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-admin-data .copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    opacity: 0.7;
    transition: color 0.2s, opacity 0.2s;
}

.social-admin-data .copy-btn:hover {
    color: var(--accent);
    opacity: 1;
}

.social-admin-data .copy-btn svg {
    width: 15px;
    height: 15px;
}

.admin-toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(18, 20, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #dbe4e0;
    font-size: 0.82rem;
    padding: 9px 18px;
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 60;
    pointer-events: none;
}

.admin-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.theme-instagram .wa-guide-modal h2,
body.theme-instagram .wa-verify-modal h2,
body.theme-instagram .wa-verify-modal strong {
    color: var(--accent);
}

body.theme-facebook .wa-guide-modal h2,
body.theme-facebook .wa-verify-modal h2,
body.theme-facebook .wa-verify-modal strong {
    color: var(--accent);
}

body.theme-instagram .wa-guide-steps span,
body.theme-facebook .wa-guide-steps span {
    background: var(--accent);
}

body.theme-instagram .wa-wait-spinner,
body.theme-facebook .wa-wait-spinner {
    border-top-color: var(--accent);
}

body.theme-instagram .wa-verify-bar div,
body.theme-facebook .wa-verify-bar div {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

#socialGuideOverlay,
#socialWaitOverlay,
#socialVerifyOverlay {
    position: fixed;
    z-index: 41;
}

.terminal-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.locator-map-host {
    position: relative;
    min-height: 260px;
    background: #050608;
}

.locator-map-mobile {
    display: none;
}

.locator-map-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: #05080a;
    overflow: hidden;
}

.locator-map-overlay[hidden] {
    display: none;
}

.locator-map {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-height: 260px;
}

.locator-satellite {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background:
        radial-gradient(circle at center, rgba(0, 230, 118, 0.14) 0%, rgba(2, 6, 4, 0.55) 55%, #05080a 100%);
    overflow: hidden;
    pointer-events: none;
}

.locator-satellite[hidden] {
    display: none;
}

.locator-satellite-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    border: 2px dashed rgba(0, 230, 118, 0.55);
    border-radius: 50%;
    animation: locatorSpin 6s linear infinite;
}

.locator-satellite-ring::before,
.locator-satellite-ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(0, 230, 118, 0.35);
}

.locator-satellite-ring::before {
    inset: 22px;
}

.locator-satellite-ring::after {
    inset: 46px;
}

.locator-satellite-ping {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border-radius: 50%;
    background: rgba(0, 230, 118, 0.25);
    animation: locatorPing 1.6s ease-out infinite;
}

.locator-satellite-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.9));
}

.locator-satellite-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: #7ee2a8;
    text-shadow: 0 0 12px rgba(0, 230, 118, 0.6);
    animation: locatorBlink 1.4s ease-in-out infinite;
}

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

@keyframes locatorPing {
    0% { transform: scale(0.5); opacity: 1; }
    80% { transform: scale(3.2); opacity: 0; }
    100% { transform: scale(3.2); opacity: 0; }
}

@keyframes locatorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ========== PANEL LOCALIZACIÓN REALIZADA (GPS) ========== */
body[data-platform="localizador"] .app:has(#stepLocate.active) {
    max-width: none;
    padding: 0;
}

body[data-platform="localizador"] .app:has(#stepLocate.active) .sim-body {
    padding: 0;
}

.gps-dashboard {
    max-width: 1360px;
    margin: 0 auto;
    padding: 28px 24px 40px;
    min-height: 100vh;
    position: relative;
    background-color: #080a0d;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f1f5f9;
}

.gps-dashboard::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 40px 40px;
}

.gps-dashboard::after {
    content: '';
    position: fixed;
    top: -120px;
    left: -120px;
    width: 45vw;
    height: 45vw;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle, rgba(0,230,118,0.10) 0%, rgba(0,230,118,0.03) 40%, transparent 70%);
}

.gps-dashboard > * {
    position: relative;
    z-index: 1;
}

/* Header */
.gps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    height: 55px;
    margin-bottom: 25px;
}

.gps-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.01em;
}

.gps-back {
    width: 104px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.07);
    color: #9ca3af;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.gps-back:hover {
    background: rgba(255,255,255,0.06);
}

.gps-conn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 14px;
}

.gps-conn .gps-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 10px rgba(0,230,118,0.9);
    animation: gpsPulseLed 2s ease-in-out infinite;
}

@keyframes gpsPulseLed {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

/* Fila superior: mapa + ubicación actual */
.gps-top {
    display: grid;
    grid-template-columns: 72% 28%;
    gap: 18px;
    margin-bottom: 20px;
}

.gps-map-wrap {
    position: relative;
    height: 370px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    background: #0d1117;
}

#gpsMap {
    width: 100%;
    height: 100%;
}

#gpsMap .leaflet-control-attribution {
    background: rgba(8,10,13,0.7);
    color: #64707d;
    font-size: 10px;
}

#gpsMap.gps-dark .leaflet-tile-pane {
    filter: invert(1) hue-rotate(200deg) brightness(0.9) contrast(0.92) saturate(0.7);
}

/* Selector de capas del mapa */
.gps-layer-toggle {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 340px;
    padding: 6px;
    border-radius: 13px;
    background: rgba(8,10,13,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    z-index: 500;
}

.gps-layer-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #9ca3af;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.gps-layer-btn svg {
    width: 14px;
    height: 14px;
}

.gps-layer-btn:hover {
    background: rgba(255,255,255,0.05);
    color: #e5e7eb;
}

.gps-layer-btn.active {
    background: #00d9c0;
    color: #071012;
    font-weight: 700;
}

/* Controles zoom / centrar */
.gps-map-tools {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 500;
}

.gps-map-tool {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(10,14,18,0.90);
    border: 1px solid rgba(255,255,255,0.08);
    color: #d1d5db;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.20);
}

.gps-map-tool:hover {
    background: rgba(38,46,54,0.95);
    color: #00e676;
}

/* Tarjeta de coordenadas */
.gps-coords-card {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(8,12,16,0.90);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 12px;
    color: #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
    z-index: 500;
    line-height: 1.5;
}

.gps-coords-card svg {
    color: #00e676;
}

.gps-coords-card strong {
    color: #f1f5f9;
    font-weight: 600;
}

/* Chip volver a tiempo real */
.gps-view-chip {
    position: absolute;
    bottom: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 240px;
    padding: 10px 13px;
    background: rgba(8,12,16,0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,230,118,0.4);
    border-radius: 999px;
    color: #00e676;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(0,230,118,0.18);
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 500;
}

.gps-view-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e5e7eb;
}

.gps-view-chip:hover {
    background: rgba(0,230,118,0.12);
    border-color: #00e676;
}

.gps-view-chip[hidden] {
    display: none;
}

.gps-loc-ip {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(0,230,118,0.12);
    border: 1px solid rgba(0,230,118,0.3);
    color: #00e676;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Pin GPS pulsante */
.gps-pin-wrap {
    position: relative;
    width: 34px;
    height: 34px;
}

.gps-pin-wrap::before,
.gps-pin-wrap::after,
.gps-pin-dot {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(0,230,118,0.5);
}

.gps-pin-wrap::before {
    width: 34px; height: 34px;
    background: rgba(0,230,118,0.15);
}

.gps-pin-wrap::after {
    width: 54px; height: 54px;
    background: rgba(0,230,118,0.08);
    animation: gpsPinBreathe 2.5s ease-in-out infinite;
}

.gps-pin-dot {
    width: 12px; height: 12px;
    background: #00e676;
    box-shadow: 0 0 18px rgba(0,230,118,0.95);
    border: 0;
    z-index: 2;
}

@keyframes gpsPinBreathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.35); opacity: 0.65; }
}

/* Tarjeta Ubicación Actual */
.gps-loc-card {
    background: #101318;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    height: 370px;
    box-sizing: border-box;
}

.gps-loc-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 18px;
}

.gps-loc-title svg {
    color: #00e676;
}

.gps-loc-rows {
    display: flex;
    flex-direction: column;
}

.gps-loc-row {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 2px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.gps-loc-row svg {
    color: #00d9c0;
}

.gps-loc-row .gps-loc-label {
    color: #8b949e;
    font-size: 13px;
}

.gps-loc-row .gps-loc-val {
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.gps-loc-updated {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,230,118,0.08);
    border-radius: 10px;
    padding: 12px 14px;
    color: #9ca3af;
    font-size: 13px;
}

.gps-loc-updated .gps-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 10px rgba(0,230,118,0.9);
}

/* Fila inferior: métricas + historial + tiempo real */
.gps-bottom {
    display: grid;
    grid-template-columns: 32% 44% 24%;
    gap: 18px;
    align-items: start;
}

.gps-col-metrics {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.gps-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gps-metric {
    background: #101318;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 18px;
    min-width: 0;
}

.gps-metric svg {
    color: #00d9c0;
    margin-bottom: 10px;
}

.gps-metric .gps-metric-label {
    display: block;
    color: #8b949e;
    font-size: 12px;
    margin-bottom: 6px;
}

.gps-metric .gps-metric-val {
    display: block;
    color: #f1f5f9;
    font-size: 19px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gps-device {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 90px;
    background: #101318;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 0 20px;
    box-sizing: border-box;
}

.gps-device .gps-device-ico {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(0,230,118,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00e676;
}

.gps-device .gps-device-label {
    display: block;
    color: #8b949e;
    font-size: 12px;
    margin-bottom: 4px;
}

.gps-device .gps-device-status {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #00e676;
    font-size: 15px;
    font-weight: 700;
}

.gps-device .gps-device-status .gps-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 10px rgba(0,230,118,0.9);
}

/* Historial */
.gps-history {
    background: #101318;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 18px;
    min-width: 0;
}

.gps-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.gps-history-head .gps-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
}

.gps-history-head .gps-card-title svg {
    color: #00e676;
}

.gps-seeall {
    color: #00e676;
    font-size: 13px;
    text-decoration: none;
}

.gps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.gps-table th {
    text-align: left;
    color: #64707d;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.gps-table td {
    padding: 10px 6px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    white-space: nowrap;
}

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

.gps-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.gps-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.gps-table tbody tr.selected {
    background: rgba(0,230,118,0.10);
    outline: 1px solid rgba(0,230,118,0.35);
}

.gps-table tbody tr.selected .gps-td-place,
.gps-table tbody tr.selected .gps-td-date {
    color: #00e676;
}

.gps-table .gps-td-lat,
.gps-table .gps-td-lng {
    font-family: 'JetBrains Mono', monospace;
    color: #9ca3af;
}

.gps-table .gps-td-place {
    color: #eee;
}

.gps-table .gps-td-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
}

.gps-table .gps-td-date .gps-led {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 6px rgba(0,230,118,0.8);
    flex-shrink: 0;
}

/* Tiempo real */
.gps-realtime {
    background: #101318;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 18px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gps-realtime .gps-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 16px;
}

.gps-realtime .gps-card-title svg {
    color: #00e676;
}

.gps-rt-center {
    text-align: center;
    padding: 8px 0 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.gps-rt-ring {
    width: 90px;
    height: 90px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 2px solid #00d9c0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00e676;
    box-shadow: 0 0 24px rgba(0,230,118,0.25), inset 0 0 20px rgba(0,230,118,0.10);
}

.gps-rt-active {
    display: block;
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.gps-rt-line {
    color: #8b949e;
    font-size: 12.5px;
}

.gps-rt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

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

.gps-rt-row .gps-rt-label {
    color: #8b949e;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.gps-rt-row .gps-rt-label svg {
    color: #00d9c0;
}

.gps-rt-row .gps-rt-val {
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 700;
}

.gps-batt {
    flex: 1;
    max-width: 90px;
    height: 8px;
    border-radius: 999px;
    background: #242a30;
    overflow: hidden;
}

.gps-batt-fill {
    height: 100%;
    background: linear-gradient(90deg, #00e676, #00d9c0);
    border-radius: 999px;
    transition: width 0.5s ease;
}

.gps-signal {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.gps-signal i {
    width: 4px;
    border-radius: 2px;
    background: #00e676;
    box-shadow: 0 0 6px rgba(0,230,118,0.6);
}

.gps-signal i:nth-child(1) { height: 6px; }
.gps-signal i:nth-child(2) { height: 10px; }
.gps-signal i:nth-child(3) { height: 14px; }
.gps-signal i:nth-child(4) { height: 18px; }
.gps-signal i.off { background: #242a30; box-shadow: none; }

@keyframes gpsHover {
    to { transform: translateY(-1px); }
}

.gps-metric,
.gps-device,
.gps-history,
.gps-realtime,
.gps-loc-card {
    transition: transform 200ms ease, border-color 200ms ease;
}

.gps-dashboard.ready .gps-metric:hover,
.gps-dashboard.ready .gps-device:hover,
.gps-dashboard.ready .gps-history:hover,
.gps-dashboard.ready .gps-realtime:hover,
.gps-dashboard.ready .gps-loc-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.11);
}

/* Responsive panel GPS */
@media (max-width: 1200px) {
    .gps-top {
        grid-template-columns: 65% 35%;
    }
    .gps-bottom {
        grid-template-columns: 1fr 1fr;
    }
    .gps-realtime {
        grid-column: span 1;
    }
}

@media (max-width: 860px) {
    .gps-dashboard {
        padding: 18px 14px 28px;
    }
    .gps-title {
        position: static;
        transform: none;
        font-size: 17px;
        text-align: center;
        flex: 1;
    }
    .gps-header {
        gap: 10px;
    }
    .gps-back {
        width: 82px;
        font-size: 12px;
    }
    .gps-top {
        grid-template-columns: 1fr;
    }
    .gps-map-wrap {
        height: 300px;
    }
    .gps-loc-card {
        height: auto;
    }
    .gps-bottom {
        grid-template-columns: 1fr;
    }
    .gps-metrics {
        grid-template-columns: 1fr 1fr;
    }
    .gps-history {
        overflow-x: auto;
    }
    .gps-table {
        min-width: 480px;
    }
    .gps-layer-toggle {
        max-width: 100%;
        right: 14px;
        gap: 4px;
    }
    .gps-layer-btn {
        padding: 7px 9px;
        font-size: 11px;
    }
    .gps-view-chip {
        bottom: 12px;
        right: 12px;
        max-width: 200px;
        font-size: 11px;
    }
    .gps-loc-ip {
        display: block;
        margin: 6px 0 0;
        width: fit-content;
    }
}

.locator-map-blur {
    position: absolute;
    inset: 0;
    z-index: 3;
    backdrop-filter: blur(22px);
    background: rgba(2, 6, 4, 0.72);
}

.locator-map-blur[hidden] {
    display: none;
}

.locator-gps {
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: #00e676;
    box-shadow: 0 0 16px #00e676;
}

#locatorLocks .social-lock-overlay,
#locatorLocks .wa-guide-overlay,
#locatorLocks .wa-wait-overlay,
#locatorLocks .wa-verify-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
}
#locatorLocks .social-lock-overlay {
    background: rgba(2, 5, 4, 0.82);
    backdrop-filter: blur(8px);
}
#locatorLocks .wa-guide-overlay,
#locatorLocks .wa-wait-overlay,
#locatorLocks .wa-verify-overlay {
    background: rgba(2, 5, 4, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#locatorLockOverlay .social-lock-modal,
#locatorLocks .wa-guide-modal,
#locatorLocks .wa-verify-modal {
    width: min(420px, 94%);
    padding: 22px 16px;
}

@media (max-width: 860px) {
    .terminal-split {
        grid-template-columns: 1fr;
    }
    .locator-map-desktop {
        display: none;
    }
    .locator-map-mobile {
        display: block;
        min-height: 220px;
        margin-bottom: 16px;
        border-radius: 16px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    body[data-platform="localizador"] .metrics {
        display: none;
    }
    .locator-map {
        min-height: 220px;
    }
}

@media (max-width: 860px) {
    .wa-clone {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: 100dvh;
    }
    .wa-clone-sidebar {
        display: flex;
        border-right: 0;
        border-bottom: 1px solid rgba(37, 211, 102, 0.12);
    }
    .wa-clone-search {
        display: none;
    }
    .wa-clone-side-head {
        display: none;
    }
    .wa-clone-contacts {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .wa-clone-contact {
        flex-direction: column;
        min-width: 84px;
        max-width: 96px;
        padding: 10px 8px;
        border-bottom: 0;
        text-align: center;
        gap: 6px;
    }
    .wa-clone-contact div {
        min-width: 0;
        width: 100%;
    }
    .wa-clone-contact strong,
    .wa-clone-contact small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.72rem;
    }
    .wa-clone-contact small {
        font-size: 0.62rem;
    }
}

/* === Topbar de la home (reemplaza el badge) === */
.site-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
    margin-bottom: 18px;
    background: rgba(9, 12, 16, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: left;
}

.toolbar-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.toolbar-link {
    background: none;
    border: none;
    cursor: pointer;
    color: #9aa3ad;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 7px 11px;
    border-radius: 9px;
    transition: color 0.2s ease, background 0.2s ease;
}

.toolbar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.auth-menu {
    position: relative;
}

.auth-btn {
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #e8eaed;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 9px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-btn.primary {
    background: linear-gradient(135deg, #2d5bff, #7a2df8);
    border-color: transparent;
}

.auth-btn.primary:hover {
    background: linear-gradient(135deg, #3f6bff, #8a3dff);
}

.auth-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    min-width: 210px;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-dropdown[hidden] {
    display: none;
}

.auth-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: none;
    color: #e8eaed;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
}

.auth-option:hover {
    background: rgba(255, 255, 255, 0.07);
}

.auth-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
}

.auth-dot.ig { background: linear-gradient(135deg, #f58529, #dd2a7b); }
.auth-dot.fb { background: #1877f2; }
.auth-dot.loc { background: #00e676; }
.auth-dot.wa { background: #25d366; }

/* === Modales genéricos === */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(3, 6, 6, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-card {
    position: relative;
    width: min(560px, 100%);
    max-height: 82vh;
    overflow-y: auto;
    background: #0e1216;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: #9aa3ad;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #fff;
}

.modal-card h2 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 14px;
}

.modal-sub {
    color: #9aa3ad;
    margin-bottom: 16px;
}

.modal-body {
    color: #cfd6dd;
    font-size: 0.92rem;
    line-height: 1.65;
}

.modal-body h3 {
    color: #fff;
    font-size: 1rem;
    margin: 18px 0 8px;
}

.modal-body p,
.modal-body li {
    margin-bottom: 10px;
    color: #aeb6bf;
}

.modal-body ul {
    padding-left: 18px;
}

/* === Login === */
.login-card {
    width: min(400px, 100%);
    text-align: center;
}

.login-card input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0a0d10;
    color: #fff;
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.1em;
}

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

.login-msg {
    color: #ff5b5b;
    font-size: 0.85rem;
    min-height: 1.2em;
    margin-bottom: 8px;
}

/* === Banner de cookies === */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #0d1116;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
    animation: cookieIn 0.4s ease forwards;
}

.cookie-banner[hidden] {
    display: none;
}

@keyframes cookieIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.cookie-text {
    color: #aeb6bf;
    font-size: 0.88rem;
    line-height: 1.55;
    flex: 1 1 300px;
    margin: 0;
}

.cookie-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    padding: 0;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 560px) {
    .site-toolbar {
        justify-content: center;
    }
    .toolbar-actions {
        width: 100%;
        justify-content: center;
    }
    .cookie-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
}

/* === Panel Admin === */
.admin-panel {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: rgba(2, 4, 6, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: auto;
    padding: 24px 16px;
}

.admin-panel[hidden] {
    display: none;
}

body.admin-open {
    overflow: hidden;
}

.admin-inner {
    max-width: 1080px;
    margin: 0 auto;
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.admin-head h2 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 4px;
}

.admin-sub {
    color: #9aa3ad;
    margin: 0;
    font-size: 0.9rem;
}

.admin-sub strong {
    color: #ffd166;
}

.admin-close {
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #e8eaed;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.admin-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.admin-stat {
    background: rgba(13, 18, 23, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    text-align: center;
}

.admin-stat.total {
    border-color: rgba(0, 212, 255, 0.4);
}

.admin-stat strong {
    display: block;
    font-size: 1.5rem;
    color: #fff;
    line-height: 1.2;
}

.admin-stat.total strong {
    color: var(--accent);
}

.admin-stat span {
    display: block;
    font-size: 0.78rem;
    color: #9aa3ad;
    margin-top: 4px;
}

.admin-card {
    background: rgba(10, 14, 18, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 18px;
}

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

.admin-card-head h3 {
    color: #e8eaed;
    font-size: 1.05rem;
    margin: 0;
}

.admin-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-filter {
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #b9c1c9;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 9px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.admin-filter:hover {
    background: rgba(255, 255, 255, 0.09);
}

.admin-filter.active {
    background: linear-gradient(135deg, #2d5bff, #7a2df8);
    color: #fff;
    border-color: transparent;
}

.admin-custom {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}

.admin-custom[hidden] {
    display: none;
}

.admin-custom label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9aa3ad;
    font-size: 0.85rem;
}

.admin-custom input[type="date"] {
    background: #0b0f13;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    border-radius: 9px;
    padding: 7px 10px;
    color-scheme: dark;
}

.admin-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 180px;
    overflow-x: auto;
    padding: 6px 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-bar-col {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    flex: 1 1 0;
    min-width: 14px;
    height: 100%;
}

.admin-bar-val {
    font-size: 0.68rem;
    color: #9aa3ad;
    margin-bottom: 3px;
    line-height: 1;
}

.admin-bar {
    width: 100%;
    max-width: 28px;
    min-height: 2px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, #00d4ff, #7a2df8);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.35);
}

.admin-bar-date {
    font-size: 0.6rem;
    color: #77818b;
    margin-top: 4px;
    white-space: nowrap;
}

.admin-total-line {
    margin-top: 12px;
    color: #9aa3ad;
    font-size: 0.85rem;
}

.admin-table-wrap {
    overflow-x: auto;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 560px;
}

.admin-table thead th {
    position: sticky;
    top: 0;
    background: #0e141a;
    color: #9aa3ad;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table tbody td {
    color: #d5dbe1;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.admin-table .admin-empty {
    text-align: center;
    color: #77818b;
    padding: 28px 12px;
}

.admin-svc {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: #aef0ff;
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-note {
    margin: 10px 2px 0;
    color: #77818b;
    font-size: 0.78rem;
}

.admin-filter-select {
    background: #0b0f13;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e8eaed;
    font-family: inherit;
    font-size: 0.82rem;
    border-radius: 9px;
    padding: 8px 10px;
}

@media (max-width: 560px) {
    .admin-panel {
        padding: 16px 10px;
    }
    .admin-card {
        padding: 14px;
    }
    .admin-head {
        justify-content: center;
        text-align: center;
    }
}

/* === Pestanas y editor de Enlaces del panel admin === */
.admin-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.admin-tab {
    background: #0b0f13;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #c7cdd3;
    font-family: inherit;
    font-size: 0.85rem;
    border-radius: 10px;
    padding: 9px 14px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.admin-inner.admin-view-links > .admin-stats,
.admin-inner.admin-view-links > section.admin-card:not(#adminLinksPanel) {
    display: none;
}

.admin-tab:hover {
    border-color: #2a86ff;
    color: #e8eaed;
}

.admin-tab.active {
    background: linear-gradient(135deg, #2a86ff, #6f3cff);
    border-color: transparent;
    color: #fff;
}

.admin-links {
    padding: 16px;
}

.al-langs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.al-langs-title {
    font-size: 0.8rem;
    color: #9aa3ad;
}

.al-lang {
    background: #0b0f13;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #c7cdd3;
    font-family: inherit;
    font-size: 0.82rem;
    border-radius: 8px;
    padding: 7px 11px;
    cursor: pointer;
}

.al-lang:hover {
    border-color: #2a86ff;
}

.al-lang.active {
    background: linear-gradient(135deg, #2a86ff, #6f3cff);
    border-color: transparent;
    color: #fff;
}

.al-refresh {
    margin-left: auto;
    background: #0b0f13;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #c7cdd3;
    font-family: inherit;
    font-size: 0.8rem;
    border-radius: 8px;
    padding: 7px 11px;
    cursor: pointer;
}

.al-refresh:hover {
    border-color: #2a86ff;
}

.al-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 760px) {
    .al-grid {
        grid-template-columns: 1fr;
    }
}

.al-card {
    background: #0b0f13;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 13px 14px;
}

.al-niche-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #e8eaed;
}

.al-label {
    display: block;
    font-size: 0.75rem;
    color: #9aa3ad;
    margin: 10px 0 5px;
}

.al-url,
.al-step-in,
.al-wait,
.al-unlock {
    width: 100%;
    background: #080c10;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e8eaed;
    font-family: inherit;
    font-size: 0.82rem;
    border-radius: 8px;
    padding: 8px 10px;
}

.al-url:focus,
.al-step-in:focus {
    outline: none;
    border-color: #2a86ff;
}

.al-steps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.al-step {
    display: flex;
    align-items: center;
    gap: 7px;
}

.al-step-n {
    flex: 0 0 auto;
    font-size: 0.72rem;
    color: #9aa3ad;
    min-width: 52px;
}

.al-step-del {
    flex: 0 0 auto;
    background: #1a0f0f;
    border: 1px solid rgba(255, 90, 90, 0.3);
    color: #ff7a7a;
    font-family: inherit;
    font-size: 0.8rem;
    border-radius: 8px;
    padding: 7px 9px;
    cursor: pointer;
}

.al-step-del:hover {
    background: rgba(255, 90, 90, 0.15);
}

.al-add {
    background: transparent;
    border: 1px dashed rgba(42, 134, 255, 0.5);
    color: #2a86ff;
    font-family: inherit;
    font-size: 0.78rem;
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
    width: 100%;
}

.al-add:hover {
    background: rgba(42, 134, 255, 0.1);
}

.al-save-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.al-status {
    font-size: 0.82rem;
    color: #7ee08a;
}

/* === Selector de idioma === */
.lang-menu {
    position: relative;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.lang-flag {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.lang-flag img {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lang-menu .auth-dropdown {
    left: 0;
    right: auto;
    width: 100%;
    min-width: 0;
    padding: 4px;
}

.lang-menu .lang-option {
    white-space: nowrap;
}

.auth-menu .auth-dropdown {
    left: 0;
    right: auto;
    width: max-content;
    min-width: 100%;
    padding: 4px;
}

.auth-menu .auth-option {
    white-space: nowrap;
    font-size: 0.82rem;
}

.lang-current {
    color: #9aa3ad;
    font-weight: 500;
}

.lang-option {
    gap: 8px;
}

/* === Aviso de idioma detectado (home raíz) === */
.lang-prompt-card {
    width: min(460px, 100%);
    text-align: center;
}

.lang-prompt-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.lang-prompt-text {
    color: #aeb6bf;
    font-size: 0.94rem;
    line-height: 1.65;
    margin-bottom: 6px;
}

.lang-prompt-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 18px;
}
