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

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #1c2a3a;
  background: #f2f6fb;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 64px;
}

.card {
  width: min(520px, 100%);
  background: #ffffff;
  padding: 24px;
  border-radius: 28px;
  box-shadow:
    0 24px 60px rgba(12, 32, 63, 0.12),
    0 4px 14px rgba(12, 32, 63, 0.08);
}

.page-title {
  text-align: center;
  font-size: clamp(24px, 3vw, 32px);
  margin: 8px 0 24px;
  letter-spacing: 0.2px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
  background: #eef4ff;
  padding: 6px;
  border-radius: 16px;
}

.tab {
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: #4b5b73;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab--active {
  background: #ffffff;
  color: #17315a;
  box-shadow: 0 6px 16px rgba(23, 49, 90, 0.12);
}

.tab-panel {
  display: none;
}

.tab-panel--active {
  display: block;
}

.form-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 18px 18px 22px;
  border: 1px solid #e6eef5;
  box-shadow: 0 8px 26px rgba(18, 45, 77, 0.08);
  margin-bottom: 18px;
}

.form-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.form-card__title {
  font-size: 18px;
  margin: 0 0 6px;
}

.form-card__subtitle {
  margin: 0;
  font-size: 14px;
  color: #5f6b7a;
  line-height: 1.4;
}

.pill {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.pill--required {
  background: #ffe9e7;
  color: #d93a3a;
}

.pill--optional {
  background: #ffe9f4;
  color: #ff1b57;
}

.status-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  background: #f6f8fc;
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  padding: 6px;
}

.status-tab {
  border: none;
  border-radius: 10px;
  background: transparent;
  padding: 10px 12px;
  color: #5e6f88;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-tab--active {
  background: linear-gradient(90deg, #ff2b8a, #ff1b57);
  color: #ffffff;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.field__label {
  font-weight: 600;
  font-size: 15px;
  color: #1c2a3a;
}

input[type="tel"],
textarea {
  width: 100%;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: #1c2a3a;
  background: #fff;
}

textarea {
  resize: vertical;
  min-height: 140px;
}

input[type="tel"]::placeholder,
textarea::placeholder {
  color: #9aa6b2;
}

input[type="tel"]:focus,
textarea:focus {
  border-color: #9ec7ff;
  box-shadow: 0 0 0 4px rgba(80, 140, 255, 0.15);
}

.field__count {
  align-self: flex-end;
  font-size: 12px;
  color: #9aa6b2;
}

.upload {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid #e2e8f0;
  padding: 14px 16px;
  border-radius: 16px;
  color: #1c2a3a;
  font-weight: 600;
  background: #fff;
}

.upload__icon {
  font-size: 18px;
}

.upload__text {
  font-size: 14px;
  letter-spacing: 0.4px;
}

.upload__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.preview {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.preview__item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  aspect-ratio: 1 / 1;
}

.preview__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 24, 31, 0.7);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.preview__remove:hover {
  background: rgba(20, 24, 31, 0.85);
}

.submit {
  width: 100%;
  border: none;
  border-radius: 18px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #ff2b8a, #ff1b57);
  box-shadow: 0 16px 30px rgba(255, 27, 87, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(255, 27, 87, 0.35);
}

.submit:active {
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(255, 27, 87, 0.28);
}

.submit--secondary {
  margin-top: 14px;
  background: linear-gradient(90deg, #ff2b8a, #ff1b57);
  box-shadow: 0 16px 30px rgba(255, 27, 87, 0.3);
}

.submit--secondary:hover {
  box-shadow: 0 18px 34px rgba(255, 27, 87, 0.35);
}

.submit--secondary:active {
  box-shadow: 0 10px 22px rgba(255, 27, 87, 0.28);
}

.tickets-meta {
  margin-bottom: 12px;
}

.results-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ffeef5;
  border-radius: 10px;
  border: 1px solid #ffd0e4;
}

.results-summary__count {
  font-weight: 800;
  color: #ff1b57;
}

.results-summary__label {
  font-size: 14px;
  color: #3f4f68;
}

.tickets-list {
  display: grid;
  gap: 12px;
}

.ticket-card {
  border: 1px solid #dfe8f3;
  border-radius: 16px;
  padding: 14px;
  background: #fbfdff;
}

.ticket-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ticket-card__head h3 {
  margin: 0;
  font-size: 16px;
}

.ticket-badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.ticket-badge--active {
  background: #fee2e2;
  color: #b91c1c;
}

.ticket-badge--resolved {
  background: #dcfce7;
  color: #166534;
}

.ticket-message {
  margin: 0 0 10px;
  color: #1f2d40;
}

.ticket-grid {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #4d5f78;
}

.ticket-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-link {
  display: inline-flex;
  text-decoration: none;
  color: #ff1b57;
  font-weight: 600;
  font-size: 13px;
}

.ticket-link:hover {
  text-decoration: underline;
}

.empty-state {
  border: 1px dashed #ced9ea;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  background: #f8fbff;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.empty-state p {
  margin: 0;
  color: #5f6d82;
  font-size: 14px;
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  max-width: 400px;
  word-wrap: break-word;
}

.notification--show {
  opacity: 1;
  transform: translateY(0);
}

.notification--success {
  background: #10b981;
  color: #fff;
}

.notification--error {
  background: #ef4444;
  color: #fff;
}

.notification--info {
  background: #3b82f6;
  color: #fff;
}

.submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

@media (max-width: 480px) {
  .card {
    padding: 20px;
  }

  .form-card {
    padding: 16px;
  }

  .notification {
    left: 20px;
    right: 20px;
    max-width: calc(100% - 40px);
  }
}
