:root{
  --bg:#07060a; --bg-panel:#110d16; --bg-panel-2:#171220; --border:#2a2232;
  --pink:#e21a6b; --pink-2:#ff3d81; --pink-dim:rgba(226,26,107,0.15);
  --text:#f3f1f6; --text-dim:#9b93a8; --radius:14px; --serif:Georgia,'Times New Roman',serif;
}
*{box-sizing:border-box;}
body{ margin:0; background:var(--bg); color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; min-height:100vh; }

.brand{ display:flex; align-items:center; gap:10px; }
.brand-badge{ width:40px; height:40px; border-radius:10px; background:linear-gradient(145deg,#ff3d81,#9c0a44);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:12px; color:#fff;
  box-shadow:0 4px 14px rgba(226,26,107,0.45); flex-shrink:0; }
.brand-name{ font-family:var(--serif); font-weight:700; font-size:19px; letter-spacing:1px; }
.brand-name span{ color:var(--pink-2); }
.brand-sub{ font-size:10.5px; color:var(--text-dim); letter-spacing:1.5px; text-transform:uppercase; margin-top:-4px; }

.login-screen{ min-height:100vh; display:flex; align-items:center; justify-content:center; }
.login-box{ background:var(--bg-panel); border:1px solid var(--border); border-radius:var(--radius);
  padding:32px; width:320px; display:flex; flex-direction:column; gap:16px; }
.error{ color:#e5696e; font-size:13px; min-height:16px; }

.app{ display:flex; min-height:100vh; }
.sidebar{ width:230px; flex-shrink:0; background:var(--bg-panel); border-right:1px solid var(--border);
  padding:22px 16px; display:flex; flex-direction:column; gap:26px; }
nav{ display:flex; flex-direction:column; gap:4px; }
.nav-item{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px;
  color:var(--text-dim); cursor:pointer; font-size:14px; font-weight:500; }
.nav-item svg{ width:17px; height:17px; }
.nav-item.active{ background:var(--pink-dim); color:#fff; }
.sidebar-foot{ margin-top:auto; font-size:11px; color:var(--text-dim); }

main{ flex:1; padding:28px 34px; overflow-y:auto; }
.page{ display:none; }
.page.active{ display:block; }
h1{ font-size:22px; margin:0 0 4px; }
.lede{ color:var(--text-dim); font-size:14px; margin:0 0 24px; }
.top-actions{ display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.card{ background:var(--bg-panel); border:1px solid var(--border); border-radius:var(--radius); padding:22px; }

table{ width:100%; border-collapse:collapse; font-size:13.5px; }
thead th{ text-align:left; color:var(--text-dim); font-weight:600; font-size:11.5px; text-transform:uppercase;
  letter-spacing:.5px; padding:0 10px 10px; border-bottom:1px solid var(--border); }
tbody td{ padding:14px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
tbody tr:last-child td{ border-bottom:none; }
.badge{ display:inline-block; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.badge.on{ background:rgba(60,200,120,0.15); color:#4fd887; }
.badge.off{ background:rgba(200,60,60,0.15); color:#e5696e; }

.btn{ background:linear-gradient(135deg,var(--pink-2),var(--pink)); color:#fff; border:none;
  padding:9px 16px; border-radius:9px; font-size:13px; font-weight:700; cursor:pointer; }
.btn.ghost{ background:transparent; border:1px solid var(--border); color:var(--text); }
.btn.small{ padding:6px 12px; font-size:12px; }
.row-actions{ display:flex; gap:8px; }

.field{ margin-bottom:14px; }
.field label{ display:block; font-size:12.5px; color:var(--text-dim); margin-bottom:6px; font-weight:600; }
.field input, .field select{ width:100%; background:var(--bg); border:1px solid var(--border); border-radius:8px;
  padding:10px 12px; color:var(--text); font-size:14px; }

.link-row{ display:flex; align-items:center; gap:8px; }
.link-box{ background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:8px 10px;
  font-size:12px; color:var(--text-dim); max-width:240px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }

/* modal */
.modal-overlay{ position:fixed; inset:0; background:rgba(0,0,0,0.6); display:flex; align-items:center;
  justify-content:center; z-index:100; }
.modal{ background:var(--bg-panel); border:1px solid var(--border); border-radius:var(--radius);
  padding:24px; width:380px; max-height:90vh; overflow-y:auto; }
.modal h2{ margin:0 0 16px; font-size:17px; }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:6px; }
