:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #dfe4ea;
  --text: #1c2733;
  --text-muted: #62707e;
  --primary: #0b3d66;
  --primary-dark: #082c4a;
  --accent: #1892c9;
  --success-bg: #e6f6ed;
  --success-text: #1b7a43;
  --error-bg: #fdecec;
  --error-text: #b3261e;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: var(--primary);
  color: #fff;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header .brand { font-weight: 700; font-size: 1.1rem; color: #fff; text-decoration: none; }
.site-header nav a { color: #dbe9f5; margin-left: 1.25rem; font-size: 0.92rem; }
.site-header nav a.active { color: #fff; font-weight: 600; }
.site-header .staff-meta { color: #b9d2e6; font-size: 0.85rem; margin-left: 1.25rem; }
.link-button {
  background: none; border: none; padding: 0; margin-left: 1.25rem;
  color: #dbe9f5; font-size: 0.92rem; font-family: inherit; cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }
.container.wide { max-width: 1180px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.6rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 0 0 0.75rem; }
p.lede { color: var(--text-muted); margin-top: 0; }

label { display: block; font-weight: 600; font-size: 0.88rem; margin: 0.9rem 0 0.3rem; }
label .hint { font-weight: 400; color: var(--text-muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], input[type="datetime-local"], input[type="color"],
select, textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
textarea { resize: vertical; min-height: 5rem; }
input[type="checkbox"] { margin-right: 0.4rem; }
.checkbox-row { display: flex; align-items: center; margin: 0.5rem 0; font-weight: 400; }
.field-error { color: var(--error-text); font-size: 0.85rem; margin-top: 0.25rem; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--primary); }
.btn.secondary:hover { background: #eef3f8; }
.btn.danger { background: #fff; color: var(--error-text); border-color: var(--error-text); }
.btn.danger:hover { background: var(--error-bg); }
.btn.small { padding: 0.35rem 0.7rem; font-size: 0.82rem; }
form.inline { display: inline; }

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1.25rem; font-size: 0.92rem; }
.alert.success { background: var(--success-bg); color: var(--success-text); }
.alert.error { background: var(--error-bg); color: var(--error-text); }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.02em; }
tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge.active, .badge.approved, .badge.valid { background: var(--success-bg); color: var(--success-text); }
.badge.pending, .badge.trial { background: #fff4de; color: #9a6300; }
.badge.suspended, .badge.rejected, .badge.revoked, .badge.expired { background: var(--error-bg); color: var(--error-text); }
.badge.standard { background: #e8eef7; color: var(--primary); }
.badge.enterprise { background: #eee3fb; color: #6a2fb3; }

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.tabs a { padding: 0.4rem 0.9rem; border-radius: 6px; border: 1px solid var(--border); color: var(--text); font-size: 0.88rem; }
.tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-card { flex: 1; min-width: 160px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.stat-card .value { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-card .label { color: var(--text-muted); font-size: 0.85rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

.muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.empty-state { color: var(--text-muted); padding: 1.5rem 0; text-align: center; }

.hero { text-align: center; padding: 3.5rem 1.5rem; }
.hero h1 { font-size: 2.2rem; }
.hero p { color: var(--text-muted); max-width: 560px; margin: 0.75rem auto 1.75rem; }

.company-logo { max-height: 40px; max-width: 140px; object-fit: contain; }

.site-footer { text-align: center; color: var(--text-muted); font-size: 0.82rem; padding: 2rem 1rem; }

.hp-field { position: absolute; left: -9999px; top: -9999px; }
.submit-row { margin-top: 1.5rem; }
.logo-preview { max-height: 60px; max-width: 200px; object-fit: contain; margin-top: 0.5rem; display: none; }
.color-swatch { display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: 3px; vertical-align: middle; margin-right: 0.4rem; border: 1px solid var(--border); }
.reference-code { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.03em; color: var(--primary); }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
