:root {
  --primary: #0d47a1;
  --primary-dark: #08306b;
  --accent: #00a8e8;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #dbe3ef;
  --border-strong: #c7d4e6;
  --soft: #f7faff;
  --success: #0f9d58;
  --danger: #d93025;
  --shadow: 0 10px 30px rgba(13, 71, 161, 0.10);
  --shadow-soft: 0 8px 24px rgba(13, 71, 161, 0.07);
  --brand-blue: #0756b1;
  --brand-cyan: #00a7d8;
  --ink: #102033;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #eef4ff, #f8fbff);
  color: var(--text);
  min-height: 100%;
}

body {
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
  width: 100%;
}

.screen.active {
  display: flex;
}

#loginScreen {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #ffffff;
}

.login-card,
.menu-card,
.content-card,
.page-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.admin-login-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(440px, 1fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.admin-login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 36px;
  padding: clamp(40px, 5vw, 64px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(4, 35, 70, 0.50), rgba(3, 19, 38, 0.82)),
    linear-gradient(90deg, rgba(4, 49, 92, 0.72), rgba(0, 96, 148, 0.38)),
    url("/cadastro/frontend/assets/login-telecom-hero.png") center / cover no-repeat,
    linear-gradient(135deg, #08396c 0%, #0b5d94 54%, #0aa3c7 100%);
}

.admin-login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 72px 72px;
  opacity: 0.22;
}

.admin-login-hero > * {
  position: relative;
  z-index: 1;
}

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

.admin-login-hero h1 {
  max-width: 680px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(54px, 5.4vw, 84px);
  line-height: 0.98;
  text-shadow: 0 12px 28px rgba(0, 20, 44, 0.26);
}

.admin-login-hero p {
  max-width: 620px;
  margin: 0;
  color: #eef8ff;
  font-size: 20px;
  line-height: 1.45;
}

.admin-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 140px));
  gap: 14px;
}

.admin-hero-grid span {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  backdrop-filter: blur(4px);
}

.admin-hero-grid small {
  color: #d9f4ff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-product-badge {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  color: #061827;
  background: #16c4e8;
  font-size: 15px;
  font-weight: 900;
}

.admin-brand-kicker {
  margin: 14px 0 0;
  color: #d9f4ff;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-provider-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.login-provider-card {
  margin-bottom: 34px;
  padding: 14px;
  border: 1px solid #d8e6f4;
  border-radius: 8px;
  background: #f8fbff;
}

.login-provider-card img {
  width: 102px;
  max-height: 44px;
  object-fit: contain;
}

.login-provider-card strong {
  color: var(--primary-dark);
  font-size: 14px;
  margin-bottom: 3px;
}

.login-provider-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.login-card {
  width: 100%;
  max-width: none;
  padding: clamp(48px, 6vw, 88px) clamp(38px, 4.8vw, 56px);
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.brand-wrap h1,
.topbar h2,
.page-card h3 {
  margin: 0 0 8px;
  color: var(--primary);
}

.topbar h2 {
  font-size: 24px;
  line-height: 1.1;
  margin-bottom: 4px;
}

.page-card h3 {
  font-size: 24px;
}

.brand-wrap p,
.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

.module-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--brand-cyan);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-wrap h1 {
  color: #071827;
  font-size: 32px;
  line-height: 1.12;
}

#loginScreen .module-kicker {
  color: #40586b;
}

#loginScreen .field label {
  color: #061827;
  font-size: 14px;
}

#loginScreen input {
  min-height: 50px;
  border-radius: 8px;
  background: #edf5ff;
}

#loginScreen .btn-primary {
  min-height: 50px;
  border-radius: 8px;
  background: #0756a5;
  box-shadow: none;
}

#loginScreen .login-entry-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

#loginScreen .login-entry-actions .btn {
  width: 100%;
  min-height: 50px;
}

#loginScreen .login-entry-actions .btn-outline {
  border-color: #0756a5;
  color: #0756a5;
  background: #ffffff;
}

#loginScreen .message {
  min-height: 22px;
}

.admin-login-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.admin-login-footer strong {
  color: var(--primary-dark);
}

.hero-footer {
  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;
}

#appScreen {
  flex-direction: column;
}

.topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

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

.app-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  color: #fff;
  font-weight: 900;
}

.container {
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  align-items: start;
}

.menu-card {
  padding: 14px;
  position: sticky;
  top: 76px;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(28, 55, 92, 0.10);
}

.menu-title {
  padding: 4px 4px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.menu-btn {
  width: 100%;
  padding: 12px 13px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  color: var(--primary-dark);
  transition: 0.2s ease;
}

.menu-btn:last-child {
  margin-bottom: 0;
}

.menu-btn.active,
.menu-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(0, 122, 204, 0.18);
}

