:root{
  --bg:#f6fbff;
  --surface:#ffffff;
  --surface-soft:#f9fcff;
  --text:#0f172a;
  --muted:#64748b;
  --primary:#0b6bcb;
  --primary-strong:#0858a6;
  --success-bg:#e8fff0;
  --success-text:#166534;
  --danger-bg:#fff1f2;
  --danger-text:#9f1239;
  --border:#dbe8f5;
  --border-strong:#b8d0ea;
  --shadow:0 8px 24px rgba(14,80,138,.08);
  --radius:12px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:"Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(circle at 8% 0%, #eef8ff 0%, transparent 42%),
    radial-gradient(circle at 92% 100%, #f2fbff 0%, transparent 45%),
    var(--bg);
  color:var(--text);
  line-height:1.45;
}
.wrap{
  max-width:1100px;
  margin:20px auto 30px;
  background:var(--surface);
  border:1px solid var(--border);
  padding:18px 20px 24px;
  border-radius:16px;
  box-shadow:var(--shadow);
}
nav{
  background:var(--surface-soft);
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px;
  margin-bottom:14px;
}
nav a{
  display:inline-block;
  margin:2px 10px 2px 0;
  padding:6px 8px;
  color:var(--primary);
  text-decoration:none;
  border-radius:8px;
  font-weight:600;
}
nav a:hover{background:#eaf4ff;color:var(--primary-strong)}
h2,h3,h4{margin:10px 0 10px}
p{margin:8px 0}
.msg{
  padding:10px 12px;
  border-radius:10px;
  margin:10px 0;
  border:1px solid transparent;
}
.ok{background:var(--success-bg);color:var(--success-text);border-color:#b6f0ce}
.err{background:var(--danger-bg);color:var(--danger-text);border-color:#fecdd3}
input,textarea,select,button{
  width:100%;
  padding:9px 10px;
  margin:6px 0 12px;
  border:1px solid var(--border-strong);
  border-radius:9px;
  background:#fff;
  color:var(--text);
}
input:focus,textarea:focus,select:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(11,107,203,.16);
}
button{
  background:linear-gradient(180deg,#1d7fe3 0%,#0b6bcb 100%);
  color:#fff;
  border:none;
  cursor:pointer;
  font-weight:600;
}
button:hover{background:linear-gradient(180deg,#2d8fed 0%,#0c72d8 100%)}
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid var(--border);
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}
th,td{
  border-bottom:1px solid var(--border);
  padding:9px 10px;
  text-align:left;
  vertical-align:top;
}
th{
  background:#f1f7ff;
  color:#1e3a5f;
  font-size:13px;
}
tr:last-child td{border-bottom:none}
.small{color:var(--muted);font-size:13px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.preview-box{
  border:1px dashed var(--border-strong);
  border-radius:10px;
  padding:12px;
  background:#f8fcff;
}
.preview-option{
  padding:9px;
  border:1px solid var(--border);
  border-radius:9px;
  margin-bottom:8px;
  background:#fff;
}
.inline-form{display:inline}
.inline-btn{width:auto;padding:6px 10px}
.thumb{
  max-width:180px;
  height:auto;
  display:block;
  margin-top:6px;
  border-radius:8px;
  border:1px solid var(--border);
}
.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.card{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  background:#fff;
  box-shadow:0 2px 8px rgba(16,72,121,.04);
}
.card h4{margin:0 0 8px 0}
.muted{color:var(--muted);font-size:13px}
.links a{
  display:block;
  margin:6px 0;
  color:var(--primary);
  text-decoration:none;
  font-weight:600;
}
.links a:hover{text-decoration:underline}
@media (max-width: 900px){
  .grid-2{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr}
  .wrap{margin:10px;padding:14px}
  nav a{margin-right:6px}
}
