/**
 * GradualPlus — profile pages (student, parent, employee)
 */

body.gp-app .gp-profile-page {
  --gp-profile-accent: var(--gp-accent, #22d3ee);
  --gp-profile-accent-soft: var(--gp-accent-soft, rgba(34, 211, 238, 0.12));
  --gp-profile-accent-border: rgba(34, 211, 238, 0.28);
}

body.gp-app .gp-profile-page .gp-profile-hero--parent {
  --gp-profile-accent: #a78bfa;
  --gp-profile-accent-soft: rgba(167, 139, 250, 0.14);
  --gp-profile-accent-border: rgba(167, 139, 250, 0.32);
}

body.gp-app .gp-profile-page .gp-profile-hero--employee {
  --gp-profile-accent: #60a5fa;
  --gp-profile-accent-soft: rgba(96, 165, 250, 0.14);
  --gp-profile-accent-border: rgba(96, 165, 250, 0.32);
}

body.gp-app .gp-profile-page > .row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

body.gp-app .gp-profile-page > .row > [class*="col-"] {
  padding: 0;
  float: none;
  width: 100%;
  max-width: 100%;
}

/* ── Hero ── */
body.gp-app .gp-profile-hero {
  position: relative;
  border: 1px solid var(--gp-border-subtle);
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, var(--gp-profile-accent-soft), transparent 55%),
    var(--gp-panel-bg, rgba(15, 23, 42, 0.72));
  box-shadow: var(--gp-shadow-subtle);
}

body.gp-app .gp-profile-hero__glow {
  pointer-events: none;
  position: absolute;
  inset: -30% auto auto -10%;
  width: 55%;
  height: 140%;
  background: radial-gradient(circle, var(--gp-profile-accent-soft), transparent 68%);
  opacity: 0.9;
}

body.gp-app .gp-profile-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 28px;
  padding: 24px;
}

body.gp-app .gp-profile-hero__avatar-wrap {
  position: relative;
  flex: 0 0 auto;
}

body.gp-app .gp-profile-hero__avatar,
body.gp-app .gp-profile-avatar.gp-profile-hero__avatar {
  width: 112px;
  height: 112px;
  border-radius: 22px;
  object-fit: cover;
  border: 3px solid var(--gp-profile-accent-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  background: var(--gp-bg-soft);
}

body.gp-app .gp-profile-hero__social {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

body.gp-app .gp-profile-hero__social a {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--gp-border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gp-text-muted);
  font-size: 13px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

body.gp-app .gp-profile-hero__social a:hover {
  color: var(--gp-profile-accent);
  border-color: var(--gp-profile-accent-border);
  background: var(--gp-profile-accent-soft);
}

body.gp-app .gp-profile-hero__status {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--gp-profile-accent-soft);
  border: 1px solid var(--gp-profile-accent-border);
  color: var(--gp-text-main);
}

body.gp-app .gp-profile-hero__status--inactive {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

body.gp-app .gp-profile-hero__content {
  flex: 1;
  min-width: 240px;
}

body.gp-app .gp-profile-hero__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gp-profile-accent);
}

body.gp-app .gp-profile-hero__name {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gp-text-main);
}

body.gp-app .gp-profile-hero__subtitle {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--gp-text-muted);
  line-height: 1.45;
}

body.gp-app .gp-profile-hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

body.gp-app .gp-profile-hero__chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--gp-border-subtle);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

body.gp-app .gp-profile-hero__chip-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--gp-profile-accent-soft);
  color: var(--gp-profile-accent);
  font-size: 13px;
}

body.gp-app .gp-profile-hero__chip-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.gp-app .gp-profile-hero__chip-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gp-text-soft);
}

body.gp-app .gp-profile-hero__chip-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--gp-text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Deactivated alert ── */
body.gp-app .gp-profile-page .gp-profile-alert {
  border-radius: 16px !important;
  border: 1px solid rgba(239, 68, 68, 0.28) !important;
  background: rgba(239, 68, 68, 0.06) !important;
  overflow: hidden;
}

