:root {
  --bg: #eef3f2;
  --panel: #ffffff;
  --line: #d6e2df;
  --text: #13201f;
  --muted: #637370;
  --primary: #00a985;
  --primary-dark: #08715f;
  --accent: #9ccf3b;
  --danger: #b42318;
  --warning: #a96800;
  --soft: #f8fafb;
  --ink: #0d1718;
  --ink-2: #132324;
  --glow: rgba(0, 169, 133, 0.22);
  --shadow: 0 18px 42px rgba(16, 30, 31, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(238, 243, 242, 0.96)),
    var(--bg);
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.btn {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #138f7d);
  color: #fff;
  padding: 0 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0, 169, 133, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

button:hover,
.btn:hover {
  background: linear-gradient(135deg, #13bd99, var(--primary-dark));
  box-shadow: 0 14px 28px rgba(0, 169, 133, 0.30);
  transform: translateY(-1px);
}

button.secondary,
.btn.secondary {
  background: #e8f6f2;
  color: var(--primary-dark);
  box-shadow: none;
}

button.danger {
  background: var(--danger);
}

button.ghost {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 113, 133, 0.12);
  outline: none;
}

input[readonly] {
  background: #f5f8fa;
  color: #415161;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

label span {
  font-weight: 700;
  color: #354642;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 22%, rgba(24, 194, 123, 0.16), transparent 25%),
    radial-gradient(circle at 78% 15%, rgba(29, 109, 242, 0.18), transparent 28%),
    linear-gradient(135deg, #eff6ff 0%, #f8fbff 52%, #eefdf8 100%);
  overflow: hidden;
}

.login-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.wm-text {
  position: absolute;
  font-size: clamp(58px, 11vw, 150px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  color: rgba(29, 109, 242, 0.055);
  white-space: nowrap;
  filter: blur(0.2px);
  animation: watermarkDrift 24s ease-in-out infinite;
}

.wm-text-1 {
  top: 10%;
  left: -5%;
}

.wm-text-2 {
  right: -8%;
  bottom: 11%;
  color: rgba(24, 194, 123, 0.07);
  animation-delay: -8s;
}

.wm-drop {
  position: absolute;
  width: clamp(120px, 18vw, 230px);
  aspect-ratio: 0.78;
  border-radius: 58% 58% 62% 62%;
  background: linear-gradient(180deg, rgba(29, 109, 242, 0.10), rgba(24, 194, 123, 0.055));
  box-shadow: inset 0 0 0 1px rgba(29, 109, 242, 0.06);
  transform: rotate(12deg);
  animation: watermarkFloat 18s ease-in-out infinite;
}

.wm-drop::after {
  content: "";
  position: absolute;
  top: 18%;
  right: 24%;
  width: 16%;
  height: 24%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.wm-drop-1 {
  left: 9%;
  bottom: 7%;
}

.wm-drop-2 {
  right: 14%;
  top: 12%;
  width: clamp(90px, 13vw, 170px);
  animation-delay: -5s;
}

.wm-drop-3 {
  left: 47%;
  top: -8%;
  width: clamp(150px, 22vw, 280px);
  animation-delay: -10s;
  opacity: 0.8;
}

.wm-wave {
  position: absolute;
  left: -15%;
  width: 130%;
  height: 120px;
  border: 2px solid rgba(29, 109, 242, 0.055);
  border-color: rgba(29, 109, 242, 0.055) transparent transparent transparent;
  border-radius: 50%;
  animation: watermarkWave 16s ease-in-out infinite;
}

.wm-wave-1 {
  top: 30%;
}

.wm-wave-2 {
  bottom: 17%;
  border-top-color: rgba(24, 194, 123, 0.065);
  animation-delay: -6s;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 420px);
  gap: 22px;
  align-items: stretch;
}

.login-art,
.login-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(223, 232, 245, 0.92);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(15, 35, 68, 0.14);
  backdrop-filter: blur(18px);
}

.login-art {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(235, 246, 255, 0.92)),
    #f8fbff;
}

.login-art::before {
  content: "";
  position: absolute;
  width: 150%;
  height: 190px;
  left: -25%;
  bottom: -48px;
  background: linear-gradient(90deg, rgba(29, 109, 242, 0.72), rgba(24, 194, 123, 0.62), rgba(29, 109, 242, 0.72));
  border-radius: 45% 45% 0 0;
  animation: waterFlow 7s ease-in-out infinite;
}

.login-art::after {
  content: "";
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(29, 109, 242, 0.12);
  border-radius: 18px;
}

.water-orbit {
  position: relative;
  z-index: 1;
  width: 260px;
  height: 260px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 109, 242, 0.12), rgba(24, 194, 123, 0.04) 56%, transparent 58%);
  animation: floatSoft 5s ease-in-out infinite;
}

.water-meter {
  width: 154px;
  height: 154px;
  border-radius: 32px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #ffffff;
  background: linear-gradient(145deg, #1d6df2, #18c27b);
  box-shadow: 0 22px 44px rgba(29, 109, 242, 0.30);
}

.water-meter b {
  font-size: 46px;
  line-height: 1;
}

.water-meter small {
  font-weight: 900;
  letter-spacing: 0;
}

.meter-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.drop {
  position: absolute;
  width: 30px;
  height: 42px;
  border-radius: 55% 55% 60% 60%;
  background: linear-gradient(180deg, #93c5fd, #18c27b);
  box-shadow: 0 12px 28px rgba(29, 109, 242, 0.22);
}

.drop::before {
  content: "";
  position: absolute;
  inset: 5px 9px auto auto;
  width: 7px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.d1 {
  top: 12px;
  left: 32px;
  animation: dropPulse 3.4s ease-in-out infinite;
}

.d2 {
  right: 18px;
  top: 70px;
  animation: dropPulse 3.8s ease-in-out 0.5s infinite;
}

.d3 {
  left: 52px;
  bottom: 24px;
  animation: dropPulse 4.2s ease-in-out 0.9s infinite;
}

.wave-lines {
  position: absolute;
  z-index: 1;
  left: 12%;
  right: 12%;
  bottom: 42px;
  display: grid;
  gap: 12px;
}

.wave-lines span {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  animation: waveSlide 4.8s ease-in-out infinite;
}

.wave-lines span:nth-child(2) {
  animation-delay: 0.45s;
  opacity: 0.75;
}

.wave-lines span:nth-child(3) {
  animation-delay: 0.9s;
  opacity: 0.55;
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  align-self: center;
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card form,
.form-grid {
  display: grid;
  gap: 14px;
}

.login-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.login-brand h1 {
  font-size: 30px;
  letter-spacing: 0;
}

.login-brand p,
.login-copy span {
  color: var(--muted);
}

.login-mark {
  flex: 0 0 auto;
}

.login-copy {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dfe8f5;
  border-radius: 14px;
  background: #f8fbff;
}

.login-link {
  width: 100%;
  color: #0b4fc4;
}

@keyframes waterFlow {
  0%, 100% {
    transform: translateX(-24px) translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateX(24px) translateY(-16px) rotate(1deg);
  }
}

@keyframes floatSoft {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes dropPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.92;
  }
  50% {
    transform: translateY(-18px) scale(1.08);
    opacity: 1;
  }
}

@keyframes waveSlide {
  0%, 100% {
    transform: translateX(-18px);
  }
  50% {
    transform: translateX(18px);
  }
}

@keyframes watermarkDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(34px, -18px, 0);
  }
}

@keyframes watermarkFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(12deg) scale(1);
  }
  50% {
    transform: translate3d(-26px, 28px, 0) rotate(18deg) scale(1.05);
  }
}

