/****************
 * Base structure
 ****************/
:root {
  --primary: #ff8200;
  --primary-border: #ff8800;
  --primary-dark: #ff931f;
  --gf-surface: #ffffff;
  --gf-surface-alt: #f5f5f5;
  --gf-surface-hover: #e5e5e5;

  --gf-border: #e0e0e0;
  --gf-border-strong: #999999;

  --gf-text: #333333;
  --gf-text-muted: #6b7280;
  --gf-border-selected: #004085;
  --gf-border-updated: #28a745;
  --gf-border-private: #ffc107;

  --green: #2db123;
  --gray: #808080;
  --red: #dc3545;
  --light-red: #f5c6cb;
  --light-yellow: #ffeeba;
  --light-green: #eeffba;
  --light-orange: #fed3a8;
  --light-purple: #dfd7ff;
  --light-gray: #d9e0e3;
  --light-blue: #cce5ff;

  --gf-color-positive: #2db123;
  --gf-color-negative: #dc3545;

  --gf-success-bg: #d4edda;
  --gf-success-border: #c3e6cb;
  --gf-success-text: #155724;

  --gf-info: #007bff;
  --gf-info-hover: #0056b3;

  --chat-user-bg: #e8f0fe;
  --chat-user-border: #0d6efd;
  --chat-agent-bg: #f6f8fa;
  --chat-agent-border: #ff8200;
  --chat-cache-bg: #e6f4ea;
  --chat-cache-border: #28a745;
  --chat-tool-bg: #fff8e1;
  --chat-tool-border: #f5a623;
}

[data-theme="dark"] {
  --gf-surface: #1e1e20;
  --gf-surface-alt: #2a2a2d;
  --gf-surface-hover: #3a3a3d;
  --gf-border: #3a3a3d;
  --gf-border-strong: #55555a;
  --gf-text: #e4e4e7;
  --gf-text-muted: #9ca3af;
  --primary-border: #663300;

  --light-red: #4a1f24;
  --light-yellow: #4d3f12;
  --light-green: #33401c;
  --light-orange: #4a2f14;
  --light-purple: #2e2447;
  --light-gray: #3a3d40;
  --light-blue: #1c3049;

  --chat-user-bg: #16233a;
  --chat-agent-bg: #2a2a2d;
  --chat-cache-bg: #1c3320;
  --chat-tool-bg: #3a2e0d;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  padding-top: 0px;
  font-family: 'Open Sans', sans-serif;
  font-weight: normal;
  margin-bottom: 160px;
}

caption {padding:0 0 0 5px;}

.gf-color, a:not([href]).gf-color {color: var(--primary);}
.pointer {cursor: pointer;}
.pointer-rotate:active { transform: rotate(180deg); transition: all 0.3s; }

.bg-watched { background-color: var(--light-yellow) !important; }
.bg-approved { background-color: var(--light-green) !important; }
.bg-disciplined { background-color: var(--light-red) !important; }
.bg-locked { background-color: var(--light-orange) !important; }
.bg-payout-blocked { background-color: var(--light-purple) !important; }
.bg-deleted { background-color: var(--light-gray) !important; }
.bg-selected { background-color: var(--light-blue) !important; border-left: 4px solid var(--gf-border-selected) !important; }
.bg-updated { background-color: var(--light-green) !important; border-left: 4px solid var(--gf-border-updated) !important; }
.bg-private { background-color: var(--light-yellow) !important; border-right: 4px solid var(--gf-border-private) !important; }
.bg-selected.bg-private { background-color: var(--light-blue) !important; border-left: 4px solid var(--gf-border-selected); border-right: 4px solid var(--gf-border-private) !important; }
.bg-updated.bg-private { background-color: var(--light-green) !important; border-left: 4px solid var(--gf-border-updated); border-right: 4px solid var(--gf-border-private) !important; }

.bg-watched, .bg-approved, .bg-disciplined, .bg-locked, .bg-payout-blocked, .bg-deleted,
.bg-selected, .bg-updated, .bg-private, .bg-ai-review-agreed, .bg-ai-review-disagreed, .bg-quantity {
  color: var(--gf-text) !important;
}