.content-card {
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 118px);
  overflow: hidden;
  border-radius: 8px;
}

#contentFrame {
  width: 100%;
  height: calc(100vh - 118px);
  min-height: 720px;
  border: 0;
  display: block;
  background: #fff;
}

.embedded-page {
  background: transparent;
  padding: 0;
}

.page-card {
  margin: 0;
  padding: 22px 24px 28px;
  border: none;
  box-shadow: none;
  border-radius: 0;
  background: #fff;
  min-height: 100%;
}

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

.single-column {
  grid-template-columns: 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

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

label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  font-size: 15px;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.15);
}

.actions {
  display: flex;
  align-items: center;
}

.btn {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: #fff;
}

.btn:hover {
  transform: translateY(-1px);
}

.search-panel {
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--soft);
  box-shadow: var(--shadow-soft);
}

.search-panel h4 {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 18px;
}

.search-panel .actions {
  align-items: flex-end;
}

.search-panel .btn {
  width: 100%;
}

.message {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
}

.message.success {
  color: var(--success);
}

.message.error {
  color: var(--danger);
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.observations-field textarea {
  min-height: 88px;
  resize: vertical;
}

.observations-field small {
  margin-top: 4px;
  color: var(--muted);
}

.cliente-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cliente-section {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--soft);
}

.cliente-section > label {
  margin-bottom: 10px;
  font-size: 15px;
}

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

.section-title.compact {
  margin-bottom: 0;
  padding-bottom: 10px;
}

.section-title small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.cliente-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.cliente-actions .btn {
  min-width: 132px;
}

.cliente-actions-secondary,
.cliente-actions-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cliente-actions-primary {
  margin-left: auto;
}

.document-list,
.cliente-list {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  min-height: 42px;
}

.doc-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
  padding: 8px;
  border-radius: 8px;
  background: var(--soft);
}

.doc-option input {
  width: 18px;
  min-height: 18px;
}

.cliente-list-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 2fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.cliente-list-item div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.cliente-list-item strong {
  color: var(--primary-dark);
}

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

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table-wrap th,
.table-wrap td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

.table-wrap th {
  background: var(--soft);
  color: var(--primary-dark);
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

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

.btn-sm {
  min-height: 34px;
  padding: 7px 12px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.heading-status {
  flex: 0 0 auto;
  padding-top: 2px;
}

.contracts-layout {
  display: grid;
  gap: 18px;
}

.contracts-search {
  margin-bottom: 0;
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.input-action .btn {
  min-width: 120px;
}

.contract-form {
  display: grid;
  gap: 18px;
}

.form-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.form-modern {
  gap: 18px;
}

.form-modern .form-section {
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.form-modern .cliente-actions {
  margin-top: 0;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-title h4 {
  margin: 0;
  color: var(--primary);
  font-size: 17px;
}

.contract-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--soft);
}

.contract-actions-secondary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.provisioning-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 1fr) minmax(190px, 0.8fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.provisioning-filters .actions {
  align-items: stretch;
}

.provisioning-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.status-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.status-card h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-card strong {
  color: var(--primary);
  font-size: 26px;
  line-height: 1;
}

.status-card-pendente {
  border-left: 4px solid #d29a00;
}

.status-card-ok {
  border-left: 4px solid #1a9b5b;
}

.status-card-bloqueado,
.status-card-erro {
  border-left: 4px solid #d93025;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: #fff;
  white-space: nowrap;
}

.status-pendente {
  color: #9a6700;
  background: #fff7d6;
  border-color: #f1d27a;
}

.status-provisionado,
.status-ativo {
  color: #0f7f49;
  background: #e8f5ec;
  border-color: #b7e1c3;
}

.status-bloqueado,
.status-cancelado {
  color: #b3261e;
  background: #fdecea;
  border-color: #f2b8b5;
}

.status-erro {
  color: #9a3412;
  background: #fff0e6;
  border-color: #fdba74;
}

.status-neutro {
  color: var(--muted);
  background: var(--soft);
}

.provisioning-table table {
  min-width: 1180px;
}

.provisioning-table td:nth-child(9) {
  max-width: 300px;
  white-space: normal;
}

.table-actions .btn {
  min-width: 0;
}

@media (max-width: 1200px) {
  .container {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 992px) {
  .admin-login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .admin-login-hero {
    min-height: 300px;
    padding: 28px;
  }

  .admin-login-hero h1 {
    font-size: 30px;
  }

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

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

  .menu-title {
    grid-column: 1 / -1;
    padding-bottom: 2px;
  }

  .menu-btn {
    margin-bottom: 0;
  }

  .content-card {
    min-height: auto;
  }

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

  #contentFrame {
    height: 980px;
    min-height: 980px;
  }
}

@media (max-width: 768px) {
  .admin-login-hero {
    min-height: 260px;
  }

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

  .topbar {
    align-items: flex-start;
    padding: 16px;
  }

  .topbar-brand {
    align-items: flex-start;
  }

  .topbar .btn {
    align-self: flex-end;
  }

  .container {
    padding: 12px;
    gap: 12px;
  }

  .menu-card {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
  }

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

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

  .cliente-support-grid {
    grid-column: span 1;
  }

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

  .cliente-actions .btn {
    flex: 1 1 180px;
  }

  .page-heading {
    flex-direction: column;
  }

  .heading-status {
    width: 100%;
  }

  .input-action {
    grid-template-columns: 1fr;
  }

  .contract-actions,
  .contract-actions-secondary {
    width: 100%;
  }

  .contract-actions .btn {
    flex: 1 1 180px;
  }

  .provisioning-filters {
    grid-template-columns: 1fr;
  }

  .provisioning-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-card,
  .login-card {
    padding: 18px;
  }

  #contentFrame {
    height: 1180px;
    min-height: 1180px;
  }
}

@media (max-width: 480px) {
  .admin-login-shell {
    border-radius: 8px;
  }

  .admin-login-hero {
    padding: 22px;
  }

  .admin-login-hero h1 {
    font-size: 25px;
  }

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

  .menu-card {
    grid-template-columns: 1fr;
  }

  #loginScreen {
    padding: 16px;
  }

  .login-card {
    padding: 20px;
  }

  .provisioning-cards {
    grid-template-columns: 1fr;
  }

  #contentFrame {
    height: 1280px;
    min-height: 1280px;
  }
}