body.gp-app .gp-profile-page .gp-profile-alert .panel-body {
  padding: 20px 22px !important;
}

body.gp-app .gp-profile-page .gp-profile-alert .chart-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #f87171 !important;
  margin: 0 0 16px !important;
}

body.gp-app .gp-profile-page .gp-profile-alert h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gp-text-muted);
  margin: 20px 0 12px;
}

body.gp-app .gp-profile-page .stu-disabled {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

body.gp-app .gp-profile-page .stu-disabled .main-r {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--gp-border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

body.gp-app .gp-profile-page .stu-disabled .r-1 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gp-text-soft);
}

/* ── Sidebar layout ── */
body.gp-app .gp-profile-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body.gp-app .gp-profile-nav {
  position: sticky;
  top: calc(var(--gp-topbar-height, 60px) + 16px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--gp-border-subtle);
  border-radius: 16px;
  background: var(--gp-panel-bg, rgba(15, 23, 42, 0.55));
}

body.gp-app .gp-profile-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--gp-text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

body.gp-app .gp-profile-nav__item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--gp-border-subtle);
  color: var(--gp-text-main);
}

body.gp-app .gp-profile-nav__item.is-active {
  background: var(--gp-profile-accent-soft);
  border-color: var(--gp-profile-accent-border);
  color: var(--gp-text-main);
}

body.gp-app .gp-profile-nav__icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--gp-profile-accent);
  flex-shrink: 0;
  font-size: 13px;
}

body.gp-app .gp-profile-nav__item.is-active .gp-profile-nav__icon {
  background: rgba(255, 255, 255, 0.08);
}

body.gp-app .gp-profile-nav__label {
  line-height: 1.3;
}

body.gp-app .gp-profile-panels {
  min-width: 0;
}

body.gp-app .gp-profile-panel {
  display: none;
  border: 1px solid var(--gp-border-subtle);
  border-radius: 16px;
  overflow: hidden;
  background: var(--gp-panel-bg, rgba(15, 23, 42, 0.55));
}

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

body.gp-app .gp-profile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gp-border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

body.gp-app .gp-profile-panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--gp-text-main);
}

body.gp-app .gp-profile-panel__title i {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--gp-profile-accent-soft);
  color: var(--gp-profile-accent);
  font-size: 13px;
}

body.gp-app .gp-profile-panel__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

body.gp-app .gp-profile-panel__actions .btn,
body.gp-app .gp-profile-panel__actions a.btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  border: 1px solid var(--gp-border-subtle) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--gp-text-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  height: auto !important;
  min-width: 0 !important;
  white-space: nowrap;
}

body.gp-app .gp-profile-panel__actions .btn:hover:not(:disabled),
body.gp-app .gp-profile-panel__actions a.btn:hover {
  color: var(--gp-profile-accent) !important;
  border-color: var(--gp-profile-accent-border) !important;
  background: var(--gp-profile-accent-soft) !important;
}

body.gp-app .gp-profile-panel__body {
  padding: 0;
}

body.gp-app .gp-profile-panel__body > .panel-body,
body.gp-app .gp-profile-panel__body .panel-body {
  padding: 22px !important;
  border: 0 !important;
  background: transparent !important;
}

body.gp-app .gp-profile-panel__body .panel-footer {
  padding: 14px 22px !important;
  border-top: 1px solid var(--gp-border-subtle) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

body.gp-app .gp-profile-panel__body .panel-footer .btn[type="submit"],
body.gp-app .gp-profile-panel__body .panel-footer button[name="update"] {
  min-width: 140px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6) !important;
  border: 0 !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
}

body.gp-app .gp-profile-panel__body .panel-footer .btn[type="submit"]:hover,
body.gp-app .gp-profile-panel__body .panel-footer button[name="update"]:hover {
  filter: brightness(1.06);
}

/* ── Profile avatars (photo + modern placeholder) ── */
body.gp-app .gp-profile-avatar {
  display: block;
  object-fit: cover;
  border-radius: 16px;
  flex-shrink: 0;
}

