* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    color: #e8ecf4;
}

/* ---------- LOGIN PAGE (teal/green glass, matches screenshot 2) ---------- */
.login-bg {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 30% 20%, #0f6659, #0a3d35 60%, #05221d);
}
.login-card {
    width: 360px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 30px 28px;
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.brand { display: flex; align-items: center; gap: 12px; justify-content: center; }
.brand-logo {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg,#5b5bf0,#9b4de0);
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.brand-title { font-weight: 800; font-size: 20px; letter-spacing: 1px; background: linear-gradient(90deg,#8ea8ff,#c98cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 11px; letter-spacing: 2px; color: #9fb3c8; margin-top: -2px; }
.brand-tagline { text-align: center; font-size: 12px; letter-spacing: 1px; color: #6ee7d0; margin: 10px 0 20px; font-weight: 600; }

.field-label { display: block; font-size: 11px; letter-spacing: 1px; color: #8fb6ae; margin: 14px 0 6px; font-weight: 700; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: 0.8; }
.input-wrap input {
    width: 100%; padding: 12px 12px 12px 36px;
    border-radius: 10px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.25); color: #fff; font-size: 14px;
}
.input-wrap input::placeholder { color: #86a39c; }

.btn-primary {
    margin-top: 20px; width: 100%; padding: 13px;
    border: none; border-radius: 10px; font-weight: 700; letter-spacing: 1px; font-size: 14px;
    background: linear-gradient(90deg,#17b4ff,#1388ff); color: #fff; cursor: pointer;
}
.btn-block { width: 100%; }
.login-hint { text-align: center; margin-top: 16px; font-size: 11px; color: #8fb6ae; }
.alert-error { background: rgba(255,70,70,0.15); border: 1px solid rgba(255,70,70,0.4); color: #ffb4b4; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 6px; }
.alert-ok { background: rgba(70,220,150,0.15); border: 1px solid rgba(70,220,150,0.4); color: #b6f5d8; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }

/* ---------- APP / DASHBOARD (dark navy, matches screenshot 1) ---------- */
.app-bg { background: #0c1120; min-height: 100vh; }

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; background: #11162a; border-bottom: 1px solid #1f2742;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.small-logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg,#5b5bf0,#9b4de0); display: flex; align-items: center; justify-content: center; }
.topbar-title { font-weight: 800; color: #b9c7ff; letter-spacing: 1px; }
.topbar-title small { color: #7e8bb8; font-weight: 700; margin-left: 4px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-pill { font-size: 12px; color: #a7b4d6; background: #171d33; padding: 6px 12px; border-radius: 20px; }
.btn-ghost { color: #cdd6f4; background: #1b2140; border: 1px solid #2a3356; padding: 7px 14px; border-radius: 20px; text-decoration: none; font-size: 13px; }
.btn-ghost:hover { background: #242c52; }

.panel-wrap { display: flex; justify-content: center; padding: 30px 16px 60px; }
.panel-card {
    width: 420px; background: #141a30; border: 1px solid #232b4d;
    border-radius: 20px; padding: 26px 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.wide-card { width: 760px; max-width: 100%; }

.router-select-row { display: flex; gap: 8px; margin: 18px 0 10px; }
.router-select { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid #2a3356; background: #0e1327; color: #e8ecf4; font-size: 13px; }
.btn-sync { padding: 10px 16px; border-radius: 10px; border: none; background: linear-gradient(90deg,#17b4ff,#1388ff); color: #fff; font-weight: 700; cursor: pointer; }

.status-bar { display: flex; justify-content: space-between; align-items: center; background: #0e1327; border: 1px solid #1d2748; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.badge-offline { color: #ff6b6b; background: rgba(255,70,70,0.12); padding: 3px 10px; border-radius: 20px; font-weight: 700; font-size: 12px; }
.badge-online  { color: #35e2a1; background: rgba(53,226,161,0.12); padding: 3px 10px; border-radius: 20px; font-weight: 700; font-size: 12px; }
.badge-unknown { color: #ffc266; background: rgba(255,194,102,0.12); padding: 3px 10px; border-radius: 20px; font-weight: 700; font-size: 12px; }

.package-row { display: flex; gap: 8px; margin-bottom: 14px; }
.btn-bulk { padding: 10px 14px; border-radius: 10px; border: none; background: linear-gradient(90deg,#8b5cf6,#6d28d9); color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap; }

.big-input { margin: 6px 0 16px; }
.big-input input { background: #0e1327; border: 1px solid #2a3356; }

.btn-action {
    display: block; width: 100%; padding: 14px; margin-bottom: 12px;
    border: none; border-radius: 12px; color: #fff; font-weight: 800; letter-spacing: 0.5px;
    font-size: 14px; cursor: pointer; transition: transform 0.05s ease-in-out;
}
.btn-action:active { transform: scale(0.98); }
.btn-check    { background: linear-gradient(90deg,#17b4ff,#1388ff); }
.btn-recharge { background: linear-gradient(90deg,#ff5f4d,#ff9d2f); }
.btn-mac      { background: linear-gradient(90deg,#7c5cff,#a24dff); }
.btn-enable   { background: linear-gradient(90deg,#2ecf8c,#19a86b); }
.btn-disable  { background: linear-gradient(90deg,#ff9d2f,#ff6a3d); }
.btn-destroy  { background: linear-gradient(90deg,#ff4d4d,#d91f3c); }
.btn-pair { display: flex; gap: 10px; }
.btn-pair .btn-action { flex: 1; }

.result-box {
    margin-top: 6px; background: rgba(255,70,70,0.08); border: 1px solid rgba(255,70,70,0.25);
    color: #f1b9c1; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; white-space: pre-wrap;
}
.result-box.ok { background: rgba(53,226,161,0.1); border-color: rgba(53,226,161,0.3); color: #c7f6e3; }

/* ---------- Admin forms / tables ---------- */
.section-title { margin: 22px 0 12px; font-size: 16px; color: #b9c7ff; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-form .full-row { grid-column: 1 / -1; }
.grid-form label { display: block; font-size: 12px; color: #8ea0cf; margin-bottom: 6px; }
.grid-form input { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #2a3356; background: #0e1327; color: #fff; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #0e1327; border: 1px solid #2a3356; border-radius: 8px; padding: 12px; }
.chk { font-size: 13px; color: #cdd6f4; display: flex; align-items: center; gap: 6px; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #202a4a; }
.data-table th { color: #8ea0cf; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.link-danger { color: #ff7a7a; text-decoration: none; }
.link-muted { color: #8ea0cf; text-decoration: none; }
