* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f5f6fa; color: #444; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f5f6fa; }
.login-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,.08); padding: 40px; width: 420px; max-width: 92vw; }
.login-card .logo { text-align: center; font-size: 30px; font-weight: 700; color: #7367f0; margin-bottom: 14px; }
.login-card h3 { color: #444; margin-bottom: 4px; }
.login-card p.sub { color: #999; font-size: 14px; margin-bottom: 22px; }
label { display: block; font-size: 13px; color: #666; margin: 12px 0 5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #7367f0; }
.btn { display: inline-block; border: 0; border-radius: 6px; padding: 10px 18px; font-size: 14px; cursor: pointer; text-decoration: none; color: #fff; background: #7367f0; }
.btn:hover { opacity: .9; }
.btn-block { width: 100%; margin-top: 20px; padding: 12px; }
.btn-green { background: #28c76f; }
.btn-red { background: #ea5455; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.alert { padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-size: 14px; }
.alert.ok { background: #e5f8ed; color: #1f9d57; }
.alert.err { background: #fdecec; color: #d33; }

/* ---------- layout ---------- */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 230px; background: #fff; box-shadow: 2px 0 12px rgba(0,0,0,.04); padding: 18px 12px; }
.brand { font-size: 22px; font-weight: 700; color: #7367f0; padding: 6px 12px 20px; }
.brand-ip { color: #a29af8; font-weight: 400; }
.nav { list-style: none; }
.nav li a { display: block; padding: 11px 14px; border-radius: 6px; color: #666; text-decoration: none; font-size: 15px; margin-bottom: 4px; }
.nav li.active a, .nav li a:hover { background: #7367f0; color: #fff; }
.main { margin-left: 230px; }
.topbar { background: #fff; margin: 18px 24px 0; border-radius: 10px; padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.topbar .me { text-align: right; line-height: 1.2; }
.topbar .me small { display: block; color: #999; }
.content { padding: 24px; }
.page-title { font-weight: 500; color: #555; margin-bottom: 18px; }
.card { background: #fff; border-radius: 10px; padding: 22px; box-shadow: 0 2px 10px rgba(0,0,0,.04); margin-bottom: 22px; }
.card h3 { font-weight: 500; color: #555; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-head h3 { margin: 0; }

/* ---------- tables ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; background: #f3f2f7; color: #888; text-transform: uppercase; font-size: 12px; letter-spacing: .5px; padding: 12px 14px; }
table.tbl td { padding: 12px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
table.tbl tr:hover td { background: #fafaff; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.badge.green { background: #e5f8ed; color: #1f9d57; }
.badge.red { background: #fdecec; color: #d33; }
.badge.grey { background: #eee; color: #777; }
.mono { font-family: Consolas, monospace; font-size: 13px; }
a.link { color: #7367f0; text-decoration: none; word-break: break-all; }
a.link:hover { text-decoration: underline; }
.pager { margin-top: 16px; }
.pager a, .pager span { display: inline-block; padding: 6px 12px; border-radius: 6px; background: #fff; border: 1px solid #e2e2e2; margin-right: 6px; color: #7367f0; text-decoration: none; font-size: 13px; }
.pager span.cur { background: #7367f0; color: #fff; border-color: #7367f0; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 180px; background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.stat b { display: block; font-size: 28px; color: #7367f0; }
.stat span { color: #999; font-size: 13px; }
textarea { resize: vertical; min-height: 110px; }
.form-row { margin-bottom: 6px; }
.copy-btn { cursor: pointer; }
@media (max-width: 800px) { .sidebar { width: 64px; } .sidebar .brand, .sidebar .nav li a { font-size: 0; } .main { margin-left: 64px; } }
