@font-face { font-family: Handong; src: url("/assets/fonts/handong-sans-sc.woff2") format("woff2"); font-display: swap; font-weight: 100 900; }
:root { font-family: Handong, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; color: #263541; background: #f0f3f6; font-size: 15px; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
button, input, textarea, a { outline-offset: 4px; }
a { color: #a82d2d; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.primary, .secondary, .upload-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 7px; padding: 10px 17px; min-height: 42px; white-space: nowrap; font-weight: 550; }
.primary { background: #c93131; color: #fff; }
.primary:hover { background: #ad2828; }
.secondary, .upload-button { background: #fff; color: #3a5262; border-color: #cfdae0; }
.secondary:hover, .upload-button:hover { border-color: #849cab; }
label { display: grid; gap: 8px; font-weight: 550; font-size: 14px; }
input, textarea { width: 100%; min-width: 0; border: 1px solid #cbd8e1; border-radius: 6px; background: #fff; color: #263541; padding: 11px 12px; }
textarea { resize: vertical; line-height: 1.65; }
.notice { font-size: 14px; color: #a82d2d; line-height: 1.6; }
.notice[data-state="success"] { color: #1c7350; }
.notice[data-state="pending"] { color: #365b7a; }
.login-view {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(16px, 5vh) max(13px, 4vw);
  background: radial-gradient(ellipse at 5% 20%, #dbe7ef, transparent 60%), linear-gradient(150deg, #f8fafc, #e9eff4);
}
.login-view .signin-card { width: min(870px, 100%); overflow: hidden; border: 1px solid #dbe4ec; border-radius: 18px; box-shadow: 0 28px 80px #1a395626; }
.signin-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; color: #455e70; font-size: 14px; }
.signin-back:hover { color: #a93030; }
.workspace { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 20px; background: #213749; color: #e0e8ef; }
.brand-mark { padding: 12px 8px; border-radius: 8px; background: #f7fafc; }
.brand-mark img { display: block; width: 100%; }
.sidebar-title { color: #b7cbd8; margin: 28px 8px 14px; font-size: 13px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav button { display: block; text-align: left; color: #e0e8ef; background: transparent; border: 0; padding: 14px 13px; border-radius: 6px; }
.sidebar nav button[aria-current] { background: #c93131; color: #fff; font-weight: 600; }
.site-link { margin-top: auto; padding: 12px; color: #e0e8ef; }
.dashboard { min-width: 0; padding: 34px clamp(20px, 3vw, 52px); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.topbar h1 { font-size: clamp(28px, 3vw, 37px); letter-spacing: -.025em; }
.topbar p { margin-top: 9px; color: #6b7e8c; }
.account { display: flex; align-items: center; gap: 12px; }
.surface { background: #fff; border: 1px solid #dce4e9; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 18px #19374e08; }
.section-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; }
.section-bar h2 { font-size: 20px; }
.count { color: #758b99; font-size: 14px; margin-left: 8px; font-weight: 450; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { border-top: 1px solid #e4eaf0; padding: 16px 20px; line-height: 1.5; }
th { background: #f7f9fb; color: #627989; font-size: 13px; font-weight: 550; white-space: nowrap; }
td:first-child { font-weight: 550; min-width: 210px; }
td .text-action + .text-action { margin-left: 12px; }
.text-action { display: inline-block; color: #ad2b2b; border: 0; padding: 4px 0; background: transparent; white-space: nowrap; font-size: 14px; }
.empty { font-weight: 400 !important; padding: 45px 20px; text-align: center; color: #71818b; }
.badge { display: inline-block; border-radius: 100px; background: #edf1f5; color: #506270; padding: 4px 11px; white-space: nowrap; font-size: 13px; }
.badge[data-state="sent"], .badge[data-state="published"] { background: #e7f3ec; color: #216a46; }
.badge[data-state="failed"] { background: #fdecee; color: #b33232; }
.search { display: flex; gap: 8px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 18px 24px; border-top: 1px solid #e4eaf0; font-size: 14px; }
#workspace-status { margin: 0 0 14px; }
dialog { border: 1px solid #d7dfe6; border-radius: 12px; padding: 0; color: #263541; background: white; width: min(850px, calc(100% - 28px)); max-height: calc(100dvh - 32px); overflow: auto; }
dialog::backdrop { background: #14263799; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; position: sticky; top: 0; z-index: 2; background: #fff; padding: 20px 28px; border-bottom: 1px solid #e0e7ec; }
.dialog-head h2 { font-size: 23px; }
.icon-button { border: 1px solid #d4dee5; border-radius: 50%; width: 38px; height: 38px; background: #fff; color: #425965; font-size: 24px; line-height: 1; }
.dialog-body { display: grid; gap: 19px; padding: 25px 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.media-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.media-heading h3 { font-size: 16px; }
.upload-button { position: relative; cursor: pointer; }
.upload-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-button:focus-within { outline: 2px solid #3c6b8a; outline-offset: 3px; }
.hint { color: #728493; font-size: 13px; }
.photos { display: grid; gap: 12px; }
.photo-row { display: grid; grid-template-columns: 145px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 12px; border: 1px solid #dce4e9; border-radius: 8px; }
.photo-row img { display: block; width: 100%; max-height: 140px; aspect-ratio: 4 / 3; object-fit: contain; background: #edf1f4; border-radius: 5px; }
.photo-row > div { display: grid; gap: 8px; }
.photo-row label { font-size: 13px; }
.dialog-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; position: sticky; bottom: 0; z-index: 2; background: #fff; border-top: 1px solid #e0e7ec; padding: 17px 28px; }
.dialog-footer > div { display: flex; gap: 11px; margin-left: auto; }
.record-dialog { width: min(680px,calc(100% - 28px)); }
.password-dialog { width: min(470px, calc(100% - 28px)); }
#save-password { margin-left: auto; }
#password-length { margin-top: -11px; }
dl { display: grid; grid-template-columns: minmax(95px, .3fr) minmax(0,1fr); margin: 0; gap: 0; }
dt, dd { margin: 0; padding: 12px 4px; border-bottom: 1px solid #e6edf1; overflow-wrap: anywhere; line-height: 1.65; }
dt { color: #758591; }
dd { white-space: pre-wrap; }
#record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media(max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 15px; }
  .brand-mark { width: 150px; padding: 5px; }
  .sidebar-title { display: none; }
  .sidebar nav { grid-template-columns: repeat(3,1fr); margin-top: 12px; }
  .sidebar nav button { text-align: center; padding: 11px 4px; }
  .site-link { display: none; }
  .dashboard { padding: 22px 15px; }
  .topbar { align-items: flex-start; }
  .account { flex-direction: column; align-items: flex-end; gap: 7px; }
  .section-bar { padding: 16px; }
  .search { width: 100%; }
  th, td { padding: 12px 15px; }
  .dialog-head, .dialog-body, .dialog-footer { padding-inline: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .photo-row { grid-template-columns: 95px minmax(0,1fr); gap: 10px; }
  .photo-row > button { grid-column: 2; justify-self: start; }
}
