@import url('https://fonts.googleapis.com/css2?family=Catamaran:wght@400;500;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --bg: #f3f7fa;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0061ae;
  --brand-dark: #004b87;
  --blue: #0061ae;
  --amber: #d97706;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0, 97, 174, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f8fafc;
  color: var(--ink);
  font-family: 'Catamaran', sans-serif;
}

h1, h2, h3, h4, h5, h6, strong {
  font-family: 'Outfit', sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone {
  width: min(430px, 100%);
  height: min(900px, calc(100vh - 48px));
  min-height: 720px;
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.login-screen,
.contract-screen,
.app-screen {
  flex: 1;
  min-height: 0;
}

.app-screen {
  display: flex;
  flex-direction: column;
}

.login-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 40px 24px;
  background: var(--bg);
  color: var(--ink);
}

.contract-screen {
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  background: #f8fafc;
  color: var(--ink);
  gap: 16px;
}

.contract-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding-top: 10px;
}

.contract-header h1 {
  margin: 0;
  font-size: 24px;
}

.contract-copy {
  color: #475467;
  line-height: 1.45;
}

.contract-copy p {
  margin-bottom: 0;
}

.contract-list {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding-right: 2px;
}

.contract-option {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.contract-option strong {
  display: block;
  font-size: 17px;
}

.contract-option p {
  margin: 0;
  color: #475467;
  font-size: 13px;
}

.contract-option .contract-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.contract-option .contract-meta span {
  color: var(--muted);
  font-size: 12px;
}

.login-logo {
  display: grid;
  justify-items: center;
  text-align: center;
}

.login-logo .logo-img {
  width: 190px;
  height: auto;
}

.login-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .2px;
}

.login-form {
  display: grid;
  gap: 18px;
  padding: 28px 24px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.login-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.login-form input,
.login-form select {
  min-height: 50px;
  border-radius: 12px;
  font-size: 15px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  padding: 0 14px;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}

.login-form input:focus,
.login-form select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}

.login-form input::placeholder {
  color: #94a3b8;
}

.login-credentials {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  animation: loginFieldsIn .2s ease;
}

@keyframes loginFieldsIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}

.password-toggle:hover {
  color: var(--brand);
  background: var(--bg);
}

.login-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.4;
}

.welcome-back {
  display: grid;
  gap: 2px;
  margin-bottom: 4px;
}

