:root {
  --ink: #172033;
  --muted: #617085;
  --line: #d8dee8;
  --panel: #ffffff;
  --page: #f4f7fb;
  --navy: #18324f;
  --teal: #0b766d;
  --blue: #2563eb;
  --green: #15803d;
  --red: #b42318;
  --amber: #a15c07;
}
.image-provider-panel { display:grid; gap:16px; }
.provider-list { display:grid; gap:12px; }
.provider-card { border:1px solid #d8dee8; border-radius:14px; padding:16px; background:#fff; display:grid; gap:12px; }
.provider-card-head,.provider-order { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.provider-toggle { display:flex; align-items:center; gap:9px; margin:0; }
.provider-toggle input { width:auto; }
.provider-state { font-size:12px; font-weight:700; padding:5px 9px; border-radius:999px; background:#f2f4f7; color:#667085; }
.provider-state.configured { background:#ecfdf3; color:#027a48; }
.provider-state.missing { background:#fff4ed; color:#b54708; }
.provider-order { justify-content:flex-end; }
.provider-order button { width:auto; padding:7px 12px; }
.provider-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.provider-fields label { margin:0; }
.top-setting-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.top-setting-actions .master-switch { margin:0; }
.top-setting-actions button { width:auto; min-height:44px; }
.credential-test-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; align-items:end; gap:10px; }
.credential-test-row label { margin:0; }
.credential-test-row button { width:auto; min-height:42px; }
.provider-test-result { flex:1; min-width:90px; font-size:11px; color:var(--muted); }
.provider-test-result.test-ok { color:#15803d; }.provider-test-result.test-fail { color:#b42318; }
@media (max-width:700px) {
  .provider-fields { grid-template-columns:1fr; }
  .provider-card { padding:13px; }
  .provider-card-head { align-items:flex-start; }
  .provider-order button { flex:1; }
  .top-setting-actions { display:grid; grid-template-columns:1fr 1fr; width:100%; }
  .top-setting-actions button { width:100%; }
  .credential-test-row { grid-template-columns:1fr; }.credential-test-row button { width:100%; }
  .provider-order { flex-wrap:wrap; }.provider-test-result { order:4; flex-basis:100%; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, "Malgun Gothic", sans-serif;
  font-size: 15px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px 24px;
  background: var(--navy);
  color: #fff;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.2;
}

h2 {
  font-size: 16px;
}

.topbar p {
  margin-top: 4px;
  color: #dbe7f5;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-pill {
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 5px 8px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.site-pill.ready {
  border-color: #7dd3c7;
}

.site-pill.missing {
  border-color: #fca5a5;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(560px, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: start;
}

.history-panel {
  grid-column: 1 / -1;
}

.settings-layout {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

.settings-panel {
  width: 100%;
}

.footer-links {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding: 0 4px 12px;
}

.footer-links a,
.topbar-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.topbar-link {
  color: #fff;
}

.footer-links a:hover,
.topbar-link:hover {
  text-decoration: underline;
}

.topbar-button,
.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
}

.topbar-button {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
}

button.topbar-button {
  cursor: pointer;
  font: inherit;
}

.secondary-link-button {
  border: 1px solid #b9c3d3;
  color: var(--ink);
  background: #fff;
  padding: 9px 12px;
}

.topbar-button:hover,
.secondary-link-button:hover {
  border-color: var(--blue);
  text-decoration: none;
}

.settings-footer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-panel {
  width: min(100%, 420px);
}

.login-panel h1 {
  color: var(--ink);
}

.login-panel form {
  display: grid;
  gap: 12px;
  margin: 18px 0 12px;
}

.helper-text {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 700;
}

.advanced-options {
  border: 1px solid #e3e8f0;
  border-radius: 6px;
  background: #f8fafc;
  margin-bottom: 12px;
  padding: 9px 10px;
}

.advanced-options summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.advanced-options label {
  margin-top: 12px;
  margin-bottom: 0;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  font-weight: 400;
}

input[type="radio"] {
  width: auto;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

button {
  min-height: 40px;
  border: 1px solid #b9c3d3;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  cursor: pointer;
}

button:hover {
  border-color: var(--blue);
}

button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 18px;
}

.button-row,
.publish-row {
  display: flex;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}

.button-row button {
  flex: 1;
}

.two-col,
.image-grid,
.publish-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.subsection,
.media-upload {
  border-top: 1px solid var(--line);
  margin: 16px 0;
  padding: 16px 0 0;
}

.subsection h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.subsection-heading,
.media-upload-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.subsection-heading h3,
.media-upload-heading h3 {
  margin: 0;
  font-size: 15px;
}

.subsection-actions {
  display: flex;
  gap: 8px;
}

.subsection-actions button {
  min-height: 36px;
  padding: 7px 10px;
}

.image-prompt-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.image-prompt-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.alt-field {
  margin-top: 6px;
  margin-bottom: 0;
}

.alt-field input {
  padding: 8px 9px;
}

.image-prompt-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.image-prompt-card textarea {
  min-height: 86px;
}

.image-result-top {
  margin-bottom: 12px;
}

.image-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #eef3f8;
  margin-bottom: 8px;
}

.image-prompt-card:first-child .image-preview {
  aspect-ratio: 16 / 9;
}

.image-preview[hidden] {
  display: none;
}

.image-prompt-title span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.image-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.image-actions button {
  flex: 1;
  min-height: 36px;
  padding: 7px 10px;
}

.publish-options {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 10px;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
  color: var(--ink);
  min-height: 48px;
  padding: 10px;
  margin-bottom: 0;
}

.schedule-field {
  display: none;
  margin-top: 12px;
}

.schedule-field.visible {
  display: grid;
}

.publish-row label {
  flex: 1;
  margin-bottom: 0;
}

.result {
  min-height: 48px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 10px;
  border-radius: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.result.ok {
  border-color: #86efac;
  color: var(--green);
}

.result.fail {
  border-color: #fca5a5;
  color: var(--red);
}

.post-list {
  display: grid;
  gap: 10px;
}

.post-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
  background: #fbfdff;
}

.post-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.post-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 1180px) {
  .layout {
    grid-template-columns: minmax(300px, 360px) minmax(440px, 1fr);
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .history-panel {
    grid-column: auto;
  }

  .image-prompt-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  .layout,
  .two-col,
  .image-grid,
  .image-prompt-list,
  .publish-options {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 14px;
  }

  .button-row,
  .publish-row,
  .subsection-heading,
  .subsection-actions,
  .media-upload-heading,
  .image-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button-row button,
  .publish-row button,
  .subsection-actions button,
  .image-actions button {
    width: 100%;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  h1 {
    font-size: 20px;
  }
}
.admin-nav{display:flex;gap:.6rem;flex-wrap:wrap}.admin-nav a,.secondary-link-button{color:inherit;text-decoration:none;border:1px solid rgba(255,255,255,.35);padding:.6rem .8rem;border-radius:.5rem}.table-wrap{overflow:auto;margin:1rem 0}table{width:100%;border-collapse:collapse}th,td{padding:.65rem;border-bottom:1px solid #dfe5ec;text-align:left;vertical-align:top}.schedule-table input,.schedule-table select{min-width:72px}.weekdays{min-width:250px}.weekdays label{display:inline-flex;gap:.15rem;margin-right:.35rem}.filter-row{display:flex;gap:1rem;align-items:end;flex-wrap:wrap}

/* Refined admin workspace */
body { font-family: Inter, Pretendard, "Noto Sans KR", "Malgun Gothic", Arial, sans-serif; line-height: 1.5; }
.topbar { min-height: 88px; padding: 18px clamp(18px, 3vw, 42px); background: linear-gradient(135deg, #142c47 0%, #1c4565 72%, #146f69 100%); box-shadow: 0 4px 18px rgba(20,44,71,.18); }
.topbar h1 { font-size: 24px; }
.site-pill { padding: 6px 10px; border-radius: 999px; backdrop-filter: blur(8px); }
.layout { grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 22px; width: min(1560px, 100%); margin: 0 auto; padding: 24px clamp(14px, 2vw, 30px) 36px; }
.control-panel { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; scrollbar-width: thin; }
.panel { border-radius: 12px; padding: 20px; box-shadow: 0 10px 30px rgba(24,50,79,.08); }
.panel-heading { margin-bottom: 18px; }
input, select, textarea { border-radius: 8px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(37,99,235,.13); border-color: var(--blue); }
button { border-radius: 8px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
button:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(24,50,79,.08); }
button.primary { box-shadow: 0 5px 14px rgba(37,99,235,.22); }
.subsection, .media-upload { margin: 22px 0; padding-top: 20px; }
.image-prompt-card { border-radius: 10px; background: #fbfdff; padding: 14px; box-shadow: 0 3px 12px rgba(24,50,79,.06); }
.result { border-radius: 8px; }
.post-item { border-radius: 9px; padding: 13px; transition: border-color .15s ease, transform .15s ease; }
.post-item:hover { border-color: #9fb3cc; transform: translateY(-1px); }
.footer-links { justify-content: center; gap: 10px; padding: 2px 4px 12px; flex-wrap: wrap; }
.footer-links a { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 15px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; box-shadow: 0 3px 12px rgba(24,50,79,.06); }
.footer-links a:hover { border-color: var(--blue); background: #eff6ff; text-decoration: none; }
.admin-nav a { color: #fff; }

@media (max-width: 1180px) { .layout { grid-template-columns: minmax(310px, 360px) minmax(0, 1fr); } }
@media (max-width: 900px) { .control-panel { position: static; max-height: none; overflow: visible; } }

/* Manual execution page: same centered card layout as the admin pages */
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.layout { display: grid; grid-template-columns: 1fr; width: min(1120px, 100%); gap: 18px; padding-top: 22px; }
.control-panel { position: static; max-height: none; overflow: visible; }
.history-panel { grid-column: auto; }
.panel { padding: 24px 26px; }
.panel-heading { min-height: 44px; align-items: flex-start; }
.panel-heading h2 { margin-top: 2px; font-size: 19px; }
.section-kicker { display: block; margin-bottom: 2px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.site-status-box { display: flex; flex-wrap: wrap; gap: 7px; margin: -2px 0 18px; padding: 12px; border: 1px solid #dfe7f1; border-radius: 9px; background: #f8fafc; }
.site-status-box .site-pill { color: #334155; background: #fff; border-color: #cbd5e1; }
.site-status-box .site-pill.ready { color: #0f6b43; border-color: #86d5ad; background: #f0fdf4; }
.site-status-box .site-pill.missing { color: #a12626; border-color: #f0aaaa; background: #fff5f5; }
.editor-panel > label:first-of-type { margin-top: 2px; }
.post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-links { display: none; }

@media (min-width: 850px) {
  .control-panel .two-col { grid-template-columns: 1fr 1fr; }
  .control-panel > label, .control-panel > details, .control-panel > .button-row, .control-panel > .two-col { max-width: 100%; }
}

@media (max-width: 760px) {
  .topbar { align-items: flex-start; }
  .header-actions { justify-content: flex-start; }
  .admin-nav { width: 100%; }
  .panel { padding: 18px 16px; }
  .post-list { grid-template-columns: 1fr; }
}

.prompt-action-row { margin-top: 2px; }
.action-accent { background: #0b766d !important; border-color: #0b766d !important; box-shadow: 0 5px 14px rgba(11,118,109,.22) !important; }
button:disabled { cursor: wait; opacity: .62; transform: none; }
.global-status { position: sticky; top: 10px; z-index: 20; min-height: 52px; display: flex; align-items: center; margin-bottom:16px; border-width: 1px; background: rgba(248,250,252,.96); box-shadow: 0 8px 24px rgba(24,50,79,.12); backdrop-filter: blur(10px); }
.sortable-column { cursor:pointer; user-select:none; touch-action:manipulation; }
.sortable-column::after { content:" ↕"; color:#94a3b8; font-size:11px; }
.sortable-column.sort-asc::after { content:" ↑"; color:var(--blue); }
.sortable-column.sort-desc::after { content:" ↓"; color:var(--blue); }
.sortable-column.column-filtered { color:var(--blue); box-shadow:inset 0 -3px 0 var(--blue); }
.table-filter-popup { position:fixed; z-index:1000; width:min(300px,calc(100vw - 20px)); padding:14px; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 18px 50px rgba(15,23,42,.24); }
.table-filter-popup strong { display:block; margin-bottom:9px; }
.table-filter-popup input { width:100%; margin:0 0 10px; }
.table-filter-popup>div { display:flex; justify-content:flex-end; gap:8px; }
.log-helper { margin: 14px 0 4px; }
.log-status { display: inline-flex; white-space: nowrap; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.log-success { color: #166534; background: #dcfce7; }
.log-retried { color: #92400e; background: #fef3c7; }
.log-failed { color: #991b1b; background: #fee2e2; }
.log-pending { color: #1e40af; background: #dbeafe; }
.topic-layout { width: min(1600px, 100%); margin: 0 auto; padding: 18px; }
.topic-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.topic-summary span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.topic-table { min-width: 1400px; }
.topic-cell { min-width: 260px; max-width: 420px; }
.error-cell { min-width: 180px; max-width: 300px; color: var(--red); }
.row-actions { display: flex; gap: 6px; }
.row-actions button { min-height: 32px; padding: 5px 8px; white-space: nowrap; }
.topic-filters label { min-width: 125px; margin-bottom: 0; }
.automation-controls { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.automation-controls > div { margin-right: auto; }
.automation-controls label { margin-bottom: 0; }
.switch-label { display: flex; align-items: center; gap: 7px; min-height: 40px; color: var(--ink); }
.switch-label input, .topic-table input[type="checkbox"] { width: auto; }
.schedule-bulk-actions { display:flex; gap:8px; flex-wrap:wrap; margin:14px 0; }
.danger-button { color:#991b1b; border-color:#fca5a5; background:#fff5f5; }

/* Unified mobile-first admin navigation and pages */
.admin-nav { display:grid; grid-template-columns:repeat(7,auto); gap:7px; }
.admin-nav a,.admin-nav .nav-current,.admin-nav .nav-logout { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:8px 12px; border:1px solid rgba(255,255,255,.38); border-radius:9px; color:#fff; background:rgba(255,255,255,.08); font-weight:750; text-decoration:none; white-space:nowrap; }
.admin-nav .nav-current { color:#e2e8f0; border-color:rgba(255,255,255,.16); background:rgba(15,23,42,.42); cursor:default; }
.admin-nav .nav-logout { font:inherit; cursor:pointer; }
.admin-page { width:min(1560px,100%); margin:0 auto; padding:22px clamp(12px,2vw,28px) 40px; }
.narrow-page { max-width:820px; }
.plan-toolbar { align-items:end; }
.plan-toolbar label { min-width:130px; margin:0; }
.toolbar-buttons,.page-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.page-actions { margin-bottom:16px; }
.mobile-table-hint { display:none; margin:10px 0 4px; color:var(--muted); font-size:12px; }
.job-id { color:#334155; font-size:12px; font-weight:800; white-space:nowrap; }
.editable-row { background:#fbfdff; }
.locked-row { background:#f8fafc; }
.topic-table textarea { min-width:260px; resize:vertical; }
.topic-table input[type="date"] { min-width:145px; }
.topic-table input[type="time"] { min-width:105px; }
.schedule-table { min-width:760px; }
.schedule-table input[type="checkbox"],.topic-table input[type="checkbox"],.admin-nav button { width:auto; }
.weekdays.is-disabled { opacity:.42; }
dialog { width:min(92vw,470px); border:0; border-radius:16px; padding:0; box-shadow:0 24px 80px rgba(15,23,42,.28); }
dialog::backdrop { background:rgba(15,23,42,.55); backdrop-filter:blur(3px); }
.dialog-card { display:grid; gap:18px; padding:24px; }
.dialog-card label { margin:0; }
.dialog-actions { display:flex; justify-content:flex-end; gap:8px; }
.minute-input { display:grid; grid-template-columns:auto 90px auto; align-items:center; gap:10px; }
.setting-section { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:20px 0; border-bottom:1px solid var(--line); }
.setting-section.stacked { display:grid; }
.master-switch { display:flex; align-items:center; gap:12px; margin:0; padding:12px 16px; border:1px solid var(--line); border-radius:12px; background:#f8fafc; }
.master-switch input { width:24px; height:24px; }
.master-switch span { display:grid; }
.master-switch small { color:var(--muted); }
.status-card { display:flex; justify-content:space-between; gap:20px; padding:12px 14px; border:1px solid var(--line); border-radius:9px; background:#f8fafc; }
.status-ok { color:var(--green); }.status-bad { color:var(--red); }
.readonly-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.requirements-page { max-width:980px; }
.criteria-block { margin:20px 0; padding:20px; border:1px solid var(--line); border-radius:14px; background:#fbfdff; }
.criteria-heading { display:flex; align-items:start; justify-content:space-between; gap:20px; margin-bottom:18px; }
.criteria-heading p { color:var(--muted); font-size:13px; }
.mix-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:4px 0 10px; }
.mix-header > div { display:flex; align-items:center; gap:10px; }
.mix-header button { min-height:36px; }
.topic-mix-list { display:grid; gap:9px; margin-bottom:18px; }
.topic-mix-row { display:grid; grid-template-columns:minmax(180px,1fr) 130px auto; align-items:end; gap:10px; padding:10px; border:1px solid #e3e8f0; border-radius:10px; background:#fff; }
.topic-mix-row label { margin:0; }
.topic-mix-row button { min-height:42px; }
.percent-input { display:grid; grid-template-columns:1fr auto; align-items:center; gap:7px; }
.mix-valid { color:var(--green); font-weight:800; }.mix-invalid { color:var(--red); font-weight:800; }
.empty-mix { padding:16px; border:1px dashed var(--line); border-radius:9px; color:var(--muted); text-align:center; }
.lookback-label > span { display:flex; align-items:center; gap:8px; color:var(--ink); font-weight:500; }
.lookback-label input { width:92px; }

@media (max-width:900px) {
  .topbar { align-items:stretch; flex-direction:column; gap:14px; }
  .admin-nav { grid-template-columns:repeat(3,1fr); width:100%; }
  .admin-nav a,.admin-nav .nav-current,.admin-nav .nav-logout { min-height:44px; padding:8px 6px; font-size:13px; }
  .mobile-table-hint { display:block; }
}

.dashboard-page { display:grid; gap:18px; }
.dashboard-filter { display:flex; align-items:end; justify-content:space-between; gap:18px; }
.dashboard-date-filter { display:flex; align-items:end; gap:9px; flex-wrap:wrap; }
.dashboard-date-filter label { min-width:145px; margin:0; }
.dashboard-date-filter button { width:auto; min-height:42px; }
.dashboard-alerts { display:grid; gap:9px; }
.dashboard-alert { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; padding:13px 16px; border-radius:12px; color:var(--ink); text-decoration:none; border:1px solid var(--line); background:#fff; }
.dashboard-alert span { color:var(--muted); font-size:13px; }
.dashboard-alert b { font-size:12px; }
.alert-warning { border-left:5px solid #f59e0b; background:#fffbeb; }
.alert-error { border-left:5px solid #dc2626; background:#fef2f2; }
.alert-ok { border-left:5px solid #16a34a; background:#f0fdf4; }
.alert-info { border-left:5px solid #2563eb; background:#eff6ff; }
.dashboard-summary { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.summary-card { min-width:0; padding:17px; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 5px 18px rgba(23,32,51,.04); }
.summary-card span,.summary-card small { display:block; color:var(--muted); }
.summary-card strong { display:block; margin:7px 0 5px; font-size:28px; line-height:1; }
.summary-card small { font-size:11px; line-height:1.4; }
.summary-3 { border-top:4px solid #16a34a; }.summary-5 { border-top:4px solid #dc2626; }.summary-2 { border-top:4px solid #2563eb; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(300px,.85fr); gap:18px; align-items:start; }
.lower-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.dashboard-chart-panel { overflow:hidden; }
.chart-legend { display:flex; gap:10px; flex-wrap:wrap; font-size:11px; color:var(--muted); }
.chart-legend span { display:flex; align-items:center; gap:4px; }.chart-legend i { width:8px; height:8px; border-radius:2px; }
.legend-planned,.bar-planned { background:#94a3b8; }.legend-progress,.bar-progress { background:#3b82f6; }.legend-success,.bar-success { background:#22c55e; }.legend-failed,.bar-failed { background:#ef4444; }
.daily-chart { min-height:210px; display:flex; align-items:end; gap:clamp(8px,2vw,24px); padding:24px 8px 2px; overflow-x:auto; border-bottom:1px solid var(--line); }
.chart-day { flex:1 0 42px; min-width:42px; text-align:center; color:var(--muted); font-size:11px; }
.chart-value { margin-bottom:5px; color:var(--ink); font-weight:700; }
.chart-bar { height:150px; display:flex; align-items:end; justify-content:center; gap:2px; }
.chart-bar i { width:min(10px,22%); min-height:0; border-radius:4px 4px 0 0; }.chart-bar .bar-empty { width:24px; height:2px; background:#e2e8f0; }
.chart-day>span { display:block; padding-top:7px; }
.site-summary-list,.failure-list,.recent-post-list { display:grid; gap:10px; margin-top:14px; }
.site-summary-item { display:grid; grid-template-columns:1fr 92px; align-items:center; gap:12px; padding:12px; border:1px solid var(--line); border-radius:11px; color:var(--ink); text-decoration:none; }
.site-summary-item small { display:block; margin-top:5px; color:var(--muted); font-size:11px; }
.site-rate>span { display:block; text-align:right; font-size:12px; font-weight:800; }.site-rate>i { display:block; height:6px; margin-top:5px; background:#e2e8f0; border-radius:99px; overflow:hidden; }.site-rate b { display:block; height:100%; background:#22c55e; }
.failure-item { padding:12px; border:1px solid #fecaca; border-radius:11px; background:#fffafa; }
.failure-item>div { display:flex; justify-content:space-between; gap:8px; color:#b42318; font-size:11px; }.failure-item strong { display:block; margin:7px 0 5px; font-size:13px; }.failure-item p { color:var(--muted); font-size:12px; line-height:1.45; }
.recent-post-item { display:grid; grid-template-columns:72px 1fr; gap:12px; align-items:center; padding:9px; border:1px solid var(--line); border-radius:11px; color:var(--ink); text-decoration:none; }
.post-thumb { width:72px; aspect-ratio:16/10; border-radius:8px; overflow:hidden; display:grid; place-items:center; background:#e8eef6; color:#64748b; font-size:10px; font-weight:800; }.post-thumb img { width:100%; height:100%; object-fit:cover; }
.recent-post-item span,.recent-post-item time { display:block; color:var(--muted); font-size:10px; }.recent-post-item strong { display:-webkit-box; margin:4px 0; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; font-size:12px; line-height:1.4; }
.dashboard-empty { padding:18px; text-align:center; border:1px dashed var(--line); border-radius:10px; color:var(--muted); }.success-empty { color:#15803d; background:#f0fdf4; }
@media (max-width:1100px) { .dashboard-summary { grid-template-columns:repeat(3,1fr); }.dashboard-grid { grid-template-columns:1fr; }.lower-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:700px) {
  .dashboard-filter { align-items:stretch; flex-direction:column; }.dashboard-date-filter { display:grid; grid-template-columns:1fr 1fr; }.dashboard-date-filter label { min-width:0; }.dashboard-date-filter button { width:100%; }
  .dashboard-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.summary-card { padding:14px; }.summary-card strong { font-size:24px; }
  .lower-grid { grid-template-columns:1fr; }.dashboard-alert { grid-template-columns:1fr auto; }.dashboard-alert span { grid-column:1/-1; grid-row:2; }
  .chart-legend { margin-top:8px; }.recent-post-item { grid-template-columns:64px 1fr; }.post-thumb { width:64px; }
}
@media (max-width:640px) {
  .admin-page { padding:12px 10px 28px; }
  .admin-page .panel { padding:15px 12px; }
  .filter-row.plan-toolbar { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .plan-toolbar label { min-width:0; }
  .toolbar-buttons { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,1fr); }
  .toolbar-buttons .primary:last-child { grid-column:1/-1; }
  .page-actions { display:grid; grid-template-columns:1fr 1fr; }
  .setting-section { align-items:stretch; flex-direction:column; }
  .readonly-grid { grid-template-columns:1fr; }
  .criteria-block { padding:15px 12px; margin:14px 0; }
  .criteria-heading { display:grid; gap:6px; }
  .topic-mix-row { grid-template-columns:minmax(0,1fr) 105px; }
  .topic-mix-row button { grid-column:1/-1; min-height:38px; }
  .mix-header { align-items:flex-start; }
  .dialog-card { padding:20px 16px; }
  .table-wrap { margin-left:-12px; margin-right:-12px; padding:0 12px; }
}
