/* ==============================================================================
   TENANT REMOTE CONTROLLER - TITANIUM MONOCHROME GLASSMORPHISM STYLESHEET
   Matching MALIK Devil Precision Engine Theme
   ============================================================================== */

:root {
    --bg: #050505;
    --panel: rgba(18, 18, 18, 0.88);
    --panel-card: rgba(24, 24, 28, 0.92);
    --border: rgba(255, 255, 255, 0.12);
    --border-highlight: rgba(255, 255, 255, 0.45);
    --silver-glow: rgba(255, 255, 255, 0.35);
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #525252;
    --accent-cyan: #00e5ff;
    --accent-green: #00e676;
    --accent-red: #ff1744;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    padding: 16px 14px 40px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* BACKGROUND WATERMARKS */
.bg-demon-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 460px;
    max-width: 88vw;
    height: 460px;
    color: rgba(255, 255, 255, 0.04);
    pointer-events: none;
    user-select: none;
    z-index: 0;
    filter: drop-shadow(0 0 35px rgba(255, 255, 255, 0.02));
}

.demon-svg-bg {
    width: 100%;
    height: 100%;
}

.bg-watermark {
    position: fixed;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    font-size: 26vw;
    font-weight: 950;
    color: rgba(255, 255, 255, 0.03);
    letter-spacing: 14px;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    white-space: nowrap;
}

.container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 1;
}

/* GLASS PANEL */
.panel {
    background: var(--panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

/* HEADER */
.header {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.demon-icon-top {
    width: 38px;
    height: 38px;
    color: #ffffff;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.75));
    flex-shrink: 0;
    animation: demonPulse 3s infinite ease-in-out;
}

@keyframes demonPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)); }
    50% { filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.95)); }
}

.brand-col {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 17px;
    font-weight: 950;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.1;
}

.brand-tag {
    font-size: 10px;
    font-weight: 800;
    background: #fff;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 1px;
}

.brand-sub {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #404040;
    transition: all 0.3s;
}

.status-dot.online {
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

.status-dot.offline {
    background: var(--accent-red);
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.btn-logout:hover {
    color: #fff;
}

/* RENTAL DURATION BADGE */
.rental-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
}

.rental-key {
    color: var(--accent-cyan);
    font-family: monospace;
    letter-spacing: 1px;
}

.rental-remaining {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* PAIRED DEVICE CARD */
.device-card {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.device-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
}

.device-ping {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 700;
}

.device-actions {
    display: flex;
    gap: 8px;
}

/* TARGET MAIN CARD */
.target-card {
    padding: 22px 16px;
    text-align: center;
    position: relative;
    border: 1px solid var(--border-highlight);
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.7) 0%, rgba(10, 10, 10, 0.9) 100%);
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.08);
}

.round-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.target-display {
    font-size: 88px;
    font-weight: 950;
    color: #ffffff;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.5), 0 0 50px rgba(255, 255, 255, 0.2);
    line-height: 1;
    margin: 6px 0;
    letter-spacing: -2px;
}

