:root {
  --bg-main: #f4efe8;
  --bg-panel: rgba(255, 252, 247, 0.88);
  --bg-panel-strong: #fffaf2;
  --bg-accent: #efe2d1;
  --bg-input: #fffdf9;
  --line-soft: rgba(93, 64, 42, 0.14);
  --line-strong: rgba(93, 64, 42, 0.24);
  --text-main: #2d2219;
  --text-soft: #6e5a4b;
  --primary: #b85c38;
  --primary-hover: #9f4f30;
  --danger: #c94f44;
  --danger-hover: #ac4037;
  --shadow-main: 0 24px 80px rgba(90, 60, 35, 0.14);
  --shadow-soft: 0 14px 35px rgba(90, 60, 35, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

body {
  min-height: 100vh;
  padding: 32px 16px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 30%),
    linear-gradient(135deg, #f8f2ea 0%, #f1e3d2 42%, #ead7c4 100%);
  color: var(--text-main);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.page-shell {
  display: flex;
  justify-content: center;
}

.container {
  width: min(100%, 520px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  background: var(--bg-panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-main);
}

.hero {
  margin-bottom: 24px;
}

.eyebrow,
.section-label {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-text,
.section-helper {
  color: var(--text-soft);
  line-height: 1.5;
}

.hero-text {
  max-width: 34ch;
  margin-top: 12px;
}

.search-panel,
.form-card,
.client-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--bg-panel-strong);
  box-shadow: var(--shadow-soft);
}

.search-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
}

.search-copy {
  display: grid;
  gap: 6px;
}

.search-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-field {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg-input);
}

.search-icon {
  color: var(--text-soft);
  font-size: 1rem;
}

.search-field input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 0;
  color: var(--text-main);
  outline: none;
}

.form-card {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
  padding: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-main);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.field input:focus,
.search-field:focus-within {
  border-color: rgba(184, 92, 56, 0.4);
  box-shadow: 0 0 0 4px rgba(184, 92, 56, 0.12);
}

.field input:focus {
  transform: translateY(-1px);
}

.form-actions {
  display: flex;
  gap: 12px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

#salvar-cliente,
.ghost-button,
.secondary-button,
.action-button,
.danger-button {
  font-weight: 700;
}

#salvar-cliente {
  flex: 1;
  background: var(--primary);
  color: #fff8f1;
  box-shadow: 0 12px 24px rgba(184, 92, 56, 0.22);
}

#salvar-cliente:hover {
  background: var(--primary-hover);
}

.ghost-button,
.secondary-button,
.action-button {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-main);
}

.ghost-button {
  min-width: 96px;
}

.ghost-button:hover,
.secondary-button:hover,
.action-button:hover {
  background: var(--bg-accent);
}

.secondary-button {
  min-width: 160px;
}

.list-header {
  margin-bottom: 12px;
}

.empty-state {
  padding: 22px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 242, 0.75);
  color: var(--text-soft);
  text-align: center;
  line-height: 1.6;
}

.client-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  list-style: none;
}

.client-item {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
}

.client-info {
  min-width: 0;
}

.client-name {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.client-email {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.client-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-button,
.danger-button {
  width: auto;
  min-width: 88px;
  padding-inline: 14px;
}

.danger-button {
  background: rgba(201, 79, 68, 0.1);
  color: var(--danger);
}

.danger-button:hover {
  background: rgba(201, 79, 68, 0.18);
  color: var(--danger-hover);
}

[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  body {
    padding: 20px 12px;
  }

  .container {
    padding: 22px 18px;
  }

  .search-controls,
  .form-actions,
  .client-item {
    flex-direction: column;
    align-items: stretch;
  }

  .ghost-button,
  .secondary-button,
  .action-button,
  .danger-button {
    width: 100%;
  }

  .client-actions {
    width: 100%;
    justify-content: stretch;
  }
}
