* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f6f7f9;
  color: #222;
}

.page {
  min-height: 100vh;
  padding: 24px 16px 40px;
}

.center-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

h1 {
  margin: 0 0 6px;
  font-size: 24px;
  text-align: center;
}

.subtitle {
  margin: 0 0 18px;
  font-size: 14px;
  text-align: center;
  color: #666;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: bold;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cfcfcf;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  margin-bottom: 14px;
  background: #fff;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #999;
}

.full-width {
  width: 100%;
}

.top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.logout-btn {
  padding: 10px 14px;
  border: 1px solid #bbb;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.logout-btn:hover {
  background: #f3f3f3;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.status-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #bbb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: 0.15s;
  min-height: 50px;
}

.status-btn:hover {
  background: #f2f2f2;
}

.status-btn.active {
  background: #222;
  color: #fff;
  border-color: #222;
}

.edit-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f5;
  border: 1px solid #d9d9d9;
  flex-shrink: 0;
}

.status-btn.active .edit-badge {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.edit-badge i {
  font-size: 12px;
}

.custom-box {
  display: none;
  margin-bottom: 14px;
}

.custom-help {
  font-size: 12px;
  color: #666;
  margin-top: -8px;
  margin-bottom: 10px;
}

.note-toggle {
  width: 100%;
  padding: 12px;
  border: 1px dashed #888;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 14px;
}

.note-toggle:hover {
  background: #f4f4f4;
}

.note-box {
  display: none;
}

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

.btn-dark {
  background: #222;
  color: #fff;
}

.btn-dark:hover {
  background: #111;
}

.btn-light {
  background: #e9e9e9;
  color: #222;
}

.btn-light:hover {
  background: #dedede;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.preview-card {
  display: none;
}

.preview-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: bold;
}

.preview-box {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 14px;
}

.preview-row {
  margin-bottom: 10px;
  font-size: 14px;
}

.preview-row:last-child {
  margin-bottom: 0;
}

.preview-label {
  font-weight: bold;
  margin-right: 6px;
}

.message {
  margin-top: 14px;
  min-height: 20px;
  text-align: center;
  font-size: 14px;
  color: #c62828;
}

.message.success {
  color: #1b5e20;
}

@media (max-width: 480px) {
  .status-grid {
    grid-template-columns: 1fr;
  }

  .action-row {
    flex-direction: column;
  }
}