/* ViaProfit main shell */
#appScreen {
  background:
    linear-gradient(135deg, rgba(0, 106, 212, 0.18), transparent 28%),
    linear-gradient(150deg, #082c5c 0%, #004a99 46%, #0698d6 100%);
}

.vp-login-frame,
.vp-app-frame {
  width: min(1240px, 100%);
  min-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 420px;
  overflow: hidden;
  border: 1px solid rgba(217, 234, 255, 0.74);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 30px 70px rgba(0, 19, 53, 0.34),
    inset 0 0 0 6px rgba(255, 255, 255, 0.16);
}

.vp-app-frame {
  width: min(1480px, calc(100% - 28px));
  min-height: calc(100vh - 28px);
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  margin: 14px auto;
  align-items: stretch;
}

.vp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 34px 24px;
  border: 0;
  border-radius: 0;
  color: #d7eaff;
  background:
    linear-gradient(180deg, rgba(0, 96, 198, 0.96), rgba(0, 33, 78, 0.98)),
    #06366f;
  box-shadow: none;
}

.vp-brand {
  width: fit-content;
  max-width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(138, 202, 255, 0.28);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0075d8, #06a7e8);
  box-shadow: 0 12px 24px rgba(0, 23, 70, 0.24);
  font-size: 15px;
  font-weight: 900;
}

.vp-nav {
  display: grid;
  gap: 4px;
}

.vp-nav-item,
.vp-sidebar .menu-btn {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d9ecff;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.vp-nav-item::before,
.vp-sidebar .menu-btn::before,
.vp-sidebar-footer::before,
.vp-logout-btn::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid currentColor;
  border-radius: 5px;
  opacity: 0.78;
}

