:root {
  --blue: #12a5b1;
  --blue-dark: #0e8f99;
  --orange: #ff7e47;
  --bg: #e8e8e8;
  --text: #1a1d26;
  --muted: #8b93a7;
  --border: #e4e7ef;
  --white: #ffffff;
  --panel: #12a5b1;
  --radius: 10px;
  --radius-lg: 28px;
}

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

body {
  font-family: "Open Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.shell {
  width: min(1100px, 100%);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(18, 100, 110, 0.1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  min-height: 640px;
}

.form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-icon svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-name span {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.95em;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 2px;
}

.form-side h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
}

.field input[type=email],
.field input[type=password],
.field input[type=text] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input[type=email]:focus,
.field input[type=password]:focus,
.field input[type=text]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 165, 177, 0.15);
}
.field input[type=email]::placeholder,
.field input[type=password]::placeholder,
.field input[type=text]::placeholder {
  color: #b0b7c8;
}

.field input[type=password],
.field input#password {
  padding-right: 44px;
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #ef5350;
  text-align: left;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: grid;
  place-items: center;
}
.toggle-pass:hover {
  color: var(--text);
}

.options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
  font-size: 0.85rem;
  gap: 12px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

.forgot {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.forgot:hover {
  text-decoration: underline;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-primary {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: scale(0.99);
}

.btn-mozo {
  background: var(--blue);
  box-shadow: 0 6px 16px rgba(18, 165, 177, 0.3);
}
.btn-mozo:hover {
  background: var(--blue-dark);
}

.btn-acceder {
  background: var(--orange);
  box-shadow: 0 6px 16px rgba(255, 126, 71, 0.3);
}
.btn-acceder:hover {
  background: #e86b35;
  filter: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.signup {
  margin-top: 12px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}
.signup a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.signup a:hover {
  color: var(--blue);
}

.panel {
  background: var(--panel);
  border-radius: var(--radius-lg);
  margin: 16px;
  padding: 48px 40px 36px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.panel-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  max-width: 360px;
  margin-bottom: 14px;
}

.panel-desc {
  font-size: 0.8rem;
  line-height: 1.65;
  opacity: 0.85;
  max-width: 340px;
  margin-bottom: 36px;
}

.charts {
  position: relative;
  flex: 1;
  min-height: 260px;
}

.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(10, 80, 90, 0.2);
  color: var(--text);
}

.sales-card {
  position: absolute;
  left: 0;
  top: 20px;
  width: 72%;
  padding: 18px 18px 14px;
  z-index: 1;
}

.sales-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 8px;
}
.sales-head h3 {
  font-size: 0.85rem;
  font-weight: 700;
}

.legend {
  display: flex;
  gap: 12px;
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 500;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.dot-blue {
  background: var(--blue);
}

.dot-gray {
  background: #c5cad6;
}

.dot-navy {
  background: #0e8f99;
}

.dot-cyan {
  background: var(--orange);
}

.bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 110px;
  gap: 8px;
  padding: 0 4px;
  position: relative;
}

.bar-group {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
  position: relative;
}

.bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  min-width: 6px;
}
.bar.profit {
  background: var(--blue);
}
.bar.expense {
  background: #dfe3ec;
}

.tooltip {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1d26;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.4;
  z-index: 2;
}
.tooltip::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1a1d26;
  border-bottom: 0;
}

.categories-card {
  position: absolute;
  right: 0;
  bottom: 24px;
  width: 48%;
  padding: 16px;
  z-index: 2;
}
.categories-card h3 {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.donut {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(#0e8f99 0deg 130deg, #ff7e47 130deg 220deg, #d1d5e0 220deg 360deg);
  display: grid;
  place-items: center;
  position: relative;
}
.donut::before {
  content: "";
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--white);
}

.donut-label {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.55rem;
  color: var(--muted);
  line-height: 1.3;
}
.donut-label strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 700;
}

.cat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.6rem;
  color: var(--muted);
  font-weight: 500;
  justify-content: center;
}
.cat-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
}
.dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.dots i.active {
  width: 22px;
  border-radius: 4px;
  background: var(--white);
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .panel {
    display: none;
  }
  .form-side {
    padding: 40px 32px;
  }
}
@media (max-width: 420px) {
  body {
    padding: 12px;
  }
  .form-side {
    padding: 28px 20px;
  }
  .actions {
    grid-template-columns: 1fr;
  }
  .form-side h1 {
    font-size: 1.55rem;
  }
  .options {
    flex-direction: column;
    align-items: flex-start;
  }
}