body.gp-app .gp-profile-avatar--hero {
  width: 112px;
  height: 112px;
  border-radius: 22px;
  border: 3px solid var(--gp-profile-accent-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

body.gp-app .gp-profile-avatar--lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

body.gp-app .gp-profile-avatar--md {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

body.gp-app .gp-profile-avatar--sm {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

body.gp-app .gp-profile-avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gp-profile-accent-border);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 55%),
    var(--gp-profile-accent-soft);
  color: var(--gp-profile-accent);
}

body.gp-app .gp-profile-avatar--hero.gp-profile-avatar--placeholder {
  font-size: 2rem;
}

body.gp-app .gp-profile-avatar--lg.gp-profile-avatar--placeholder {
  font-size: 1.45rem;
}

body.gp-app .gp-profile-avatar--md.gp-profile-avatar--placeholder {
  font-size: 1.2rem;
}

body.gp-app .gp-profile-avatar--sm.gp-profile-avatar--placeholder {
  font-size: 1rem;
}

body.gp-app img.gp-profile-avatar--hero {
  background: var(--gp-bg-soft);
}

body.gp-app img.gp-profile-avatar--lg,
body.gp-app img.gp-child-card__avatar-img {
  border: 2px solid var(--gp-profile-accent-border);
  background: var(--gp-bg-soft);
}

body.gp-app img.gp-table-avatar {
  border: 1px solid var(--gp-border-subtle);
}

body.gp-app td.center .gp-profile-avatar,
body.gp-app td.center .gp-table-avatar {
  margin: 0 auto;
}

body.gp-app .quick_image {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

body.gp-app .quick_image .gp-profile-avatar--hero {
  width: 120px;
  height: 120px;
}

body.gp-app .gp-profile-avatar--round {
  border-radius: 999px !important;
}

body.gp-app .gp-userbox__avatar.gp-profile-avatar--sm {
  width: 32px;
  height: 32px;
}

body.gp-app .gp-userbox__header .gp-profile-avatar {
  flex-shrink: 0;
}

body.gp-app .gp-birthday-item__avatar.gp-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

body.gp-app .gp-birthday-item__avatar.gp-profile-avatar--placeholder {
  font-size: 1rem;
}

body.gp-app img.gp-birthday-item__avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}

/* Dropify upload — center profile placeholder and preview image */
body.gp-app .dropify-wrapper .dropify-preview .dropify-render {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

body.gp-app .dropify-wrapper .dropify-preview .dropify-render img {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  margin: 0;
}

body.gp-app .dropify-wrapper .dropify-preview .dropify-render .gp-profile-avatar--placeholder {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  margin: 0;
}

body.gp-app .dropify-wrapper .dropify-preview .dropify-render .gp-profile-avatar--placeholder.gp-dropify-avatar {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  font-size: 2rem;
}

/* ── Parent children cards ── */
body.gp-app .gp-child-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

body.gp-app .gp-child-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--gp-border-subtle);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body.gp-app .gp-child-card:hover {
  border-color: var(--gp-profile-accent-border);
  background: var(--gp-profile-accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

body.gp-app .gp-child-card__avatar {
  flex: 0 0 auto;
}

body.gp-app .gp-child-card__body {
  min-width: 0;
  flex: 1;
}

body.gp-app .gp-child-card__name {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--gp-text-main);
}

body.gp-app .gp-child-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--gp-text-muted);
  line-height: 1.4;
}

body.gp-app .gp-child-card__meta i {
  color: var(--gp-profile-accent);
  font-size: 12px;
}

body.gp-app .gp-child-card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gp-profile-accent);
}

body.gp-app .gp-child-card__action i {
  font-size: 11px;
  transition: transform 0.15s ease;
}

body.gp-app .gp-child-card:hover .gp-child-card__action i {
  transform: translate(1px, -1px);
}

body.gp-app .gp-child-cards__empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  border: 1px dashed var(--gp-border-subtle);
  border-radius: 16px;
  color: var(--gp-text-muted);
  text-align: center;
}