.vp-nav-item.active,
.vp-sidebar .menu-btn.active,
.vp-sidebar .menu-btn:hover {
  color: #fff;
  border-color: rgba(120, 199, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.vp-sidebar-footer,
.vp-logout-btn {
  margin-top: auto;
  color: #d9ecff;
  font-size: 14px;
  font-weight: 800;
}

.vp-logout-btn {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  padding: 10px 12px;
}

.vp-login-dashboard {
  padding: 68px 34px 34px;
  background:
    linear-gradient(90deg, #ffffff 0%, #fbfdff 60%, #f3f8ff 100%);
}

.vp-login-dashboard h1 {
  margin: 0 0 26px;
  color: #12243d;
  font-size: 22px;
}

.vp-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 26px;
}

.vp-metric-card,
.vp-chart-card {
  border: 1px solid #e6eef8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(28, 55, 92, 0.08);
}

.vp-metric-card {
  min-height: 116px;
  padding: 20px 22px;
}

.vp-metric-card span,
.vp-chart-title {
  display: block;
  color: #6b7b91;
  font-size: 13px;
  font-weight: 800;
}

.vp-metric-card strong {
  display: block;
  margin: 12px 0 10px;
  color: #142642;
  font-size: 26px;
  line-height: 1;
}

.vp-metric-card small {
  color: #00a884;
  font-size: 12px;
  font-weight: 800;
}

.vp-chart-card {
  padding: 22px 22px 18px;
}

.vp-chart {
  position: relative;
  height: 168px;
  margin-top: 16px;
  overflow: hidden;
  border-bottom: 1px solid #dbe7f5;
  background:
    linear-gradient(#edf3fa 1px, transparent 1px) 0 0 / 100% 42px,
    linear-gradient(180deg, rgba(0, 145, 234, 0.08), rgba(0, 145, 234, 0.02));
}

.vp-chart-line {
  position: absolute;
  inset: 18px 12px 20px 12px;
  background:
    linear-gradient(150deg, transparent 0 8%, #1e88e5 8% 10%, transparent 10% 28%, #1e88e5 28% 30%, transparent 30% 48%, #1e88e5 48% 50%, transparent 50% 67%, #1e88e5 67% 69%, transparent 69% 84%, #1e88e5 84% 86%, transparent 86% 100%),
    linear-gradient(180deg, rgba(30, 136, 229, 0.32), rgba(30, 136, 229, 0.02));
  clip-path: polygon(0 66%, 18% 62%, 36% 38%, 52% 52%, 66% 16%, 82% 28%, 100% 0, 100% 100%, 0 100%);
}

.vp-chart-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #1e88e5;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.14);
}

.dot-1 { left: 4%; top: 66%; }
.dot-2 { left: 22%; top: 62%; }
.dot-3 { left: 39%; top: 38%; }
.dot-4 { left: 56%; top: 52%; }
.dot-5 { left: 73%; top: 17%; }
.dot-6 { left: 94%; top: 4%; }

.vp-chart-labels {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 12px;
  color: #63758d;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.vp-login-panel {
  justify-content: center;
  padding: 72px 38px;
  border-left: 1px solid #eef3f9;
  background: linear-gradient(90deg, #fbfdff 0%, #ffffff 100%);
}

.vp-login-panel .brand-wrap {
  margin-bottom: 22px;
}

.vp-login-panel input {
  min-height: 48px;
  border-radius: 8px;
  background: #fbfdff;
}

.vp-login-panel .btn-primary {
  min-height: 48px;
  border-radius: 8px;
}

.vp-forgot-link {
  width: fit-content;
  color: #60748f;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.vp-forgot-link:hover {
  color: var(--primary);
}

.vp-app-frame .menu-title {
  padding: 0 12px;
  color: #9cccf7;
}

.vp-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #f5f9ff;
}

.vp-workspace .topbar {
  position: static;
  padding: 20px 24px;
  border-bottom: 1px solid #e5eef8;
  background: rgba(255, 255, 255, 0.92);
}

.vp-workspace .content-card {
  margin: 18px;
  min-height: calc(100vh - 112px);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(28, 55, 92, 0.10);
}

.vp-workspace #contentFrame {
  height: calc(100vh - 112px);
  min-height: 720px;
}

@media (max-width: 1180px) {
  .vp-login-frame {
    grid-template-columns: 220px minmax(0, 1fr) 360px;
  }

  .vp-metric-grid {
    gap: 14px;
  }
}

@media (max-width: 992px) {
  .vp-login-frame,
  .vp-app-frame {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .vp-login-sidebar {
    display: none;
  }

  .vp-sidebar.menu-card {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 18px;
  }

  .vp-sidebar .vp-brand,
  .vp-sidebar .menu-title,
  .vp-sidebar .vp-logout-btn {
    grid-column: 1 / -1;
  }

  .vp-login-dashboard {
    padding: 32px;
  }

  .vp-login-panel {
    border-left: 0;
    border-top: 1px solid #eef3f9;
    padding: 32px;
  }
}

@media (max-width: 640px) {
  #loginScreen {
    padding: 12px;
  }

  .vp-login-frame,
  .vp-app-frame {
    border-radius: 16px;
  }

  .vp-login-dashboard {
    display: none;
  }

  .vp-sidebar.menu-card {
    grid-template-columns: 1fr;
  }

  .vp-workspace .content-card {
    margin: 12px;
  }
}

/* Authenticated app usability refinements */
#appScreen.active {
  display: block;
}

#appScreen {
  min-height: 100vh;
  overflow: hidden;
}

#appScreen .vp-app-frame {
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  grid-template-columns: 218px minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
  transition: grid-template-columns 0.22s ease;
}

#appScreen .vp-app-frame.menu-collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}

#appScreen .vp-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  padding: 14px 12px;
  gap: 7px;
  border-right: 1px solid rgba(127, 194, 255, 0.22);
}

#appScreen .vp-sidebar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

#appScreen .vp-brand {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  overflow: hidden;
  text-align: center;
}

