/* CloudPearl Sitepanel — clean operator-console styling. */
:root {
    --ink: #393a3d;
    --blue: #2e5f8a;
    --blue-dark: #1f4565;
    --line: #d6d9de;
    --bg: #f4f5f8;
    --ok: #2e7d32;
    --bad: #b3261e;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--blue-dark); color: #dbe7f3; flex-shrink: 0; padding: 18px 0; }
.sidebar .brand { padding: 0 20px 16px; font-size: 19px; font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255,255,255,.15); }
.sidebar .brand small { display: block; font-size: 11px; font-weight: 400; color: #a9c4dc; margin-top: 2px; }
.sidebar nav { padding: 10px 0; }
.sidebar h4 { margin: 14px 20px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8fb0cc; }
.sidebar a { display: block; padding: 7px 20px; color: #dbe7f3; font-size: 14px; }
.sidebar a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.sidebar a.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.main { flex: 1; padding: 24px 28px 40px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.topbar h1 { font-size: 22px; margin: 0; }
.topbar .who { font-size: 13px; color: #666; }
.topbar form { display: inline; }

.cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; min-width: 180px; }
.stat .num { font-size: 30px; font-weight: 700; color: var(--blue-dark); }
.stat .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #777; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-bottom: 20px; }
.panel h2 { margin: 0 0 12px; font-size: 17px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eceef1; vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #666; background: #fafbfc; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot.green { background: var(--ok); }
.dot.red { background: var(--bad); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; background: #e8eef5; color: var(--blue-dark); }
.badge.trusted { background: #fff3cd; color: #7a5b00; }

.btn { display: inline-block; background: var(--blue); color: #fff; border: 0; border-radius: 6px; padding: 8px 14px; font-size: 13.5px; cursor: pointer; }
.btn:hover { background: var(--blue-dark); text-decoration: none; }
.btn.secondary { background: #eceef1; color: var(--ink); }
.btn.danger { background: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.flash.success { background: #e6f4ea; color: #14532d; border: 1px solid #b7e1c0; }
.flash.error { background: #fdecea; color: #7a1610; border: 1px solid #f5c6c0; }

form .row { margin-bottom: 13px; }
form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
form input[type=text], form input[type=email], form input[type=password], form input[type=number],
form select, form textarea { width: 100%; max-width: 520px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
form textarea { min-height: 110px; }
form .hint { font-size: 12px; color: #777; margin-top: 3px; }
form .err { font-size: 12.5px; color: var(--bad); margin-top: 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; max-width: 1080px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .layout { flex-direction: column; } .sidebar { width: 100%; } }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=text], .toolbar select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13.5px; }
.company-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.company-card { border: 1px solid var(--line); border-radius: 8px; padding: 13px 15px; background: #fff; font-size: 13.5px; }
.company-card .nm { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.muted { color: #777; font-size: 12.5px; }
pre.mail { white-space: pre-wrap; background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; padding: 14px; font-size: 13.5px; }
img.logo-thumb { max-height: 42px; max-width: 110px; object-fit: contain; }
.login-wrap { max-width: 380px; margin: 9vh auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.login-wrap h1 { font-size: 20px; margin: 0 0 4px; }
