* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.6 "Segoe UI", system-ui, Arial, sans-serif;
  color: #1e2430;
  background: #eef1f7;
  background-image: radial-gradient(900px 500px at 15% -10%, #dfe7ff 0%, transparent 60%),
                    radial-gradient(700px 400px at 90% 0%, #ffe6d9 0%, transparent 55%);
  background-attachment: fixed;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 28px 16px 64px; }

.top {
  background: linear-gradient(135deg, #2b3a67 0%, #3f5efb 55%, #6a4fd8 100%);
  color: #fff;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 10px 28px rgba(43, 58, 103, 0.25);
}

.top h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: -0.2px; }
.top .sub { color: rgba(255, 255, 255, 0.82); font-size: 13.5px; }
.top nav a { color: #fff; margin-left: 16px; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.6); }
.top nav a:hover { border-bottom-style: solid; }
.top nav .sub { display: inline; margin-right: 4px; }

h1 { font-size: 21px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 26px 0 10px; color: #2b3a67; }
p { margin: 0 0 12px; }
a { color: #3f5efb; }

.sub { color: #6b7280; font-size: 13.5px; }
p.sub { margin: 0 0 6px; }

.card {
  background: #fff;
  border: 1px solid #e3e7f0;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(43, 58, 103, 0.06);
}

table { border-collapse: collapse; width: 100%; background: #fff; font-size: 14px; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(43, 58, 103, 0.06); }
th, td { border-bottom: 1px solid #eceff5; padding: 9px 12px; text-align: left; vertical-align: top; }
th { background: #2b3a67; color: #fff; font-weight: 600; border-bottom: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: #f7f9ff; }

label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=number], input[type=password], input[type=email], select, textarea {
  width: 100%; max-width: 460px; padding: 8px 10px; border: 1px solid #cfd6e4; border-radius: 7px; font: inherit; background: #fff;
}
textarea, .row input, .row select { max-width: none; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b9c6ff; border-color: #3f5efb; }
textarea { min-height: 90px; resize: vertical; }

button, input[type=submit] {
  padding: 9px 20px; border: 0; border-radius: 7px; background: #3f5efb; color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 8px rgba(63, 94, 251, 0.3); transition: transform .08s, background .15s;
}
button:hover, input[type=submit]:hover { background: #2f4ae0; transform: translateY(-1px); }
button:active, input[type=submit]:active { transform: translateY(0); }
button.red, input[type=submit].red { background: #d63b3b; box-shadow: 0 2px 8px rgba(214, 59, 59, 0.3); }
button.red:hover, input[type=submit].red:hover { background: #b32e2e; }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 170px; }

.opts label { display: inline-block; margin: 0 18px 6px 0; font-weight: 400; }
.opts input { width: auto; margin-right: 6px; }

.actions { margin-top: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.msg { background: #fff; border-left: 4px solid #3f5efb; border-radius: 8px; padding: 11px 14px; margin: 0 0 16px; box-shadow: 0 2px 8px rgba(43,58,103,.06); }
.err, label.error { color: #c02626; font-size: 13px; font-weight: 400; display: block; margin-top: 4px; }
.msg.err { border-left-color: #d63b3b; }

ul.links { list-style: none; padding: 0; margin: 0; }
ul.links li { margin-bottom: 10px; padding-left: 4px; }
ul.links a { font-weight: 600; text-decoration: none; }
ul.links a:hover { text-decoration: underline; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; background: #fff; border: 1px solid #e3e7f0; border-radius: 10px; padding: 12px 14px; }
.toolbar input[type=text] { width: 220px; }

pre.sql { background: #1f2937; color: #d7e3ff; border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; font: 12.5px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-x: auto; }

img.chart { background: #fff; border: 1px solid #e3e7f0; border-radius: 10px; padding: 6px; }

.foot { margin-top: 28px; text-align: center; color: #7a8298; font-size: 13px; }
