/* Aplikacija Rampa - dopuna mobile.css / instructors.css */
:root { --rp-ok: #2f9e5a; --rp-ok-soft: #e3f5ea; --rp-bad: #d9433b; --rp-bad-soft: #fde7e5; --rp-warn: #b7791f; --rp-warn-soft: #fdf3dc; --rp-lamp: #ffc928; }

/* veza sa serverom (tackica u zaglavlju) */
.rp-conn { width: 12px; height: 12px; border-radius: 50%; background: var(--rp-ok); margin: 0 8px; flex-shrink: 0; animation: rp-pulse 2s infinite; }
.rp-conn.is-bad { background: var(--rp-bad); animation: none; }
@keyframes rp-pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 158, 90, .5); } 70% { box-shadow: 0 0 0 8px rgba(47, 158, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 90, 0); } }

/* traka: test rezim tastera */
.rp-testbar { display: flex; align-items: center; gap: 10px; background: #ff9f1c; color: #2b1a00; border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.rp-testbar > i { font-size: 26px; }
.rp-testbar > div { flex: 1; }
.rp-testbar b { display: block; font-size: 14px; }

/* brojevi */
.rp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.rp-stat { background: var(--m-card, #fff); border-radius: 12px; padding: 10px 8px; text-align: center; box-shadow: 0 2px 10px rgba(20, 40, 90, .06); }
.rp-stat b { display: block; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rp-stat span { font-size: 11px; color: var(--m-muted); }
.rp-stat.is-warn b { color: var(--rp-warn); }
.rp-stat.is-bad b { color: var(--rp-bad); }

/* rampe */
.rp-gate-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rp-gate-head h2 { font-size: 18px; font-weight: 800; margin: 0; }
.rp-gate-head small { color: var(--m-muted); font-size: 12px; }
.rp-gate-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--m-primary-soft); color: var(--m-primary); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.rp-gate-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-gate-btns.one { grid-template-columns: 1fr; }
.rp-btn { border: 0; border-radius: 16px; min-height: 74px; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .5px;
          display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); transition: transform .1s; }
.rp-btn i { font-size: 28px; }
.rp-btn:active { transform: scale(.97); }
.rp-up { background: linear-gradient(135deg, #2fb15c, #218a47); }
.rp-down { background: linear-gradient(135deg, #e0524a, #c0342c); }
.rp-btn.is-armed { background: linear-gradient(135deg, #ffb020, #e58e00); color: #2b1a00; animation: rp-arm .6s infinite alternate; }
@keyframes rp-arm { from { box-shadow: 0 0 0 0 rgba(255, 176, 32, .7); } to { box-shadow: 0 0 0 8px rgba(255, 176, 32, 0); } }
.rp-btn.is-busy, .btn.is-busy { opacity: .6; pointer-events: none; }
.rp-btn.is-busy i { animation: rp-spin 1s linear infinite; }
@keyframes rp-spin { to { transform: rotate(360deg); } }

/* rezultat / poruke */
.rp-result { margin-top: 10px; }
.rp-note { display: flex; gap: 8px; align-items: flex-start; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.rp-note > i { font-size: 18px; line-height: 1.2; }
.rp-note-ok { background: var(--rp-ok-soft); color: #1e6b3d; }
.rp-note-warn { background: var(--rp-warn-soft); color: #7a5410; }
.rp-note-err { background: var(--rp-bad-soft); color: #9c2a23; }
.rp-pill { display: inline-block; border-radius: 20px; padding: 1px 8px; margin-top: 4px; font-size: 12px; font-weight: 700; }
.rp-pill-ok { background: #fff; color: var(--rp-ok); }
.rp-pill-warn { background: #fff; color: var(--rp-warn); }
.rp-pill-err { background: var(--rp-bad); color: #fff; }

/* sijalice */
.rp-lamps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
.rp-lamp { background: var(--m-card, #fff); border-radius: 14px; padding: 12px; text-align: center; box-shadow: 0 2px 10px rgba(20, 40, 90, .06); border: 2px solid transparent; transition: border-color .2s, background .2s; }
.rp-lamp b { display: block; font-size: 14px; margin-top: 6px; }
.rp-lamp small { display: block; font-size: 11px; color: var(--m-muted); }
.rp-lamp-last { display: block; font-size: 12px; margin-top: 6px; line-height: 1.35; color: #4a5468; }
.rp-lamp-last em { color: #9a5b00; font-style: normal; font-weight: 600; }
.rp-bulb { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: #eceff4; color: #b9c0cc; display: flex; align-items: center; justify-content: center; font-size: 32px; transition: all .2s; }
.rp-lamp.is-on { border-color: var(--rp-lamp); background: #fffbea; }
.rp-lamp.is-on .rp-bulb { background: var(--rp-lamp); color: #fff; box-shadow: 0 0 22px 6px rgba(255, 201, 40, .75); animation: rp-glow 1s infinite alternate; }
.rp-lamp.is-test .rp-bulb { background: #ff9f1c; box-shadow: 0 0 22px 6px rgba(255, 159, 28, .75); }
@keyframes rp-glow { from { transform: scale(1); } to { transform: scale(1.08); } }

/* uredjaji */
.rp-dev { align-items: flex-start; }
.rp-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--rp-ok); }
.rp-dev-warn .rp-dot { background: var(--rp-warn); }
.rp-dev-err .rp-dot { background: var(--rp-bad); }
.rp-dev-err .m-item-title { color: var(--rp-bad); }
.rp-wrap { font-size: 12.5px; color: var(--m-muted); white-space: normal; line-height: 1.35; margin-top: 2px; word-break: break-word; }

/* uzivo */
.rp-ev-icon { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; background: #eef1f6; color: #66718a; }
.rp-ev-in .rp-ev-icon, .rp-ev-out .rp-ev-icon { background: var(--rp-ok-soft); color: var(--rp-ok); }
.rp-ev-bad .rp-ev-icon { background: var(--rp-bad-soft); color: var(--rp-bad); }
.rp-ev-bad .m-item-title { color: var(--rp-bad); }
.rp-ev-wait .rp-ev-icon, .rp-ev-tick .rp-ev-icon { background: var(--rp-warn-soft); color: var(--rp-warn); }
.rp-ev-sig .rp-ev-icon { background: #fff6d6; color: #c79a00; }
.rp-ev-test .rp-ev-icon { background: #ffe8cc; color: #d27300; }
.rp-ev-man .rp-ev-icon { background: var(--m-primary-soft); color: var(--m-primary); }
.rp-ev .m-item-title { white-space: normal; font-size: 15px; }
.rp-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.rp-ev.is-new { animation: rp-flash 2.5s ease-out; }
@keyframes rp-flash { 0% { background: #fff3c4; } 100% { background: inherit; } }
