/* Gnome — modern client area dashboard & inner pages */

:root {
  --gn-pink: #ee5586;
  --gn-pink-dark: #a5215e;
  --gn-yellow: #ffc107;
  --gn-navy: #111827;
  --gn-navy-soft: #1a2332;
  --gn-border: #e8edf3;
  --gn-bg: #f7f9fc;
  --gn-radius: 14px;
  --gn-shadow: 0 8px 32px rgba(17, 24, 39, 0.08);
}

.gn-ca-dashboard {
  background: var(--gn-bg);
  padding-bottom: 32px;
}

/* Welcome banner */
.gn-ca-welcome {
  background: linear-gradient(120deg, #ee5586 0%, #c44569 40%, #303a9a 100%);
  color: #fff;
  padding: 28px 0;
  margin-bottom: 28px;
}

.gn-ca-welcome-inner {
  width: min(1140px, 100% - 32px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.gn-ca-user {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.gn-ca-avatar {
  position: relative;
  flex-shrink: 0;
}

.gn-ca-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  object-fit: cover;
}

.gn-ca-avatar a {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
  text-decoration: none;
}

.gn-ca-avatar:hover a {
  opacity: 1;
}

.gn-ca-greeting {
  margin: 0 0 4px;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 800;
  color: #fff;
}

.gn-ca-meta {
  margin: 0;
  font-size: 14px;
  opacity: 0.88;
}

.gn-ca-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gn-ca-quick-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.gn-ca-quick-actions a:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
  color: #fff;
}

/* Stat cards */
.gn-ca-stats {
  width: min(1140px, 100% - 32px);
  margin: 0 auto 32px;
}

.gn-ca-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gn-ca-stat-card {
  background: #fff;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  padding: 24px 20px;
  box-shadow: var(--gn-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gn-ca-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
}

.gn-ca-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(238, 85, 134, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.gn-ca-stat-icon .svg {
  width: 28px;
  height: 28px;
}

.gn-ca-stat-badge {
  display: inline-block;
  padding: 3px 10px;
  margin-bottom: 10px;
  background: var(--gn-pink);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: flex-start;
}

.gn-ca-stat-card h3 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gn-navy);
}

.gn-ca-stat-card p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  flex: 1;
}

.gn-ca-stat-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* Account overview panels */
.gn-ca-panels {
  width: min(1140px, 100% - 32px);
  margin: 0 auto;
  padding-bottom: 40px;
}

.gn-ca-panels-head {
  text-align: center;
  margin-bottom: 28px;
}

.gn-ca-panels-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--gn-navy);
}

.gn-ca-panels-head p {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
}

.gn-ca-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.gn-ca-panel {
  background: #fff;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  padding: 24px;
  box-shadow: var(--gn-shadow);
}

.gn-ca-panel h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gn-navy);
}

.gn-ca-panel .list-group {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gn-border);
}

.gn-ca-panel .list-group-item {
  border-color: var(--gn-border) !important;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--gn-navy);
  transition: background 0.15s;
}

.gn-ca-panel .list-group-item:hover {
  background: rgba(238, 85, 134, 0.06) !important;
  color: var(--gn-pink);
}

.gn-ca-panel .list-group-item.active {
  background: rgba(238, 85, 134, 0.1) !important;
  color: var(--gn-pink);
  font-weight: 600;
}

.gn-ca-panel .btn {
  margin-top: 16px;
}

/* Inner client area pages — tables, panels */
#main-body .table-list,
#main-body .table-container .table {
  border-radius: var(--gn-radius);
  overflow: hidden;
  border: 1px solid var(--gn-border);
  box-shadow: var(--gn-shadow);
}

#main-body .table-list thead th {
  background: var(--gn-pink);
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 12px 14px;
}

#main-body .table-list tbody tr {
  transition: background 0.15s;
}

#main-body .table-list tbody tr:hover {
  background: rgba(238, 85, 134, 0.04);
}

#main-body .panel-sidebar,
#main-body .panel-default {
  border-radius: var(--gn-radius);
  border: 1px solid var(--gn-border);
  box-shadow: var(--gn-shadow);
  overflow: hidden;
}

#main-body .panel-sidebar > .panel-heading {
  background: var(--gn-navy-soft);
  color: #fff;
  font-weight: 700;
}

#main-body .label.status-active {
  background: #059669;
}

#main-body .label.status-pending,
#main-body .label.status-suspended {
  background: #d97706;
}

#main-body .label.status-terminated,
#main-body .label.status-cancelled {
  background: #6b7280;
}

/* Hide legacy client area header when gn dashboard is used */
.gn-ca-dashboard ~ .container-clientarea,
.gn-ca-dashboard + .container-clientarea {
  display: none;
}