.target-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.type-badge {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.dist-badge {
    font-size: 12px;
    font-weight: 600;
    color: #a3a3a3;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 8px;
}

/* TIMELINE BOXES (GAME 1, 2, 3) */
.timeline-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.round-box {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    transition: all 0.2s;
}

.round-box.active {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 16px var(--silver-glow);
}

.round-box.done {
    opacity: 0.85;
    border-color: rgba(0, 230, 118, 0.35);
    background: rgba(0, 230, 118, 0.05);
}

.round-box.done .r-num {
    color: #00e676;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.25);
}

.round-box.done .r-status {
    color: #00e676;
    font-weight: 800;
}

.round-box .r-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.round-box .r-num {
    font-size: 22px;
    font-weight: 950;
    color: #fff;
    margin: 2px 0;
}

.round-box .r-type {
    font-size: 10px;
    font-weight: 700;
    color: #a3a3a3;
}

.round-box .r-status {
    font-size: 9px;
    margin-top: 4px;
    font-weight: 700;
    color: #fff;
}

/* CONTROLS */
.ctrl-row {
    display: flex;
    gap: 8px;
}

.btn-ctrl {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #e5e5e5;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-ctrl:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.97);
}

/* SECTION LABEL */
.section-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.safe-tag {
    font-size: 10px;
    color: #737373;
    font-weight: 600;
}

/* BO3 SIMPLE GRID (2-0 & 2-1) */
.bo3-simple-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-bo3-simple {
    background: linear-gradient(180deg, #181818 0%, #0d0d0d 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.btn-bo3-simple:active {
    transform: scale(0.96);
}

.btn-bo3-simple.active {
    border-color: #fff;
    background: #282828;
    box-shadow: 0 0 16px var(--silver-glow);
}

/* CUSTOM INPUT CARD */
.custom-card {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group {
    display: flex;
    gap: 8px;
}

.custom-input {
    flex: 1;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    outline: none;
    letter-spacing: 1px;
}

.custom-input:focus {
    border-color: #fff;
    box-shadow: 0 0 10px var(--silver-glow);
}

.btn-apply {
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 900;
    border: none;
    padding: 0 18px;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.15s;
}

.btn-apply:active {
    transform: scale(0.95);
}

.chips-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 800;
    color: #d4d4d4;
    cursor: pointer;
}

.chip:active {
    background: #fff;
    color: #000;
}

/* HISTORY & LOG */
.history-card {
    padding: 12px 14px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 140px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.history-item .val {
    font-weight: 900;
    color: #fff;
    font-size: 14px;
}

/* MODAL LOGIN LICENSE KEY */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-card {
    width: 100%;
    max-width: 440px;
    background: #0d0d0f;
    border: 1px solid var(--border-highlight);
    border-radius: 22px;
    padding: 26px 20px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}

.modal-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    color: #fff;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}

.modal-title {
    font-size: 20px;
    font-weight: 950;
    letter-spacing: 1px;
    color: #fff;
}

.modal-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.license-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.license-input-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.license-input {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 1.5px;
    text-align: center;
    outline: none;
    text-transform: uppercase;
}

.license-input:focus {
    border-color: #fff;
    box-shadow: 0 0 15px var(--silver-glow);
}

.btn-activate {
    background: linear-gradient(180deg, #ffffff 0%, #d4d4d4 100%);
    color: #000;
    font-size: 14px;
    font-weight: 900;
    border: none;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
    transition: all 0.15s;
}

.btn-activate:active {
    transform: scale(0.97);
}

.modal-alert {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    display: none;
    line-height: 1.4;
}

.modal-alert.error {
    background: rgba(255, 23, 68, 0.15);
    border: 1px solid rgba(255, 23, 68, 0.4);
    color: #ff5252;
    display: block;
}

.modal-alert.success {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.4);
    color: #69f0ae;
    display: block;
}

.modal-alert.info {
    background: rgba(0, 229, 255, 0.15);
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: #40c4ff;
    display: block;
}

/* TOAST NOTIFICATION */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(20, 20, 22, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* BUYER MOBILECONFIG STYLES */
.btn-op-buyer {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 10px 8px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    user-select: none;
}

.btn-op-buyer:hover, .btn-op-buyer:active {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(0.98);
}

/* DEVICE TELEMETRY & BATTERY METER */
.battery-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.battery-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    min-width: 68px;
}

.battery-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.battery-bar-fill {
    height: 100%;
    width: 100%;
    background: #00e676;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
}

.battery-bar-fill.mid { background: #ffea00; }
.battery-bar-fill.low { background: #ff1744; }

.charging-badge {
    font-size: 10px;
    font-weight: 700;
    color: #00e5ff;
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.device-submeta {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 3px;
}

.profile-installed-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.3);
    border-radius: 10px;
    color: #00e676;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 10px;
}

.btn-sm-reconfig {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #eee;
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm-reconfig:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.btn-confirm-installed {
    width: 100%;
    margin-top: 10px;
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid rgba(0, 230, 118, 0.4);
    color: #00e676;
    font-weight: 800;
    font-size: 11.5px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-confirm-installed:hover {
    background: rgba(0, 230, 118, 0.25);
}