@keyframes watermarkWave {
  0%, 100% {
    transform: translateX(-18px) scaleY(1);
  }
  50% {
    transform: translateX(28px) scaleY(1.18);
  }
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(18, 37, 38, 0.96), rgba(9, 20, 21, 0.98)),
    var(--ink);
  color: #ecfffb;
  border-right: 1px solid rgba(0, 169, 133, 0.22);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 18px 0 45px rgba(11, 25, 26, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #dfffee;
  background: linear-gradient(145deg, #00a985, #9ccf3b);
  box-shadow: 0 0 26px rgba(0, 169, 133, 0.38);
}

.brand-mark .icon,
.brand-mark .icon svg {
  width: 21px;
  height: 21px;
}

.brand strong {
  color: #ffffff;
  font-size: 20px;
  letter-spacing: 0;
}

.brand span,
.user-box {
  color: #91aaa5;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav a,
.nav button {
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.035);
  color: #bed4d0;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  min-height: 44px;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 700;
}

.nav a.active,
.nav button.active {
  background: linear-gradient(135deg, rgba(0, 169, 133, 0.24), rgba(156, 207, 59, 0.12));
  border-color: rgba(0, 169, 133, 0.45);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 28px rgba(0, 169, 133, 0.12);
}

.nav a:hover,
.nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.main {
  padding: 26px 30px;
  display: grid;
  gap: 18px;
  align-content: start;
}

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

.topbar h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px;
}