/* Legacy overview sections — soften if still present */
.services.overview-services.bg-yellow.clientarea-limited-chracters {
  background: var(--gn-bg) !important;
  padding: 48px 0 !important;
}

@media (max-width: 991px) {
  .gn-ca-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gn-ca-panels-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .gn-ca-stats-grid {
    grid-template-columns: 1fr;
  }

  .gn-ca-welcome-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Client area layout (match screenshot) ── */
.gh-client-page-shell {
  display: grid;
  grid-template-columns: minmax(220px, 25%) minmax(0, 1fr);
  column-gap: 28px;
  align-items: start;
}

body.gnome-client-logged-in .gh-client-page-shell .gh-client-page-title-row,
body.gnome-client-logged-in .gh-client-page-shell .gh-client-layout-row {
  display: contents;
}

body.gnome-client-logged-in .gh-client-page-shell .gh-client-page-title-row > .col-md-12 {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

body.gnome-client-logged-in .gh-client-page-shell .gh-client-sidebar-col {
  grid-column: 1;
  grid-row: 2;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  margin-top: 0;
  padding-top: 0;
  padding-left: 15px;
  padding-right: 15px;
}

body.gnome-client-logged-in .gh-client-page-shell .gh-client-main-col {
  grid-column: 2;
  grid-row: 2;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  padding-left: 15px;
  padding-right: 15px;
}

.gh-client-page-title-row {
  margin-bottom: 0;
}

.gh-client-sidebar-col,
.gh-client-main-col {
  padding-top: 0;
  padding-bottom: 28px;
}

/* Page title — above main column only */
.gh-pageheader {
  position: relative;
  margin-bottom: 12px;
  padding-bottom: 0;
}

.gh-pageheader-inner {
  text-align: left;
}

.gh-pageheader-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  color: var(--gn-navy);
  line-height: 1.2;
}

.gh-pageheader-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: #6b7280;
}

/* DataTables toolbar — info left, search right */
body.gnome-client-logged-in .gh-client-main-col .dataTables_wrapper {
  padding-top: 0 !important;
}

body.gnome-client-logged-in .gh-client-main-col .dataTables_wrapper .listtable {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 10px;
}

body.gnome-client-logged-in .gh-client-main-col .dataTables_filter {
  order: 2;
  margin: 0 0 0 auto;
  float: none !important;
  text-align: right;
}

body.gnome-client-logged-in .gh-client-main-col div.dataTables_wrapper div.dataTables_info {
  order: 1;
  margin: 0;
  padding: 0;
  float: none !important;
  font-size: 13px;
  color: #6b7280;
}

body.gnome-client-logged-in .gh-client-main-col .dataTables_wrapper .table-responsive {
  order: 3;
  flex: 0 0 100%;
  width: 100%;
}

body.gnome-client-logged-in .gh-client-main-col .dataTables_filter .form-control {
  min-width: 220px;
  border-radius: 999px;
  border: 1px solid var(--gn-border);
  padding: 8px 16px 8px 38px;
  height: auto;
}

body.gnome-client-logged-in section#main-body {
  padding-top: 12px;
  padding-bottom: 24px;
}

/* Products table — pink header like screenshot */
body.gnome-client-logged-in #main-body .table-list thead th,
body.gnome-client-logged-in .gh-client-main-col .table-list thead th {
  background: var(--gn-pink) !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 13px;
  border: none;
  padding: 12px 14px;
  vertical-align: middle;
}

body.gnome-client-logged-in #main-body .table-list tbody td {
  padding: 12px 14px;
  font-size: 13px;
  vertical-align: middle;
  border-top: 1px solid var(--gn-border);
}

body.gnome-client-logged-in #main-body .table-list tbody tr:nth-child(even) {
  background: #f9fafb;
}

body.gnome-client-logged-in #main-body .table-list tbody tr:hover {
  background: rgba(238, 85, 134, 0.05);
}

body.gnome-client-logged-in #main-body .table-list tbody td a {
  color: #dc2626;
  font-size: 12px;
}

body.gnome-client-logged-in #main-body .label.status-active {
  background: #059669;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}

body.gnome-client-logged-in #main-body .label.status-suspended {
  background: #d97706;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
}

.gh-client-sidebar-col .gn-sidebar-panel {
  margin-bottom: 18px;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--gn-shadow);
}

.gh-client-sidebar-col .gn-sidebar-panel:last-child {
  margin-bottom: 0;
}

