:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17203f;
  background: #f2efe9;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page { min-height: 100vh; padding: 48px 24px; }
.page--form { display: grid; place-items: center; background: radial-gradient(circle at top, #fff 0, #f2efe9 54%); }
.card { background: rgba(255,255,255,.96); border: 1px solid #ded9cf; border-radius: 18px; box-shadow: 0 20px 60px rgba(23,32,63,.09); }
.form-card { width: min(100%, 650px); padding: clamp(28px, 6vw, 56px); }
.eyebrow { margin: 0 0 9px; color: #ad8751; font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 6vw, 3.15rem); font-weight: 500; line-height: 1.05; }
h2, h3 { font-family: Georgia, serif; font-weight: 500; }
.lede { margin: 16px 0 34px; color: #64677a; line-height: 1.65; }
form { display: grid; gap: 19px; }
label { display: grid; gap: 8px; color: #3d425b; font-size: .86rem; font-weight: 700; }
input, select { width: 100%; min-height: 48px; padding: 10px 13px; color: #17203f; background: #fff; border: 1px solid #cbc7c0; border-radius: 9px; }
input:focus, select:focus, button:focus-visible, a:focus-visible, tr:focus-visible { outline: 3px solid rgba(173,135,81,.27); outline-offset: 2px; border-color: #ad8751; }
select:disabled, button:disabled { opacity: .58; cursor: not-allowed; }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 11px 17px; color: #fff; background: #17203f; border: 1px solid #17203f; border-radius: 9px; cursor: pointer; font-weight: 750; text-decoration: none; }
.button:hover { background: #26325d; }
.button--secondary { color: #17203f; background: #fff; }
.button--secondary:hover { background: #f5f2ec; }
.button--quiet { color: #64677a; background: transparent; border-color: transparent; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.notice { margin: 0 0 22px; padding: 13px 15px; color: #81422e; background: #fff0eb; border-radius: 9px; line-height: 1.45; }
.notice--success { color: #25603e; background: #e9f6ee; }
.notice--info { color: #3d5476; background: #edf4fb; }
.error { color: #a33d31; }

.admin-page { width: min(100%, 1320px); margin: auto; }
.admin-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.login-card { width: min(100%, 430px); margin: 12vh auto 0; padding: 40px; }
.login-card h1 { margin-bottom: 30px; }
.table-wrap { overflow-x: auto; border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { color: #777989; background: #faf9f6; font-size: .71rem; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
th, td { max-width: 310px; padding: 15px 18px; border-bottom: 1px solid #ebe8e2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #fbfaf7; }

dialog { width: min(100% - 28px, 900px); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 30px 90px rgba(14,18,35,.3); }
dialog::backdrop { background: rgba(13,18,38,.62); }
.dialog-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; background: #fff; border-bottom: 1px solid #e7e3dc; }
.dialog-header h2 { margin: 0; }
.icon-button { width: 40px; height: 40px; color: #64677a; background: transparent; border: 0; border-radius: 50%; cursor: pointer; font-size: 2rem; line-height: 1; }
#detail-content { padding: 26px; }
#detail-content section { margin-top: 28px; }
#detail-content pre { max-height: 340px; padding: 18px; overflow: auto; background: #f5f3ee; border-radius: 9px; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 650px) {
  .page { padding: 24px 14px; }
  .grid-two { grid-template-columns: 1fr; }
  .admin-header { align-items: start; flex-direction: column; }
  .admin-header .button-row { width: 100%; }
  .admin-header .button { flex: 1; }
}