.stat,
.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(28, 49, 64, 0.06);
}

.stat {
  padding: 16px 17px;
  display: grid;
  gap: 6px;
  border-left: 4px solid var(--primary);
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, rgba(0, 169, 133, 0.12), rgba(156, 207, 59, 0.08));
  border-bottom-left-radius: 100%;
  pointer-events: none;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.stat b {
  font-size: 23px;
  letter-spacing: 0;
}

.panel {
  padding: 18px;
}

.workspace {
  display: grid;
  gap: 16px;
}

.topbar p {
  margin: 4px 0 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px 13px;
  vertical-align: top;
}

th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  background: #f4f8f7;
}

tbody tr:hover {
  background: #f8fcfb;
}

td a {
  color: var(--primary);
  font-weight: 700;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  background: #eff8e7;
  color: #557a08;
  border: 1px solid rgba(156, 207, 59, 0.25);
}

.badge.pending {
  background: #fff6e5;
  color: var(--warning);
}

.badge.deleted,
.badge.inactive {
  background: #fff1f0;
  color: var(--danger);
}

.badge.active {
  background: #e8f8f3;
  color: var(--primary-dark);
  border-color: rgba(0, 169, 133, 0.25);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-actions {
  gap: 6px;
  align-items: center;
  min-width: max-content;
}

.icon-action {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  flex: 0 0 auto;
}

.icon-action .icon,
.icon-action .icon svg {
  width: 17px;
  height: 17px;
}

.icon-action.primary {
  background: linear-gradient(135deg, var(--primary), #155ee8);
  color: #fff;
}

.icon-action[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  background: #09152b;
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(15, 35, 68, 0.20);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.icon-action[data-tip]:hover::after,
.icon-action[data-tip]:focus-visible::after,
.icon-action[data-tip]:focus::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 520px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: #eef6ff;
  color: #0b4fc4;
  border: 1px solid #d5e6ff;
  font-size: 12px;
  font-weight: 700;
}

.filter-bar,
.period-picker {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  align-items: end;
  gap: 10px;
  box-shadow: 0 12px 28px rgba(28, 49, 64, 0.05);
}

.filter-bar {
  grid-template-columns: 180px 180px minmax(220px, 1fr) auto;
}

.period-picker {
  grid-template-columns: 180px auto;
}

.compact-stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stacked-cell {
  display: grid;
  gap: 2px;
}

.stacked-cell span {
  color: var(--muted);
  font-size: 12px;
}

.text-danger {
  color: var(--danger) !important;
}

.cash-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: start;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 17, 18, 0.68);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 20;
}

.modal {
  width: min(980px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  border: 1px solid rgba(214, 226, 223, 0.92);
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 37, 48, 0.30);
}

.modal h2 {
  margin-top: 0;
}

.modal > .panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 16px 20px;
}

.modal > .panel-head h2 {
  font-size: 20px;
}

.client-form,
.modal .form-grid {
  padding: 18px 20px 20px;
}

.modal-message {
  margin: 14px 20px 0;
}

.client-form {
  display: grid;
  gap: 16px;
}

.form-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
  padding: 15px;
}

.section-title {
  display: grid;
  gap: 2px;
}

.section-title h3,
.section-title p {
  margin: 0;
}

.section-title h3 {
  font-size: 16px;
}

.section-title p,
.photo-input small,
.location-box p {
  color: var(--muted);
  font-size: 13px;
}

.section-body {
  display: grid;
  gap: 12px;
}

.location-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.location-box p {
  margin: 3px 0 0;
}

.compact-grid input {
  min-height: 38px;
}

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

.photo-input {
  min-height: 132px;
  background: #fff;
  border: 1px dashed #8fbab2;
  border-radius: 14px;
  padding: 12px;
  align-content: start;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.photo-input:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 169, 133, 0.10);
}

.photo-input input {
  margin-top: 4px;
  padding: 9px;
}

.modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--line);
  padding: 14px 0 0;
}