.color-positive { color: var(--gf-color-positive) !important; }
.bg-quantity { background-color: var(--light-yellow) ; }

.bg-stepper { background-color: var(--gf-surface-alt) !important; }
.stepper-current { background-color: var(--primary) !important; color: white !important; }
.stepper-completed { background-color: var(--green) !important; color: white !important; }
.stepper-upcoming { background-color: var(--gf-surface-alt) !important; color: var(--gf-text-muted) !important; }
.stepper-text-active { color: var(--gf-text) !important; }
.stepper-text-inactive { color: var(--gf-text-muted) !important; }


.bg-ai-review-agreed { background-color: var(--light-green) !important; border-left: 4px solid var(--gf-border-updated) !important; }
.bg-ai-review-disagreed { background-color: var(--light-yellow) !important; border-left: 4px solid var(--gf-border-private) !important; }

.popcell { word-break: break-all; }
.popcell-header { display: inline-block; border-bottom: 1px dotted var(--gf-text) ; cursor: pointer; }
.popcell-inline .popcell-header, .popcell-inline .popcell-content { display: inline; }

a { cursor: pointer; }
a:hover { color: var(--primary); }

.btn.disabled { border-color: var(--gray); color: white; background-color: var(--gray); cursor: not-allowed }
.btn.disabled:hover, .btn.disabled:focus { background-color: var(--gray); border-color: var(--gray); color: var(--gf-surface); }
.btn-primary { color: var(--gf-surface); background-color: var(--primary); border-color: var(--primary-border); }
.app-gc .btn-primary { background-color: var(--green); border-color: var(--green); }
.btn-primary:hover, .btn-primary:active, .btn-primary:focus, .btn-primary:active:focus { color: var(--gf-surface); background-color: var(--primary-dark); border-color: var(--primary); }
.app-gc .btn-primary:hover, .app-gc .btn-primary:active, .app-gc .btn-primary:focus, .app-gc .btn-primary:active:focus { background-color: var(--green); border-color: var(--green); }
.btn-primary:disabled { border-color: var(--gray); color: var(--gf-surface); background-color: var(--gray); }
.btn-default:hover { color: var(--primary); }
.btn-clear { background-color: transparent; border: solid 1px var(--gray); }
.btn-clear:hover, .btn-clear:focus { background-color: var(--light-gray); }

