.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color 0.2s var(--ease);
}

.card:hover {
  border-color: var(--border);
}

.card:focus-within {
  border-color: rgba(201, 168, 76, 0.35);
  box-shadow: var(--shadow-gold);
}

.card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.card__tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid rgba(201, 168, 76, 0.2);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field--full {
  grid-column: 1 / -1;
}

.label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.875rem;
  padding: var(--space-3) var(--space-4);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s;
  width: 100%;
  outline: none;
  appearance: none;
}

.input::placeholder { color: var(--text-faint); }

.input:hover {
  border-color: var(--border);
  background: var(--surface-3);
}

.input:focus {
  border-color: var(--gold-dim);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a90' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.select option {
  background: var(--surface-2);
  color: var(--text);
}

.textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

.items-header {
  display: grid;
  grid-template-columns: 1fr 70px 90px 70px 90px 36px;
  gap: var(--space-2);
  padding: 0 0 var(--space-3);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: var(--space-3);
}

.items-header span {
  font-size: 0.67rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.item-row {
  display: grid;
  grid-template-columns: 1fr 70px 90px 70px 90px 36px;
  gap: var(--space-2);
  align-items: center;
  animation: fadeInUp 0.25s var(--ease);
}

.item-row .input {
  padding: var(--space-2) var(--space-3);
  font-size: 0.82rem;
}

.item-total {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--gold-light);
  text-align: right;
  padding-right: 4px;
}

.btn-delete-item {
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s var(--ease);
  flex-shrink: 0;
}

.btn-delete-item:hover {
  color: var(--danger);
  border-color: rgba(224, 85, 85, 0.3);
  background: rgba(224, 85, 85, 0.08);
}

.btn-add-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: var(--space-3) var(--space-4);
  width: 100%;
  justify-content: center;
  transition: all 0.18s var(--ease);
  margin-top: var(--space-1);
}

.btn-add-item:hover {
  border-color: var(--gold-dim);
  color: var(--gold-light);
  background: var(--gold-glow);
}

.btn-add-item svg { color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}

.btn--ghost {
  background: none;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.btn--secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.btn--secondary:hover {
  background: var(--surface-3);
  border-color: var(--gold-dim);
  color: var(--gold-light);
}

.btn--primary {
  background: linear-gradient(135deg, #b8922e, var(--gold));
  color: #0c0c11;
  font-weight: 600;
  border: none;
  box-shadow: 0 2px 12px rgba(201, 168, 76, 0.25);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
  filter: brightness(1.08);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.2);
}

.dad-modal-content {
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-lg);
}

.dad-modal-header {
  border-bottom: 1px solid var(--border-soft);
}

.modal-footer {
  border-top: 1px solid var(--border-soft);
}

.modal-backdrop {
  background-color: #000;
  opacity: 0.8 !important;
}

@media (max-width: 768px) {
  .items-header {
    grid-template-columns: 1fr 50px 70px 50px 70px 30px;
  }
  .item-row {
    grid-template-columns: 1fr 50px 70px 50px 70px 30px;
  }
  .items-header span {
    font-size: 0.6rem;
  }
  .item-row .input, .item-total {
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .items-header {
    display: none;
  }
  .item-row {
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border-soft);
    padding: var(--space-3);
    border-radius: var(--radius);
  }
  .item-row input[data-field="desc"] {
    grid-column: 1 / -1;
  }
  .btn-delete-item {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
}

.modal {
  z-index: 10005 !important;
}
.modal-backdrop {
  z-index: 10004 !important;
}