:root {
  --font-sans:       'Roboto', sans-serif;
  --color-bg:        #f9f9f9;
  --color-light:     #fafafa;
  --color-white:     #fff;
  --color-border:    #ececec;
  --color-text:      #333;
  --color-primary:   #1890ff;
  --color-primary-2: #40a9ff;
  --color-success:   #52c41a;
  --color-danger:    #ff4d4f;
  --radius:          8px;
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.1);
  --shadow-md:       0 4px 12px rgba(0,0,0,0.1);
  --transition:      all 0.2s ease;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: var(--transition);
}
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  height: 100vh;
  overflow: hidden;
}
.hidden { display: none !important; }
.sidebar {
  position: fixed; top: 0; left: 0;
  width: 240px; height: 100%;
  background: var(--color-white);
  border-right: 1px solid var(--color-border);
  display: flex; flex-direction: column;
  padding: 20px 0;
}
.main {
  margin-left: 240px;
  display: flex; flex-direction: column;
  height: 100%;
}
.header {
  background: var(--color-white);
  padding: 10px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex; justify-content: space-between; align-items: center;
}
.content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.sidebar .logo {
  font-weight: bold;
  font-size: 1.2rem;
  padding: 0 20px;
  margin-bottom: 30px;
}
.sidebar .menu { list-style: none; }
.sidebar .menu li {
  display: flex; align-items: center;
  padding: 12px 20px;
  cursor: pointer;
}
.sidebar .menu li:hover     { background: var(--color-light); }
.sidebar .menu li.active    { background: #e6f7ff; font-weight: 600; }
.sidebar .menu-link {
  display: flex; align-items: center;
  width: 100%; text-decoration: none; color: inherit;
}
.card,
.widget,
.modal-ui-content,
.chart-container {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 15px;
  flex: 1 1 0;
}
.charts-row .chart-container {
  height: 210px;
}
.metrics-widgets .widget {
  height: auto;
}
.charts-row .chart-container {
  flex: 1 1 0;
  height: auto;
}
.charts-row .left-chart {
  height: 440px;
}
.charts-row .right-charts .chart-container {
  height: 210px;
}
.metrics-widgets .widget {
  height: auto;
}
.header-inner {
  display: flex;
  justify-content: space-between; 
  align-items: center;           
}
.copy-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.1s ease;
}
.copy-btn i {
  font-size: 1.2rem;
  color: var(--color-primary);
}
.copy-btn:active {
  transform: scale(0.85);
  opacity: 0.7;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.metrics-widgets {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.widget { text-align: center; }
.widget p { margin-top: 12px; }
.metrics-widgets.compact-metrics {
  display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0;
}
.widget.compact {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 12px;
  border-radius: var(--radius);
  text-align: center;
  flex: 1;
  min-width: 110px;
  box-shadow: var(--shadow-sm);
}
.widget.compact h4 { margin: 0; font-size: 1rem; }
.widget.compact p { margin: 0.2rem 0; font-weight: bold; }
.widget.compact small { color: #666; font-size: 0.75rem; }
.charts-row {
  display: flex; gap: 20px; margin: 30px 0;
  gap: 20px;
  margin: 30px 0;
  align-items: flex-start; 
}
.left-chart {
  flex: 1; height: 440px;
}
.right-charts {
  flex: 1; height: 440px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.table-reset,
.uniform-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-reset th,
.table-reset td,
.uniform-table th,
.uniform-table td {
  padding: 10px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.table-reset thead,
.uniform-table thead { background: var(--color-light); }
.table-reset tbody tr:hover,
.uniform-table tbody tr:hover { background: #f5f5f5; }
.uniform-table.small-table th,
.uniform-table.small-table td { font-size: 0.85rem; padding: 6px 8px; }
.uniform-table.slim th,
.uniform-table.slim td { padding: 6px 10px; font-size: 13px; }
.buy-btn {
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  background: var(--color-primary);
  color: var(--color-white);
  transition: var(--transition);
}
.buy-btn:hover { background: var(--color-primary-2); }
.buy-btn.red {
  background: var(--color-danger);
}
.buy-btn.red:hover { background: #ff7875; }
.input,
.modal-ui-content input,
.auth-form input,
.password-form input,
.input-field {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: border-color .2s;
}
.input:focus,
.auth-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.auth-page {
  display: flex; justify-content: center; align-items: center;
  height: 100vh; background: #f0f2f5;
}
.auth-form {
  background: var(--color-white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  width: 360px;
  display: flex; flex-direction: column;
}
.auth-form h2 {
  margin-bottom: 24px;
  text-align: center;
  font-size: 1.75rem;
}
.auth-form button {
  margin-top: 10px;
}
.auth-form .alt-link {
  margin-top: 16px;
  text-align: center;
  font-size: .95rem;
}
.auth-form .alt-link a,
.alt-link a {
  color: var(--color-primary);
  text-decoration: none;
}
.auth-form .alt-link a:hover { text-decoration: underline; }
.modal-ui {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.modal-ui-content {
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-md);
  position: relative;
}
.modal-ui-content.wide { max-width: 700px; }
.modal-ui-close {
  position: absolute; top: 10px; right: 14px;
  font-size: 20px; font-weight: bold;
  color: var(--color-text);
  cursor: pointer;
}
.modal-ui-content.wide {
  background: var(--color-light);    
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid var(--color-border);
}
.order-form-left input,
.order-form-left select {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  transition: border-color .2s;
}
.order-form-left input:focus,
.order-form-left select:focus {
  border-color: var(--color-primary);
  outline: none;
}
.order-form-right {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}
.order-form-right h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1rem;
}
.modal-ui-content.wide {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.order-form-left input,
.order-form-left select {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  transition: border-color .2s;
}
.order-form-left input:focus,
.order-form-left select:focus {
  border-color: var(--color-primary);
  outline: none;
}
.order-form-right {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}
.order-form-right h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1rem;
}
@keyframes fadeOut { 0%,70%{opacity:1}100%{opacity:0}}
.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: .85rem;
  font-weight: 500;
}
.status.active {
  background: #e6f7ff;
  color: #0050b3;
}
.status.inactive {
  background: #fff1f0;
  color: #a8071a;
}
.avatar-circle {
  width: 36px; height: 36px;
  background: linear-gradient(45deg,#6a11cb,#2575fc);
  border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  color: #fff; font-weight: bold;
  cursor: pointer;
}
.avatar-dropdown {
  position: absolute; top: 46px; right: 0;
  background: var(--color-white);
  border: 1px solid #ccc;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 8px 0;
  z-index: 1000;
}
.avatar-dropdown button {
  width: 100%; padding: 8px 12px;
  background: none; border: none;
  text-align: left; cursor: pointer;
}
.avatar-dropdown button:hover { background: #f5f5f5; }
.referrals-page { position: relative; }
.page-title {
  font-size: 1.8rem;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.info-btn {
  padding: 4px 10px;
  border: none; border-radius: 50%;
  background: #2ecc71; color: #fff;
  font-size: 1rem; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.popup-container {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  display: none; align-items: center; justify-content: center;
  background-color: rgba(0,0,0,0.4);
  z-index: 999;
}
.popup-container.visible { display: flex; }
.popup-content {
  background: var(--color-white);
  padding: 1.5rem; border-radius: var(--radius);
  width: 90%; max-width: 500px;
  box-shadow: var(--shadow-md);
  text-align: left;
}
.popup-content h3 { margin-top: 0; }
.copy-wrapper { position: relative; display: inline-block; margin-left: 10px; }
.copy-tooltip {
  position: absolute; top: -30px; left: 50%;
  transform: translateX(-50%);
  background: var(--color-success);
  color: var(--color-white);
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: .85rem;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.copy-tooltip.visible { opacity: 1; transform: translateX(-50%) translateY(-5px); }
.referral-subtabs,
.referral-tab,
.referral-subtab {
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: 
    background 0.2s, 
    color 0.2s, 
    border-color 0.2s,
    transform 0.1s;
}
.referral-tab,
.referral-subtab {
  background: var(--color-light);
  color: var(--color-text);
}
.referral-tab:hover,
.referral-subtab:hover {
  background: var(--color-primary-2);
  color: var(--color-white);
  transform: translateY(-1px);
}
.referral-tab.active,
.referral-subtab.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.referral-tab.red.active,
.referral-subtab.red.active {
  background: var(--color-danger);
  border-color: var(--color-danger);
}
.referral-tab:disabled,
.referral-subtab:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.referral-link-box {
  background: var(--color-light);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 10px;
}
.referral-link-box code {
  font-size: .95rem;
  background: var(--color-white);
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  flex: 1; overflow-wrap: anywhere;
}
.referral-link-box button {
  background: var(--color-success);
  color: var(--color-white);
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
}
.referral-link-box button:hover { background: #73d13d; }
.two-columns {
  display: flex; gap: 20px; margin-top: 30px;
}
.two-columns .column h3 {
  margin-bottom: 12px;
}
.two-columns .column table {
  margin-top: 8px;
}
.column {
  flex: 1; display: flex; flex-direction: column;
}
.column .uniform-table {
  flex-grow: 1; display: table;
}
.order-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 10px;
  align-items: start;
}
.order-form-left,
.order-form-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-form-right {
  flex: 1; 
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px;
}
.referral-stat-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.popup-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
.market-table .no-data {
  text-align: center;
  color: #888;
}
.order-form-grid {
  align-items: stretch; 
}
.order-form-right {
  display: flex;            
  flex-direction: column;   
}
.referral-stat-box {
  flex: 1;                  
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  padding: 16px;            
}
.order-form-grid {
  align-items: stretch; 
}
.order-form-right {
  display: flex;
  flex-direction: column;
}
.referral-stat-box {
  flex: 1;                     
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.referral-stat-box h4 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}
.referral-stats-list {
  flex: 1;                     
  display: flex;
  flex-direction: column;
  gap: 12px;                   
}
.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-white);
  padding: 8px 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-weight: 500;
  color: var(--color-text);
}
.stat-value {
  font-weight: 600;
  color: var(--color-primary);
}
.nodes-page { padding: 20px; }
.nodes-header-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.nodes-title { font-size: 1.25rem; font-weight: 600; }
.node-status-toggle { display: flex; gap: 10px; }
.status-btn {
  padding: 6px 14px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-light);
  cursor: pointer;
  transition: var(--transition);
}
.status-btn:hover { background: #e6f7ff; }
.status-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.empty-nodes-state {
  text-align: center;
  padding: 60px 0;
  color: #888;
}
.primary-btn {
  background: #000;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition);
}
.primary-btn:hover { background: #333; }
.node-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-top: 20px;
}
.node-table th,
.node-table td {
  padding: 12px 15px;
  text-align: left;
  font-size: 0.95rem;
  border-bottom: 1px solid #ececec;
}
.node-table thead {
  background: #fafafa;
}
.node-table tbody tr:hover {
  background: #f5f5f5;
}
.node-table th {
  font-weight: 500;
}
.ads { display: flex; gap: 20px; margin-top: 10px; }
.ad-card {
  background: var(--color-white);
  width: 200px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  padding: 10px;
}
.ad-card img {
  width: 100%;
  border-radius: 4px;
  display: block;
}
.realtors {
  list-style: none;
  margin-top: 10px;
}
.realtors li {
  background: var(--color-white);
  padding: 10px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.profile-popup-content {
  max-width: 500px;
  padding: 24px;
  font-family: 'Segoe UI', sans-serif;
}
.profile-title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: bold;
}
.profile-stats { display: flex; flex-direction: column; gap: 12px; }
.stat-item {
  display: flex; justify-content: space-between;
  font-size: 15px;
}
.stat-label { color: #666; font-weight: 500; }
.stat-value { font-weight: bold; color: #222; }
.stat-unit { margin-left: 4px; font-size: 12px; color: #888; }
.progress-bar {
  width: 100%; height: 10px;
  background: #f0f0f0; border-radius: 5px;
  overflow: hidden; margin-top: 4px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg,#52c41a,#1890ff);
  width: 0%; transition: width 0.4s ease;
}
.divider { margin: 24px 0 16px; height: 1px; background: #e2e2e2; border: none; }
.section-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.password-form label { display: flex; flex-direction: column; margin-bottom: 12px; font-size: 14px; }
.change-password-btn {
  width: 100%; margin-top: 10px;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.change-password-btn:hover { background: var(--color-primary-2); }
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  width: 360px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  position: relative;
}
.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  transition: color .2s;
}
.modal-close:hover {
  color: #333;
}
.modal-content h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.25rem;
}
.modal-content label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
}
.modal-content input {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.modal-content .stats {
  margin: 16px 0;
  line-height: 1.4;
}
.modal-box.simple-modal {
  display: flex;
  flex-direction: column;
  align-items: center;        
  justify-content: center;    
  text-align: center;         
  padding: 2rem 1.5rem;
}
.modal-box.simple-modal .modal-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.modal-box.simple-modal h2 {
  margin: 0;
  font-size: 1.5rem;
}
.modal-box.simple-modal .close-btn {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}
.modal-box.simple-modal .modal-content {
  width: 100%;
}
.modal-box.simple-modal .description {
  margin-bottom: 1.5rem;
  color: #444;
  font-size: 1rem;
  line-height: 1.4;
}
.modal-box.simple-modal .download-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center; 
  margin-bottom: 1.5rem;
}
.modal-box.simple-modal .download-link {
  background: #000;
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
  min-width: 220px;
}
.modal-box.simple-modal .download-link:hover {
  background: #333;
}
.modal-box.simple-modal .docs-link a {
  color: #8A7DDF;
  text-decoration: none;
  font-size: 0.95rem;
}
.modal-box.simple-modal .docs-link a:hover {
  text-decoration: underline;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden {
  display: none !important;
}
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.modal-box.simple-modal {
  position: relative;
  z-index: 1001;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 480px;
  width: 90%;
  display: flex;
  flex-direction: column;
}
.modal-box.simple-modal .modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-box.simple-modal .modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}
.modal-box.simple-modal .close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #888;
  transition: color 0.2s;
}
.modal-box.simple-modal .close-btn:hover {
  color: #333;
}
.modal-box.simple-modal .modal-content {
  padding: 24px;
  background: none;
  box-shadow: none;
  width: auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}
.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%; right: 12px;
  width: 16px; height: 16px;
  margin: -8px 0 0 0;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.buy-btn:disabled,
.referral-tab:disabled,
.buy-btn.disabled-btn,
.referral-tab.disabled-btn {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
.buy-btn:disabled,
.buy-btn.disabled-btn {
  background-color: #ccc !important;
  color: #666 !important;
}
#confirmation-popup .buy-btn:disabled,
#confirmation-popup .buy-btn.disabled-btn {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background-color: #ccc !important;  
  color: #666 !important;
}
input.input-error {
  border: 2px solid #e74c3c !important; 
  background-color: #fdecea;            
}
.market-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: none;
  border-radius: 6px; 
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  min-width: 90px;  
}
.market-btn.green {
  background: var(--color-success);
  color: white;
}
.market-btn.green:hover {
  background: #73d13d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.market-btn.blue {
  background: var(--color-primary);
  color: white;
}
.market-btn.blue:hover {
  background: var(--color-primary-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.market-btn.red {
  background: var(--color-danger);
  color: white;
}
.market-btn.red:hover {
  background: #ff7875;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.market-btn:disabled,
.market-btn.disabled-btn {
  background: #ccc !important;
  color: #666 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}
.menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}
.menu-icon {
  width: 18px;
  text-align: center;
}
.avatar-dropdown button {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.avatar-dropdown button:hover {
  background: #f5f5f5;
}
@keyframes fadeOut {
  0%, 70% { opacity: 1; }
  100%    { opacity: 0; }
}
.auth-form input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.auth-form button {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}
.auth-form button:hover {
  background: var(--color-primary-2);
}
.auth-form .alt-link {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
}
.auth-form .alt-link a {
  color: var(--color-primary);
  text-decoration: none;
}
.auth-form .alt-link a:hover {
  text-decoration: underline;
}
#loading-overlay {
  display: none;
  opacity: 0;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #fff;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  color: #222;
  font-size: 20px;
  font-family: 'Segoe UI', sans-serif;
  transition: opacity 0.4s;
}
#loading-overlay .spinner {
  border: 4px solid rgba(0,0,0,0.1);
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 48px; height: 48px;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}
#toast-container {
  position: fixed;
  bottom: 20px;          
  right: 20px;           
  display: flex;
  flex-direction: column;
  gap: 10px;             
  z-index: 9999;         
  pointer-events: none;  
}
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}
button.referral-tab {
  padding: 4px 10px;
  font-size: 0.85rem;
}
.top-loader {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: #1890ff;           
  transition: width 0.3s ease;
  z-index: 1000;
}
.header.loading .top-loader {
  width: 100%;
}
.avatar-dropdown {
  position: absolute;
  top: 40px;
  right: 0;
  width: 180px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 1000;
}
.avatar-dropdown.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.avatar-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background-color 0.2s, color 0.2s;
}
.avatar-dropdown .dropdown-item + .dropdown-item {
  border-top: 1px solid #f0f0f0;
}
.avatar-dropdown .dropdown-icon {
  margin-right: 8px;
  font-size: 16px;
  color: #666;
  transition: color 0.2s;
}
.avatar-dropdown .dropdown-item:hover {
  background-color: #f5f7fa;
  color: #1890ff;
}
.avatar-dropdown .dropdown-item:hover .dropdown-icon {
  color: #1890ff;
}
.avatar-dropdown .dropdown-item:active {
  background-color: #e6edf7;
}
@media (max-width: 768px) {
  .metrics-widgets {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .charts-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
    align-items: stretch !important;
    margin: 20px 0 !important;
  }
  .charts-row .chart-container {
    flex: none !important;
    width: 100% !important;
    height: 240px !important;    
    box-sizing: border-box;
  }
  .charts-row .chart-container canvas {
    width: 100% !important;
    height: 100% !important;
  }
  #tab-dashboard .charts-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 20px 0 !important;
    align-items: stretch !important;
  }
  #tab-dashboard .charts-row .chart-container {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 240px !important;
    max-height: 240px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  #tab-dashboard .charts-row .chart-container canvas {
    width: 100% !important;
    height: 100% !important;
  }
  .two-columns {
    flex-direction: column;
    gap: 20px;
  }
  .content, .header, .sidebar {
    padding: 10px;
  }
  .sidebar {
    width: 60px;
  }
  .main {
    margin-left: 60px;
  }
  .sidebar .menu li .menu-link span {
    display: none;
  }
  .sidebar .logo {
    font-size: 1rem;
    text-align: center;
  }
.two-columns .column {
  width: 100% !important;
  box-sizing: border-box;
  overflow-x: auto;
  padding: 0 10px;
}
.two-columns .column .uniform-table {
  display: table !important;
  width: 100% !important;
  table-layout: auto !important;
  border-spacing: 0;
  border-collapse: collapse;
}
.two-columns .column .uniform-table th,
.two-columns .column .uniform-table td {
  white-space: nowrap;
  padding: 6px 8px;
  font-size: 0.9rem;
}
}
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text);
}
@media (min-width: 769px) {
  .mobile-menu-toggle { display: none !important; }
  .sidebar {
    transform: none !important;
    transition: none !important;
  }
  .main { margin-left: 240px; }
}
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1500;
    background: var(--color-white);
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.3);
    z-index: 1400;
  }
  .overlay.visible {
    display: block;
  }
  .main {
    margin-left: 0 !important;
  }
}
.mobile-only { display: none; }
.desktop-only { display: inline-block; }
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only  { display: inline-block !important; }
  .ref-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
  }
}
@media (max-width: 768px) {
  .ref-link-box {
    border-right: none !important;
    border-left: 1px solid var(--color-border) !important;
    padding-left: 8px;
    margin-left: 8px;
  }
  .account-status-bar {
    border-left: 1px solid var(--color-border) !important;
    padding-left: 8px;
    margin-left: 8px;
  }
}
@media (max-width: 768px) {
  .node-table {
    border: 0;
  }
  .node-table thead {
    display: none;
  }
  .node-table tr {
    display: block;
    margin-bottom: 1rem;
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
    padding: 10px;
  }
  .node-table td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid var(--color-border);
  }
  .node-table td:last-child {
    border-bottom: none;
  }
  .node-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #555;
  }
}
@media (max-width: 768px) {
  .referral-link-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .referral-link-row code {
    width: 100%;
    word-break: break-all;
    font-size: 0.9rem;
  }
  .referral-link-row .copy-wrapper {
    align-self: flex-start;
  }
  .referral-subtabs,
  .referral-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .referral-subtabs button,
  .referral-tabs button {
    flex: none;
    font-size: 0.85rem;
    padding: 6px 10px;
    white-space: nowrap;
  }
  .metrics-widgets.compact-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .referrals-page .uniform-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .referrals-page .uniform-table th,
  .referrals-page .uniform-table td {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 8px 6px;
  }
}
@media (max-width: 768px) {
  .referral-link-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;     
    gap: 8px !important;
    width: 100% !important;
  }
  .referral-link-row .copy-wrapper {
    margin: 0 !important;
    align-self: center !important;      
    display: inline-block !important;
  }
  .referral-link-row code {
    text-align: center !important;
    width: 100% !important;
    white-space: normal !important;
    word-break: break-all !important;
  }
}
@media (max-width: 768px) {
  .referral-link-box {
    display: block !important;
    padding: 16px !important;
    text-align: center;
  }
  .referral-link-box h3 {
    display: block !important;
    width: 100% !important;
    margin-bottom: 8px !important;
    font-size: 1rem !important;
    text-align: center !important;
  }
  .referral-link-row {
    display: block !important;
    width: 100% !important;
  }
  .referral-link-row code {
    display: block !important;
    margin: 0 auto 12px !important;
    padding: 6px !important;
    background: var(--color-white) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 4px !important;
    word-break: break-all !important;
    text-align: center !important;
    font-size: 0.9rem !important;
  }
  .referral-link-row .copy-wrapper {
    display: block !important;
    margin: 0 auto !important;
  }
  .referral-link-row .copy-wrapper button {
    display: inline-block !important;
    margin: 0 auto !important;
  }
}
@media (max-width: 768px) {
  .referrals-page #subtab-list .uniform-table,
  .referrals-page #subtab-transactions .uniform-table {
    width: 100% !important;
    table-layout: fixed !important;
    display: table !important;
    word-break: break-word !important;
  }
  .referrals-page #subtab-list .uniform-table th:first-child,
  .referrals-page #subtab-list .uniform-table td:first-child {
    width: 60%;
  }
  .referrals-page #subtab-list .uniform-table th:nth-child(2),
  .referrals-page #subtab-list .uniform-table td:nth-child(2) {
    width: 40%;
  }
  .referrals-page #subtab-transactions .uniform-table th:first-child,
  .referrals-page #subtab-transactions .uniform-table td:first-child {
    width: 35%;
  }
  .referrals-page #subtab-transactions .uniform-table th:nth-child(2),
  .referrals-page #subtab-transactions .uniform-table td:nth-child(2) {
    width: 50%;
  }
  .referrals-page #subtab-transactions .uniform-table th:nth-child(3),
  .referrals-page #subtab-transactions .uniform-table td:nth-child(3) {
    width: 15%;
    text-align: right;
  }
}
@media (max-width: 768px) {
  #tab-market > div[style*="display: flex"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 16px 0 !important;
  }
  #tab-market > div[style*="display: flex"] .referral-tab {
    width: 100% !important;
    text-align: center !important;
    padding: 10px 0 !important;
    font-size: 0.95rem !important;
  }
  #tab-market .market-table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 16px !important;
  }
  #tab-market .market-table thead,
  #tab-market .market-table tbody {
    display: table !important;
    width: 100% !important;
    table-layout: fixed !important;
  }
  #tab-market .market-table th,
  #tab-market .market-table td {
    white-space: nowrap !important;
    padding: 8px !important;
    font-size: 0.9rem !important;
  }
  #tab-market #cancel-all-orders {
    width: 100% !important;
    margin-top: 12px !important;
    padding: 10px 0 !important;
  }
  #order-ui-popup .order-form-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  #order-ui-popup .order-form-left,
  #order-ui-popup .order-form-right {
    width: 100% !important;
  }
}
@media (max-width: 768px) {
  #tab-market > div[style*="display: flex"] .referral-tab {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }
  #cancel-all-orders {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }
  #tab-market .market-table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
  }
  #tab-market .market-table th,
  #tab-market .market-table td {
    white-space: nowrap !important;
    padding: 6px 8px !important;
    font-size: 0.85rem !important;
  }
  #order-ui-popup .order-form-grid {
    flex-direction: column !important;
  }
  #order-ui-popup .order-form-left,
  #order-ui-popup .order-form-right {
    width: 100% !important;
  }
}
@media (max-width: 768px) {
  .market-table,
  .thin-table,
  .referral-table {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: auto !important;
  }
  .market-table th, .market-table td,
  .thin-table th,  .thin-table td,
  .referral-table th, .referral-table td {
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
  }
  .market-table td button,
  .thin-table td button,
  .referral-table td button {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
  }
}
.mobile-only { display: none; }
.desktop-only { display: inline; }
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only  { display: inline !important; }
  abbr[title] {
    border-bottom: 1px dotted rgba(0,0,0,0.4);
    cursor: help;
    text-decoration: none;
  }
  abbr[title]:hover {
    color: var(--color-primary);
  }
}
.market-table {
  table-layout: fixed;         
  width: 100%;
}
.market-table th,
.market-table td {
  overflow: hidden;            
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-table .col-email {
  width: 40%;
}
.market-table .col-refs {
  width: 15%;
}
.market-table td:nth-child(2),
.market-table th.col-refs {
  padding-left: 12px;          
  text-align: center;
}
.market-table .col-re    { width: 10%; }
.market-table .col-bl    { width: 10%; }
.market-table .col-oe    { width: 10%; }
.market-table .col-price { width: 10%; }
.market-table .col-act   { width: 15%; }
.market-table-wrapper {
  overflow-x: auto;
}
.mobile-only { display: none; }
.desktop-only { display: inline; }
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only  { display: inline !important; }
}
.modal-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: auto !important;
}
.modal-table th,
.modal-table td {
  white-space: nowrap;
  padding: 10px 8px;
}
@media (max-width: 768px) {
  .modal-table th,
  .modal-table td {
    padding: 6px 4px !important;
    font-size: 0.85rem !important;
  }
}
#referral-popup-list {
  display: flex;        
  flex: 1 1 auto;       
  min-width: 0;         
  overflow-x: auto;     
  overflow-y: auto;     
}
#referral-popup-list table {
  width: 100%;          
  table-layout: auto;   
}
#referral-popup .modal-ui-content {
  width: 100%;
  min-height: 500px; 
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#referral-popup-list {
  overflow-y: auto;
  flex-grow: 1;
  min-height: 300px; 
}
.market-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.filter-input {
  width: 140px;
  padding: 8px 12px;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.2);
}
.clear-btn {
  padding: 8px 16px;
  font-size: 0.95rem;
  background: var(--color-white);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.clear-btn:hover {
  background: var(--color-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.orders-pager button {
  margin: 0 4px;
  padding: 4px 8px;
  border: 1px solid var(--color-primary);
  background: var(--color-white);
  color: var(--color-primary);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.orders-pager button:hover {
  background: var(--color-primary-2);
  color: var(--color-white);
}
.orders-pager span {
  font-size: 0.9rem;
  margin: 0 8px;
}
.header {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  width: 100%;
  justify-content: space-between; 
  align-items: center;
}
.header-left {
  display: flex;
  align-items: center;  
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.mobile-menu-toggle {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
}
.account-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-track {
  width: 80px; height: 8px;
  background: #eee; border-radius: 4px;
  overflow: hidden;
}
.status-fill {
  height: 100%; width: 31%; background: var(--color-success);
}
.boost-wrapper { position: relative; }
.boost-tooltip {
  position: absolute; top: 28px; left: 0;
  background: #fff; border: 1px solid #ddd;
  border-radius: 6px; padding: 10px;
  box-shadow: var(--shadow-sm); z-index: 999;
}
.avatar-dropdown {
  display: none;           
}
.avatar-dropdown.visible {
  display: block !important;
}
.referral-info-popup {
  max-width: 400px;
  padding: 24px;
  position: relative;
  text-align: left;
}
.referral-info-popup .modal-ui-close {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 1.2rem;
  background: none; border: none;
  cursor: pointer; color: #999;
}
.referral-info-popup .popup-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px;
}
.referral-info-popup .popup-header i {
  font-size: 1.5rem;
  color: var(--color-primary);
}
.referral-info-popup h3 {
  margin: 0; font-size: 1.25rem;
}
.referral-info-popup p {
  margin-bottom: 16px;
  color: #555;
  line-height: 1.4;
}
.popup-steps {
  list-style: decimal inside;
  margin-bottom: 20px;
}
.popup-steps li {
  margin-bottom: 12px;
  color: #333;
  line-height: 1.4;
}
.popup-steps li strong {
  color: var(--color-primary);
}
.popup-footer {
  text-align: right;
}
.popup-footer .buy-btn {
  padding: 8px 16px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
}
.popup-footer .buy-btn:hover {
  background: var(--color-primary-2);
}
.sidebar .logo {
  display: flex;
  align-items: center;
  padding: 0 20px;
  margin-bottom: 30px;
}
.sidebar-logo {
  height: 32px;
  width: auto;
  margin-right: 8px;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}
.header-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  justify-content: flex-end;
}
.mobile-menu-toggle {
  flex: 0 0 auto;
}
@media (max-width: 768px) {
  .header-inner {
    justify-content: space-between;
  }
  .header-left,
  .header-right {
    align-items: center;
  }
}
.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  text-transform: capitalize;
}
.badge-common    { background: #888888; }
.badge-good  { background: #52c41a; }
.badge-rare      { background: #fa8c16; }
.badge-epic      { background: #1890ff; }
.badge-legendary { background: #722ed1; }
.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  z-index: 10000;
  animation: fadeOut 3s ease-out forwards;
}
.notification.success {
  background-color: #52c41a !important;  
}
.notification.error {
  background-color: #ff4d4f !important;  
}
.referral-tab,
.referral-subtab {
  border-radius: 0 !important;          
  padding: 10px 18px;                    
  background: #f5f7fa;
  border: 1px solid #d9d9d9;
  color: var(--color-text);
  box-shadow: none;
}
.referral-tab:hover,
.referral-subtab:hover {
  background: var(--color-primary-2);
  border-color: var(--color-primary-2);
  color: #fff;
  transform: none;                       
}
.referral-tab.active,
.referral-subtab.active {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.12); 
}
.referral-tab.red.active,
.referral-subtab.red.active {
  background: var(--color-danger) !important;
  border-color: var(--color-danger) !important;
}
.square-btn {
  border-radius: 0 !important;
}
.buy-btn,
.market-btn,
.primary-btn {
  border-radius: 0 !important;
}
.market-actions{
  margin:16px 0;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.ref-btn{
  appearance:none;
  border:1px solid var(--color-primary);
  background: var(--color-white);
  color: var(--color-primary);
  padding:10px 18px;
  font-size:0.95rem;
  font-weight:600;
  line-height:1;
  border-radius:0;                 
  cursor:pointer;
  transition:background .15s,color .15s,border-color .15s;
}
.ref-btn:hover{
  background: var(--color-primary-2);
  border-color: var(--color-primary-2);
  color:#fff;
}
.ref-btn--primary{
  background: var(--color-primary);
  border-color: var(--color-primary);
  color:#fff;
}
.ref-btn--primary:hover{
  background: var(--color-primary-2);
  border-color: var(--color-primary-2);
}
.ref-btn--danger{
  background: var(--color-danger);
  border-color: var(--color-danger);
  color:#fff;
}
.ref-btn--danger:hover{
  background:#ff7875;
  border-color:#ff7875;
}
.ref-btn:disabled,
.ref-btn.disabled-btn{
  background:#ccc !important;
  border-color:#ccc !important;
  color:#666 !important;
  cursor:not-allowed !important;
  box-shadow:none !important;
}
.my-orders-wrap{
  max-height: 60vh;     
  overflow-y: auto;
  overflow-x: auto;
}
#my-orders-pager button{
  margin: 0 4px;
  padding: 6px 10px;
  border: 1px solid var(--color-primary);
  background: var(--color-white);
  color: var(--color-primary);
  cursor: pointer;
  font-size: .9rem;
  border-radius: 0;       
  transition: background .2s;
}
#my-orders-pager button:hover:not([disabled]){
  background: var(--color-primary-2);
  color: #fff;
}
#my-orders-pager button[disabled]{
  opacity: .4;
  cursor: not-allowed;
}
#my-orders-pager span{
  margin: 0 8px;
  font-size: .9rem;
}
.orders-pager button[disabled] {
  opacity: .4;
  cursor: not-allowed;
}
#referral-pagination{
  display:flex;
  gap:8px;
  justify-content:center;
  align-items:center;
  margin-top:12px;
  font-size:14px;
}
#referral-pagination .referral-tab{
  min-width:32px;
  height:32px;
  padding:0 !important;
  line-height:30px;
  border:1px solid var(--color-primary) !important;
  background:#fff !important;
  color:var(--color-primary) !important;
  border-radius:4px;
  box-shadow:none !important;
  cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
}
#referral-pagination .referral-tab.red{
  background:var(--color-primary) !important;
  color:#fff !important;
  border-color:var(--color-primary) !important;
}
#referral-pagination .referral-tab:hover:not(.red){
  background:var(--color-primary-2) !important;
  border-color:var(--color-primary-2) !important;
  color:#fff !important;
}
#referral-pagination .ellipsis{
  color:#999;
  padding:0 4px;
  user-select:none;
}
.orders-wrap{
  position:relative;
  padding-bottom:56px;          
  min-height:520px;             
}
#orders-pager{
  position:absolute;
  left:0; bottom:0;
  width:100%;
  height:56px;                  
  display:flex;
  justify-content:center;
  align-items:center;
  background:#fff;
}
tr.placeholder td{
  height:44px;                  
  border-bottom:1px solid transparent;
  background:transparent;
  padding:10px;
}
.referral-tabs{
  display:flex;
  gap:8px;
  margin:12px 0 24px;   
}
