:root {
  --ink: #10242f;
  --muted: #60717a;
  --line: #d9e2e6;
  --paper: #ffffff;
  --canvas: #f4f7f8;
  --accent: #0b6e69;
  --accent-dark: #07514d;
  --warning: #8a5a00;
  --danger: #a52828;
  --success: #1c6f43;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.site-header { background: #0d2c35; color: white; border-bottom: 3px solid #1c8d85; }
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 30px; }
.brand { color: white; font-size: 1.4rem; font-weight: 800; letter-spacing: .02em; }
.site-header nav { display: flex; gap: 22px; flex: 1; }
.site-header nav a { color: #dcebed; font-weight: 650; }
.account { color: #b7cdd1; font-size: .92rem; display: flex; align-items: center; gap: .8rem; }
.account form { margin: 0; }
.link-button { appearance: none; border: 0; background: transparent; color: #dcebed; font: inherit; font-weight: 650; padding: 0; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.badge { display: inline-flex; min-width: 1.4rem; height: 1.4rem; align-items: center; justify-content: center; border-radius: 999px; margin-left: .35rem; background: #f4ba55; color: #332000; font-size: .78rem; font-weight: 800; }
main { padding: 42px 0 64px; }
h1, h2 { line-height: 1.14; margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.035em; margin-bottom: .55rem; }
h2 { font-size: 1.35rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .11em; font-weight: 800; font-size: .77rem; margin: 0 0 .55rem; }
.hero, .page-heading { margin-bottom: 30px; }
.hero p:last-child, .page-heading p:last-child { max-width: 760px; color: var(--muted); font-size: 1.05rem; }
.split-heading, .section-heading, .notice-card, .actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.card, .notice-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 8px 26px rgba(16, 36, 47, .045); }
.notice-card { border-left: 5px solid var(--accent); margin-bottom: 30px; }
.warning-card { border-left-color: #d4971f; }
.success-card { border-left-color: var(--success); }
.section-block { margin-top: 35px; }
.section-heading { align-items: baseline; }
.button { display: inline-flex; border: 0; border-radius: 9px; padding: .72rem 1rem; background: var(--accent); color: white; font: inherit; font-weight: 750; cursor: pointer; align-items: center; justify-content: center; }
.button:hover { background: var(--accent-dark); text-decoration: none; }
.button.secondary { background: #e8eff1; color: var(--ink); }
.button.secondary:hover { background: #dbe6e9; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { padding: 15px 17px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: #eef3f4; color: #405660; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; padding: .22rem .55rem; border-radius: 999px; background: #e8eff1; color: #405660; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.status-ready { background: #dff3e8; color: #1b663f; }
.status-needs_admin, .status-conflict { background: #fff0d1; color: #805500; }
.status-unsupported, .status-stale { background: #f0e9e9; color: #744; }
.status-imported { background: #dceff4; color: #185b6c; }
.status-ignored { background: #ececef; color: #555765; }
.filters { display: grid; grid-template-columns: 2fr 1.2fr 1.2fr 1.5fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.filters label, .form-row { display: flex; flex-direction: column; gap: 6px; color: #405660; font-size: .88rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #b9c8ce; border-radius: 8px; background: white; padding: .7rem .75rem; font: inherit; color: var(--ink); }
input[type=checkbox] { width: auto; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.details { margin: 0; }
.details > div { display: grid; grid-template-columns: 150px 1fr; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.details > div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-weight: 700; }
dd { margin: 0; overflow-wrap: anywhere; }
code { background: #eff3f4; border-radius: 5px; padding: .1rem .3rem; overflow-wrap: anywhere; }
.stats-card { margin-top: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.stats div { display: flex; flex-direction: column; padding: 16px; background: #f2f6f7; border-radius: 10px; }
.stats strong { font-size: 1.15rem; }
.stats span { color: var(--muted); font-size: .84rem; }
.breadcrumb { color: var(--muted); margin-bottom: 22px; }
.form-card { max-width: 760px; }
.form-row { margin-bottom: 18px; }
.form-row.invalid input, .form-row.invalid select { border-color: var(--danger); }
.field-error, .danger-text, .warning-text { color: var(--danger); }
.form-errors, .message.error { background: #fae4e4; color: #7e2020; }
.callout { padding: 16px; margin: 20px 0; border-radius: 9px; background: #eef5f6; color: #37525b; }
.messages { margin-bottom: 20px; }
.message { padding: 13px 16px; border-radius: 9px; background: #e7f2eb; color: var(--success); margin-bottom: 8px; }
.muted, .empty { color: var(--muted); }
.footer { color: var(--muted); border-top: 1px solid var(--line); padding: 25px 0 40px; font-size: .88rem; }
@media (max-width: 850px) {
  .header-inner, .split-heading, .notice-card { align-items: flex-start; flex-direction: column; padding: 15px 0; }
  .site-header nav { flex-wrap: wrap; }
  .two-column { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .filters, .stats { grid-template-columns: 1fr; }
  .details > div { grid-template-columns: 1fr; gap: 4px; }
  .shell { width: min(100% - 22px, 1180px); }
}
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 0; }
.login-card { width: min(460px, 100%); }
.login-card h1 { font-size: 2.2rem; }

/* HydraMX 0.3.2 end-user address management */
.address-heading { overflow-wrap: anywhere; }
.alias-filters { grid-template-columns: 2fr 1fr 1.25fr 1.4fr auto; }
.status-active { background: #dff3e8; color: #1b663f; }
.status-blocked, .status-expired, .status-inactive, .status-quota_exhausted { background: #fae4e4; color: #7e2020; }
.status-temporarily_unblocked, .status-temporary_allowance { background: #fff0d1; color: #805500; }
.access-note { margin-left: .6rem; color: var(--muted); font-size: .9rem; }
.recipient-list { margin: 0; padding-left: 1.25rem; }
.recipient-list li { margin: .45rem 0; }
.control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.control-card h3 { margin-top: 0; }
.compact-form { display: grid; grid-template-columns: minmax(100px, 1fr) auto; gap: 10px; align-items: center; }
.inline-action { margin-top: 12px; }
.content-link { color: var(--accent); }
.button.danger { background: var(--danger); }
.button.danger:hover { background: #7f1f1f; }
.stats-note { margin-bottom: 0; }
.dashboard-stats { margin-bottom: 30px; }
.empty-state { text-align: center; padding: 42px 24px; }
.compact-table { min-width: 620px; }
@media (max-width: 900px) {
  .control-grid { grid-template-columns: 1fr; }
  .alias-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .alias-filters, .compact-form { grid-template-columns: 1fr; }
}

/* HydraMX 0.3.3 policy activity */
.dashboard-address-heading { align-items: flex-end; }
.dashboard-address-heading h2 { margin-bottom: .35rem; }
.dashboard-address-heading p { margin: 0; max-width: 680px; }
.dashboard-address-actions { display: flex; gap: 16px; align-items: flex-end; }
.dashboard-sort-form { display: grid; grid-template-columns: auto minmax(150px, 190px) auto; gap: 8px; align-items: end; }
.dashboard-sort-form label { color: var(--muted); font-size: .82rem; font-weight: 750; align-self: center; }
.activity-table { min-width: 1080px; }
.decision { display: inline-flex; padding: .22rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.decision-accept { background: #dff3e8; color: #1b663f; }
.decision-reject { background: #fae4e4; color: #7e2020; }
.decision-defer { background: #fff0d1; color: #805500; }
.compact-empty-state { padding: 24px; text-align: left; }
@media (max-width: 850px) {
  .dashboard-address-heading, .dashboard-address-actions { align-items: flex-start; flex-direction: column; }
  .dashboard-sort-form { grid-template-columns: 1fr; width: 100%; }
}

/* HydraMX 0.3.6 recipient-management and permanent-reject clarity. */
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.form-row select[multiple] { min-height: 12rem; }
.notice-inline { margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 10px; background: #fff5e6; color: #68430b; }
.notice.warning { border-left: 4px solid #b66a00; }
.status-rejected { background: #fde8e8; color: #8a1c1c; }
