/* Garra Vip 2.0.14 — responsividade global para desktop, tablet e celular */
:root {
  --gv-touch: 44px;
  --gv-mobile-gap: 1rem;
  --gv-mobile-radius: 14px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-size: 1rem;
  line-height: 1.55;
}

img, svg, video, canvas {
  max-width: 100%;
}

/* Conteúdo do painel */
.content-wrapper .container-xxl,
.content-wrapper .container-fluid {
  width: 100%;
}

.card-title,
.modal-title,
.gestor-page-header h4,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: anywhere;
}

.form-label {
  font-weight: 600;
  margin-bottom: .45rem;
}

.form-text,
.text-muted,
small {
  line-height: 1.45;
}

.form-control,
.form-select,
.input-group-text {
  min-height: 42px;
  font-size: .975rem;
}

textarea.form-control {
  min-height: 92px;
}

.btn {
  min-height: 42px;
  font-weight: 600;
}

.dropdown-menu {
  max-width: min(92vw, 360px);
}

.dropdown-item {
  white-space: normal;
}

/* Menu lateral / navegação */
.menu-vertical .menu-item > .menu-link {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.menu-vertical .menu-inner > .menu-item .menu-link {
  line-height: 1.35;
}

.layout-navbar .navbar-nav .nav-link,
.layout-navbar .navbar-nav .dropdown-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}

/* Tabelas */
.fixed-table-body,
.table-responsive {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.fixed-table-body::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.fixed-table-body::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(105,108,255,.38);
}

.bootstrap-table .table > thead > tr > th,
.bootstrap-table .table > tbody > tr > td {
  line-height: 1.4;
}

.bootstrap-table .card-view .title,
.bootstrap-table .card-view .value {
  font-size: .95rem;
}

/* Modais: sempre dentro da viewport */
.modal-dialog {
  max-width: min(var(--bs-modal-width, 900px), calc(100vw - 1rem));
}

.modal-content {
  max-width: 100%;
}

/* Página de vendas */
.landing-navbar {
  min-height: 70px;
}

.landing-navbar .app-brand-text {
  font-size: 1.15rem;
}

.landing-navbar .nav-link {
  font-size: 1rem;
}

.landing-hero .hero-text-box {
  max-width: 780px !important;
}

.landing-hero .hero-title {
  font-size: clamp(2rem, 4.4vw, 3.75rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -.035em;
}

.landing-hero .hero-sub-title {
  max-width: 690px;
  margin-inline: auto;
  font-size: clamp(1rem, 1.8vw, 1.18rem) !important;
  line-height: 1.65 !important;
}

.landing-features .features-icon-box {
  padding: 1.15rem;
  border-radius: 18px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.landing-features .features-icon-box:hover {
  transform: translateY(-2px);
  background: rgba(105,108,255,.035);
}

.landing-features .features-icon-box img {
  max-width: 72px;
  height: auto;
}

.landing-features .features-icon-description {
  font-size: 1rem;
  line-height: 1.6;
}

.landing-pricing .card {
  border-radius: 20px !important;
}

.landing-pricing .card .card-header,
.landing-pricing .card .card-body {
  padding: clamp(1.25rem, 2.6vw, 2rem) !important;
}

.landing-pricing .display-5 {
  font-size: clamp(2.25rem, 5vw, 3.3rem);
}

.landing-pricing .card li {
  font-size: 1rem;
  line-height: 1.45;
}

.landing-pricing .js-buy-plan {
  min-height: 48px;
  font-size: 1rem;
}

.landing-faq .accordion-button {
  min-height: 52px;
  font-size: 1rem;
  line-height: 1.4;
}

.landing-faq .accordion-body,
.landing-reviews .card-body p {
  font-size: 1rem;
  line-height: 1.6;
}

/* Checkout */
.gv-checkout .card-body {
  min-width: 0;
}

.gv-checkout #pixPayload {
  font-size: .92rem;
  word-break: break-all;
}

.gv-checkout .input-group {
  align-items: stretch;
}

/* Tablet */
@media (max-width: 991.98px) {
  body {
    font-size: 1rem;
  }

  .content-wrapper .container-xxl,
  .content-wrapper .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .landing-navbar {
    min-height: 64px;
  }

  .landing-nav-menu {
    font-size: 1rem;
  }

  .landing-nav-menu .navbar-nav {
    gap: .35rem;
  }

  .landing-nav-menu .nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: .75rem 1rem !important;
  }

  .landing-pricing {
    border-radius: 2rem !important;
  }

  .landing-pricing .row > [class*="col-"] {
    min-width: 0;
  }
}

