/* GSMVanta customer workspace — fluid geometry and container behavior. */

html[data-app-area="client"] body.app-client .app-main,
html[data-app-area="client"] body.app-client .app-content,
html[data-app-area="client"] body.app-client .app-content-inner,
html[data-app-area="client"] body.app-client .workspace-page,
html[data-app-area="client"] body.app-client .panel,
html[data-app-area="client"] body.app-client .table-wrap {
  min-width: 0;
}

html[data-app-area="client"] body.app-client .app-content-inner {
  container: client-workspace / inline-size;
}

html[data-app-area="client"] body.app-client .service-grid,
html[data-app-area="client"] body.app-client .catalog-card-grid,
html[data-app-area="client"] body.app-client .metric-grid {
  width: 100%;
  align-items: stretch;
}

html[data-app-area="client"] body.app-client :is(.panel,.card,.metric-card,.security-card,.catalog-service-card) {
  min-width: 0;
  max-width: 100%;
}

html[data-app-area="client"] body.app-client :is(.panel-head,.workspace-page-head,.page-actions) > * {
  min-width: 0;
}

html[data-app-area="client"] body.app-client :is(
  .table-wrap,
  .gv-data-table-wrap,
  .orders-table-wrap,
  .wallet-transaction-table-wrap,
  .topup-table-wrap,
  .client-support-table-wrap
) {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

html[data-app-area="client"] body.app-client :is(.table,.gv-unified-table) {
  width: max-content;
  min-width: 100%;
}






@container client-workspace (max-width: 980px) {
  html[data-app-area="client"] body.app-client .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container client-workspace (max-width: 640px) {
  html[data-app-area="client"] body.app-client .metric-grid,
html[data-app-area="client"] body.app-client .catalog-card-grid,
html[data-app-area="client"] body.app-client .service-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
html[data-app-area="client"] body.app-client .app-topbar-actions {
    gap: 4px;
  }

  html[data-app-area="client"] body.app-client :is(
    .app-menu-button,
    .app-language-button,
    .app-profile-button
  ) {
    min-width: 38px;
    height: 38px;
  }
}

@container client-workspace (max-width: 680px) {
  html[data-app-area="client"] body.app-client .workspace-page-head {
    align-items: stretch;
  }

  html[data-app-area="client"] body.app-client .workspace-page-head > * {
    width: 100%;
  }

  html[data-app-area="client"] body.app-client .page-actions,
  html[data-app-area="client"] body.app-client .client-profile-actions,
  html[data-app-area="client"] body.app-client .security-form-actions {
    align-items: stretch;
  }

  html[data-app-area="client"] body.app-client .page-actions :is(.button,.btn),
  html[data-app-area="client"] body.app-client .client-profile-actions .button,
  html[data-app-area="client"] body.app-client .security-form-actions .button {
    flex: 1 1 150px;
  }
}

/* customer header popovers, Security sign-in controls and mobile order history. */


html[data-app-area="client"] body.app-client .security-customer-signin-grid {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
  gap: 16px;
  min-width: 0;
}
html[data-app-area="client"] body.app-client .security-customer-signin-grid > .security-card {
  min-width: 0;
}
html[data-app-area="client"] body.app-client .security-customer-login-body,
html[data-app-area="client"] body.app-client .security-customer-password-form {
  display: grid;
  gap: 16px;
  min-width: 0;
}
html[data-app-area="client"] body.app-client .security-customer-google-row {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}
html[data-app-area="client"] body.app-client .security-customer-google-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
html[data-app-area="client"] body.app-client .security-customer-google-row :is(b,small) {
  min-width: 0;
  overflow-wrap: anywhere;
}
html[data-app-area="client"] body.app-client .security-customer-login-empty {
  min-height: 110px;
  padding: 16px;
  border: 1px dashed var(--theme-border, var(--ui-border));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
html[data-app-area="client"] body.app-client .security-customer-google-action {
  display: grid;
  gap: 12px;
}
html[data-app-area="client"] body.app-client .security-customer-password-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  min-width: 0;
}
html[data-app-area="client"] body.app-client .security-customer-password-grid .field {
  min-width: 0;
}
html[data-app-area="client"] body.app-client .security-customer-password-grid .security-password-control {
  min-width: 0;
}
html[data-app-area="client"] body.app-client .security-customer-password-grid input.input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  height: 54px;
}
html[dir="rtl"][data-app-area="client"] body.app-client .security-customer-password-grid input.input {
  padding-inline: 48px 16px;
}
html[data-app-area="client"] body.app-client .security-customer-password-grid .security-password-toggle-v2 {
  width: 38px;
  height: 38px;
  inset-inline-end: 8px;
}


@container client-workspace (max-width: 680px) {
  html[data-app-area="client"] body.app-client .security-customer-password-grid {
    grid-template-columns: 1fr;
  }

  html[data-app-area="client"] body.app-client .security-customer-login-empty {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
  }

  html[data-app-area="client"] body.app-client .security-customer-login-empty .button,
  html[data-app-area="client"] body.app-client .security-customer-google-action .button {
    width: 100%;
  }
}



/* visible customer password fields and borderless brand/catalog imagery. */
html[data-app-area="client"] body.app-client .security-customer-password-grid input.input,
html[data-app-area="client"] body.app-client .security-customer-google-action input.input {
  padding-inline: 16px;
  font-size: 16px;
  font-weight: 500;
}

/* The collapsible customer rail shows the actual logo, not a framed tile. */
html[data-app-area="client"] body.app-client .app-sidebar .app-brand-mark > img {
  overflow: hidden;
}

/* Service/group artwork is the image itself: no extra square frame around it. */

/* Desktop customer sidebar hide/show motion. The sidebar is either fully visible or fully hidden;
   there is intentionally no icon-only rail state. */
@media (min-width: 901px) {
  html[data-app-area="client"] body.app-client .app-sidebar {
    transition: opacity 180ms ease, transform 220ms cubic-bezier(.22,.8,.24,1),
                border-color 180ms ease, background-color 180ms ease;
  }
  html[data-app-area="client"] body.app-client .app-main {
    transition: margin 220ms cubic-bezier(.22,.8,.24,1), width 220ms cubic-bezier(.22,.8,.24,1);
  }
  html[data-app-area="client"] body.app-client .app-topbar {
    transition: background-color 180ms ease, border-color 180ms ease;
  }
}

/* Transparent customer logos keep a clean edge on the sidebar surface. */
html[data-app-area="client"] body.app-client .app-sidebar .app-brand-mark {
  border: 0 !important;
  background: transparent !important;
  box-shadow:none;
  overflow: hidden;
  border-radius: 8px;
}
html[data-app-area="client"] body.app-client .app-sidebar .app-brand-mark > img {
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0 !important;
  border-radius: 8px;
  background: transparent !important;
  box-shadow:none;
  object-fit: contain;
}
html[data-app-area="client"] body.app-client .app-sidebar .app-brand-mark > .app-brand-fallback {
  border: 0;
  border-radius: 8px;
  background: var(--theme-accent);
  color: var(--theme-accent-text);
}
html[data-app-area="client"] body.app-client .app-sidebar .app-brand-mark > .app-brand-fallback[hidden] {
  display: none !important;
}

/* Make the two-word Google action read like a proper CTA instead of a tight pill. */
html[data-app-area="client"] body.app-client .security-customer-login-empty > .button.primary {
  min-width: 132px;
  min-height: 44px;
  padding-inline: 20px;
  justify-content: center;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--gv-radius-button);
}

@container client-workspace (max-width: 680px) {
  html[data-app-area="client"] body.app-client .security-customer-login-empty > .button.primary {
    min-width: 0;
    width: 100%;
    min-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-app-area="client"] body.app-client .app-sidebar,
  html[data-app-area="client"] body.app-client .app-main,
  html[data-app-area="client"] body.app-client .app-topbar,
  html[data-app-area="client"] body.app-client .app-sidebar :is(.app-brand-copy,.app-nav-label,.app-nav-group-title) {
    transition-duration: .01ms !important;
  }
}
