* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary: #1a6e5a;
  --primary-dark: #145844;
  --bg: #f4f6f5;
  --card: #ffffff;
  --text: #1f2d2a;
  --text-sub: #6b7c77;
  --border: #e2e8e6;
  --warn: #b45309;
  --danger: #b91c1c;
  --ok: #15803d;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.loading-page {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-sub);
}

.page {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 88px;
}

.topbar {
  background: var(--primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar .title {
  font-size: 17px;
  font-weight: 600;
}

.topbar .sub {
  font-size: 12px;
  opacity: 0.85;
}

.topbar button.link {
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  padding: 6px 4px;
}

.content {
  padding: 14px 14px 0;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card.clickable:active {
  background: #f0f4f2;
}

.card .row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card .name {
  font-weight: 600;
  font-size: 16px;
}

.card .meta {
  color: var(--text-sub);
  font-size: 13px;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.badge.SUBMITTED { background: #e0ecff; color: #1d4ed8; }
.badge.NEED_SUPPLEMENT { background: #fef3c7; color: var(--warn); }
.badge.APPROVED { background: #dcfce7; color: var(--ok); }
.badge.REJECTED { background: #fee2e2; color: var(--danger); }
.badge.ENABLED { background: #dcfce7; color: var(--ok); }
.badge.DISABLED { background: #fee2e2; color: var(--danger); }
.badge.PENDING_ENABLE { background: #fef3c7; color: var(--warn); }

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
}

.field textarea {
  min-height: 72px;
  resize: vertical;
}

.field .hint {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 4px;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.btn:active {
  background: var(--primary-dark);
}

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

.btn.danger {
  background: var(--danger);
}

.btn.small {
  width: auto;
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  margin-right: 8px;
}

.btn:disabled {
  opacity: 0.5;
}

.fab {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 18px;
  max-width: 532px;
  margin: 0 auto;
  z-index: 20;
}

.message {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 14px;
}

.message.error {
  background: #fee2e2;
  color: var(--danger);
}

.message.success {
  background: #dcfce7;
  color: var(--ok);
}

.message.info {
  background: #e0ecff;
  color: #1d4ed8;
}

.empty {
  text-align: center;
  color: var(--text-sub);
  padding: 48px 0;
}

.detail-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row .k {
  width: 88px;
  color: var(--text-sub);
  flex-shrink: 0;
}

.detail-row .v {
  flex: 1;
  word-break: break-all;
}

.opinion-box {
  background: #fef3c7;
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
  font-size: 14px;
  color: var(--warn);
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filters select,
.filters input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
  min-width: 0;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.attachment-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.attachment-grid .att-loading {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #eef1f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 12px;
}

.tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 52px;
  z-index: 9;
}

.tabs .tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 15px;
  color: var(--text-sub);
  cursor: pointer;
}

.tabs .tab.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom: 2px solid var(--primary);
}

.login-hero {
  text-align: center;
  padding: 56px 24px 28px;
}

.login-hero .logo {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}

.login-hero .slogan {
  color: var(--text-sub);
  font-size: 13px;
  margin-top: 6px;
}

.load-more {
  text-align: center;
  padding: 8px 0 20px;
}

.load-more button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 22px;
  color: var(--text-sub);
  font-size: 13px;
}