.invoice-total-box {
  border: 1px solid rgba(0, 169, 133, 0.24);
  border-radius: 12px;
  background: linear-gradient(135deg, #effcf8, #ffffff);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.invoice-total-box span {
  color: var(--muted);
  font-weight: 700;
}

.invoice-total-box strong {
  color: var(--primary-dark);
  font-size: 24px;
}

.payment-hint {
  border: 1px solid rgba(0, 169, 133, 0.22);
  border-radius: 12px;
  background: #effcf8;
  color: var(--primary-dark);
  padding: 12px 14px;
  font-weight: 700;
}

.payment-hint.warning {
  background: #fff6e5;
  border-color: rgba(169, 104, 0, 0.22);
  color: var(--warning);
}

.permission-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
  padding: 15px;
  display: grid;
  gap: 12px;
}

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

.permission-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
}

.permission-check.full {
  background: #eef6ff;
  border-color: #d5e6ff;
}

.permission-check input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.integration-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(28, 49, 64, 0.06);
  padding: 18px;
  display: grid;
  gap: 16px;
}

.integration-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.integration-head h2,
.integration-head p {
  margin: 0;
}

.integration-head p,
.integration-note {
  color: var(--muted);
}

.integration-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.integration-status div,
.integration-note {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.integration-status small {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.message {
  background: #e8f8f3;
  border: 1px solid #b8e3d9;
  color: var(--primary-dark);
  border-radius: 12px;
  padding: 10px 12px;
}

.error {
  background: #fff1f0;
  border-color: #ffc9c4;
  color: var(--danger);
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-list a {
  color: var(--primary);
}

.receipt-page {
  background: #fff;
}

.receipt {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.receipt header {
  border-bottom: 2px solid var(--text);
  padding-bottom: 14px;
  display: grid;
  gap: 4px;
}

.receipt header strong {
  font-size: 24px;
}

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

.receipt-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.receipt small {
  color: var(--muted);
}

.receipt-total {
  border: 2px solid var(--text);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0;
}

.receipt-total b {
  font-size: 28px;
}

.print-btn {
  margin-top: 20px;
}

.portal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(29, 109, 242, 0.16), transparent 28%),
    linear-gradient(180deg, #f8fbff, #edf4ff);
}

.portal-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 28px 16px;
}

.portal-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dfe8f5;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(15, 35, 68, 0.12);
  padding: 22px;
}

.portal-login {
  width: min(430px, 100%);
  margin: 8vh auto 0;
  display: grid;
  gap: 16px;
}

.portal-login form {
  display: grid;
  gap: 14px;
}

.portal-brand {
  display: grid;
  gap: 3px;
}

.portal-brand strong {
  color: #0b4fc4;
  font-size: 24px;
}

.portal-brand span {
  color: var(--muted);
}

.portal-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.portal-header strong,
.portal-header span {
  display: block;
}

.portal-header strong {
  font-size: 26px;
}

.portal-header span {
  color: var(--muted);
}

.portal-summary {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portal-summary div,
.portal-invoice,
.portal-wompi {
  border: 1px solid #dfe8f5;
  border-radius: 14px;
  background: #f8fbff;
  padding: 14px;
}

.portal-summary small,
.portal-invoice small,
.portal-invoice span {
  color: var(--muted);
}

.portal-invoices {
  display: grid;
  gap: 12px;
}

.portal-invoice {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(2, minmax(110px, 0.7fr)) auto auto;
  align-items: center;
  gap: 12px;
}

.portal-invoice strong,
.portal-invoice b {
  color: #09152b;
}

.portal-wompi {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.portal-wompi:empty {
  display: none;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 169, 133, 0.22);
    gap: 10px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav a,
  .nav button {
    flex: 0 0 auto;
    min-width: 126px;
  }

  .brand {
    min-height: 46px;
  }

  .stats,
  .grid-2,
  .grid-3,
  .filter-bar,
  .period-picker,
  .cash-grid,
  .photo-grid,
  .permission-grid,
  .receipt-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 16px;
  }

  .modal-backdrop {
    padding: 0;
    place-items: stretch;
  }

  .modal {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .modal > .panel-head,
  .client-form,
  .modal .form-grid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .location-box,
  .modal-actions,
  .integration-head,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .integration-status {
    grid-template-columns: 1fr;
  }

  .modal-actions button,
  .topbar button {
    width: 100%;
  }
}

@media print {
  .print-btn {
    display: none;
  }
}

/* RecaudoPro-style interface layer */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --line: #e3eaf4;
  --text: #09152b;
  --muted: #63718a;
  --primary: #1d6df2;
  --primary-dark: #0b4fc4;
  --accent: #18c27b;
  --danger: #ef4444;
  --warning: #f59e0b;
  --soft: #f7faff;
  --ink: #0b1d36;
  --ink-2: #142943;
  --glow: rgba(29, 109, 242, 0.22);
  --shadow: 0 18px 48px rgba(15, 35, 68, 0.10);
}

body {
  background:
    radial-gradient(circle at 38% 8%, rgba(29, 109, 242, 0.10), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef3fb 100%);
}

button,
.btn {
  border-radius: 12px;
  background: linear-gradient(135deg, #1d6df2, #155ee8);
  box-shadow: 0 12px 26px rgba(29, 109, 242, 0.22);
}

button:hover,
.btn:hover {
  background: linear-gradient(135deg, #2b7cff, #0754df);
  box-shadow: 0 16px 32px rgba(29, 109, 242, 0.28);
}

button.secondary,
.btn.secondary {
  background: #f4f7fc;
  color: #12223c;
  border: 1px solid #dfe8f5;
}

button.ghost {
  color: #12223c;
  background: #f8fbff;
  border-color: #dfe8f5;
  box-shadow: none;
}

button.ghost:hover {
  color: #0b4fc4;
  background: #eef5ff;
  border-color: #bed3f4;
  box-shadow: none;
  transform: none;
}

.sidebar button.ghost,
.sidebar .logout-btn {
  color: #d6e5ff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
}

.sidebar button.ghost:hover,
.sidebar .logout-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.20);
}

input,
select,
textarea {
  border-color: #dce5f2;
  background: #fbfdff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #1d6df2;
  box-shadow: 0 0 0 4px rgba(29, 109, 242, 0.12);
}

.app-shell {
  grid-template-columns: 236px 1fr;
  background: transparent;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(19, 43, 74, 0.98), rgba(8, 22, 42, 0.99)),
    #0b1d36;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 14px 18px;
  box-shadow: 18px 0 48px rgba(10, 28, 54, 0.16);
  overflow: hidden;
}