#appScreen .vp-brand-short {
  display: none;
}

#appScreen .vp-menu-toggle {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(158, 213, 255, 0.24);
  border-radius: 8px;
  color: #e6f4ff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

#appScreen .menu-title {
  margin-top: 2px;
  margin-bottom: 2px;
  font-size: 11px;
}

#appScreen .vp-menu-group {
  display: grid;
  gap: 6px;
}

#appScreen .vp-menu-group summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(158, 213, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

#appScreen .vp-menu-group summary::-webkit-details-marker {
  display: none;
}

#appScreen .vp-menu-group summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

#appScreen .vp-menu-group:not([open]) summary::after {
  transform: rotate(-45deg);
}

#appScreen .vp-menu-group-items {
  display: grid;
  gap: 5px;
  padding-left: 8px;
  border-left: 1px solid rgba(158, 213, 255, 0.18);
}

#appScreen .vp-sidebar .menu-btn {
  min-height: 34px;
  justify-content: flex-start;
  padding: 7px 10px;
  color: #cfe7ff;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}

#appScreen .vp-sidebar .menu-btn.active {
  background: linear-gradient(135deg, #0b69c9, #02a4df);
  box-shadow: 0 12px 26px rgba(0, 29, 72, 0.26);
}

#appScreen .vp-sidebar .menu-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

#appScreen .vp-sidebar .menu-btn.active:hover {
  background: linear-gradient(135deg, #0b69c9, #02a4df);
}

#appScreen .vp-logout-btn {
  min-height: 34px;
  flex: 0 0 auto;
  margin-top: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

#appScreen .vp-sidebar .menu-btn::before,
#appScreen .vp-logout-btn::before {
  display: none;
}

#appScreen .vp-app-frame.menu-collapsed .vp-sidebar {
  padding: 12px 10px;
}

#appScreen .vp-app-frame.menu-collapsed .vp-brand-full,
#appScreen .vp-app-frame.menu-collapsed .menu-title,
#appScreen .vp-app-frame.menu-collapsed .menu-label,
#appScreen .vp-app-frame.menu-collapsed .vp-menu-group summary {
  display: none;
}

#appScreen .vp-app-frame.menu-collapsed .vp-brand-short {
  display: inline;
}

#appScreen .vp-app-frame.menu-collapsed .vp-menu-toggle {
  min-height: 38px;
  padding: 0;
  font-size: 11px;
}

#appScreen .vp-app-frame.menu-collapsed .vp-sidebar .menu-btn {
  min-height: 36px;
  justify-content: center;
  padding: 6px 4px;
  font-size: 0;
}

#appScreen .vp-app-frame.menu-collapsed .vp-sidebar .menu-btn::after {
  content: attr(data-short);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  border-radius: 8px;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

#appScreen .vp-app-frame.menu-collapsed .vp-menu-group,
#appScreen .vp-app-frame.menu-collapsed .vp-menu-group-items {
  display: grid;
  gap: 6px;
  padding-left: 0;
  border-left: 0;
}

#appScreen .vp-app-frame.menu-collapsed .vp-logout-btn {
  justify-content: center;
  padding: 8px 4px;
}

#appScreen .vp-app-frame.menu-collapsed .vp-logout-btn::after {
  content: "Sair";
  font-size: 12px;
  font-weight: 900;
}

#appScreen .vp-workspace {
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 249, 255, 0.94)),
    #f5f9ff;
}

#appScreen .vp-workspace .topbar {
  min-height: 76px;
  flex: 0 0 auto;
  padding: 16px 24px;
  box-shadow: 0 10px 28px rgba(28, 55, 92, 0.06);
  z-index: 2;
}

#appScreen .vp-workspace .content-card {
  flex: 1 1 auto;
  min-height: 0;
  margin: 16px;
  overflow: hidden;
  border-color: #dde8f6;
}

#appScreen .vp-workspace #contentFrame {
  height: calc(100vh - 108px);
  min-height: 0;
}

