:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1d2433;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --border: #e5e7eb;
  --success: #15803d;
  --danger: #b91c1c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Cairo", Tahoma, Arial, sans-serif;
  background: radial-gradient(circle at top, #eef4ff 0%, var(--bg) 45%);
  color: var(--text);
}
.container {
  max-width: 980px;
  margin: 28px auto;
  padding: 0 16px;
}
.shell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(24, 39, 75, 0.08);
  overflow: hidden;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
}
.brand h1 {
  font-size: 1.08rem;
  margin: 0;
}
.brand p {
  color: var(--muted);
  margin: 2px 0 0;
  font-size: 0.88rem;
}
.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nav a {
  color: #1e3a8a;
  text-decoration: none;
  background: var(--primary-soft);
  border: 1px solid #bfdbfe;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
}
.content {
  padding: 22px;
}
h2,
h3 {
  margin-top: 0;
}
.subtitle {
  color: var(--muted);
  margin-top: -8px;
  margin-bottom: 18px;
}
form p {
  margin: 0 0 14px;
}
.field {
  margin-bottom: 14px;
}
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px #dbeafe;
}
ul {
  padding-right: 20px;
}
ul.errorlist {
  list-style: none;
  padding: 8px 10px;
  margin: 6px 0;
  border-radius: 10px;
  color: var(--danger);
  background: #fee2e2;
  border: 1px solid #fecaca;
}
.btn {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.btn-link {
  color: #1d4ed8;
  text-decoration: none;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.metric {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: #fafcff;
}
.metric span {
  color: var(--muted);
  font-size: 0.9rem;
}
.metric strong {
  font-size: 1.4rem;
  display: block;
  margin-top: 6px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th,
td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: right;
  white-space: nowrap;
}
th {
  background: #f8fafc;
  font-weight: 700;
}
.badge-success {
  background: #dcfce7;
  color: var(--success);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
}
.notice {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #0c4a6e;
  border-radius: 12px;
  padding: 12px;
}
.notice.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}
.notice.warn {
  border-color: #fecaca;
  background: #fef2f2;
  color: #7f1d1d;
}
.radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.radio-option {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.radio-option:has(input:checked) {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: 0 0 0 3px #dbeafe;
}
.radio-option label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}
.radio-avatar {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid #dbe2ef;
  background: #fff;
}
.radio-label {
  font-weight: 600;
}
.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.pill-link {
  display: inline-block;
  text-decoration: none;
  color: #1e3a8a;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.88rem;
  white-space: nowrap;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.action-card {
  display: block;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid #dbe2ef;
  background: #fff;
  color: #1f2937;
  font-weight: 600;
}
.action-card:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.status-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  border: 1px solid transparent;
}
.status-chip.licensed {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}
.status-chip.unlicensed {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}
.dashboard-panels {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