.brand {
  min-height: 78px;
  align-items: flex-start;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(145deg, #1d6df2, #64a5ff);
  box-shadow: 0 18px 32px rgba(29, 109, 242, 0.34);
}

.brand strong {
  font-size: 20px;
}

.brand span,
.user-box {
  color: #aebed4;
}

.nav {
  gap: 8px;
}

.nav a,
.nav button {
  min-height: 46px;
  color: #c7d4e8;
  background: transparent;
  border-color: transparent;
  border-radius: 12px;
  padding: 0 13px;
}

.nav a.active,
.nav button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #1d6df2, #175ad1);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 14px 28px rgba(29, 109, 242, 0.26);
}

.nav a:hover,
.nav button:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer {
  margin-top: auto;
  margin-left: -14px;
  margin-right: -14px;
  margin-bottom: -18px;
  padding: 16px 14px 18px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(15, 37, 67, 0.86), rgba(7, 19, 36, 0.98)),
    #071324;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.10);
}

.user-box strong {
  display: block;
  color: #ffffff;
  font-size: 13px;
}

.user-box span:not(.avatar) {
  display: block;
  color: #c6d4e8;
  font-size: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eaf3ff, #ffffff);
  color: #0b4fc4;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px #dce8f8;
}

.avatar.small {
  width: 34px;
  height: 34px;
}

.logout-btn {
  justify-content: flex-start;
  color: #dce9ff !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.main {
  padding: 0;
  gap: 0;
  background: transparent;
}

.app-topbar {
  min-height: 72px;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(213, 224, 240, 0.78);
  position: sticky;
  top: 0;
  z-index: 8;
}

.global-search {
  width: min(560px, 100%);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 14px;
  background: #f5f8fd;
  border: 1px solid #dfe8f5;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.global-search input {
  border: 0;
  padding: 0;
  background: transparent;
  min-height: auto;
}

.global-search input:focus {
  box-shadow: none;
}

.global-search > span:last-child {
  color: #0d1b34;
  background: #eaf0f8;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
}

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

.date-pill,
.profile-chip,
.icon-button {
  background: #ffffff;
  border: 1px solid #dfe8f5;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 35, 68, 0.06);
}

