:root {
  --rni-primary: #9b1106;
  --rni-primary-dark: #7a0c04;
  --rni-accent: #D4AF37;
  --rni-soft: #FBEAE8;
  --rni-text-soft: #C0392B;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Be Vietnam Pro', Arial, sans-serif;
  color: #2b2b2b;
  background: #fff;
}
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 60px;
}
h1 { font-size: 24px; margin: 0; color: var(--rni-primary); }
h2 { font-size: 17px; margin: 0 0 14px; color: var(--rni-primary); }

.login-box {
  max-width: 320px;
  margin: 80px auto;
  text-align: center;
}
.login-box h1 { margin-bottom: 16px; }

.password-field { position: relative; margin-bottom: 12px; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  appearance: none;
  border: none;
  background: transparent;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--rni-text-soft);
}
.password-toggle:hover { color: var(--rni-primary); }
.password-toggle svg { width: 20px; height: 20px; }

input[type="text"],
input[type="password"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--rni-soft);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: #2b2b2b;
}
textarea { resize: vertical; min-height: 70px; }
input[type="text"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--rni-primary);
}

input[type="file"] {
  width: 100%;
  padding: 8px;
  border: 1.5px dashed var(--rni-soft);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  background: #fff;
}

input[type="color"] {
  width: 44px;
  height: 38px;
  padding: 2px;
  border: 1.5px solid var(--rni-soft);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 11px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--rni-primary);
  color: #fff;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: var(--rni-primary-dark); }
.btn-outline {
  background: transparent;
  color: var(--rni-primary);
  border: 1.5px solid var(--rni-primary);
}
.btn-outline:hover { background: var(--rni-soft); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { color: #b3261e; border-color: #b3261e; background: transparent; border: 1.5px solid #b3261e; }
.btn-danger:hover { background: #fdecea; }

.alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: var(--rni-soft); color: var(--rni-primary); }
.alert-success { background: #EAF6EA; color: #1F5447; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar a.logout { color: var(--rni-text-soft); font-size: 14px; text-decoration: none; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* Campaign list */
.campaign-list { display: flex; flex-direction: column; gap: 12px; }
.campaign-card {
  border: 1px solid var(--rni-soft);
  border-radius: 14px;
  padding: 16px;
}
.campaign-card-body { display: flex; gap: 14px; }
.campaign-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.campaign-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.campaign-thumb-empty {
  font-size: 10px;
  color: #999;
  text-align: center;
  padding: 4px;
}
.campaign-info { flex: 1; min-width: 0; }
.campaign-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.campaign-card-head h3 { margin: 0; font-size: 16px; color: #2b2b2b; }
.campaign-link {
  font-size: 13px;
  color: var(--rni-primary);
  word-break: break-all;
}
.campaign-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  margin: 8px 0;
}
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-public { background: #EAF6EA; color: #1F5447; }
.badge-restricted { background: #FFF4E0; color: #9a6700; }
.badge-private { background: #F1F1F4; color: #555; }
.badge-ratio { background: var(--rni-soft); color: var(--rni-primary); }
.badge-ratio.muted { background: #F1F1F4; color: #999; }
.campaign-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.empty { color: var(--rni-text-soft); font-size: 14px; }

/* Form / wizard sections */
.form-section {
  border: 1px solid var(--rni-soft);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #2b2b2b; }
.field .hint { font-size: 12px; color: var(--rni-text-soft); margin: 6px 0 0; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row > .field { flex: 1; min-width: 180px; }

.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1.5px solid var(--rni-soft);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
}
.radio-option input { margin-top: 3px; }
.radio-option .opt-title { font-weight: 600; }
.radio-option .opt-desc { font-size: 12px; color: var(--rni-text-soft); margin-top: 2px; }

.color-field { display: flex; align-items: center; gap: 10px; }
.color-field label { margin: 0; font-size: 13px; font-weight: 600; flex: 1; }

.frame-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.frame-upload {
  border: 1.5px dashed var(--rni-soft);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.frame-upload .ratio-label { font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.frame-upload img {
  max-width: 100%;
  max-height: 110px;
  display: block;
  margin: 0 auto 8px;
  background: #f5f5f5;
  border-radius: 8px;
}
.frame-upload .dims { font-size: 11px; color: var(--rni-text-soft); margin-bottom: 6px; }

.form-actions { display: flex; gap: 10px; margin-top: 6px; }
