/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

/* BODY */
body.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 180, 216, 0.18), transparent 30%),
    linear-gradient(135deg, #f3f8ff 0%, #dceafe 50%, #f8fbff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #102033;
}

/* CONTAINER */
.login-container {
  width: 100%;
  max-width: 980px;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 420px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(177, 199, 226, 0.78);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(28, 55, 92, 0.18);
  overflow: hidden;
}

.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 36px;
  background: linear-gradient(160deg, rgba(6, 77, 152, 0.94), rgba(0, 156, 199, 0.88));
  color: #ffffff;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 42, 91, 0.08), rgba(6, 42, 91, 0.36));
  pointer-events: none;
}

.hero-brand,
.hero-copy,
.hero-metrics {
  position: relative;
  z-index: 1;
}

.hero-brand {
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 490px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #dff8ff;
}

.hero-copy h1 {
  font-size: 38px;
  line-height: 1.08;
  margin-bottom: 14px;
}

.hero-copy p {
  font-size: 16px;
  line-height: 1.55;
  color: #eefaff;
}

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

.hero-metrics div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  font-size: 18px;
  margin-bottom: 4px;
}

.hero-metrics span {
  font-size: 13px;
  color: #e4f7ff;
}

/* CARD */
.login-card {
  background: #ffffff;
  padding: 42px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* BRAND */
.brand-area {
  text-align: left;
  margin-bottom: 26px;
}

.logo-wrap {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.logo-vianet {
  max-width: 132px;
}

.provider-card {
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid #dbe8f7;
  border-radius: 8px;
  background: #f8fbff;
}

.provider-card strong,
.provider-card span {
  display: block;
}

.provider-card strong {
  color: #17365d;
  font-size: 14px;
  margin-bottom: 3px;
}

.provider-card span {
  color: #66788e;
  font-size: 12px;
  line-height: 1.35;
}

.logo-fallback {
  width: 120px;
  height: 48px;
  background: #004a9f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: bold;
}

.brand-area h1 {
  font-size: 27px;
  line-height: 1.18;
  color: #073f86;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  line-height: 1.45;
  color: #5e6c7d;
}

/* FORM */
.login-form {
  margin-top: 4px;
}

/* FIELD */
.field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 7px;
  color: #17365d;
}

.field input {
  height: 48px;
  border-radius: 8px;
  border: 1px solid #c9d8eb;
  background: #f9fbfe;
  padding: 0 13px;
  font-size: 15px;
  color: #102033;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field input:focus {
  border-color: #009bd6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 155, 214, 0.14);
  outline: none;
}

.field-help {
  font-size: 12px;
  color: #6b7b8e;
  margin-top: 6px;
}

/* MESSAGE */
.message {
  min-height: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #d11a2a;
}

/* BUTTON */
.btn-primary {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #0756b1, #00a7d8);
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 22px rgba(0, 122, 204, 0.24);
}

.btn-primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  cursor: not-allowed;
  filter: grayscale(0.3);
  transform: none;
  opacity: 0.82;
}

/* FOOTER */
.login-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e6eef8;
  text-align: left;
  font-size: 12px;
  color: #66788e;
}

.login-footer strong {
  color: #17365d;
}

.hero-footer {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: 100%;
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #e8f8ff;
}

.hero-footer strong {
  color: #ffffff;
}

/* MOBILE AJUSTES */
@media (max-width: 820px) {
  body.login-page {
    align-items: flex-start;
    padding: 16px;
  }

  .login-container {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-hero {
    min-height: 280px;
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: 28px;
  }

  .login-card {
    padding: 26px 20px;
  }
}

@media (max-width: 480px) {
  .login-hero {
    min-height: 240px;
  }

  .hero-brand {
    font-size: 12px;
  }

  .hero-copy h1 {
    font-size: 24px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .brand-area h1 {
    font-size: 23px;
  }
}

/* APP INTERNO */
body.app-page {
  min-height: 100vh;
  background: #edf3f9;
  padding: 12px;
}

.app-container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

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

.topbar h1 {
  font-size: 22px;
  color: #0d1b2a;
  margin-bottom: 4px;
}

.topbar p {
  font-size: 13px;
  color: #555;
}

.client-home-topbar {
  align-items: flex-start;
  padding: 18px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f4fbff);
}

.client-home-topbar h1 {
  max-width: 520px;
  color: #073f86;
  font-size: 28px;
  line-height: 1.12;
  margin-bottom: 8px;
}

.home-kicker {
  margin-bottom: 6px;
  color: #0f6bb7 !important;
  font-weight: 800;
  text-transform: uppercase;
}

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

.quick-action {
  min-height: 86px;
  border: 1px solid #d7e4f2;
  border-radius: 8px;
  background: #ffffff;
  color: #102033;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.quick-action:hover {
  transform: translateY(-1px);
  border-color: #8fc5ec;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.quick-action.is-active {
  border-color: #0768b7;
  background: #eef7ff;
  box-shadow: 0 12px 26px rgba(7, 104, 183, 0.16);
}

.quick-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
}

.quick-action strong,
.quick-action small {
  display: block;
}

.quick-action strong {
  font-size: 15px;
  line-height: 1.25;
  margin-bottom: 4px;
}

.quick-action small {
  color: #63768c;
  font-size: 12px;
}

.action-pay .quick-action-icon {
  background: #0f8a4b;
}

.action-connection .quick-action-icon {
  background: #0768b7;
}