.btn.btn-soc { width: 260px; padding: 0px; text-align: left; border-color: rgba(0,0,0, 0.2); color: var(--gf-surface); background-color: var(--gray); }
.btn.btn-soc img { width: 40px; height: auto; margin: 0 10px 0 0; border-radius: 4px; }
.btn.btn-ggl { background-color: #4285F4; }
.btn.btn-ggl:hover { background-color: #2e5df7; }

.show > .btn-primary.dropdown-toggle { background-color: var(--primary); border-color: var(--primary); }

h1, h2 { font-weight: 700; color:var(--primary); }
h3, h4, h5, h6 { font-weight: 400; color:var(--primary);}
.app-gc h1, .app-gc h2, .app-gc h3, .app-gc h4, .app-gc h5, .app-gc h6 { color:var(--green); }
.clear { clear: both; }
.center { position: absolute; left: 50%; transform: translateX(-50%); }

#select {margin-bottom:10px; width:auto !important;}
.form-inline {margin-bottom:10px; }

.highlight {
  padding: 9px 14px;
  margin-bottom: 14px;
  background-color: var(--light-gray);
  border: 1px solid var(--light-gray);
  border-radius: 4px;
}
.required { border: 1px solid var(--red) !important; }
.border-input-container { border: 2px dotted var(--light-gray); border-radius: 0.25rem; }
.border-input-secondary { border: 1px dashed var(--light-gray); border-radius: 0.25rem; }

.action_buttons { margin-bottom:10px; margin-top:10px; }
/* profile_new action row: wraps and stays centered at any width; the gap replaces the old right margins */
.profile-actions .r-spacer { margin-right: 0; }
@media (max-width: 575px) { .profile-actions > .btn, .profile-actions > .dropdown { flex: 1 1 calc(50% - 8px); } .profile-actions > .dropdown > .btn { width: 100%; } }

.help-block { font-size:11px; }
.inline { display:inline-block; }

.align-r { text-align: right; }

.l-spacer { margin-left:10px; }
.r-spacer { margin-right:10px; }
.b-spacer { margin-bottom:10px; }

.z-index-3 { z-index: 3; }

.text-wrap {
  overflow-wrap: break-word;
  word-break: break-word;
}
.text-monospace { font-family: monospace; }
.text-faint { color: var(--gf-text-muted); }

tr.invalid { background-color: var(--gf-surface-hover); }

.dropdown-menu .dropdown-item:hover, .dropdown-menu .dropdown-item:focus { color: var(--primary); }
.dropdown-menu>li>a { padding: 3px 10px; }

.big-checkbox { transform: scale(2); cursor: pointer; }


/****************
 * Top nav bar
 ****************/
/* Hide default border for navbar */
.navbar { border: transparent; }
.navbar-dark .nav-link { color: #ffffff; }
.navbar-light .nav-link { color: #000000; }
.navbar-dark .nav-link:hover, .navbar-light .nav-link:hover { color: var(--primary); }
.navbar-dark .text-muted, .navbar-dark .footer-top { color: rgba(255, 255, 255, 0.75) !important; }
.navbar-light .text-muted, .navbar-light .footer-top { color: #000 !important; }
.theme-toggle { text-decoration: none; }
.theme-toggle:hover, .theme-toggle:focus { color: var(--primary); }

/* Modern underline tabs (profile_new) */
.profile-tabs { gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--bs-border-color); flex-wrap: wrap; }
.profile-tabs .nav-link { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; margin-bottom: -1px; font-weight: 500; color: var(--bs-secondary-color); transition: color .15s, background-color .15s, border-color .15s; }
.profile-tabs .nav-link:hover { color: var(--bs-body-color); background-color: var(--bs-tertiary-bg); }
.profile-tabs .nav-link.active { color: var(--bs-body-color); background: transparent; border-bottom-color: #198754; font-weight: 600; }

/* Profile field sections (profile_new): card per section, label/value grid per row */
.profile-section { overflow: hidden; }
.profile-section-title { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; font-size: 15px; font-weight: 600; background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); }
.profile-section-title i { width: 18px; text-align: center; color: var(--bs-secondary-color); }
.profile-section-toggle { cursor: pointer; user-select: none; }
.profile-section-toggle:hover { background-color: var(--bs-secondary-bg); }
.profile-section-toggle.collapsed { border-bottom-color: transparent; }
.profile-section-arrow { transition: transform .2s ease; }
.profile-section-arrow.open { transform: rotate(180deg); }
.profile-field { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 16px; align-items: start; padding: 10px 16px; border-bottom: 1px solid var(--bs-border-color-translucent); }
.profile-field:last-child { border-bottom: 0; }
.profile-field:hover { background-color: var(--bs-tertiary-bg); }
.profile-field-label { font-size: 13px; font-weight: 500; color: var(--bs-secondary-color); overflow-wrap: anywhere; }
.profile-field-value { overflow-wrap: anywhere; }
/* Narrower label column, used by the listing page */
.profile-field.listing-field { grid-template-columns: minmax(80px, 130px) minmax(0, 1fr); gap: 12px; }
@media (max-width: 575px) { .profile-field, .profile-field.listing-field { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Flash a profile section after jumping to it */
@keyframes section-flash { 0%, 60% { background-color: var(--light-yellow); } 100% { background-color: transparent; } }
.section-highlight { animation: section-flash 1.8s ease-out; border-radius: 6px; }

/* Profile section buttons: 4 tiles per line, icon above title */
.profile-section-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.profile-section-btn { min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px 6px; border-radius: 10px; line-height: 1.15; font-size: 12px; font-weight: 500; text-align: center; }
.profile-section-btn i { font-size: 18px; }

/* Side by side stats (profile_new card) */
.profile-stat:last-child { border-right: 0 !important; }
.profile-stat-link { cursor: pointer; border-radius: 6px; }
.profile-stat-link:hover { background-color: var(--bs-tertiary-bg); }

/* ---- Responsive profile_new ---- */
.min-w-0 { min-width: 0; }
.profile-user-col { height: 100px; min-width: 0; }
/* wide tables scroll sideways inside their own box (so dropdowns elsewhere in the section are not clipped) */
.profile-section .table-div { overflow-x: auto; }
.profile-section .table-div > * { min-width: 640px; }
@media (max-width: 767px) {
  .profile-user-col { height: auto; gap: 6px; }
  .profile-user-cols { row-gap: 12px !important; }
  .profile-section-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
  .profile-tabs .nav-link { white-space: nowrap; }
}
@media (max-width: 575px) {
  .profile-stat { flex: 1 1 50%; border-inline-end: 0 !important; padding-top: 6px; padding-bottom: 6px; }
  .profile-section-title { padding: 10px 12px; }
  .profile-field { padding: 8px 12px; }
}
@media (max-width: 479px) {
  .profile-section-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Legacy / New pill switch in the navbar */
.legacy-switch { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 2px; border: 1px solid rgba(128,128,128,.55); border-radius: 15px; background: rgba(128,128,128,.2); cursor: pointer; }
.legacy-switch .legacy-switch-label { display: inline-flex; align-items: center; justify-content: center; height: 24px; min-width: 24px; padding: 0 6px; border-radius: 12px; font-size: 12px; font-weight: 600; color: inherit; opacity: .75; transition: background-color .2s, color .2s, opacity .2s; }
.legacy-switch .legacy-switch-label.active { padding: 0 10px; color: #fff; opacity: 1; background: #6c757d; }
.legacy-switch.is-new .legacy-switch-label.active { background: #198754; }
/* Online / offline dot in the navbar, with the last login on hover */
.online-status { position: relative; display: inline-flex; align-items: center; cursor: default; font-size: 0.7rem; outline: none; }
.online-status.clock-status { font-size: 1rem; color: rgba(128,128,128,.9); }
.online-status .online-status-tip { display: none; position: absolute; top: 100%; right: 0; margin-top: 10px; padding: 6px 10px; border-radius: 6px; background: #212529; color: #fff; font-size: 12px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.3); z-index: 1100; }
.online-status:hover .online-status-tip, .online-status:focus .online-status-tip { display: block; }
.navbar.fixed-bottom { z-index: 0; opacity: 0.8; } /* Allow dropdowns to be visible over the bottom navbar */
.navbar.fixed-bottom:hover { opacity: 1; cursor: pointer; }
.navbar.fixed-bottom .footer-top { display: none; }
.navbar.fixed-bottom:hover .footer-top { display: inline-block; }
.bg-test { background-color: #ffce99 !important; }
.bg-test.gc { background-color: #2db123 !important; }


/****************
 * Table using div
 ****************/
.table-div { padding: 20px; }
.table-div > .row > [class^="col-"], .table-div .row > [class*=" col-"] { border: 1px solid var(--gf-border-strong); }
.table-div > .row > [class^="col-"]:not(:last-child), .table-div .row > [class*=" col-"]:not(:last-child) { border-right-width: 0; }
.table-div > .row:not(:last-child) > [class^="col-"] { border-bottom-width: 0; }
.table-div > .row:not(:last-child) > [class*=" col-"] { border-bottom-width: 0; }


/****************
 * Tab
 ****************/
.nav-tabs {
  margin-bottom:10px;
}

/****************
 * Main content
 ****************/
.main {
  margin-top:80px;
}
@media (min-width: 768px) {
  .main {
    padding-right: 40px;
    padding-left: 40px;
  }
}
/****************
 * Modal dialog *
 ****************/
.close { color: var(--primary); font-weight: 36px; text-shadow: none; opacity: 0.8; }
.close:hover { color: var(--primary); }
.modal { overflow: auto !important; } /* Allow scrolling if two dialogs are shown simultaneously */
.modal-body .buttons button { margin-right: 10px; }
.modal-body .message { margin-top: 10px; margin-bottom: 20px; }
.modal-body .message .alert { width: 100%; }

/****************
 * Spinner loader
 ****************/
/*.loader { top:0; background: darkgray; opacity:0.5; height: 100%; width: 100%; position: fixed; z-index: 99999; text-align:center; display:none;}*/
.loader { position: fixed; top: 0; left: 0; text-align: center; z-index: 1; }
.loader.blocked { width: 100%; height: 100%; z-index: 10000; background-color: var(--gray); opacity: 0.5; }
.spinner-loader { top: 40%; position: absolute; }
@-moz-keyframes spinner-loader {
  0% { -moz-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -moz-transform: rotate(360deg); transform: rotate(360deg); }
}
@-webkit-keyframes spinner-loader {
  0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes spinner-loader {
  0% { -moz-transform: rotate(0deg); -ms-transform: rotate(0deg); -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  100% { -moz-transform: rotate(360deg); -ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
/* :not(:required) hides this rule from IE9 and below */
.spinner-loader:not(:required) {
  -moz-animation: spinner-loader 1500ms infinite linear;
  -webkit-animation: spinner-loader 1500ms infinite linear;
  animation: spinner-loader 1500ms infinite linear;
  -moz-border-radius: 0.5em;
  -webkit-border-radius: 0.5em;
  border-radius: 0.5em;
  -moz-box-shadow: var(--gf-surface-alt) 1.5em 0 0 0, var(--gf-surface-alt) 1.1em 1.1em 0 0, var(--gf-surface-alt) 0 1.5em 0 0, var(--gf-surface-alt) -1.1em 1.1em 0 0, var(--gf-surface-alt) -1.5em 0 0 0, var(--gf-surface-alt) -1.1em -1.1em 0 0, var(--gf-surface-alt) 0 -1.5em 0 0, var(--gf-surface-alt) 1.1em -1.1em 0 0;
  -webkit-box-shadow: var(--gf-surface-alt) 1.5em 0 0 0, var(--gf-surface-alt) 1.1em 1.1em 0 0, var(--gf-surface-alt) 0 1.5em 0 0, var(--gf-surface-alt) -1.1em 1.1em 0 0, var(--gf-surface-alt) -1.5em 0 0 0, var(--gf-surface-alt) -1.1em -1.1em 0 0, var(--gf-surface-alt) 0 -1.5em 0 0, var(--gf-surface-alt) 1.1em -1.1em 0 0;
  box-shadow: var(--gf-surface-alt) 1.5em 0 0 0, var(--gf-surface-alt) 1.1em 1.1em 0 0, var(--gf-surface-alt) 0 1.5em 0 0, var(--gf-surface-alt) -1.1em 1.1em 0 0, var(--gf-surface-alt) -1.5em 0 0 0, var(--gf-surface-alt) -1.1em -1.1em 0 0, var(--gf-surface-alt) 0 -1.5em 0 0, var(--gf-surface-alt) 1.1em -1.1em 0 0;
  display: inline-block;
  font-size: 15px;
  width: 1em;
  height: 1em;
  margin: 1.5em;
  overflow: hidden;
  text-indent: 100%;
}

.flp {background-color: var(--gf-surface-alt);}

/*******************
 * Scrollable menu
 *******************/
.scrollable-menu { height: auto; max-height: 400px; overflow-x: hidden; }
.scrollable-menu::-webkit-scrollbar { -webkit-appearance: none; width: 6px; }
.scrollable-menu::-webkit-scrollbar-thumb { border-radius: 3px; background-color: var(--gf-border-strong); -webkit-box-shadow: 0 0 1px rgba(255,255,255,.75); }

/****************
 * Search
 ****************/
.search-filter { background-color: var(--gf-surface-alt); box-shadow: 0 1px 5px rgba(0,0,0,.25); }
.search-filter .dropdown-item:hover { color: var(--gf-surface)!important; background-color: var(--primary)!important; }
.search-filter .text-primary { color: var(--primary)!important; }

.search-filter-exchange { border-top: 1px solid var(--gf-border); width: 100% }

/****************
 * Listing
 ****************/
.listing-media-outer { border: 1px solid var(--gf-border-strong); }
.listing-media-container { position: relative; margin: 10px; height: 640px; width: 640px; }
.listing-poster { margin: 4px; max-width: 64px; max-height: 64px; border: 1px dotted var(--gf-border-strong); }
.listing-photo-thumbnail { position: relative; }
.listing-photo-thumbnail .listing-ribbon { position: absolute; width: 80%; top: 0; left: 0; margin-top: -2%; margin-left: -4%;}
.react-player { position: absolute; top: 0; left: 0; }
.react-player-button { position: absolute; z-index: 2; margin-top: calc(50% - 40px); margin-left: calc(50% - 40px); padding: 16px; font-size: 48px; color: white; background: rgb(51,51,51); opacity: 0.5; border-radius: 50%; pointer-events: none; }
.react-player-poster { position: absolute; z-index: 1; }

/****************
 * Money formatting
 ****************/
.formatted-money .text-muted { font-size: 75% }

/****************
 * API Editor
 ****************/
.apieditor .apieditor table { background: repeating-linear-gradient( -45deg, var(--gf-surface-alt), var(--gf-surface-alt) 2px, var(--gf-surface) 2px, var(--gf-surface) 8px ); }
.apieditor .table th, .apieditor .table td { padding: 4px 8px; }
.apieditor .table tbody { border: 2px solid var(--gf-border); }
.apieditor .apie-inactive { background: rgba(0,0,0,0.04); }
.apie-horizontal-actions { text-align: right; }
.apie-horizontal-actions button { margin-right: 4px; }
.apie-vertical-actions button { margin-bottom: 2px; }
.apie-frame-actions button { margin-right: 4px; }
.apie-frame { padding: 4px; }
.apie-frame-inner { display: flex; flex-direction: column; height: 100%; padding: 4px; border: 1px solid var(--gf-border-strong); }
.apie-frame-tags { position: absolute; top: 16px; right: 16px; padding: 0 4px; font-size: 12px; font-weight: lighter; color: white; background-color: rgba(0,0,0, 0.6); }
.apie-frame-title { font-size: 14px; font-weight: bold; }
.apie-frame-description { font-size: 12px; }
.apie-frame-actions { margin-top: auto; }
.apie-frame button { padding: 2px 4px; font-size: 12px; border-radius: 2px; }
.apie-compact-thumbnail { max-width: 128px; max-height: 128px; }
.apie-batcher-preview { max-height: 80vh; overflow-y: auto; border-radius: 4px; border: 1px solid var(--gf-border); }
.apie-batcher-preview-item { display: flex; align-items: center; padding: 4px; border-bottom: 1px solid var(--gf-border-strong); }
.apie-batcher-preview .apie-batcher-preview-item:nth-child(even) { background-color: var(--gf-surface-alt); }
.apie-batcher-preview .apie-batcher-preview-item:nth-child(odd) { background-color: var(--gf-surface-hover); }
.apie-batcher-status { max-height: 144px; overflow-y: auto; }

/* Photo upload dialog */
.photo-upload-container { margin-bottom: 32px; }
.photo-upload-area { display: table; width: 100%; background: url(/img/app/default_upload_photo.png); background-color: var(--gf-surface-alt); background-size: contain; background-repeat: no-repeat; background-position: center; border: 4px dashed var(--gf-border-strong); border-radius: 8px; }
.photo-upload-area-inner { display: table-cell; width: 100%; height: 200px; text-align: center; vertical-align: middle; background: transparent; }
.edit-item-photos { max-width: 512px; }
.edit-item-photos .photo { padding-left: 10px; padding-right: 10px; }
.edit-item-photos .square-content { border: dashed 1px var(--gf-border-strong); color: var(--gf-text-muted); background-color: var(--gf-surface-hover); font-size: 10px; padding-top: 25%; }
.edit-item-photos .required-square-content { border: dashed 2px #a94442; }
.edit-item-photos img.square-content { border: solid 1px var(--gf-border-strong); background-color: var(--gf-surface); padding-top: 0; }
.edit-item-photos img.icon-delete { position: absolute; width: 20px; top: 4px; right: 4px; }
.edit-item-photos .spinner { top: 50%; left: 50%; transform: translate(-50%,-50%); }
.edit-item-photos .spinner > div { width: 15px; height: 15px; }

.square-responsive { padding-bottom: 100%; position:relative; overflow: hidden; }
.square-responsive img { position: absolute; }
.square-responsive .square-content { position: absolute; width: 100%; height: 100%; top: 50%; transform: translateY(-50%); }
.cinema-responsive video { max-width: 512px; }
.square-content-landscape:before, .square-content-landscape:after { content: ''; position: absolute; display: block; width: 100%; height: 21%; background: black; }
.square-content-landscape:before { top: 0; }
.square-content-landscape:after { bottom: 0; }

/* Loading Spinner */
.spinner { position: fixed !important; top: 80px; left: 48%; width: 80px; text-align: center; z-index: 1; }
.spinner > div { width: 20px; height: 20px; background-color: var(--gf-border-strong); border-radius: 100%; display: inline-block; -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; animation: sk-bouncedelay 1.4s infinite ease-in-out both; }
.spinner.blocked { top: 0; left: 0; width: 100%; height: 100%; z-index: 10000; background-color: #000000; opacity: 0.5; }
.spinner.blocked > div { margin-top: 20%; }
.spinner .bounce1 { -webkit-animation-delay: -0.32s; animation-delay: -0.32s; }
.spinner .bounce2 { -webkit-animation-delay: -0.16s; animation-delay: -0.16s; }

/* DataCell */
.datacell {  border: 1px solid var(--gf-border); border-radius: 4px; margin: 8px 0; background: var(--gf-surface); font-family: 'Courier New', monospace; text-align: left !important; }

.datacell-compact { margin: 4px 0; font-size: 12px; }

.datacell-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--gf-surface-alt); border-bottom: 1px solid var(--gf-border); font-weight: bold; }

.datacell-title { color: var(--gf-text); font-size: 14px; }

.datacell-actions { display: flex; gap: 4px; }

.datacell-btn { background: none; border: 1px solid var(--gray); border-radius: 3px; padding: 2px 6px; cursor: pointer; font-size: 12px; transition: all 0.2s; }

.datacell-btn:hover { background: var(--gf-surface-alt); }

.datacell-btn-success { background: var(--gf-success-bg); border-color: var(--gf-success-border); color: var(--gf-success-text); }

.datacell-content { position: relative; }

.datacell-data { margin: 0; padding: 12px; background: var(--gf-surface); border: none; font-size: 13px; line-height: 1.4; color: var(--gf-text); white-space: pre-wrap; word-wrap: break-word; }

.datacell-truncated { position: relative; }

.datacell-fade { position: absolute; bottom: 0; left: 0; right: 0; height: 40px; background: linear-gradient(transparent, var(--gf-surface)); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }

.datacell-expand-btn { background: var(--gf-info); color: white; border: none; border-radius: 4px; padding: 4px 12px; cursor: pointer; font-size: 12px; }

.datacell-expand-btn:hover { background: var(--gf-info-hover);}

/* Expandable Section */
.expandable-section { border: 1px solid var(--gf-border); border-radius: 4px; margin-bottom: 8px; }

.expandable-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background-color: var(--gf-surface-alt); cursor: pointer; user-select: none; }

.expandable-header { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background-color: var(--gf-surface-alt); cursor: pointer; user-select: none; font-size: 13px; }

.expandable-header:hover { background-color: var(--gf-surface-hover); }

.expandable-title { font-weight: 500; font-size: 12px; }

.arrow { transition: transform 0.2s ease; font-size: 10px; }

.arrow.expanded { transform: rotate(180deg); }

.expandable-content { padding: 8px 12px; border-top: 1px solid var(--gf-border); font-size: 12px; }

/* Chat */
.inner-content { background-color: transparent; box-shadow: 0 1px 5px rgba(0,0,0, 0.15); }
#messaging { border-radius: 4px; display: block; }
#messaging-container { padding: 32px 0; }
.conversation-card {
  cursor: pointer;
  transition: all 0.15s ease;
}

.conversation-card:hover {
  background-color: var(--bs-primary-bg-subtle, #e8f0fe);
  border-color: var(--bs-primary, #0d6efd) !important;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
  transform: translateY(-1px);
}

.conversation-card-selected {
  background-color: var(--bs-primary-bg-subtle, #e8f0fe);
  border-color: var(--bs-primary, #0d6efd) !important;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.message-input {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.message-input p:last-child,
.message-input ul:last-child,
.message-input ol:last-child {
  margin-bottom: 0;
}

.message-timestamp {
font-size: 10px;
line-height: 1;
margin-top: 4px;
opacity: 0.7;
text-align: right;
white-space: nowrap;
}

.message-timestamp-owner {
color: rgba(255, 255, 255, 0.85);
}

.message-load-more {
  font-size: 12px;
  color: var(--gf-text-muted);
  cursor: pointer;
  text-align: center;
}

/* Chat Agent */
.chat-bubble-user { background-color: var(--chat-user-bg); border-left: 4px solid var(--chat-user-border); color: var(--gf-text); }
.chat-bubble-agent { background-color: var(--chat-agent-bg); border-left: 4px solid var(--chat-agent-border); color: var(--gf-text); }
.chat-bubble-cache { background-color: var(--chat-cache-bg); border-left: 4px solid var(--chat-cache-border); color: var(--gf-text); }
.chat-bubble-tool { background-color: var(--chat-tool-bg); border-left: 4px solid var(--chat-tool-border); color: var(--gf-text); }
.chat-bubble-flag { background-color: var(--light-red); border-left: 4px solid var(--red); color: var(--gf-text); }
.chat-bubble-flag-vulgar { background-color: var(--light-yellow); border-left: 4px solid var(--gf-border-private); color: var(--gf-text); }
.chat-bubble-unflag { background-color: var(--light-green); border-left: 4px solid var(--gf-border-updated); color: var(--gf-text); }

/* Chat cache review state */
.badge-review-pending { background-color: #ff8200; color: #fff; }
.badge-review-done { background-color: #6f42c1; color: #fff; }
.table-div > .row.cache-reviewed > [class*="col-"] { background-color: var(--light-purple); }
@media (max-width: 656px) {

}


@-webkit-keyframes sk-bouncedelay {
  0%, 80%, 100% { -webkit-transform: scale(0) }
  40% { -webkit-transform: scale(1.0) }
}
@keyframes sk-bouncedelay {
  0%, 80%, 100% {
    -webkit-transform: scale(0);
    transform: scale(0);
  } 40% {
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
  }
}

/* Exchange summary cards (profile_exchange_new) */
.exchange-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.exchange-summary-card { padding: 14px 16px; border: 1px solid var(--bs-border-color); border-radius: 10px; background: var(--bs-body-bg); }
.exchange-summary-period { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.exchange-summary-main { display: block; font-size: 28px; font-weight: 600; line-height: 1.2; }
.exchange-summary-sub { display: block; font-size: 12px; color: var(--bs-secondary-color); }
.exchange-summary-bar { height: 6px; margin: 8px 0 4px; }
.exchange-summary-row { display: grid; grid-template-columns: 1fr auto auto 44px; gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--bs-border-color-translucent); font-size: 13px; }
.exchange-summary-name { color: var(--bs-secondary-color); }
.exchange-summary-count { font-weight: 600; text-align: right; }
.exchange-summary-gmv { min-width: 64px; text-align: right; color: var(--bs-secondary-color); }
.exchange-summary-rate { text-align: right; font-size: 12px; }
.exchange-summary-main-btn, button.exchange-summary-row { display: block; width: 100%; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; border-radius: 6px; }
.exchange-summary-main-btn { padding: 2px 6px; margin: 0 -6px; }
button.exchange-summary-row { display: grid; border-top: 1px solid var(--bs-border-color-translucent); padding: 4px 6px; margin: 0 -6px; width: calc(100% + 12px); }
.exchange-summary-main-btn:hover, button.exchange-summary-row:hover { background-color: var(--bs-tertiary-bg); }
.exchange-summary-main-btn.active, button.exchange-summary-row.active { background-color: var(--bs-success-bg-subtle); box-shadow: inset 0 0 0 1px var(--bs-success-border-subtle); }

/* Passkey cards (passkey_settings) */
.passkey-card { display: flex; gap: 14px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--bs-border-color); border-radius: 10px; background: var(--bs-body-bg); }
.passkey-card:hover { background-color: var(--bs-tertiary-bg); }
.passkey-icon { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); font-size: 16px; }
.passkey-body { flex: 1 1 auto; min-width: 0; }
.passkey-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 8px 0; }
.passkey-meta-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.passkey-id { font-family: var(--bs-font-monospace); }
