:root {
  --bg: #efefef;
  --card: #ffffff;
  --ink: #1c1c1c;
  --muted: #8d8d8d;
  --line: #e4e4e4;
  --red: #ff2a2a;
  --red-dark: #e10600;
  --orange: #f08a16;
  --yellow: #ffd000;
  --shadow: 0 10px 28px rgba(20, 20, 20, 0.06);
  --header-h: 74px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

a { color: inherit; }

img { max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #ececec;
  height: var(--header-h);
}

.header-inner,
.container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.logo {
  display: block;
  width: 118px;
  line-height: 0;
}

.logo img { width: 118px; height: auto; display: block; }

.pills { display: flex; gap: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.pill.is-active { border-color: #222; }

.search {
  position: relative;
  width: min(560px, 100%);
  justify-self: end;
}

.search input {
  width: 100%;
  height: 38px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 0 42px 0 14px;
  background: #fff;
  outline: none;
}

.search input:focus { border-color: #bbb; }

.search button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #9a9a9a;
  cursor: pointer;
}

.btn-new {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--red);
  border-radius: 8px;
  color: var(--red);
  background: #fff;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.btn-new:hover { background: #fff5f5; }

.page { padding: 28px 0 56px; }

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #e8f8ee;
  color: #0d7a3a;
  border: 1px solid #b7e7c6;
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 28px;
}

.card {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  min-height: 176px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-cover {
  display: block;
  min-height: 176px;
  background: #8d1018;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  display: flex;
  flex-direction: column;
  padding: 16px 18px 12px;
  min-width: 0;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.category {
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
}

.card time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.card h2 {
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0.1px;
  font-weight: 800;
  text-transform: uppercase;
}

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-status {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.card-status.is-approve { color: #0d7a3a; }
.card-status.is-revisi { color: var(--red-dark); }
.card-status.is-empty { color: var(--muted); font-weight: 600; }

.detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
}

.detail-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yellow);
  color: #222;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
}

.pager, .rows {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.pager { gap: 2px; padding: 6px; }

.pager a, .pager span {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.pager .is-current {
  background: var(--red);
  color: #fff;
  font-weight: 700;
}

.pager .is-disabled { color: #c5c5c5; pointer-events: none; }

.rows {
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  color: #555;
}

.rows select {
  border: 0;
  background: transparent;
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

.empty {
  background: #fff;
  box-shadow: var(--shadow);
  padding: 48px 20px;
  text-align: center;
  color: #666;
}

.crumb {
  margin: 4px 0 18px;
  font-size: 14px;
}

.crumb a { text-decoration: none; }

.crumb a:hover { text-decoration: underline; }

.review-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  padding: 22px 0;
  border-top: 1px solid #d9d9d9;
}

.review-content p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.review-visual {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: #8a8a8a;
  font-size: 13px;
}

textarea, .text-input, .select {
  width: 100%;
  border: 1px solid #dedede;
  border-radius: 2px;
  background: #fff;
  padding: 10px 12px;
  outline: none;
}

textarea {
  min-height: 74px;
  resize: vertical;
  line-height: 1.5;
}

textarea:focus, .text-input:focus, .select:focus { border-color: #bbb; }

.is-invalid { border-color: var(--red-dark) !important; }

.field-error {
  margin: 6px 0 0;
  color: var(--red-dark);
  font-size: 12px;
}

.review-submit .select {
  height: 40px;
  background: #fff;
}

.review-submit .btn-solid {
  width: 100%;
  margin-top: 12px;
}

.btn-solid, .btn-outline {
  height: 40px;
  padding: 0 22px;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
}

.btn-solid {
  border: 0;
  background: var(--red);
  color: #fff;
}

.btn-solid:hover { background: #ff1414; }

.btn-outline {
  border: 1px solid var(--red);
  background: #fff;
  color: var(--red);
}

.btn-outline:hover { background: #fff5f5; }

.form-row, .section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.form-row { margin-bottom: 18px; }

.stack { display: flex; flex-direction: column; }

.dropzone {
  margin-top: 6px;
  min-height: 280px;
  border: 1.5px dashed #7ec8d4;
  background: #e7f6fb;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.dropzone.is-dragover { background: #d7f1f8; }

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone.has-cover {
  padding: 0;
  background: #111;
  border-style: solid;
  min-height: 0;
}

.dropzone img { pointer-events: none; }

.drop-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 8px;
  color: #2aa7b8;
}

.dropzone strong {
  display: block;
  color: #8d8d8d;
  font-size: 20px;
  font-weight: 600;
}

.cover-preview {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  background: #111;
}

.section-block {
  padding: 18px 0 8px;
  border-top: 1px solid #ddd;
}

.section-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.linkish {
  border: 0;
  background: transparent;
  color: #888;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.file-row {
  margin-top: 10px;
  display: flex;
  align-items: stretch;
  min-height: 34px;
  border: 1px solid #ccc;
  background: #fff;
  position: relative;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: #efefef;
  border-right: 1px solid #ccc;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.file-name {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #444;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-preview {
  display: block;
  width: 100%;
  margin: 16px 0 8px;
  background: #fff;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid #ddd;
}

.missing {
  background: #fff;
  box-shadow: var(--shadow);
  padding: 36px;
}

.missing a { color: var(--red-dark); }

@media (max-width: 900px) {
  .header { height: auto; }
  .header-inner {
    grid-template-columns: 1fr auto;
    height: auto;
    padding: 12px 0;
  }
  .search { grid-column: 1 / -1; width: 100%; max-width: none; justify-self: stretch; }
  .cards, .card, .review-block, .form-row, .section-grid { grid-template-columns: 1fr; }
  .list-footer { flex-direction: column; align-items: stretch; }
  .container, .header-inner { width: min(1180px, calc(100% - 28px)); }
}
