:root {
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --primary-light: #e8f0fe;
  --secondary: #34a853;
  --warning: #f9ab00;
  --danger: #ea4335;
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --text-main: #202124;
  --text-muted: #5f6368;
  --border: #dadce0;
  --border-focus: #1a73e8;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px rgba(60,64,67,0.15);
  --shadow-sm: 0 1px 2px rgba(60,64,67,0.15);
  --font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* Header */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.logo-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a73e8;
}

.logo-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
}

/* Login Box */
.login-card {
  max-width: 440px;
  margin: 60px auto;
  padding: 36px 32px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  background: #fff;
}

.login-icon {
  width: 72px;
  height: 72px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border-radius: 50%;
  margin-bottom: 16px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
  text-align: left;
}

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

.req {
  color: var(--danger);
  font-weight: bold;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: #fff;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.18);
}

.form-control[disabled], .form-control[readonly] {
  background-color: #f1f3f4;
  color: #70757a;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Radio & Checkbox Groups */
.choice-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.choice-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}

.choice-label:hover {
  background: #f8f9fa;
  border-color: #bdc1c6;
}

.choice-label input[type="radio"],
.choice-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.choice-label:has(input:checked) {
  background-color: var(--primary-light);
  border-color: var(--primary);
  font-weight: 500;
}

/* Stepper Wizard */
.stepper-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  overflow-x: auto;
  padding-bottom: 8px;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 100px;
  position: relative;
  cursor: pointer;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8eaed;
  color: #5f6368;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  transition: all 0.2s;
}

.step-indicator.active .step-circle {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.step-indicator.completed .step-circle {
  background: var(--secondary);
  color: white;
}

.step-name {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--text-muted);
}

.step-indicator.active .step-name {
  color: var(--primary);
  font-weight: 700;
}

/* Section Dividers */
.section-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a73e8;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 8px;
  margin: 24px 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 6px rgba(26,115,232,0.3);
}

.btn-secondary {
  background: #e8eaed;
  color: #3c4043;
}
.btn-secondary:hover {
  background: #dadce0;
}

.btn-success {
  background: var(--secondary);
  color: white;
}
.btn-success:hover {
  background: #2d9249;
}

.btn-warning {
  background: #fff8e1;
  color: #b06000;
  border: 1px solid #ffe082;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: #f1f3f4;
}

.btn-block {
  width: 100%;
}

/* Bottom Bar */
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  z-index: 90;
  border-radius: var(--radius);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  margin-top: 24px;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-info {
  background-color: var(--primary-light);
  color: #174ea6;
  border: 1px solid #d2e3fc;
}

.alert-warning {
  background-color: #fef7e0;
  color: #b06000;
  border: 1px solid #feefc3;
}

.alert-success {
  background-color: #e6f4ea;
  color: #137333;
  border: 1px solid #ceead6;
}

.alert-danger {
  background-color: #fce8e6;
  color: #c5221f;
  border: 1px solid #fad2cf;
}

/* Modals */
.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;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
  .login-card {
    margin: 20px auto;
    padding: 24px 16px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .bottom-bar {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .bottom-bar .btn {
    width: 100%;
  }
}