body.gp-app .gp-child-cards__empty i {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--gp-profile-accent-soft);
  color: var(--gp-profile-accent);
  font-size: 20px;
}

body.gp-app .gp-child-cards__empty p {
  margin: 0;
  font-size: 14px;
}

html.gp-theme-light body.gp-app .gp-child-card {
  background: #f8fafc;
}

html.gp-theme-light body.gp-app .gp-child-card:hover {
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* Parent — children cards (legacy widget-summary fallback) */
body.gp-app .gp-profile-page .gp-profile-panels .widget-summary {
  display: flex;
  gap: 14px;
  align-items: center;
}

body.gp-app .gp-profile-page .gp-profile-panels .widget-summary-col-icon .summary-icon img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid var(--gp-profile-accent-border);
}

body.gp-app .gp-profile-page .gp-profile-panels .widget-summary .title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gp-text-main);
}

body.gp-app .gp-profile-page .gp-profile-panels .widget-summary .info {
  font-size: 13px;
  color: var(--gp-text-muted);
}

body.gp-app .gp-profile-page .gp-profile-panels .widget-summary .summary-footer a {
  display: inline-flex;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gp-profile-accent) !important;
}

body.gp-app .gp-profile-page .gp-profile-panels section.panel.mt-sm.mb-sm {
  border: 1px solid var(--gp-border-subtle) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.02) !important;
  transition: border-color 0.15s, transform 0.15s;
}

body.gp-app .gp-profile-page .gp-profile-panels section.panel.mt-sm.mb-sm:hover {
  border-color: var(--gp-profile-accent-border) !important;
  transform: translateY(-1px);
}

/* Hide legacy profile hero when gp hero is present */
body.gp-app .gp-profile-page .profile-head {
  display: none !important;
}

/* Light theme */
html.gp-theme-light body.gp-app .gp-profile-hero {
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, var(--gp-profile-accent-soft), transparent 55%),
    #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

html.gp-theme-light body.gp-app .gp-profile-nav,
html.gp-theme-light body.gp-app .gp-profile-panel {
  background: #ffffff;
}

html.gp-theme-light body.gp-app .gp-profile-hero__chip {
  background: #f8fafc;
}

@media (max-width: 991px) {
  body.gp-app .gp-profile-layout {
    grid-template-columns: 1fr;
  }

  body.gp-app .gp-profile-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: thin;
  }

  body.gp-app .gp-profile-nav__item {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  body.gp-app .gp-profile-nav__label {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 767px) {
  body.gp-app .gp-profile-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }

  body.gp-app .gp-profile-hero__meta {
    grid-template-columns: 1fr;
    width: 100%;
  }

  body.gp-app .gp-profile-panel__head {
    padding: 14px 16px;
  }

  body.gp-app .gp-profile-panel__actions {
    width: 100%;
  }

  body.gp-app .gp-profile-page .stu-disabled .main-r {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Staff digital signature studio */
body.gp-app .gp-signature-studio__intro {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--gp-text-muted);
}

body.gp-app .gp-signature-studio__grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

body.gp-app .gp-signature-studio__card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 16px;
  border: 1px solid var(--gp-border-subtle);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

body.gp-app .gp-signature-studio__label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gp-text-muted);
}

body.gp-app .gp-signature-studio__preview-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  padding: 18px 14px;
  border: 1px dashed var(--gp-border-subtle);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.92) 100%);
}

body.gp-app .gp-signature-studio__preview-box img {
  max-width: 100%;
  max-height: 88px;
  object-fit: contain;
}

body.gp-app .gp-signature-studio__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
}

body.gp-app .gp-signature-studio__empty i {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  color: #94a3b8;
  font-size: 16px;
}

body.gp-app .gp-signature-studio__meta {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--gp-text-muted);
}

body.gp-app .gp-signature-studio__meta i {
  color: var(--gp-profile-accent);
  margin-right: 4px;
}