@media (max-width: 992px) {
  #appScreen {
    overflow: auto;
  }

  #appScreen .vp-app-frame {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
  }

  #appScreen .vp-app-frame.menu-collapsed {
    grid-template-columns: 1fr;
  }

  #appScreen .vp-sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(127, 194, 255, 0.22);
  }

  #appScreen .vp-sidebar-head,
  #appScreen .menu-title,
  #appScreen .vp-menu-group,
  #appScreen .vp-logout-btn {
    grid-column: 1 / -1;
  }

  #appScreen .vp-sidebar-head {
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: center;
  }

  #appScreen .vp-app-frame.menu-collapsed .vp-brand-full,
  #appScreen .vp-app-frame.menu-collapsed .menu-label,
  #appScreen .vp-app-frame.menu-collapsed .menu-title,
  #appScreen .vp-app-frame.menu-collapsed .vp-menu-group summary {
    display: flex;
  }

  #appScreen .vp-app-frame.menu-collapsed .vp-brand-short,
  #appScreen .vp-app-frame.menu-collapsed .vp-sidebar .menu-btn::after,
  #appScreen .vp-app-frame.menu-collapsed .vp-logout-btn::after {
    display: none;
  }

  #appScreen .vp-app-frame.menu-collapsed .vp-sidebar .menu-btn {
    min-height: 34px;
    justify-content: flex-start;
    padding: 7px 10px;
    font-size: 13px;
  }

  #appScreen .vp-menu-group-items,
  #appScreen .vp-app-frame.menu-collapsed .vp-menu-group-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-left: 0;
    border-left: 0;
  }

  #appScreen .vp-workspace {
    height: auto;
    min-height: 900px;
    overflow: visible;
  }

  #appScreen .vp-workspace #contentFrame {
    height: 980px;
    min-height: 980px;
  }
}

@media (max-width: 640px) {
  #appScreen .vp-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #appScreen .vp-menu-group-items,
  #appScreen .vp-app-frame.menu-collapsed .vp-menu-group-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Compact embedded pages for notebook screens */
#appScreen .vp-workspace .topbar {
  min-height: 62px;
  padding: 10px 20px;
}

#appScreen .vp-workspace .topbar h2 {
  font-size: 24px;
  margin-bottom: 2px;
}

#appScreen .vp-workspace .topbar p {
  font-size: 14px;
}

#appScreen .app-mark {
  width: 44px;
  height: 44px;
}

#appScreen .vp-workspace .content-card {
  margin: 12px;
}

#appScreen .vp-workspace #contentFrame {
  height: calc(100vh - 86px);
}

body.embedded-page {
  background: #ffffff;
}

body.embedded-page .page-card {
  padding: 16px 18px 20px;
}

body.embedded-page .page-heading {
  gap: 12px;
  margin-bottom: 14px;
}

body.embedded-page .page-card h3 {
  font-size: 24px;
  line-height: 1.16;
  margin-bottom: 6px;
}

body.embedded-page .page-heading p {
  font-size: 13px;
}

body.embedded-page .form-grid {
  gap: 10px 12px;
}

body.embedded-page label {
  margin-bottom: 5px;
  font-size: 13px;
}

body.embedded-page input,
body.embedded-page select,
body.embedded-page textarea {
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

body.embedded-page .btn {
  min-height: 36px;
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 14px;
}

body.embedded-page .search-panel,
body.embedded-page .form-section {
  border-radius: 10px;
  box-shadow: none;
}

body.embedded-page .search-panel {
  padding: 12px 14px;
  margin-bottom: 12px;
}

body.embedded-page .search-panel h4,
body.embedded-page .section-title h4 {
  font-size: 16px;
}

body.embedded-page .section-title {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

body.embedded-page .form-section {
  padding: 12px 14px;
}

.contracts-page .contracts-layout,
.contracts-page .contract-form {
  gap: 12px;
}

.contracts-page .page-card {
  color: #12243d;
}

.contracts-page .page-heading {
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5edf7;
}

.contracts-page .page-heading h3 {
  color: #123f8f;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.contracts-page .heading-status {
  padding-top: 0;
}

.contracts-page .status-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}

.contracts-page .equipment-payback-cell {
  display: grid;
  gap: 3px;
  min-width: 112px;
}

.contracts-page .equipment-payback-cell strong {
  color: #003b8f;
  font-size: 13px;
}

.contracts-page .equipment-payback-cell span {
  color: #65758d;
  font-size: 12px;
  font-weight: 700;
}

.contracts-page .contracts-search {
  border-color: #d7e4f5;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.contracts-page .contracts-search-head h4 {
  margin: 0;
  color: #123f8f;
}

.contracts-page .contracts-search-head span {
  color: #65758d;
  font-size: 12px;
  font-weight: 800;
}

.contracts-page .contracts-search-grid {
  grid-template-columns: minmax(320px, 1.1fr) minmax(260px, 0.9fr) minmax(320px, 1fr);
  gap: 10px 12px;
  align-items: end;
}

.contracts-page .contracts-search h4 {
  margin-bottom: 10px;
}

.contracts-page .input-action {
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
}

.contracts-page .input-action .btn {
  min-width: 0;
}

.contracts-page .contract-actions {
  padding: 12px 14px;
  border-radius: 10px;
}

.contracts-page .contract-actions-secondary {
  gap: 8px;
}

.contracts-page .contract-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.contracts-page .contract-form .form-section {
  min-height: 100%;
}

.contracts-page .contract-form .form-section:nth-of-type(3),
.contracts-page .contract-form .form-section:nth-of-type(5),
.contracts-page .contract-form .form-section:nth-of-type(6),
.contracts-page .contract-actions,
.contracts-page #msg {
  grid-column: 1 / -1;
}

