﻿:root {
  --navy: #102344;
  --muted: #667795;
  --blue: #0877ff;
  --cyan: #19d5ff;
  --green-bg: #ddf7d8;
  --green: #238a3c;
  --red-bg: #ffe1e1;
  --red: #e53838;
  --warn-bg: #fff0ce;
  --warn: #a96a00;
  --glass: rgba(248, 250, 255, 0.82);
  --glass-strong: rgba(248, 250, 255, 0.9);
  --glass-soft: rgba(255, 255, 255, 0.58);
  --border: rgba(255, 255, 255, 0.56);
  --line: rgba(112, 132, 165, 0.18);
  font-family: Inter, Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--navy);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(185, 199, 218, 0.92), rgba(113, 132, 164, 0.95)),
    url("/assets/backgrounds/outcomy-light.png") center / cover fixed;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 19% 14%, rgba(25, 213, 255, 0.23), transparent 18%),
    radial-gradient(circle at 82% 30%, rgba(8, 119, 255, 0.18), transparent 20%),
    linear-gradient(115deg, transparent 0 38%, rgba(255,255,255,0.11) 39%, transparent 46% 100%);
  opacity: 0.78;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 28px;
  animation: enter 450ms ease both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(32, 57, 96, 0.14), inset 0 1px 0 rgba(255,255,255,0.75);
  backdrop-filter: blur(24px) saturate(115%);
}

.login-screen {
  display: grid;
  min-height: calc(100vh - 56px);
  place-items: center;
}

.login-card {
  width: min(420px, calc(100vw - 36px));
  padding: 38px;
  border-radius: 32px;
  text-align: center;
}

.mascot-tile {
  display: grid;
  width: 104px;
  height: 104px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 28px;
  background: rgba(248, 250, 255, 0.76);
  overflow: hidden;
}

.mascot-tile img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.brand-logo {
  width: 178px;
  max-width: 72%;
  object-fit: contain;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.login-card h1 {
  margin-top: 22px;
  font-size: 28px;
  line-height: 1.15;
}

.login-card p {
  margin: 10px 0 26px;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 15px;
  text-align: left;
}

.field label {
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(112, 132, 165, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--navy);
  background: transparent;
}

.readonly-wrap {
  background: rgba(232,240,252,0.62);
}

.readonly-wrap input {
  color: #50617c;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.icon-btn {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  color: var(--blue);
  background: rgba(255,255,255,0.65);
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 750;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #0877ff, #3b7cff);
  box-shadow: 0 12px 26px rgba(8, 119, 255, 0.25);
}

.secondary-btn {
  color: var(--blue);
  background: rgba(255,255,255,0.78);
}

.full {
  width: 100%;
}

.error-text {
  min-height: 20px;
  margin-top: 10px;
  color: var(--red);
  font-size: 13px;
}

.dashboard {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 22px;
  min-height: calc(100vh - 56px);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 18px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand-row .mascot-tile {
  width: 112px;
  height: 112px;
  margin: 0;
}

.header-image {
  overflow: hidden;
  background: rgba(248,250,255,0.72);
}

.header-image-left {
  width: 154px;
  height: 112px;
  flex: 0 0 154px;
  border-radius: 30px;
}

.header-image-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.summary {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.summary-card {
  display: flex;
  min-width: 210px;
  min-height: 92px;
  align-items: center;
  gap: 16px;
  border-radius: 26px;
  padding: 20px 26px;
}

.summary-card strong {
  display: block;
  font-size: 23px;
}

.summary-card span {
  color: var(--muted);
}

.profile {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.72);
  overflow: hidden;
}

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

.avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.avatar-large img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  display: flex;
  min-height: 640px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 28px;
  padding: 28px 18px;
}

.side-title {
  margin: 0 0 20px;
  font-size: 26px;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--navy);
  background: rgba(255,255,255,0.72);
  font-weight: 700;
  text-align: left;
}

