@import url(http://fonts.googleapis.com/css?family=Roboto:400,400italic,700,700italic);
@import url(http://fonts.googleapis.com/css?family=Playfair+Display:400,400italic,700,700italic);
@import url(https://fonts.googleapis.com/css?family=Lato:400,400italic,700,700italic);

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

  :root {
    --teal: #12847B;
    --teal-light: #1aa89d;
    --teal-dark: #0d6b63;
    --teal-bg: rgba(18,132,123,0.06);
    --gray: #6b7280;
    --gray-light: #f3f4f6;
    --gray-mid: #e5e7eb;
    --gray-dark: #374151;
    --white: #ffffff;
    --danger: #ef4444;
    --success: #059669;
  }

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Lato', sans-serif;
    background: #f0f4f4;
    min-height: 100vh;
    padding: 40px 20px 80px;
  }

  /* ─── Background texture ─── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse at 15% 30%, rgba(18,132,123,0.07) 0%, transparent 55%),
      radial-gradient(ellipse at 85% 70%, rgba(18,132,123,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  .container {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
  }

  /* ─── Page Header ─── */
  .page-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeDown 0.6s ease both;
  }

  .page-header .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--teal-bg);
    border: 1px solid rgba(18,132,123,0.2);
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 20px;
  }

  .page-header .badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--teal);
    border-radius: 50%;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
  }

  .page-header h1 {
    font-family: 'Lato', sans-serif;
    font-size: 36px;
    color: #111827;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 12px;
  }

  .page-header h1 em {
    font-style: normal;
    color: var(--teal);
  }

  .page-header p {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.7;
    max-width: 420px;
    margin: 0 auto;
  }

  /* ─── Card ─── */
  .card {
    background: var(--white);
    border-radius: 20px;
    box-shadow:
      0 1px 3px rgba(0,0,0,0.05),
      0 10px 40px rgba(18,132,123,0.1),
      0 30px 70px rgba(0,0,0,0.06);
    overflow: hidden;
    animation: fadeUp 0.7s ease 0.1s both;
  }

  .card-top {
    background: linear-gradient(135deg, var(--teal-dark) 0%, var(--teal) 60%, var(--teal-light) 100%);
    padding: 28px 40px;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .card-top-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }

  .card-top-text h2 {
    font-family: 'Lato', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
  }

  .card-top-text p {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    margin-top: 3px;
  }

  .card-body {
    padding: 40px 40px 48px;
  }

  /* ─── Form fields ─── */
  .form-row {
    margin-bottom: 28px;
    animation: fadeUp 0.5s ease both;
  }

  .form-row:nth-child(1) { animation-delay: 0.15s; }
  .form-row:nth-child(2) { animation-delay: 0.2s; }
  .form-row:nth-child(3) { animation-delay: 0.25s; }
  .form-row:nth-child(4) { animation-delay: 0.3s; }

  label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray-dark);
    margin-bottom: 8px;
  }

  label .req {
    color: var(--teal);
    margin-left: 2px;
  }

  label .hint {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--gray);
    margin-left: 6px;
  }

  .input-wrap {
    position: relative;
  }

  .input-wrap .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
    transition: color 0.2s;
  }

  input[type="text"],
  input[type="date"],
  textarea {
    width: 100%;
    background: var(--gray-light);
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    color: #111827;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    outline: none;
  }

  input[type="text"],
  input[type="date"] {
    height: 52px;
    padding: 0 16px 0 46px;
  }

  textarea {
    padding: 16px 16px 16px 46px;
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
  }

  input:focus, textarea:focus {
    border-color: var(--teal);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(18,132,123,0.08);
  }

  input:focus ~ .icon,
  textarea:focus ~ .icon {
    color: var(--teal);
  }

  /* Reverse icon (inside .input-wrap, not after) */
  .input-wrap input:focus + .icon,
  .input-wrap textarea:focus + .icon { color: var(--teal); }

  input::placeholder, textarea::placeholder { color: #9ca3af; }

  .file-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gray-light);
  border: 2px dashed var(--gray-mid);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top:30px;
  margin-bottom:30px
  }

  .file-upload:hover {
    border-color: var(--teal);
    background: var(--teal-bg);
  }

  .file-upload input {
    display: none;
  }

  .file-btn {
    background: var(--teal);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
  }

  .file-text {
    font-size: 13px;
    color: var(--gray);
  }

  /* ─── Voice recorder ─── */
  .voice-section {
    margin-top: 16px;
    border: 2px dashed var(--gray-mid);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s, background 0.3s;
    background: #fafafa;
  }

  .voice-section.recording {
    border-color: var(--danger);
    background: rgba(239,68,68,0.03);
    animation: recordPulse 1s ease-in-out infinite;
  }

  .voice-section.has-audio {
    border-color: var(--teal);
    background: var(--teal-bg);
    border-style: solid;
  }

  @keyframes recordPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.15); }
    50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  }

  .voice-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .voice-label svg { color: var(--teal); }

  .voice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .btn-record {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 30px;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
  }

  .btn-record.start {
    background: var(--teal);
    color: white;
  }

  .btn-record.start:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18,132,123,0.3);
  }

  .btn-record.stop {
    background: var(--danger);
    color: white;
  }

  .btn-record.stop:hover {
    background: #dc2626;
  }

  .btn-record.clear {
    background: var(--gray-light);
    color: var(--gray);
    border: 1px solid var(--gray-mid);
  }

  .btn-record.clear:hover { background: var(--gray-mid); }

  .record-dot {
    width: 8px; height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1s step-start infinite;
  }

  @keyframes blink { 50% { opacity: 0; } }

  .timer {
    font-size: 13px;
    font-weight: 600;
    color: var(--danger);
    font-variant-numeric: tabular-nums;
    min-width: 40px;
  }

  audio {
    width: 100%;
    margin-top: 12px;
    border-radius: 8px;
    height: 36px;
  }

  audio::-webkit-media-controls-panel { background: var(--teal-bg); }

  /* ─── Submit button ─── */
  .submit-wrap {
    margin-top: 36px;
    animation: fadeUp 0.5s ease 0.4s both;
  }

  .btn-submit {
    width: 100%;
    height: 58px;
    background: linear-gradient(135deg, var(--teal-dark), var(--teal-light));
    color: white;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
  }

  .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(18,132,123,0.4);
  }

  .btn-submit:active { transform: translateY(0); }

  .btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
    opacity: 0;
    transition: opacity 0.2s;
  }

  .btn-submit:hover::before { opacity: 1; }

  .btn-submit .inner {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    position: relative; z-index: 1;
  }

  /* ─── Spinner ─── */
  .spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
  }

  @keyframes spin { to { transform: rotate(360deg); } }

  /* ─── Notifications ─── */
  .notification {
    display: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 20px;
    align-items: flex-start;
    gap: 12px;
  }

  .notification.success {
    background: rgba(5,150,105,0.08);
    border: 1px solid rgba(5,150,105,0.2);
    color: var(--success);
  }

  .notification.error {
    background: rgba(239,68,68,0.07);
    border: 1px solid rgba(239,68,68,0.2);
    color: var(--danger);
  }

  .notification.show { display: flex; }

  .notification-icon { flex-shrink: 0; margin-top: 1px; }

  /* ─── Success screen ─── */
  .success-screen {
    display: none;
    text-align: center;
    padding: 60px 40px;
    animation: fadeUp 0.5s ease both;
  }

  .success-screen.show { display: block; }

  .success-icon {
    width: 80px; height: 80px;
    background: rgba(5,150,105,0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
  }

  .success-screen h2 {
    font-family: 'Lato', sans-serif;
    font-size: 26px;
    color: #111827;
    margin-bottom: 12px;
  }

  .success-screen p {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.7;
    max-width: 360px;
    margin: 0 auto 32px;
  }

  .btn-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--teal-bg);
    border: 1.5px solid rgba(18,132,123,0.25);
    color: var(--teal);
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-new:hover {
    background: var(--teal);
    color: white;
    border-color: var(--teal);
  }

  /* ─── Validation ─── */
  input.invalid, textarea.invalid {
    border-color: var(--danger) !important;
    background: rgba(239,68,68,0.03);
  }

  .field-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
    display: none;
    padding-left: 4px;
  }

  .field-error.show { display: block; }

  /* ─── Privacy notice ─── */
  .privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--gray-light);
    border-radius: 10px;
    font-size: 12px;
    color: var(--gray);
    line-height: 1.6;
  }

  .privacy-note svg { flex-shrink: 0; color: var(--teal); margin-top: 1px; }

  /* ─── Animations ─── */
  @keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @media (max-width: 560px) {
    .card-body, .card-top { padding: 28px 24px; }
    .success-screen { padding: 40px 24px; }
    .page-header h1 { font-size: 28px; }
  }