/* Celular */
@media (max-width: 767.98px) {
  :root {
    --gv-touch: 48px;
  }

  body {
    font-size: 16px !important;
    line-height: 1.55;
  }

  p,
  li,
  .form-text,
  .text-muted,
  .card-text {
    font-size: .98rem;
  }

  h1, .h1 { font-size: 2rem; line-height: 1.15; }
  h2, .h2 { font-size: 1.65rem; line-height: 1.2; }
  h3, .h3 { font-size: 1.4rem; line-height: 1.25; }
  h4, .h4 { font-size: 1.2rem; }
  h5, .h5 { font-size: 1.08rem; }

  .content-wrapper .container-xxl,
  .content-wrapper .container-fluid {
    padding-left: .85rem !important;
    padding-right: .85rem !important;
  }

  .card {
    border-radius: var(--gv-mobile-radius) !important;
  }

  .card-body {
    padding: 1rem;
  }

  .btn:not(.btn-icon) {
    min-height: var(--gv-touch);
    padding: .7rem 1rem;
    font-size: .98rem;
  }

  .btn-icon {
    width: var(--gv-touch) !important;
    min-width: var(--gv-touch) !important;
    height: var(--gv-touch) !important;
  }

  .form-control,
  .form-select,
  .input-group-text {
    min-height: var(--gv-touch);
    font-size: 16px !important; /* evita zoom automático no iOS */
    padding-block: .65rem;
  }

  textarea.form-control {
    min-height: 110px;
  }

  .select2-container {
    max-width: 100% !important;
    width: 100% !important;
  }

  .select2-container .select2-selection--single {
    min-height: var(--gv-touch);
    display: flex;
    align-items: center;
  }

  .gestor-page-header {
    margin-bottom: 1rem;
  }

  .gestor-page-header h4 {
    font-size: 1.35rem;
  }

  .gestor-page-actions {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .gestor-page-actions .btn,
  .gestor-toolbar-group > .btn,
  .gestor-toolbar-group > .form-select {
    width: 100%;
  }

  .gestor-stat-label {
    font-size: .9rem;
  }

  .gestor-stat-value {
    font-size: 1.35rem;
  }

  .fixed-table-toolbar .search input {
    min-height: var(--gv-touch);
    font-size: 16px !important;
  }

  .bootstrap-table .card-view {
    padding: .48rem 0;
  }

  .bootstrap-table .card-view .title {
    flex: 0 0 38%;
    max-width: 38%;
    font-size: .9rem;
  }

  .bootstrap-table .card-view .value {
    font-size: .95rem;
  }

  .client-actions,
  .server-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(44px, 1fr));
    width: 100%;
    gap: .5rem;
  }

  .client-actions .btn,
  .server-actions .btn {
    min-width: 0;
  }

  /* Menu lateral: alvos maiores para toque */
  .menu-vertical .menu-item > .menu-link {
    min-height: 50px;
    font-size: 1rem;
    padding-top: .7rem;
    padding-bottom: .7rem;
  }

  .menu-vertical .menu-icon {
    font-size: 1.35rem !important;
  }

  /* Landing mobile */
  .layout-navbar .container,
  .landing-navbar.container,
  .landing-navbar {
    padding-left: .75rem !important;
    padding-right: .75rem !important;
  }

  .landing-navbar {
    min-height: 60px;
    border-radius: 14px;
  }

  .landing-navbar .navbar-brand {
    margin-right: .25rem !important;
  }

  .landing-navbar .app-brand-text {
    font-size: 1.05rem !important;
    white-space: nowrap;
  }

  .landing-navbar .navbar-toggler {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
  }

  .landing-navbar .navbar-toggler i {
    font-size: 1.45rem !important;
  }

  .landing-navbar .gv-login-btn {
    min-width: 44px;
    min-height: 44px;
    padding: .55rem .7rem;
  }

  .landing-navbar .gv-login-btn .gv-login-text {
    display: none;
  }

  .landing-nav-menu {
    padding: 4rem 1rem 1rem !important;
  }

  .landing-nav-menu .nav-link {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    border-radius: 12px;
  }

  .landing-hero {
    padding-top: 7.2rem !important;
    padding-bottom: 3.25rem !important;
    border-radius: 0 0 1.75rem 1.75rem !important;
  }

  .landing-hero .container {
    padding-inline: 1rem;
  }

  .landing-hero .hero-title {
    font-size: clamp(2rem, 9vw, 2.65rem) !important;
    line-height: 1.08 !important;
  }

  .landing-hero .hero-sub-title {
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
  }

  .landing-hero .landing-hero-btn,
  .landing-hero .landing-hero-btn .btn {
    width: 100%;
  }

  .landing-hero .landing-hero-btn .btn {
    min-height: 52px;
    font-size: 1.05rem;
  }

  .section-py {
    padding: 2.75rem 0 !important;
  }

  .landing-features h3,
  .landing-pricing h3,
  .landing-faq h3,
  .landing-reviews h3 {
    font-size: 1.55rem !important;
  }

  .landing-features .features-icon-wrapper {
    gap: .9rem 0 !important;
  }

  .landing-features .features-icon-box {
    text-align: left !important;
    padding: 1rem;
    border: 1px solid rgba(110,120,150,.12);
    box-shadow: 0 8px 22px rgba(31,38,135,.06);
    background: var(--bs-body-bg, #fff);
  }

  .landing-features .features-icon-box > .text-center {
    text-align: left !important;
    margin-bottom: .7rem !important;
  }

  .landing-features .features-icon-box img {
    width: 52px;
  }

  .landing-features .features-icon-box h5 {
    margin-bottom: .5rem !important;
  }

  .landing-features .features-icon-description {
    max-width: none !important;
    margin: 0 !important;
  }

  .landing-reviews,
  .landing-faq,
  .landing-pricing {
    border-radius: 1.5rem !important;
  }

  .landing-reviews .card-body {
    padding: 1rem !important;
  }

  .landing-pricing .container {
    padding-inline: 1rem;
  }

  .landing-pricing .card {
    margin-bottom: .25rem;
  }

  .landing-pricing .card .card-header,
  .landing-pricing .card .card-body {
    padding: 1.15rem !important;
  }

  .landing-pricing .display-5 {
    font-size: 2.35rem !important;
  }

  .landing-pricing .js-buy-plan {
    width: 100%;
    min-height: 52px;
    font-size: 1.05rem;
  }

  .landing-pricing .js-cycle-btn {
    min-width: 115px;
  }

  .landing-faq .faq-image {
    max-width: 13rem !important;
  }

  /* Checkout mobile */
  .gv-checkout {
    padding-top: 1rem !important;
    padding-bottom: 2rem !important;
  }

  .gv-checkout .gv-checkout-header {
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: stretch !important;
  }

  .gv-checkout .gv-checkout-header .btn {
    width: 100%;
  }

  .gv-checkout .card-body {
    padding: 1rem !important;
  }

  .gv-checkout .display-5 {
    font-size: 2.25rem !important;
  }

  .gv-checkout #pixQr {
    max-width: min(240px, 78vw) !important;
  }

  .gv-checkout .input-group {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .gv-checkout .input-group textarea {
    border-radius: 12px 0 0 12px !important;
  }

  .gv-checkout .input-group .btn {
    border-radius: 0 12px 12px 0 !important;
    min-width: 52px;
  }

  /* Modal mobile */
  .modal-dialog,
  .gestor-edit-modal .modal-dialog {
    width: calc(100vw - .5rem) !important;
    max-width: calc(100vw - .5rem) !important;
    margin: .25rem auto !important;
  }

  .modal-header {
    padding: 1rem;
  }

  .modal-footer {
    padding: .75rem 1rem 1rem;
  }

  .modal-footer .btn {
    min-height: 48px;
  }

  .modal-body::-webkit-scrollbar {
    width: 7px;
  }
}