.side-note,
.money-panel {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.72);
  color: var(--muted);
  line-height: 1.5;
}

.side-note strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 22px;
}

.money-panel h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 17px;
}

.money-panel p {
  margin-top: 14px;
  font-size: 12px;
}

.money-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
  border: 1px solid rgba(112,132,165,0.14);
  border-radius: 18px;
  padding: 13px;
  background: rgba(255,255,255,0.52);
}

.money-card span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 14px;
  color: var(--blue);
  background: rgba(255,255,255,0.76);
}

.money-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.money-card strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.15;
}

.money-card.account strong {
  color: var(--green);
}

.money-card.debt strong,
.money-card.debt span {
  color: var(--red);
}

.content {
  min-width: 0;
  border-radius: 30px;
  padding: 28px;
}

.content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.title-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: var(--blue);
  background: rgba(255,255,255,0.7);
}

.content h1 {
  font-size: 24px;
  line-height: 1.2;
}

.content p {
  color: var(--muted);
}

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

.search {
  width: 290px;
}

.table-shell {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(118,138,170,0.20);
  border-radius: 22px;
  background: rgba(255,255,255,0.62);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  height: 52px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}

td,
th {
  padding: 0 16px;
  border-bottom: 1px solid rgba(112,132,165,0.16);
}

td {
  height: 72px;
  color: #253a5d;
  font-size: 14px;
}

tbody tr {
  transition: background 180ms ease;
}

tbody tr:hover {
  background: rgba(232,240,252,0.58);
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-logo {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(80,105,145,0.25);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
}

.sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 10px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 750;
}

.code-pill {
  display: inline-flex;
  max-width: 220px;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(8,119,255,0.18);
  border-radius: 10px;
  padding: 0 10px;
  overflow: hidden;
  color: var(--blue);
  background: rgba(255,255,255,0.66);
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paid {
  color: var(--green);
  background: var(--green-bg);
}

.pending {
  color: var(--warn);
  background: var(--warn-bg);
}

.overdue {
  color: var(--red);
  background: var(--red-bg);
}

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

.action-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 178px;
}

.switch {
  position: relative;
  width: 52px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #cbd4e2;
  transition: background 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(20,40,75,0.25);
  content: "";
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.switch[aria-checked="true"] {
  background: var(--blue);
}

.switch[aria-checked="true"]::after {
  transform: translateX(24px);
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(112,132,165,0.16);
  border-radius: 12px;
  color: var(--blue);
  background: rgba(255,255,255,0.78);
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

.contact-btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.95);
}

.contact-btn.whatsapp {
  color: #1fbe5b;
}

.table-footer {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(12, 27, 52, 0.28);
}

.modal {
  width: min(640px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 28px;
  padding: 26px;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.span-2 {
  grid-column: span 2;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  transform: translateY(14px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 16px;
  padding: 13px 16px;
  color: var(--navy);
  background: rgba(248,250,255,0.92);
  box-shadow: 0 16px 40px rgba(32,57,96,0.18);
  transition: 180ms ease;
}

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

.empty {
  padding: 60px 20px;
  text-align: center;
}

@media (max-width: 1060px) {
  .topbar,
  .layout {
    grid-template-columns: 1fr;
  }

  .summary,
  .profile {
    justify-content: flex-start;
  }

  .sidebar {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 16px;
  }

  .content,
  .login-card {
    padding: 22px;
  }

  .brand-row,
  .content-head,
  .tools,
  .table-footer,
  .summary {
    align-items: stretch;
    flex-direction: column;
  }

  .search,
  .primary-btn,
  .secondary-btn,
  .summary-card {
    width: 100%;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  tbody tr {
    border: 1px solid rgba(112,132,165,0.16);
    border-radius: 18px;
    background: rgba(255,255,255,0.55);
    padding: 12px;
  }

  td {
    height: auto;
    border: 0;
    padding: 8px 2px;
  }

  td::before {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    content: attr(data-label);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }
}



