*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F9F9F9;
  color: #000000;
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: #000000;
  color: #FFFFFF;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
}

.logo { height: 32px; width: auto; }

.app-name {
  font-size: 18px;
  font-weight: 700;
  color: #F2FF92;
  flex: 1;
  letter-spacing: -0.01em;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #B3B4B4;
}

.logout-link { color: #F2FF92; text-decoration: none; font-weight: 500; }
.logout-link:hover { text-decoration: underline; }

/* ── Main ── */
main {
  max-width: 820px;
  margin: 40px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Cards ── */
.card {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }

.description { color: #555; font-size: 14px; margin-bottom: 24px; }

/* ── Form ── */
.form-group { margin-bottom: 20px; }

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.optional { font-weight: 400; color: #B3B4B4; }

textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #D9D9D9;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #F9F9F9;
  resize: vertical;
  transition: border-color 0.15s;
}

textarea:focus {
  outline: none;
  border-color: #000;
  background: #fff;
}

/* ── Site links ── */
.site-links {
  display: flex;
  gap: 12px;
}

.site-link-btn {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border: 1px solid #D9D9D9;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #000;
  text-decoration: none;
  transition: background 0.15s;
}

.site-link-btn:hover { background: #F9F9F9; }

/* ── Publish Button ── */
.publish-btn {
  background: #000000;
  color: #F2FF92;
  border: none;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: opacity 0.15s;
}

.publish-btn:hover:not(:disabled) { opacity: 0.82; }

.publish-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Status message ── */
.status-msg {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.status-msg.success { background: #F8FFE9; color: #1a4000; border: 1px solid #c8e8a0; }
.status-msg.success a { color: #1a4000; font-weight: 700; text-decoration: underline; }
.status-msg.error   { background: #FF7050; color: #fff; }
.status-msg.hidden  { display: none; }

/* Blocked, but production is untouched — visually distinct from a failure that
   may have changed the live site. */
.status-msg.untouched {
  background: #F8FFE9;
  color: #000;
  border: 1px solid #D9D9D9;
  border-left: 5px solid #FF7050;
}

.untouched-headline {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.untouched-detail {
  font-size: 14px;
  font-weight: 400;
  color: #333;
  margin-top: 4px;
}

/* ── Log table ── */
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 16px;
}

.log-table th {
  background: #D9D9D9;
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F9F9F9;
  vertical-align: top;
}

.log-table tr:nth-child(even) td { background: #F9F9F9; }

.email-small { color: #B3B4B4; font-size: 12px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success { background: #F8FFE9; color: #1a4000; }
.badge-failed  { background: #FF7050; color: #fff; }

.muted { color: #B3B4B4; font-size: 14px; }
.empty-state { text-align: center; padding: 32px; color: #B3B4B4; font-size: 14px; }

/* ── Rollback ─────────────────────────────────────────────────────────────── */

.rollback-target {
  font-size: 14px;
  color: #000;
  margin: 0 0 12px;
}

.rollback-target.unavailable { color: #B3B4B4; }

.rollback-btn {
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 4px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.rollback-btn:hover:not(:disabled) { background: #F9F9F9; }
.rollback-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.rollback-confirm {
  margin-top: 16px;
  padding: 16px;
  background: #F9F9F9;
  border: 1px solid #D9D9D9;
  border-radius: 4px;
}

.rollback-confirm.hidden { display: none; }

.rollback-warning {
  background: #FF7050;
  color: #fff;
  padding: 12px;
  border-radius: 4px;
  font-size: 14px;
  margin: 0 0 12px;
}

.cancel-btn {
  background: none;
  border: none;
  color: #B3B4B4;
  font-size: 15px;
  cursor: pointer;
  padding: 12px 16px;
  text-decoration: underline;
}

.badge-rollback { background: #D9D9D9; color: #000; }

.rolled-back-note {
  display: block;
  font-size: 12px;
  color: #B3B4B4;
}