.contracts-page .form-section {
  border-color: #dbe7f5;
  background: #ffffff;
}

.contracts-page .section-title {
  border-bottom-color: #e8eff8;
}

.contracts-page .section-title h4 {
  color: #123f8f;
  font-size: 15px;
  font-weight: 900;
}

.contracts-page .contract-actions {
  background: #f8fbff;
}

.contracts-page .contract-costs-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.contracts-page .contract-costs-summary > div {
  min-height: 64px;
  border: 1px solid #e3ecf7;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.contracts-page .contract-costs-summary span {
  display: block;
  color: #65758d;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.contracts-page .contract-costs-summary strong {
  color: #12243d;
  font-size: 18px;
  font-weight: 900;
}

.contracts-page .contract-cost-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contracts-page .contract-cost-center {
  border: 1px solid #dbe8f7;
  border-radius: 8px;
  background: #fbfdff;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.contracts-page .contract-cost-center summary {
  cursor: pointer;
  color: #003f8f;
  font-weight: 900;
}

.contracts-page .contract-cost-center-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.contracts-page .contract-cost-center-action {
  align-self: end;
}

@media (max-width: 1366px) {
  body.embedded-page .page-card {
    padding: 14px 16px 18px;
  }

  body.embedded-page .page-card h3 {
    font-size: 22px;
  }

  .contracts-page .search-panel,
  .contracts-page .form-section {
    padding: 10px 12px;
  }

  .contracts-page .contracts-search-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  }

  .contracts-page .contract-search-client {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .contracts-page .contract-form {
    grid-template-columns: 1fr;
  }

  .contracts-page .contract-form .form-section:nth-of-type(3),
  .contracts-page .contract-form .form-section:nth-of-type(5),
  .contracts-page .contract-form .form-section:nth-of-type(6),
  .contracts-page .contract-actions,
  .contracts-page #msg {
    grid-column: auto;
  }

  .contracts-page .contract-costs-summary,
  .contracts-page .contract-cost-form,
  .contracts-page .contract-cost-center-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .contracts-page .contracts-search-grid {
    grid-template-columns: 1fr;
  }

  .contracts-page .contract-search-client {
    grid-column: auto;
  }

  .contracts-page .input-action {
    grid-template-columns: 1fr;
  }

  .contracts-page .contract-actions {
    align-items: stretch;
  }

  .contracts-page .contract-costs-summary,
  .contracts-page .contract-cost-form,
  .contracts-page .contract-cost-center-form {
    grid-template-columns: 1fr;
  }
}

/* Shared cadastro screens pattern */
.registry-page .page-card {
  color: #12243d;
}

.registry-page .page-heading {
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5edf7;
}

.registry-page .module-kicker {
  margin-bottom: 6px;
  color: #0077b6;
  font-size: 11px;
}

.registry-page .page-heading h3,
.registry-page .page-card > h3 {
  color: #123f8f;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.18;
}

.registry-page .page-card > h3 {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5edf7;
}

.registry-page .search-panel {
  border-color: #d7e4f5;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.registry-page .search-panel .section-title {
  align-items: center;
  margin-bottom: 10px;
}

.registry-page .registry-search-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.registry-page .search-panel .section-title h4,
.registry-page .section-title h4 {
  color: #123f8f;
  font-size: 15px;
  font-weight: 900;
}

.registry-page .search-panel .section-title small {
  color: #65758d;
  font-size: 12px;
}

.registry-page .search-panel form.form-grid {
  grid-template-columns: minmax(260px, 1fr) 132px 132px;
  gap: 10px;
  align-items: end;
}

.empresa-page .registry-search-grid,
.usuario-page .registry-search-grid {
  grid-template-columns: minmax(320px, 1fr) 132px 132px;
}

.registry-page .search-panel .field-span-2 {
  grid-column: auto;
}

.registry-page .search-panel .actions {
  align-items: end;
}

.registry-page .search-panel .btn {
  width: 100%;
  min-width: 0;
}

.registry-page .search-panel .message {
  grid-column: 1 / -1;
}

