/* Layanan TRC Sipasti — gaya mengikuti mockup formulir modern */

:root {
  --bg-start: #eef2ff;
  --bg-end: #f5f3ff;
  --surface: #ffffff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --label: #374151;
  --border: #e5e7eb;
  --border-focus: #6366f1;
  --primary: #5850ec;
  --primary-hover: #4f46e5;
  --primary-active: #4338ca;
  --error: #dc2626;
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --radius-card: 20px;
  --radius-input: 12px;
  --space-field: 1.25rem;
  --form-width: 75%;
  --shadow-card: 0 10px 40px rgba(88, 80, 236, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(145deg, var(--bg-start) 0%, var(--bg-end) 50%, #ede9fe 100%);
  background-attachment: fixed;
}

.page {
  width: var(--form-width);
  max-width: 75vw;
  margin: 0 auto;
  padding: 1rem 0 1.25rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 1.25rem;
}

/* ---- Header ---- */
.header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.header-subtitle {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* ---- Card ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 2rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* ---- Fields ---- */
.field {
  margin-bottom: var(--space-field);
}

.field label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--label);
  margin-bottom: 0.55rem;
}

.field label .required {
  color: var(--error);
  font-weight: 600;
}

.field input[type='email'],
.field input[type='text'],
.field input[type='tel'],
.field textarea,
.field select {
  width: 100%;
  padding: 0.9rem 1.05rem;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  min-height: 3rem;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9ca3af;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.field textarea {
  min-height: 10.5rem;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
  resize: vertical;
  line-height: 1.6;
}

/* Select dengan panah custom */
.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #9ca3af;
  pointer-events: none;
}

.field select {
  padding-right: 2.25rem;
  cursor: pointer;
  color: var(--text);
}

.field select:invalid,
.field select option[value=''] {
  color: #9ca3af;
}

.field select option:not([value='']) {
  color: var(--text);
}

/* ---- Hints ---- */
.field .hint {
  font-size: 0.8125rem;
  line-height: 1.5;
  margin: 0.55rem 0 0;
  color: var(--text-muted);
}

.field .hint-gdrive {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f5f3ff;
  border-radius: 10px;
  border-left: 4px solid var(--primary);
  color: #4b5563;
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* ---- Errors ---- */
.field.error input,
.field.error textarea,
.field.error select {
  border-color: var(--error);
}

.field.error input:focus,
.field.error textarea:focus,
.field.error select:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field .error-msg {
  display: none;
  font-size: 0.75rem;
  color: var(--error);
  margin-top: 0.35rem;
}

.field.error .error-msg {
  display: block;
}

/* ---- Submit button ---- */
.actions {
  margin-top: 1.25rem;
  padding-top: 0;
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 1rem 1.5rem;
  min-height: 3.25rem;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-input);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(88, 80, 236, 0.35);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-submit:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 6px 18px rgba(88, 80, 236, 0.4);
}

.btn-submit:active:not(:disabled) {
  background: var(--primary-active);
  transform: translateY(1px);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-icon {
  flex-shrink: 0;
}

/* ---- Alert ---- */
.alert {
  display: none;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-input);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.alert.visible {
  display: block;
}

.alert.success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.alert.error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}

/* ---- Footer ---- */
.footer {
  text-align: center;
  margin-top: 1rem;
  padding: 0 0.5rem;
}

.footer p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  :root {
    --form-width: 92%;
    --space-field: 1.125rem;
  }

  .page {
    max-width: 92vw;
    padding: 0.85rem 0 1rem;
  }

  .card {
    padding: 1.25rem 1.15rem 1.1rem;
  }

  .header {
    margin-bottom: 1rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .page {
    max-width: min(75vw, 1100px);
  }
}
