:root {
  --primary: #2d5a4a;
  --primary-light: #3d7a64;
  --accent: #e8c547;
  --bg: #f5f5f0;
  --card-bg: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --border: #e0e0e0;
  --success: #4a9d6e;
  --error: #d9534f;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
}

.form-section {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.form-section h2 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.optional {
  font-size: 0.85rem;
  font-weight: normal;
  color: var(--text-light);
}

.required-mark {
  color: var(--error);
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 90, 74, 0.1);
  background: #fff;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.optional-section h2 {
  cursor: pointer;
  user-select: none;
}

.toggle-icon {
  transition: transform 0.3s;
  font-size: 0.8rem;
}

.optional-section.open .toggle-icon {
  transform: rotate(90deg);
}

.optional-content {
  display: none;
  padding-top: 10px;
}

.optional-section.open .optional-content {
  display: block;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-submit:hover {
  background: var(--primary-light);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  background: var(--border);
  cursor: not-allowed;
}

footer {
  text-align: center;
  margin-top: 40px;
}

footer a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
}

footer a:hover {
  color: var(--primary);
}

.success-page {
  text-align: center;
  padding: 60px 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 40px;
  color: white;
}

.success-page h1 {
  color: var(--primary);
  margin-bottom: 16px;
}

.success-page p {
  color: var(--text-light);
  margin-bottom: 32px;
}

.btn-back {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
}

.admin-page {
  max-width: 900px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-header h1 {
  color: var(--primary);
}

.btn-logout {
  padding: 8px 20px;
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-logout:hover {
  background: var(--primary);
  color: white;
}

.demand-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demand-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.demand-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.demand-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.demand-card h3 {
  font-size: 1.1rem;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-more {
  background: #e8f5e9;
  color: var(--success);
}

.badge-basic {
  background: #f5f5f5;
  color: var(--text-light);
}

.demand-card-meta {
  display: flex;
  gap: 16px;
  color: var(--text-light);
  font-size: 0.85rem;
}

.demand-detail {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.demand-detail h2 {
  color: var(--primary);
  margin-bottom: 24px;
}

.detail-section {
  margin-bottom: 28px;
}

.detail-section h4 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-section p {
  font-size: 1.05rem;
  line-height: 1.7;
}

.btn-back-detail {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  text-decoration: none;
}

.login-page {
  max-width: 400px;
  margin: 80px auto;
}

.login-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.login-card h1 {
  color: var(--primary);
  text-align: center;
  margin-bottom: 32px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form .btn-submit {
  margin-top: 8px;
}

.error-msg {
  color: var(--error);
  text-align: center;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state h3 {
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .container {
    padding: 24px 16px;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  .form-section {
    padding: 20px;
  }
  
  .admin-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}

.demand-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.demand-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.demand-card-header {
  flex: 1;
  cursor: pointer;
}

.btn-delete {
  padding: 6px 12px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.btn-delete:hover {
  background: #c9302c;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-box h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.modal-box p {
  color: var(--text-light);
  margin-bottom: 24px;
}

.modal-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btns button {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}

.modal-btns .btn-cancel {
  background: #f0f0f0;
  border: none;
  color: var(--text);
}

.modal-btns .btn-cancel:hover {
  background: #e0e0e0;
}

.modal-btns .btn-confirm {
  background: var(--error);
  border: none;
  color: white;
}

.modal-btns .btn-confirm:hover {
  background: #c9302c;
}