body.gp-app .gp-signature-studio__remove {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

body.gp-app .gp-signature-studio__remove:hover {
  color: #ef4444;
  text-decoration: underline;
}

body.gp-app .gp-signature-studio__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  border: 0;
}

body.gp-app .gp-signature-studio__tabs > li {
  float: none;
  margin: 0;
}

body.gp-app .gp-signature-studio__tabs > li > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--gp-border-subtle) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--gp-text-muted) !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

body.gp-app .gp-signature-studio__tabs > li > a:hover {
  color: var(--gp-text-main) !important;
  border-color: var(--gp-border-subtle) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

body.gp-app .gp-signature-studio__tabs > li.active > a,
body.gp-app .gp-signature-studio__tabs > li.active > a:hover,
body.gp-app .gp-signature-studio__tabs > li.active > a:focus {
  color: var(--gp-text-main) !important;
  border-color: var(--gp-profile-accent-border) !important;
  background: var(--gp-profile-accent-soft) !important;
}

body.gp-app .gp-signature-studio__tabs > li > a i {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--gp-profile-accent);
  font-size: 11px;
}

body.gp-app .gp-signature-studio__hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--gp-text-muted);
}

body.gp-app .gp-signature-studio__pad {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.gp-app .gp-signature-studio__pad::after {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 28px;
  height: 1px;
  background: rgba(148, 163, 184, 0.45);
  pointer-events: none;
}

body.gp-app .gp-signature-studio__pad canvas {
  display: block;
  width: 100%;
  height: 168px;
  touch-action: none;
  cursor: crosshair;
}

body.gp-app .gp-signature-studio__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

body.gp-app .gp-signature-studio__actions .btn-ghost {
  padding: 8px 14px;
  border: 1px solid var(--gp-border-subtle);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--gp-text-muted);
  font-size: 12px;
  font-weight: 600;
}

body.gp-app .gp-signature-studio__actions .btn-ghost:hover {
  color: var(--gp-text-main);
  border-color: var(--gp-profile-accent-border);
  background: var(--gp-profile-accent-soft);
}

body.gp-app .gp-signature-studio__actions .btn-save {
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

body.gp-app .gp-signature-studio__actions .btn-save:hover {
  filter: brightness(1.06);
}

body.gp-app .gp-signature-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 148px;
  padding: 20px 16px;
  border: 1px dashed var(--gp-border-subtle);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

body.gp-app .gp-signature-upload:hover {
  border-color: var(--gp-profile-accent-border);
  background: var(--gp-profile-accent-soft);
}

body.gp-app .gp-signature-upload input[type="file"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

body.gp-app .gp-signature-upload__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--gp-profile-accent-soft);
  color: var(--gp-profile-accent);
  font-size: 18px;
}

body.gp-app .gp-signature-upload__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--gp-text-main);
}

body.gp-app .gp-signature-upload__sub {
  margin: 0;
  font-size: 11px;
  color: var(--gp-text-muted);
}

body.gp-app .gp-signature-upload__name {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--gp-profile-accent);
  word-break: break-all;
}

html.gp-theme-light body.gp-app .gp-signature-studio__card {
  background: #f8fafc;
}

html.gp-theme-light body.gp-app .gp-signature-studio__tabs > li > a {
  background: #ffffff !important;
}

@media (max-width: 991px) {
  body.gp-app .gp-signature-studio__grid {
    grid-template-columns: 1fr;
  }
}

/* Public CMS avatars */
body.gp-public-body .gp-profile-avatar {
  display: block;
  object-fit: cover;
  border-radius: 16px;
}

body.gp-public-body .gp-profile-avatar--lg {
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
}

body.gp-public-body .gp-profile-avatar--hero {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  margin-top: 20px;
}

body.gp-public-body .gp-profile-avatar--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.04));
  color: #3b82f6;
}

body.gp-public-body .gp-profile-avatar--lg.gp-profile-avatar--placeholder {
  font-size: 2.5rem;
}

body.gp-public-body .gp-profile-avatar--hero.gp-profile-avatar--placeholder {
  font-size: 2rem;
}
