:root {
  --blue: #1f679d;
  --blue-dark: #0f3b60;
  --gray: #f1f3f6;
  --shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  --text: #1a2433;
  --danger: #e33228;
}

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

body {
  margin: 0;
  font-family: "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  background: #fff;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
}

main {
  flex: 1;
  padding-bottom: 88px;
}

.screen {
  display: none;
  padding: 18px 18px 110px;
}

.screen.active {
  display: block;
}

.logo-box {
  display: flex;
  justify-content: center;
  margin: 24px auto 14px;
}

.logo-box.top-tight {
  margin-top: 6px;
}

.logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(15, 59, 96, 0.16));
}

.category-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.category-card {
  background: #fdfdfd;
  border-radius: 16px;
  padding: 14px 12px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 8px 0;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.icon-circle {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at 30% 30%, #ffe3ed, #f9a1c0);
  display: grid;
  place-items: center;
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.08), 0 10px 24px rgba(0, 0, 0, 0.08);
  padding: 8px;
}

.icon-circle svg {
  width: 68px;
  height: 68px;
}

.icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.form-header {
  text-align: center;
}

.form-header .label {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.form-header h2 {
  margin: 16px 0 10px;
  font-size: 1.35rem;
  letter-spacing: 0.2px;
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #d9dce0;
  background: #fff;
  font-size: 1rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

.text-input.prominent {
  background: #12d8f5;
  color: #0f2540;
  border: none;
  font-weight: 700;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 6px 0 18px;
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field label {
  width: 48%;
  text-align: right;
  font-weight: 600;
  font-size: 1rem;
}

.field input {
  width: 52%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #d8dce2;
  font-size: 1rem;
  background: linear-gradient(180deg, #fff, #f4f4f4);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.08);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.btn {
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn.ghost {
  width: 100%;
  background: linear-gradient(180deg, #fafafa, #dedede);
  color: #111;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn.outline {
  width: 100%;
  background: transparent;
  color: var(--blue-dark);
  border: 1px solid #c6d3e3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.btn.solid {
  background: #111;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 6px 14px rgba(227, 50, 40, 0.35);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--blue);
  color: #fff;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  align-items: center;
  padding: 10px 6px 12px;
  box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.18);
  z-index: 10;
}

.nav-item {
  background: transparent;
  border: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
}

.nav-item svg {
  width: 48px;
  height: 48px;
}

.nav-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.muted {
  color: #5a6475;
  margin: 4px 0 16px;
}

.status {
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 8px;
  background: #eef5ff;
  color: #0f2540;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.status.error {
  background: #ffe9e6;
  color: #8e1b14;
}

.list-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-item {
  width: 100%;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  text-align: left;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.client-item small {
  font-weight: 400;
  color: #5a6475;
}

.list-card {
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.list-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.list-card h4 {
  margin: 0;
  font-size: 1.05rem;
}

.badge {
  background: var(--blue);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.value-grid .label {
  font-weight: 600;
  text-align: right;
}

.value-grid .value {
  text-align: left;
}

.clients-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: var(--shadow);
  align-items: flex-start;
}

.client-name {
  font-weight: 700;
  color: var(--text);
}

.client-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.client-delete-btn {
  min-height: 34px;
  padding: 7px 14px;
  font-size: 0.9rem;
}

.garment-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  align-items: center;
  justify-items: center;
}

.garment-btn {
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f8fbff;
  padding: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  width: 90px;
  height: 90px;
}

.garment-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.garment-btn.active {
  border-color: var(--blue);
  box-shadow: 0 6px 14px rgba(31, 103, 157, 0.2);
  background: #e9f3ff;
}

.garment-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.page-bg {
  background: #fff;
}

.page {
  min-height: 100vh;
  padding: 18px 16px 140px;
  max-width: 540px;
  margin: 0 auto;
}

.top-logo {
  display: flex;
  justify-content: center;
  margin: 14px 0 6px;
}

.logo-small {
  width: 120px;
}

.page-title {
  text-align: center;
  margin: 14px 0 12px;
  font-size: 1.35rem;
  letter-spacing: 0.3px;
}

.label.large {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 4px 0 6px;
}

.form-wrapper {
  background: #fff;
  border-radius: 16px;
  padding: 10px 6px 18px;
}

.link-nav {
  text-decoration: none;
}

@media (min-width: 540px) {
  .screen {
    max-width: 480px;
    margin: 0 auto;
  }
}