/* Celulares muito pequenos */
@media (max-width: 420px) {
  .content-wrapper .container-xxl,
  .content-wrapper .container-fluid {
    padding-left: .65rem !important;
    padding-right: .65rem !important;
  }

  .gestor-stat-grid {
    grid-template-columns: 1fr !important;
  }

  .landing-navbar .app-brand-text {
    max-width: 125px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .landing-hero .hero-title {
    font-size: 1.95rem !important;
  }

  .landing-pricing .js-cycle-btn {
    min-width: 0;
    flex: 1 1 0;
  }

  .client-actions,
  .server-actions {
    grid-template-columns: repeat(2, minmax(44px, 1fr));
  }
}

/* v2.0.16 - formulários e modais mais confortáveis em celular */
.gestor-simple-integration-note,
.gestor-integration-status {
  overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
  .gestor-edit-modal .modal-content,
  #addClientModal .modal-content,
  #addServidor .modal-content {
    max-height: calc(100dvh - .5rem) !important;
  }

  .gestor-edit-modal .modal-body,
  #addClientModal .modal-body,
  #addServidor .modal-body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 1rem !important;
  }

  .gestor-sticky-modal-footer,
  .gestor-edit-modal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: var(--bs-body-bg, #fff);
    padding-bottom: max(.85rem, env(safe-area-inset-bottom)) !important;
  }

  .gestor-sticky-modal-footer .btn,
  .gestor-edit-modal .modal-footer .btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .gestor-api-panel summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    line-height: 1.35;
  }
}