.registry-page .form-modern {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.empresa-page .registry-form-grid,
.usuario-page .registry-form-grid {
  gap: 12px;
}

.registry-page .form-modern > .form-section.field-span-2 {
  grid-column: auto;
  min-height: 100%;
}

.registry-page .form-section {
  border-color: #dbe7f5;
  background: #ffffff;
}

.empresa-page .form-section,
.usuario-page .form-section {
  min-height: 100%;
}

.registry-page .section-title {
  border-bottom-color: #e8eff8;
}

.empresa-page .section-title h4,
.usuario-page .section-title h4 {
  color: #123f8f;
  font-size: 15px;
  font-weight: 900;
}

.registry-page .cliente-actions {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #f8fbff;
  justify-content: space-between;
}

.empresa-page .cliente-actions,
.usuario-page .cliente-actions {
  margin-top: 0;
}

.registry-page .cliente-actions-secondary,
.registry-page .cliente-actions-primary {
  width: auto;
  gap: 8px;
}

.registry-page .cliente-actions-secondary {
  justify-content: flex-start;
}

.registry-page .cliente-actions-primary {
  justify-content: flex-end;
  margin-left: auto;
}

.registry-page .form-modern > .message {
  grid-column: 1 / -1;
}

.registry-page .table-wrap {
  margin-top: 12px;
  border-radius: 10px;
}

.registry-page .table-wrap th,
.registry-page .table-wrap td,
.registry-page th,
.registry-page td {
  padding: 9px 10px;
  font-size: 13px;
}

.cliente-page .form-modern > .form-section:nth-of-type(5),
.cliente-page .cliente-actions,
.cliente-page #clienteMessage {
  grid-column: 1 / -1;
}

.cliente-page .cliente-support-grid {
  gap: 12px;
  padding-top: 12px;
}

.cliente-page .cliente-section {
  padding: 12px;
  border-radius: 10px;
}

.cliente-page .cliente-list,
.cliente-page .document-list {
  border-radius: 8px;
}

.planos-page .page-card > .form-grid,
.servidor-page .page-card > .form-grid,
.empresa-custos-page .empresa-cost-form {
  padding: 12px 14px;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #ffffff;
}

.planos-page .page-card > .actions,
.servidor-page .page-card > .actions {
  margin-top: 12px !important;
  padding: 12px 14px;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #f8fbff;
  justify-content: flex-start;
}

.planos-page .page-card > .actions .btn-primary,
.servidor-page .page-card > .actions .btn-primary {
  order: 2;
  margin-left: auto;
}

.planos-page .page-card > .actions .btn-outline,
.servidor-page .page-card > .actions .btn-outline {
  order: 1;
}

.planos-page hr,
.servidor-page hr {
  margin: 16px 0 !important;
}

.servidor-page .script-box {
  min-height: 150px;
  font-size: 13px;
}

.empresa-custos-page .empresa-costs-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.empresa-custos-page .empresa-costs-summary > div {
  min-height: 64px;
  border: 1px solid #e3ecf7;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.empresa-custos-page .empresa-costs-summary span {
  display: block;
  color: #65758d;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.empresa-custos-page .empresa-costs-summary strong {
  color: #12243d;
  font-size: 18px;
  font-weight: 900;
}

.empresa-custos-page .empresa-auto-rules {
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 14px;
  padding: 12px;
}

.empresa-custos-page .empresa-auto-rules-head {
  margin-bottom: 10px;
}

.empresa-custos-page .empresa-auto-rules h4 {
  color: #003b82;
  font-size: 15px;
  margin: 0 0 4px;
}

.empresa-custos-page .empresa-auto-rules p {
  color: #65758d;
  font-size: 13px;
  margin: 0;
}

.empresa-custos-page .empresa-cost-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.empresa-custos-page .field-span-4 {
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  .registry-page .form-modern,
  .cliente-page .cliente-support-grid {
    grid-template-columns: 1fr;
  }

  .registry-page .form-modern > .form-section.field-span-2,
  .cliente-page .form-modern > .form-section:nth-of-type(5) {
    grid-column: 1 / -1;
  }

  .empresa-custos-page .empresa-costs-summary,
  .empresa-custos-page .empresa-cost-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .registry-page .search-panel form.form-grid {
    grid-template-columns: 1fr;
  }

  .registry-page .search-panel .field-span-2,
  .registry-page .search-panel .message {
    grid-column: auto;
  }

  .empresa-custos-page .empresa-costs-summary,
  .empresa-custos-page .empresa-cost-form {
    grid-template-columns: 1fr;
  }

  .empresa-custos-page .field-span-2,
  .empresa-custos-page .field-span-4 {
    grid-column: auto;
  }

  .registry-page .cliente-actions,
  .registry-page .cliente-actions-secondary,
  .registry-page .cliente-actions-primary,
  .planos-page .page-card > .actions,
  .servidor-page .page-card > .actions {
    justify-content: stretch;
  }

  .registry-page .cliente-actions .btn,
  .planos-page .page-card > .actions .btn,
  .servidor-page .page-card > .actions .btn {
    flex: 1 1 160px;
  }
}