.profile-menu-wrap {
  position: relative;
}

.date-pill {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #13233f;
  font-weight: 800;
  text-transform: capitalize;
}

.icon-button {
  position: relative;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  color: #0d1b34;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 35, 68, 0.06);
}

.notification-dot {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.profile-chip {
  min-height: 48px;
  padding: 6px 12px 6px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-button {
  color: #12223c;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 35, 68, 0.06);
}

.profile-button:hover,
.profile-button[aria-expanded="true"] {
  background: #f4f7fc;
  box-shadow: 0 14px 30px rgba(15, 35, 68, 0.10);
  transform: none;
}

.profile-button .icon:last-child {
  color: var(--muted);
  width: 14px;
  height: 14px;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  z-index: 30;
  background: #ffffff;
  border: 1px solid #dfe8f5;
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(15, 35, 68, 0.16);
  padding: 8px;
}

.profile-menu-head {
  display: grid;
  gap: 2px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid #edf2f8;
}

.profile-menu-head strong {
  font-size: 14px;
  color: var(--text);
}

.profile-menu-head span {
  color: var(--muted);
  font-size: 12px;
}

.profile-menu-action {
  width: 100%;
  justify-content: flex-start;
  margin-top: 8px;
  background: #fff1f0;
  color: var(--danger);
  border: 1px solid #ffc9c4;
  box-shadow: none;
}

.profile-menu-action:hover {
  background: #ffe4e1;
  color: var(--danger);
  box-shadow: none;
  transform: none;
}

.profile-chip strong,
.profile-chip span {
  display: block;
}

.profile-chip strong {
  font-size: 13px;
}

.profile-chip span {
  color: var(--muted);
  font-size: 12px;
}

.main > .message,
.main > .message.error,
.main > .workspace,
.main > .panel,
.main > .dashboard-shell {
  margin-left: 28px;
  margin-right: 28px;
}

.main > .message,
.main > .message.error {
  margin-top: 18px;
}

.dashboard-shell,
.workspace {
  padding: 28px 0 34px;
}

.hero-row,
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.hero-row h1,
.topbar h1 {
  margin: 0;
  color: #09152b;
  font-size: 34px;
  line-height: 1.08;
}

.hero-row p,
.topbar p {
  margin: 8px 0 0;
  color: #54637a;
  font-size: 16px;
}

.stats {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.stat,
.panel,
.filter-bar,
.period-picker,
.integration-card {
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(215, 226, 241, 0.90);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(15, 35, 68, 0.08);
}

.stat {
  min-height: 130px;
  padding: 20px;
  border-left: 0;
  grid-template-columns: 46px 1fr;
  align-items: center;
  column-gap: 14px;
}

.stat::after {
  display: none;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff !important;
  background: linear-gradient(145deg, #1d6df2, #64a5ff);
  box-shadow: 0 14px 22px rgba(29, 109, 242, 0.24);
  grid-row: span 3;
}

.stat.success .stat-icon {
  background: linear-gradient(145deg, #18c27b, #67e8ad);
}

.stat.amber .stat-icon {
  background: linear-gradient(145deg, #f59e0b, #fcd34d);
}

.stat.danger .stat-icon {
  background: linear-gradient(145deg, #ef4444, #fb7185);
}

.stat span:not(.stat-icon) {
  color: #334155;
  font-weight: 700;
}

.stat b {
  font-size: 25px;
  line-height: 1.05;
}

.stat small {
  color: #18a56e;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) minmax(260px, 0.9fr) minmax(220px, 0.75fr);
  gap: 14px;
}

.panel {
  padding: 18px;
}

.panel-head h2 {
  color: #0d1b34;
  font-size: 18px;
}

.ghost.light {
  color: #1d6df2;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.modal .panel-head button.ghost,
.modal-actions button.ghost,
.actions button.ghost {
  color: #12223c;
  background: #ffffff;
  border: 1px solid #dfe8f5;
  box-shadow: 0 8px 18px rgba(15, 35, 68, 0.06);
}

.modal .panel-head button.ghost:hover,
.modal-actions button.ghost:hover,
.actions button.ghost:hover {
  color: #0b4fc4;
  background: #eef5ff;
  border-color: #bed3f4;
}

.mini-chart {
  height: 205px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 12px;
  padding: 18px 8px 8px;
  border-radius: 14px;
  background:
    linear-gradient(#dbe7f6 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, #dbe7f6 1px, transparent 1px) 0 0 / 16.66% 100%,
    #f7faff;
}

.mini-chart span {
  height: var(--h);
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #1d6df2, rgba(29, 109, 242, 0.18));
  box-shadow: 0 12px 24px rgba(29, 109, 242, 0.18);
}

.chart-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.status-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.client-ring {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #fff 0 51%, transparent 52%),
    conic-gradient(#18c27b 0 var(--paid), #f59e0b var(--paid) 82%, #ef4444 82% 100%);
}

.client-ring strong,
.client-ring span {
  grid-area: 1 / 1;
}

.client-ring strong {
  transform: translateY(-8px);
  font-size: 27px;
}

.client-ring span {
  transform: translateY(20px);
  color: var(--muted);
  font-weight: 800;
}

.status-list {
  width: 100%;
  display: grid;
  gap: 9px;
}

.status-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #23334e;
  font-weight: 800;
}

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

.dot.success {
  background: #18c27b;
}

.dot.amber {
  background: #f59e0b;
}

.dot.danger {
  background: #ef4444;
}

.quick-panel {
  display: grid;
  gap: 10px;
}

.quick-panel button {
  width: 100%;
  justify-content: flex-start;
}

.table-wrap {
  border-color: #dfe8f5;
  border-radius: 14px;
}

th {
  background: #f3f6fb;
  color: #52627a;
}

td {
  color: #13233f;
}

.badge.active {
  background: #dff8ef;
  color: #08715f;
  border-color: #b7edd7;
}

.badge.pending {
  background: #fff3d6;
  color: #a96800;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1100px) {
  .stats,
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .login-shell {
    padding: 14px;
    place-items: start center;
  }

  .wm-text {
    font-size: 56px;
    opacity: 0.8;
  }

  .wm-text-1 {
    top: 4%;
    left: -22%;
  }

  .wm-text-2 {
    right: -36%;
    bottom: 8%;
  }

  .wm-drop-3,
  .wm-wave-2 {
    display: none;
  }

  .login-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .login-art {
    min-height: 220px;
  }

  .water-orbit {
    width: 190px;
    height: 190px;
  }

  .water-meter {
    width: 112px;
    height: 112px;
    border-radius: 24px;
  }

  .water-meter b {
    font-size: 34px;
  }

  .login-card {
    width: 100%;
    padding: 22px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .app-topbar {
    min-height: auto;
    padding: 12px 14px;
    position: sticky;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-meta {
    justify-content: space-between;
  }

  .date-pill {
    font-size: 12px;
    flex: 1;
  }

  .profile-chip {
    padding-right: 6px;
  }

  .profile-chip div {
    display: none;
  }

  .profile-menu {
    right: 0;
    width: min(240px, calc(100vw - 28px));
  }

  .profile-menu div,
  .profile-menu-head {
    display: grid;
  }

  .global-search {
    width: 100%;
  }

  .global-search > span:last-child {
    display: none;
  }

  .main {
    padding-bottom: 78px;
  }

  .main > .message,
  .main > .message.error,
  .main > .workspace,
  .main > .panel,
  .main > .dashboard-shell {
    margin-left: 14px;
    margin-right: 14px;
  }

  .dashboard-shell,
  .workspace {
    padding-top: 18px;
  }

  .hero-row,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-row h1,
  .topbar h1 {
    font-size: 28px;
  }

  .stats,
  .dashboard-grid,
  .grid-2,
  .grid-3,
  .filter-bar,
  .period-picker,
  .cash-grid,
  .photo-grid,
  .receipt-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: 112px;
  }

  .topbar .icon-action,
  .compact-actions .icon-action {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .compact-actions {
    gap: 7px;
  }

  .icon-action[data-tip]:focus::after,
  .icon-action[data-tip]:active::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 12;
    height: 62px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #dbe5f2;
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(15, 35, 68, 0.18);
    backdrop-filter: blur(16px);
  }

  .mobile-nav a {
    color: #66758d;
    text-decoration: none;
    display: grid;
    place-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 16px;
  }

  .mobile-nav a.active {
    color: #1d6df2;
    background: #eef5ff;
  }

  .mobile-nav .icon,
  .mobile-nav .icon svg {
    width: 19px;
    height: 19px;
  }

  .portal-shell {
    padding: 14px;
  }

  .portal-card {
    padding: 16px;
  }

  .portal-header,
  .portal-invoice {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .portal-summary {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    padding: 0;
    place-items: stretch;
  }

  .modal {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .modal > .panel-head,
  .client-form,
  .modal .form-grid {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* Full-image login inspired by admin access portals */
.login-shell {
  min-height: 100vh;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(3, 13, 27, 0.78), rgba(3, 13, 27, 0.30) 42%, rgba(3, 13, 27, 0.76)),
    linear-gradient(180deg, rgba(5, 12, 24, 0.24), rgba(5, 12, 24, 0.68)),
    url("/assets/login-water-bg.png") center / cover no-repeat;
  animation: loginBgPan 22s ease-in-out infinite;
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
}

.login-shell::before {
  background:
    linear-gradient(100deg, transparent 15%, rgba(29, 109, 242, 0.22) 33%, transparent 55%),
    linear-gradient(72deg, transparent 20%, rgba(24, 194, 123, 0.13) 40%, transparent 62%);
  filter: blur(10px);
  animation: loginLightSweep 9s ease-in-out infinite;
}

.login-shell::after {
  background:
    radial-gradient(circle at 42% 70%, rgba(255, 255, 255, 0.16), transparent 7%),
    radial-gradient(circle at 54% 76%, rgba(255, 255, 255, 0.18), transparent 6%),
    radial-gradient(circle at 61% 64%, rgba(255, 255, 255, 0.12), transparent 5%);
  animation: loginParticles 6.5s ease-in-out infinite;
}

.login-watermark {
  z-index: 0;
  opacity: 0.72;
}

.wm-text {
  color: rgba(255, 255, 255, 0.075);
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.wm-text-2 {
  color: rgba(125, 211, 252, 0.10);
}

.wm-drop {
  background: linear-gradient(180deg, rgba(147, 197, 253, 0.15), rgba(24, 194, 123, 0.09));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.wm-wave {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.login-panel {
  width: min(390px, calc(100% - 28px));
  grid-template-columns: 1fr;
  gap: 0;
  justify-items: stretch;
}

.login-art {
  display: none;
}

.login-card {
  width: 100%;
  padding: 24px;
  color: #ffffff;
  background: rgba(3, 14, 29, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
}

.login-brand {
  justify-content: center;
  text-align: center;
}

.login-brand h1 {
  color: #ffffff;
  font-size: 24px;
}

.login-brand p,
.login-card label,
.login-card label span,
.login-copy span {
  color: rgba(255, 255, 255, 0.82);
}

.login-mark {
  display: none;
}

.login-card input {
  min-height: 38px;
  border-radius: 3px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: #071428;
}

.login-card input:focus {
  border-color: rgba(96, 165, 250, 0.85);
  box-shadow: 0 0 0 3px rgba(29, 109, 242, 0.22);
}

.login-card button:not(.login-link) {
  min-height: 40px;
  border-radius: 3px;
  background: #1475f8;
  box-shadow: 0 14px 28px rgba(20, 117, 248, 0.26);
}

.login-card button:not(.login-link):hover {
  background: #0b62df;
}

.login-link {
  color: #ffffff;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 32px;
  padding: 0;
  font-size: 12px;
  justify-self: end;
  width: auto;
}

.login-link:hover {
  color: #93c5fd;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.login-copy {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 3px;
}

.login-copy strong {
  color: #ffffff;
}

.login-card .message {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(125, 211, 252, 0.28);
  color: #dffeff;
}

.login-card .message.error {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(252, 165, 165, 0.28);
  color: #fee2e2;
}

@keyframes loginBgPan {
  0%, 100% {
    background-position: center center, center center, 50% 50%;
  }
  50% {
    background-position: center center, center center, 54% 50%;
  }
}

@keyframes loginLightSweep {
  0%, 100% {
    transform: translateX(-18%) rotate(0deg);
    opacity: 0.45;
  }
  50% {
    transform: translateX(18%) rotate(2deg);
    opacity: 0.78;
  }
}

@keyframes loginParticles {
  0%, 100% {
    transform: translateY(10px);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-18px);
    opacity: 0.78;
  }
}

@media (max-width: 900px) {
  .login-shell {
    place-items: center;
    padding: 16px;
    background-position: center center, center center, 42% 50%;
  }

  .login-panel {
    width: min(390px, 100%);
  }

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