:root {
  --primary-color: #25B18E;
  --text-dark: #333333;
  --text-gray: #666666;
  --text-light: #999999;
  --border-color: #E5E5E5;
  --bg-light: #F8F9FA;
  --white: #FFFFFF;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* Header Styles */
.header-custom {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  background: var(--white);
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: absolute;
  left: 20px;
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: #3ebfa8;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.logo {
  flex-shrink: 0;
}

.spacer {
  flex-grow: 1;
}

/* Sidebar Styles */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background-color: var(--white);
  z-index: 999;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
  left: 0;
}

.sidebar-header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: var(--white);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.sidebar-content {
  padding: 20px 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin: 0;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: var(--text-dark);
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-size: 16px;
}

.sidebar-menu li a:hover {
  background-color: var(--bg-light);
}

/* Main Container */
.main-container {
  padding: 30px 15px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Page Title */
.page-title {
  margin-bottom: 25px;
}

.page-title h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

/* Form Card */
.form-card {
  background-color: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

/* Form Groups */
.form-group-custom {
  margin-bottom: 30px;
}

.form-group-custom:last-child {
  margin-bottom: 0;
}

.form-label-custom {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 15px;
}

/* Input Styles */
.input-row {
  display: flex;
  gap: 15px;
}

.input-wrapper {
  position: relative;
  background-color: var(--bg-light);
  border-radius: 8px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-wrapper.flex-1 {
  flex: 1;
}

.input-wrapper.flex-2 {
  flex: 2;
}

.form-input {
  border: none;
  background: none;
  outline: none;
  font-size: 16px;
  color: var(--text-dark);
  width: 100%;
  padding: 0;
}

.form-input::placeholder {
  color: var(--text-light);
}

.input-unit {
  font-size: 16px;
  color: var(--text-gray);
  flex-shrink: 0;
}

.dropdown-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Radio Styles */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-item {
  position: relative;
}

.radio-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 0;
}

.radio-circle {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  margin-right: 12px;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.radio-item input[type="radio"]:checked + .radio-label .radio-circle {
  border-color: var(--primary-color);
}

.radio-item input[type="radio"]:checked + .radio-label .radio-circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.radio-text {
  font-size: 16px;
  color: var(--text-dark);
}

.radio-text-group {
  display: flex;
  flex-direction: column;
}

.radio-subtext {
  font-size: 14px;
  color: var(--text-gray);
  margin-top: 2px;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 15px;
  padding: 0 15px;
}

.btn-custom {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-next {
  background-color: #5A6C7D;
  color: var(--white);
}

.btn-next:hover {
  background-color: #4A5C6D;
}

.btn-history {
  background-color: #5A6C7D;
  color: var(--white);
}

.btn-history:hover {
  background-color: #4A5C6D;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-container {
    padding: 20px 10px;
  }

  .form-card {
    padding: 20px;
    border-radius: 8px;
  }

  .page-title h1 {
    font-size: 24px;
  }

  .action-buttons {
    flex-direction: column;
    padding: 0 10px;
  }

  .btn-custom {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .header-custom {
    padding: 0 15px;
  }

  .logo {
    width: 120px;
    height: auto;
  }

  .form-card {
    padding: 15px;
  }

  .form-label-custom {
    font-size: 14px;
  }

  .radio-text {
    font-size: 14px;
  }

  .radio-subtext {
    font-size: 12px;
  }

  .form-input {
    font-size: 14px;
  }

  .input-unit {
    font-size: 14px;
  }
}

/* Instructions Modal Styles */
.instructions-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.instructions-modal.active {
  display: flex;
}

.instructions-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.instructions-modal-content {
  position: relative;
  background-color: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.instructions-header {
  padding: 24px 30px;
  border-bottom: 1px solid var(--border-color);
}

.instructions-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
}

.instructions-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}

.instructions-list {
  margin: 0;
  padding-left: 24px;
  list-style: decimal;
}

.instructions-list li {
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dark);
}

.instructions-list li:last-child {
  margin-bottom: 0;
}

.instructions-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

.btn-agree {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-agree:hover {
  background-color: #1e9d7a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 177, 142, 0.3);
}

.btn-agree:active {
  transform: translateY(0);
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
  .instructions-modal {
    padding: 15px;
  }

  .instructions-modal-content {
    max-height: 85vh;
    border-radius: 12px;
  }

  .instructions-header {
    padding: 20px;
  }

  .instructions-header h2 {
    font-size: 20px;
  }

  .instructions-body {
    padding: 20px;
  }

  .instructions-list {
    padding-left: 20px;
  }

  .instructions-list li {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .instructions-footer {
    padding: 16px 20px;
  }

  .btn-agree {
    padding: 10px 28px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .instructions-modal {
    padding: 10px;
  }

  .instructions-header {
    padding: 16px;
  }

  .instructions-header h2 {
    font-size: 18px;
  }

  .instructions-body {
    padding: 16px;
  }

  .instructions-list li {
    font-size: 13px;
  }

  .btn-agree {
    width: 100%;
  }
}

.settings-option {
  margin-bottom: 0;
}

.settings-option .form-label-custom {
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 600;
}