:root {
  --bg-base: #090d16;
  --panel-bg: #111827;
  --panel-border: #1f293d;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --yape-purple: #8b5cf6;
  --yape-purple-bright: #a855f7;
  --yape-purple-soft: rgba(139, 92, 246, 0.15);
  --status-green: #10b981;
  --status-green-bg: rgba(16, 185, 129, 0.08);
  --font-stack: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font-stack); }
body { background-color: var(--bg-base); color: var(--text-primary); padding: 24px 16px; max-width: 680px; margin: 0 auto; min-height: 100vh; -webkit-font-smoothing: antialiased; }

header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 12px; margin-bottom: 24px; position: relative; }
.brand-group { display: flex; align-items: center; gap: 10px; }
h1 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); letter-spacing: -0.2px; text-transform: uppercase; }

.status-badge { display: none; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 500; color: var(--status-green); background: var(--status-green-bg); padding: 3px 10px; border-radius: 20px; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-dot { width: 6px; height: 6px; background-color: var(--status-green); border-radius: 50%; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); animation: statusPulse 2s infinite; }

@keyframes statusPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.summary-pill {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.summary-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 500; }
.summary-val { font-size: 0.95rem; font-weight: 600; color: var(--status-green); font-variant-numeric: tabular-nums; }

.btn { background: var(--yape-purple); color: white; border: none; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; text-decoration: none; font-size: 0.82rem; transition: background 0.15s ease; }
.btn:hover { background: var(--yape-purple-bright); }
.btn-secondary { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); border: 1px solid var(--panel-border); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.09); }

.device-grid { display: grid; gap: 10px; margin-top: 14px; }
.device-card { background: var(--panel-bg); padding: 16px; border-radius: 10px; border: 1px solid var(--panel-border); border-left: 4px solid var(--yape-purple); display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: all 0.2s ease; }
.device-card:hover { border-left-color: var(--yape-purple-bright); box-shadow: 0 4px 16px var(--yape-purple-soft); transform: translateY(-1px); }

.nav-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.yape-list { display: flex; flex-direction: column; gap: 10px; }

.yape-card { background: var(--panel-bg); padding: 16px; border-radius: 10px; border: 1px solid var(--panel-border); border-left: 4px solid var(--yape-purple); display: flex; flex-direction: column; gap: 10px; animation: fadeIn 0.25s ease-out; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.yape-card:hover { border-left-color: var(--yape-purple-bright); box-shadow: 0 4px 20px var(--yape-purple-soft); }

.yape-row-main {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 8px;
}

.remitente {
font-size: 0.95rem;
font-weight: 600;
color: var(--text-primary);
letter-spacing: -0.1px;
flex: 1;
min-width: 0;
}

.monto {
font-size: 1.25rem;
font-weight: 700;
color: var(--status-green);
font-variant-numeric: tabular-nums;
white-space: nowrap;
flex-shrink: 0;
}
.yape-row-sub { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: var(--text-secondary); }
.meta-tag { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); padding: 2px 7px; border-radius: 4px; font-size: 0.72rem; color: var(--text-secondary); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

#lock-screen { position: fixed; inset: 0; background: var(--bg-base); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; z-index: 999; }
#lock-input { background: var(--panel-bg); border: 1px solid var(--panel-border); color: var(--text-primary); padding: 10px 14px; border-radius: 8px; font-size: 0.95rem; text-align: center; }

@media (max-width: 480px) {
    header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px 16px;
    }

    .brand-group {
        justify-content: space-between;
    }

    .summary-pill {
        position: static;
        transform: none;
        justify-content: center;
        width: 100%;
    }

    header > div:last-child {
        justify-content: center;
    }
}

body.vista-ancha { max-width: 1400px; }