.welcome-back-greeting {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.welcome-back-user {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.welcome-back-city {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.link-btn {
  justify-self: start;
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover {
  color: var(--brand-dark);
}

.remember-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 9px;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.remember-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  min-height: 0;
  accent-color: var(--brand);
  cursor: pointer;
  flex-shrink: 0;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-submit {
  min-height: 50px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-weight: 700;
  letter-spacing: .2px;
}

.login-demo {
  min-height: 50px;
  width: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 700;
  letter-spacing: .2px;
  margin-top: -4px;
}

.login-submit:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.restoring-session {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 24px;
}

.restoring-session .spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
  border-color: rgba(0, 97, 174, .18);
  border-top-color: var(--brand);
}

.restoring-session p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.login-form .status {
  text-align: center;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 16px;
  background: #102a43;
  color: #fff;
}

.topbar-title {
  flex: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e9fbf7;
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
}

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

.logout-btn {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  padding: 0 12px;
  font-weight: 800;
}

.eyebrow,
.muted,
.status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.topbar .eyebrow {
  color: #b6d6d2;
}

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

h1 {
  margin-bottom: 0;
  font-size: 22px;
}

h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

h3 {
  margin-bottom: 0;
  font-size: 16px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
  color: currentColor;
  display: grid;
  place-items: center;
  font-size: 20px;
}

#modePill { display: none; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: #fbfcfe;
  color: var(--ink);
}

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

.primary,
.ghost,
.mini-btn {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 12px;
  font-weight: 700;
}

.primary {
  background: var(--brand);
  color: #fff;
}

.ghost,
.mini-btn {
  background: #f5f8fb;
  border-color: var(--line);
  color: #1f2937;
}

.status {
  min-height: 16px;
}

.hero-card {
  margin: 14px 16px 10px;
  padding: 18px;
  border-radius: 12px;
  background: #e9fbf7;
  border: 1px solid #bde6dc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.live-strip {
  margin: 0 16px 12px;
  min-height: 42px;
  border: 1px solid #d8e3ea;
  border-radius: 10px;
  padding: 9px 12px;
  background: #f7fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.live-strip span {
  color: var(--muted);
  font-size: 11px;
}

.live-strip strong {
  color: #263241;
  font-size: 12px;
  text-align: right;
}

.hero-card p:last-child {
  margin-bottom: 0;
  color: #37505c;
  font-size: 13px;
}

.speed-pill {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--brand-dark);
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  flex: 0 0 auto;
}

.speed-pill strong {
  font-size: 22px;
}

.speed-pill span {
  font-size: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  color: #475467;
  white-space: nowrap;
}

.tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.view {
  display: none;
  padding: 0 16px 92px;
  overflow-y: auto;
  flex: 1;
}

.view.active {
  display: block;
}

.summary-card {
  border: 1px solid #cfe1dd;
  background: #f1fbf8;
  border-radius: 10px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.dashboard-head,
.dashboard-contract {
  border: 1px solid #cfe1dd;
  background: #f1fbf8;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.dashboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 10px;
}

.dashboard-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-title h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.dashboard-title span {
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-head span,
.dashboard-contract span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.dashboard-head strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.dashboard-contract strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.dashboard-head p,
.dashboard-contract p {
  margin: 4px 0 0;
  color: #475467;
  font-size: 12px;
}

.dashboard-head button,
.dashboard-contract button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

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

.dashboard-widgets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.dash-widget {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

.dash-widget .compact {
  margin: 0 0 10px;
}

.dash-widget .compact button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 10px;
  color: #1f2937;
}

.contract-widget strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.contract-widget p {
  margin: 7px 0 0;
  color: #475467;
  font-size: 12px;
}

.connection-ring {
  width: 92px;
  height: 92px;
  margin: 6px auto 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 45%, transparent 46%),
    conic-gradient(var(--brand) 0 75%, #e4e7ec 75% 100%);
  display: grid;
  place-items: center;
  align-content: center;
}

.connection-ring strong {
  font-size: 24px;
}

.connection-ring span {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-tile {
  min-height: 78px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  text-align: left;
  overflow: hidden;
}

.dashboard-tile span {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-tile strong {
  display: block;
  margin-top: 7px;
  font-size: 18px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.dashboard-tile.danger {
  border-color: #fed7d7;
  background: #fff7f7;
}

.dashboard-tile.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.equipment-mini {
  display: grid;
  gap: 8px;
}

.equipment-mini div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #f8fafc;
}

.equipment-mini strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.summary-card button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 13px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-card,
.item-card,
.section-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.service-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.service-row button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
}

.speed-test-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 16px;
}

.speed-gauge {
  width: 170px;
  height: 170px;
  justify-self: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 52%, transparent 53%),
    conic-gradient(var(--brand) 0 82%, #e4e7ec 82% 100%);
  display: grid;
  place-items: center;
  align-content: center;
}

.speed-gauge.testing {
  animation: pulseSpeed 900ms ease-in-out infinite;
}

@keyframes pulseSpeed {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.speed-gauge strong {
  font-size: 42px;
}

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

.speed-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.speed-results p {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 0;
}

.speed-results strong,
.speed-results span {
  display: block;
}

.speed-results span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.speed-status {
  margin: -4px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.speed-test-card .primary:disabled {
  opacity: .72;
  cursor: wait;
}

.quick-card {
  min-height: 82px;
  padding: 14px;
  text-align: left;
}

.quick-card span,
.item-card span,
.section-head span,
.metrics span {
  color: var(--muted);
  font-size: 12px;
}

.quick-card strong {
  display: block;
  margin-top: 8px;
  font-size: 17px;
}

.section-block {
  margin-top: 12px;
  padding: 16px;
}

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

.meter {
  height: 12px;
  background: #edf2f7;
  border-radius: 999px;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--blue);
}

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

.metrics p {
  margin: 0;
}

.metrics strong {
  display: block;
  font-size: 18px;
}

.list {
  display: grid;
  gap: 10px;
}

.invoice-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.invoice-summary button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.invoice-summary button.active {
  border-color: var(--brand);
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(0, 102, 204, 0.12);
}

.invoice-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.invoice-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.item-card {
  padding: 14px;
}

.item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.item-card h4 {
  margin: 0 0 5px;
  font-size: 15px;
}

.item-card p {
  margin-bottom: 8px;
  color: #475467;
  font-size: 13px;
}

.equipment-row {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.equipment-row strong {
  display: block;
  margin-bottom: 5px;
  text-transform: capitalize;
}

.badge {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.ok {
  background: #dcfce7;
  color: #166534;
}

.badge.warn {
  background: #fef3c7;
  color: var(--amber);
}

.badge.danger {
  background: #fee4e2;
  color: var(--danger);
}

.badge.neutral {
  background: #eef2f6;
  color: #475467;
}

.ticket-card .ticket-protocol {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.ticket-card h4 {
  display: -webkit-box;
  margin-bottom: 6px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ticket-card > p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ticket-card > p + p {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.ticket-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ticket-date {
  color: var(--muted);
  font-size: 11px;
}

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

.card-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 8px;
  padding: 0 10px;
  color: #1f2937;
}

.card-actions button:disabled,
.card-actions .disabled-action {
  cursor: not-allowed;
  color: #98a2b3;
  background: #f2f4f7;
  border-color: #e4e7ec;
}

.bottom-nav {
  margin-top: auto;
  flex: 0 0 auto;
  position: relative;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px 14px;
  background: rgba(255, 255, 255, .94);
  border-top: 1px solid var(--line);
}

.nav-btn {
  border: 0;
  background: transparent;
  color: #667085;
  min-height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  gap: 2px;
}

.nav-btn span {
  font-size: 11px;
}

.nav-btn.active {
  background: #e6f4f1;
  color: var(--brand-dark);
  font-weight: 700;
}

dialog {
  width: min(390px, calc(100vw - 28px));
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0;
}

dialog::backdrop {
  background: rgba(15, 23, 42, .45);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head .icon-btn {
  background: #f2f4f7;
  color: #101828;
}

#modalBody {
  padding: 16px;
}

#modalBody p {
  color: #475467;
  line-height: 1.45;
}

.pix-box {
  display: grid;
  gap: 12px;
}

.pix-qr {
  width: 190px;
  height: 190px;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

#pixCopyText {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
  color: #1f2937;
  background: #f8fafc;
  font: 12px Consolas, monospace;
}

#modalBody textarea {
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
  color: #1f2937;
  background: #f8fafc;
  font: 12px Consolas, monospace;
}

.modal-link {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
}

@media (max-width: 520px) {
  .shell {
    padding: 0;
  }

  .phone {
    min-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: 0;
    width: 100%;
  }
}

/* Layout final do app */
.app-screen {
  position: relative;
}

.app-top {
  min-height: 86px;
  padding: 18px 18px 14px;
  background: #ffffff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.app-top p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.app-top h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.menu-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px;
  flex: 0 0 auto;
}

.menu-btn span {
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: var(--brand);
  display: block;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.shortcut-card {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #243447;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 8px 4px;
  text-align: center;
}

.shortcut-card.active {
  border-color: var(--brand);
  background: #e6f4f1;
  color: var(--brand-dark);
}

.shortcut-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #edf2f7;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.shortcut-card strong {
  font-size: 11px;
  line-height: 1.1;
}

.side-menu {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  width: min(310px, 82%);
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(15, 23, 42, .22);
  transform: translateX(105%);
  transition: transform 180ms ease;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.side-menu.open {
  transform: translateX(0);
}

.side-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.side-menu-head .icon-btn {
  background: #f2f4f7;
  color: #101828;
}

.menu-link {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  text-align: left;
  padding: 0 12px;
  font-weight: 700;
}

.menu-link.active {
  background: #e6f4f1;
  border-color: #bde6dc;
  color: var(--brand-dark);
}

.danger-link {
  color: #b42318;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  z-index: 19;
  background: rgba(15, 23, 42, .42);
}

.compact-hero {
  margin-top: 12px;
  padding: 14px;
}

.compact-hero .speed-pill,
.live-strip,
.tabs,
.bottom-nav {
  display: none;
}

.view {
  padding-bottom: 22px;
}

/* Estilos Adicionais Vellum Fibra */
.logo-img {
  max-width: 210px;
  height: auto;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

.logo-img-header {
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.1));
}

.period-toggle {
  display: flex;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--line);
}

.toggle-btn {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 28px;
}

.toggle-btn.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 97, 174, 0.2);
}

.chart-block {
  padding: 16px 10px;
}

/* Modificações de tons verdes do Via Sul para tons neutros limpos do Vellum */
.nav-btn.active {
  background: #f1f5f9;
  color: var(--brand-dark);
}

.shortcut-card.active {
  border-color: var(--brand);
  background: #f8fafc;
  color: var(--brand-dark);
}

.menu-link.active {
  background: #f1f5f9;
  border-color: var(--line);
  color: var(--brand-dark);
}

.hero-card {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hero-card p:last-child {
  color: #475467;
}

.dashboard-title span {
  background: #f1f5f9;
  color: #0061ae;
}

.dashboard-head, .dashboard-contract {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.badge.ok {
  background: #e6fdf4;
  color: #16a34a;
}

/* Modificadores de cores para separar contratos */
.contract-option.color-0,
.item-card.color-0 {
  border: 1px solid #b3d4f1 !important;
  border-left: 5px solid #0061ae !important; /* Azul Vellum */
  background: #f0f7ff !important;
}
.contract-option.color-1,
.item-card.color-1 {
  border: 1px solid #bbf7d0 !important;
  border-left: 5px solid #16a34a !important; /* Verde */
  background: #f0fdf4 !important;
}
.contract-option.color-2,
.item-card.color-2 {
  border: 1px solid #e9d5ff !important;
  border-left: 5px solid #9333ea !important; /* Roxo */
  background: #faf5ff !important;
}
.contract-option.color-3,
.item-card.color-3 {
  border: 1px solid #ffedd5 !important;
  border-left: 5px solid #ea580c !important; /* Laranja */
  background: #fff7ed !important;
}

/* Botão Flutuante do WhatsApp */
.whatsapp-btn {
  position: absolute;
  bottom: 24px;
  right: 20px;
  width: 54px;
  height: 54px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.6);
  background-color: #20ba5a;
}

.whatsapp-btn svg {
  transition: transform 0.3s ease;
}

.whatsapp-btn:hover svg {
  transform: rotate(15deg);
}

#loginCredentials {
  animation: loginCredentialsFadeIn 0.3s ease-out forwards;
}

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

.contract-option strong,
.contract-option h4,
.item-card h4,
.compact-hero h2,
#planTitle {
  word-break: break-word;
  overflow-wrap: anywhere;
}