.gh-client-sidebar-col .panel-heading {
  background: linear-gradient(135deg, var(--gn-navy-soft) 0%, #243044 100%);
  border: none;
  padding: 14px 16px;
}

.gh-client-sidebar-col .panel-heading .panel-title,
.gh-client-sidebar-col .panel-heading .panel-title.mergecolor,
.gh-client-sidebar-col .panel-heading h3,
[data-background="light"] .box-container .gh-client-sidebar-col .panel-heading .mergecolor,
[data-background="light"] .box-container .gh-client-sidebar-col .panel-heading .panel-title,
[data-background="dark"] .box-container .gh-client-sidebar-col .panel-heading .mergecolor,
[data-background="dark"] .box-container .gh-client-sidebar-col .panel-heading .panel-title {
  margin: 0;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gh-client-sidebar-col .panel-heading .gn-sidebar-title,
.gh-client-sidebar-col .gn-sidebar-title {
  color: #ffffff !important;
}

.gh-client-sidebar-col .panel-heading .badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  margin-left: 6px;
}

.gh-client-sidebar-col .panel-body {
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.65;
  color: #374151;
  background: #fff;
}

.gh-client-sidebar-col .panel-body.mergecolor {
  color: #374151 !important;
}

.gh-client-sidebar-col .panel-body strong,
.gh-client-sidebar-col .panel-body b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--gn-navy);
  margin-bottom: 2px;
}

.gh-client-sidebar-col .panel-body em,
.gh-client-sidebar-col .panel-body i:not([class]) {
  color: var(--gn-pink);
  font-style: normal;
  font-weight: 600;
}

.gh-client-sidebar-col .panel-body br + br {
  display: none;
}

.gh-client-sidebar-col .panel-footer {
  background: #f9fafb;
  border-top: 1px solid var(--gn-border);
  padding: 14px 16px;
}

.gh-client-sidebar-col .panel-footer .btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.gh-client-sidebar-col .panel-footer .btn:hover {
  transform: translateY(-1px);
}

.gh-client-sidebar-col .panel-footer .btn-success {
  background: var(--gn-yellow) !important;
  color: var(--gn-navy) !important;
  box-shadow: 0 4px 14px rgba(255, 193, 7, 0.35);
}

.gh-client-sidebar-col .panel-footer .btn-default,
.gh-client-sidebar-col .panel-footer .btn-primary {
  background: var(--gn-navy-soft) !important;
  color: #fff !important;
}

.gh-client-sidebar-col .list-group {
  margin: 0;
}

.gh-client-sidebar-col .list-group-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-bottom: 1px solid var(--gn-border);
  font-weight: 600;
  font-size: 13px;
  padding: 12px 16px;
  color: var(--gn-navy);
  background: #fff;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
}

.gh-client-sidebar-col .list-group-item:last-child {
  border-bottom: none;
}

.gh-client-sidebar-col .list-group-item .sidebar-menu-item-icon,
.gh-client-sidebar-col .list-group-item > i {
  width: 18px;
  text-align: center;
  color: var(--gn-pink);
  opacity: 0.85;
  flex-shrink: 0;
}

.gh-client-sidebar-col .list-group-item:hover {
  background: rgba(238, 85, 134, 0.06);
  color: var(--gn-pink);
  padding-left: 20px;
}

.gh-client-sidebar-col .list-group-item.active,
.gh-client-sidebar-col .list-group-item.active:focus,
.gh-client-sidebar-col .list-group-item.active:hover {
  background: rgba(238, 85, 134, 0.1) !important;
  color: var(--gn-pink) !important;
  border-left: 3px solid var(--gn-pink);
  padding-left: 17px;
}

.gh-client-sidebar-col .list-group-item .badge {
  margin-left: auto;
  background: var(--gn-pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
}

.gh-client-sidebar-col .view-filter-btns .list-group-item {
  justify-content: space-between;
}

.gh-client-sidebar-col .view-filter-btns .list-group-item.active .badge {
  background: #fff;
  color: var(--gn-pink);
}

.gh-client-sidebar-col .list-group-item.disabled,
.gh-client-sidebar-col .list-group-item.disabled:hover {
  opacity: 0.45;
  pointer-events: none;
  padding-left: 16px;
}

.gh-client-sidebar-col .panel-body .text-muted,
.gh-client-sidebar-col .panel-body p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.gh-client-sidebar-col .panel-body .btn-block {
  margin-top: 12px;
}

@media (max-width: 991px) {
  body.gnome-client-logged-in .gh-client-page-shell {
    display: block;
  }

  body.gnome-client-logged-in .gh-client-page-shell .gh-client-page-title-row,
  body.gnome-client-logged-in .gh-client-page-shell .gh-client-layout-row {
    display: block;
  }

  .gh-client-sidebar-col {
    display: none !important;
  }

  .gh-client-page-title-row .dropnav-header-lined {
    display: block !important;
  }
}

@media (min-width: 992px) {
  .gh-client-page-title-row .dropnav-header-lined {
    display: none !important;
  }
}