.action-offline .quick-action-icon {
  background: #d9382f;
}

.action-app .quick-action-icon {
  background: #5b4fc9;
}

.content-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.active-panel {
  display: block;
}

.app-panel {
  display: none;
}

.app-panel.is-active {
  display: block;
}

.section-header {
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: 18px;
  color: #0d1b2a;
  margin-bottom: 4px;
}

.section-header p {
  font-size: 13px;
  color: #666;
}

.support-card {
  margin-top: 14px;
}

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

.connection-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid #dbe8f7;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: #f8fbff;
}

.connection-summary strong,
.connection-label {
  display: block;
}

.connection-summary strong {
  color: #102033;
  font-size: 20px;
  line-height: 1.2;
}

.connection-label {
  color: #66788e;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.connection-summary .status-pill {
  margin-top: 0;
  white-space: nowrap;
  background: #17365d;
  color: #ffffff;
}

.connection-online {
  background: #eaf8ef;
  border-color: #1fa463;
}

.connection-warning {
  background: #fff8e8;
  border-color: #e2aa22;
}

.connection-offline {
  background: #ffecec;
  border-color: #e53935;
}

.connection-item {
  border: 1px solid #dbe8f7;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.connection-item strong,
.connection-item span {
  display: block;
}

.connection-item strong {
  color: #17365d;
  font-size: 13px;
  margin-bottom: 4px;
}

.connection-item span {
  color: #66788e;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.home-note {
  padding: 12px;
  border: 1px dashed #c9d3e1;
  border-radius: 8px;
  color: #66788e;
  background: #fafcff;
  font-size: 13px;
}

.support-form {
  display: grid;
  gap: 12px;
}

.support-warning {
  border: 1px solid #e2aa22;
  border-radius: 8px;
  background: #fff8e8;
  color: #614400;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  padding: 12px;
}

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

.support-form label {
  display: grid;
  gap: 6px;
}

.support-form label span {
  color: #17365d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.support-form .danger-word {
  color: #d11a2a;
}

.support-confirm {
  align-items: flex-start;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
}

.support-confirm input {
  margin-top: 2px;
}

.support-confirm span {
  color: #31445a;
  font-weight: 700;
}

.support-form select,
.support-form textarea {
  width: 100%;
  border: 1px solid #c9d8eb;
  border-radius: 8px;
  background: #f9fbfe;
  color: #102033;
  font-size: 14px;
}

.support-form select {
  height: 42px;
  padding: 0 10px;
}

.support-form textarea {
  min-height: 86px;
  padding: 10px;
  resize: vertical;
}

.support-form select:focus,
.support-form textarea:focus {
  border-color: #009bd6;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 155, 214, 0.14);
  outline: none;
}

.install-steps {
  display: grid;
  gap: 10px;
}

.install-steps div {
  border: 1px solid #dbe8f7;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.install-steps strong,
.install-steps span {
  display: block;
}

.install-steps strong {
  color: #17365d;
  font-size: 13px;
  margin-bottom: 4px;
}

.install-steps span {
  color: #66788e;
  font-size: 13px;
  line-height: 1.4;
}

.contract-list {
  display: grid;
  gap: 12px;
}

.contract-card {
  border: 1px solid #e4e8ef;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafcff;
}

.contract-card h3 {
  font-size: 17px;
  color: #0d1b2a;
  margin-bottom: 6px;
}

.contract-card p {
  font-size: 14px;
  color: #444;
  line-height: 1.45;
  margin-bottom: 3px;
}

.btn-secondary {
  border: none;
  border-radius: 10px;
  background: #e9eef7;
  color: #1b263b;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 14px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #dce5f3;
}

.empty-state {
  padding: 18px;
  border: 1px dashed #c9d3e1;
  border-radius: 12px;
  text-align: center;
  color: #666;
  font-size: 14px;
  background: #fafcff;
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .client-home-topbar h1 {
    font-size: 24px;
  }

  .connection-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .connection-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-card {
    padding: 14px;
  }

  .contract-card {
    padding: 12px;
  }

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

/* CARDS DE COBRANÇAS */
.cobranca-card {
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #dbe4f0;
  background: #ffffff;
}

.cobranca-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.cobranca-card p {
  font-size: 14px;
  margin-bottom: 5px;
}

.cobranca-card .valor-destaque {
  font-size: 22px;
  font-weight: 800;
  margin: 10px 0;
}

.cobranca-card .referencia-destaque {
  font-size: 16px;
  font-weight: 700;
}

.cobranca-card .vencimento-destaque {
  font-size: 15px;
  font-weight: 700;
}

.cobranca-aberta {
  background: #eaf3ff;
  border-color: #0d7cff;
}

.cobranca-vencida {
  background: #ffecec;
  border-color: #e53935;
}

.cobranca-paga {
  background: #eaf8ef;
  border-color: #1fa463;
}

.cobranca-isenta {
  background: #eef7f6;
  border-color: #0f9488;
}

.status-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
  margin-top: 6px;
}

.status-pill.aberta {
  background: #0d7cff;
  color: #fff;
}

.status-pill.vencida {
  background: #e53935;
  color: #fff;
}

.status-pill.paga {
  background: #1fa463;
  color: #fff;
}

.status-pill.isenta {
  background: #0f9488;
  color: #fff;
}

.acoes-cobranca {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

@media (min-width: 600px) {
  .acoes-cobranca {
    grid-template-columns: repeat(3, 1fr);
  }
}
