
/* ================= COMPLETE LIGHT & DARK THEME SYSTEM ================= */
:root, [data-theme="light"] {
  --bg-primary: #f6f8fa !important;
  --bg-sidebar: #ffffff !important;
  --bg-card: #ffffff !important;
  --border-color: #e2e8f0 !important;
  --border-focus: rgba(0, 184, 82, 0.4) !important;
  
  --text-primary: #0f172a !important;
  --text-secondary: #475569 !important;
  --text-muted: #64748b !important;
  --bg-hover: rgba(0, 0, 0, 0.05) !important;
  
  --shadow-main: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="dark"] {
  --bg-primary: #0b0f19 !important;
  --bg-sidebar: #111827 !important;
  --bg-card: #111827 !important;
  --border-color: #1f2937 !important;
  --border-focus: rgba(0, 184, 82, 0.4) !important;
  
  --text-primary: #f9fafb !important;
  --text-secondary: #9ca3af !important;
  --text-muted: #6b7280 !important;
  --bg-hover: rgba(255, 255, 255, 0.08) !important;
  
  --shadow-main: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}


/* ================= PROPER GLOBAL SCROLLBAR SUPPRESSION ================= */
::-webkit-scrollbar,
*::-webkit-scrollbar,
::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb,
::-webkit-scrollbar-track,
*::-webkit-scrollbar-track,
::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

*, html, body, div, section, main, pre, code, iframe, input, textarea, form, button, ul, ol, li {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}


/* ================= ABSOLUTE UNCONDITIONAL GLOBAL SCROLLBAR SUPPRESSION ================= */


html, body, *, div, section, main, pre, code, iframe, input, textarea, form, button, ul, ol, li {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}




/* ==========================================================================
   CSS Core Design System & Theme Customizations (Glassmorphism Deep Dark)
   ========================================================================== */

:root {
  --bg-primary: #f6f8fa;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --border-color: #cbd5e1;
  --border-focus: rgba(0, 184, 82, 0.4);
  
  --text-primary: #1f2328;
  --text-secondary: #57606a;
  --text-muted: #8c959f;
  
  --primary: #00b852;
  --primary-hover: #009e46;
  --secondary: #10b981;
  --cyan: #00b852;
  
  --green: #00b852;
  --green-glow: rgba(0, 184, 82, 0.08);
  --red: #f43f5e;
  --red-glow: rgba(244, 63, 94, 0.08);
  --orange: #d97706;
  
  --shadow-main: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Inter', sans-serif;
  --font-mono: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  font-variant-numeric: tabular-nums;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Glow FX */
.bg-glow {
  display: none !important;
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.2;
  pointer-events: none;
}

/* Scrollbar styles */
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
::-webkit-scrollbar-track { display: none !important; }
::-webkit-scrollbar-thumb { display: none !important; }
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  max-width: 100% !important;
  margin: 0;
  padding: 16px;
  box-sizing: border-box;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-main);
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.workspace-header-tabs {
  position: sticky !important;
  top: 0 !important;
  z-index: 990 !important;
  background: var(--bg-card, #ffffff) !important;
  backdrop-filter: blur(16px) !important;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-indices-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-index-widget {
  background: rgba(0, 0, 0, 0.02) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
}
.header-index-widget .index-name {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--text-secondary) !important;
}
.header-index-widget .index-price-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.header-index-widget .index-ltp {
  font-size: 13px !important;
  font-weight: 700 !important;
}
.header-index-widget .index-change {
  font-size: 11px !important;
  font-weight: 500 !important;
}
.header-profile-dropdown:hover {
  background: rgba(0, 0, 0, 0.08) !important;
  border-color: var(--primary) !important;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  font-size: 24px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}
.logo h1 span {
  font-weight: 300;
  color: var(--cyan);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.03);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid var(--border-color);
}
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-indicator.online {
  background-color: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Main Workspace */
.workspace {
  display: flex;
  gap: 16px;
  flex: 1;
  min-height: 0; /* Important for flex child overflow */
}

/* Sidebar (Hidden on Desktop in favor of Top Header Navigation) */
.sidebar {
  display: none !important;
}

.horizontal-nav {
  display: flex !important;
  flex-direction: row !important;
  gap: 12px !important;
}

.horizontal-nav .nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #6b7280;
  padding: 6px 4px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.horizontal-nav .nav-btn i {
  font-size: 12px;
  color: #9ca3af;
  transition: color 0.2s ease;
}
.horizontal-nav .nav-btn:hover {
  color: #111827;
  background: transparent;
}
.horizontal-nav .nav-btn:hover i {
  color: #111827;
}
.horizontal-nav .nav-btn.active {
  background: transparent;
  border-bottom: 2px solid #f59e0b;
  color: #111827;
  font-weight: 700;
}
.horizontal-nav .nav-btn.active i {
  color: #f59e0b;
}

/* Content Area */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
  flex-direction: column;
  gap: 16px;
}
.tab-content.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  padding: 24px;
  box-shadow: var(--shadow-main);
  transition: var(--transition);
}
.card:hover {
  border-color: rgba(0, 184, 82, 0.3);
  box-shadow: 0 12px 24px -4px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}
.card.double-width {
  grid-column: span 2;
}
.card.flex-column {
  display: flex;
  flex-direction: column;
}

.card-header {
  margin-bottom: 20px;
}
.card-header h2 {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header h2 i {
  color: var(--primary);
}
.card-header .subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
  margin-top: 4px;
}

/* Grid Layouts */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

/* Stat Card */
.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
}
.stat-card.small {
  padding: 16px;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.stat-icon.purple { background: rgba(0, 184, 82, 0.08); color: var(--primary); }
.stat-icon.blue { background: rgba(16, 185, 129, 0.08); color: var(--secondary); }
.stat-icon.green { background: rgba(0, 184, 82, 0.08); color: var(--green); }
.stat-icon.cyan { background: rgba(0, 184, 82, 0.08); color: var(--cyan); }

.stat-info h3 {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-info span {
  font-size: 24px;
  font-weight: 700;
  display: block;
  margin-top: 4px;
}

/* Topology Node Diagram */
.topology-container {
  min-height: 250px;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
}
.empty-state {
  text-align: center;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 14px;
}

/* Topology Graph elements */
.topology-graph {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
}
.topo-node {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: 12px;
  text-align: center;
  min-width: 140px;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.topo-node.master {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 184, 82, 0.15);
}
.topo-node.child {
  border-color: var(--secondary);
}
.topo-node .node-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.topo-node .node-broker {
  font-size: 11px;
  color: var(--text-secondary);
}
.topo-node .node-sim {
  font-size: 9px;
  background: rgba(255, 145, 0, 0.15);
  color: var(--orange);
  padding: 2px 6px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 4px;
}
.topo-connections {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  height: 150px;
  position: relative;
}
.topo-line {
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}
.topo-line::after {
  content: '▶';
  font-size: 8px;
  color: var(--secondary);
  position: absolute;
  right: 10%;
}
.topo-line .line-label {
  position: absolute;
  top: -18px;
  font-size: 11px;
  color: var(--cyan);
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* Quick Status List */
.account-status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}
.status-item-name {
  font-size: 14px;
  font-weight: 500;
}
.status-item-broker {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 10px;
}
.badge.connected { background: rgba(16, 185, 129, 0.1); color: var(--green); }
.badge.disconnected { background: rgba(244, 63, 94, 0.1); color: var(--red); }
.badge.market-open { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.badge.market-closed { background: rgba(244, 63, 94, 0.12); color: var(--red); }

/* Forms & Modals */
.section-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-actions h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin: 0;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-close:hover {
  color: var(--text-primary);
}

.form-card {
  margin-bottom: 20px;
  animation: slideDown 0.3s ease;
}
.form-card.hidden {
  display: none;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.form-group input, .form-group select {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 8px rgba(0, 184, 82, 0.2);
}

.form-row {
  display: flex;
  gap: 12px;
}
.colspan-2 {
  grid-column: span 2;
}
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.broker-fields {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.broker-fields.hidden {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
}
.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 184, 82, 0.2);
}
.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
}
.btn-danger {
  background: var(--red-glow);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--red);
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}
.btn-block {
  width: 100%;
}
.btn-icon {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 16px;
  cursor: pointer;
}
.btn-icon:hover {
  color: var(--text-primary);
}

/* Accounts Cards Grid */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.account-card {
  border-left: 4px solid var(--text-muted);
}
.account-card.master {
  border-left-color: var(--primary);
}
.account-card.child {
  border-left-color: var(--secondary);
}

.account-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}
.account-title h3 {
  font-size: 16px;
  font-weight: 600;
}
.account-role-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  margin-top: 4px;
  display: inline-block;
}
.account-role-tag.master {
  background: rgba(0, 184, 82, 0.1);
  color: var(--primary);
}
.account-role-tag.child {
  background: rgba(16, 185, 129, 0.1);
  color: var(--secondary);
}

.account-broker-logo {
  font-size: 12px;
  background: rgba(0, 0, 0, 0.03);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.account-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.account-details-row {
  display: flex;
  justify-content: space-between;
}
.account-details-row span:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.account-card-actions {
  display: flex;
  gap: 10px;
}
.account-card-actions button {
  flex: 1;
}

/* Tables */
.table-container {
  overflow-x: auto;
  width: 100%;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
.data-table th, .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}
.data-table th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.table-actions {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-start;
}

/* Mapping Inputs */
.table-input {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  width: 80px;
  font-family: inherit;
}
.table-select {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: inherit;
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--green);
}
input:checked + .slider:before {
  transform: translateX(18px);
}

/* Simulator View */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  align-items: stretch;
}

.compact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.radio-toggle {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  overflow: hidden;
  height: 38px;
}
.radio-toggle input {
  display: none;
}
.radio-toggle label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  color: var(--text-secondary);
}
.radio-toggle input:checked + label.buy-label {
  background: var(--green);
  color: #ffffff;
}
.radio-toggle input:checked + label.sell-label {
  background: var(--red);
  color: #ffffff;
}

/* Console logs */
.justify-between { justify-content: space-between; }
.align-center { align-center: center; }
.flex-row { display: flex; flex-direction: row; }

.console-output {
  background: rgba(5, 7, 15, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: #c5cdd8;
  overflow-y: auto;
  flex: 1;
  min-height: 380px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.console-line {
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  padding-bottom: 6px;
  word-break: break-all;
}
.console-time {
  color: var(--text-muted);
  margin-right: 8px;
}
.console-tag {
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
  font-size: 10px;
  text-transform: uppercase;
}
.console-tag.info { background: rgba(6, 182, 212, 0.15); color: var(--secondary); }
.console-tag.success { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.console-tag.error { background: rgba(244, 63, 94, 0.15); color: var(--red); }
.console-tag.engine { background: rgba(168, 85, 247, 0.15); color: var(--primary); }
.console-tag.api-request { background: rgba(34, 211, 238, 0.15); color: var(--cyan); }

.console-details {
  display: block;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px;
  border-radius: 4px;
  margin-top: 4px;
  font-size: 11px;
  color: #8da2bb;
  white-space: pre-wrap;
}

/* Portfolio View dropdown */
.dropdown-accent {
  background: rgba(0, 184, 82, 0.08) !important;
  border: 1px solid var(--border-focus) !important;
  color: var(--text-primary);
  font-weight: 600;
}

.text-green { color: var(--green) !important; }
.text-red { color: var(--red) !important; }

/* Watchlist Price Tickers */
@keyframes flash-green {
  0% { text-shadow: 0 0 8px var(--green); background-color: rgba(16, 185, 129, 0.25); }
  100% { text-shadow: none; background-color: transparent; }
}
@keyframes flash-red {
  0% { text-shadow: 0 0 8px var(--red); background-color: rgba(244, 63, 94, 0.25); }
  100% { text-shadow: none; background-color: transparent; }
}
.flash-up {
  animation: flash-green 1.2s ease-out;
}
.flash-down {
  animation: flash-red 1.2s ease-out;
}

/* Order Status Badges */
.badge.status-pending { background: rgba(255, 145, 0, 0.15); color: var(--orange); }
.badge.status-open { background: rgba(255, 145, 0, 0.15); color: var(--orange); }
.badge.status-confirm { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.badge.status-traded { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.badge.status-executed { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.badge.status-cancelled { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }
.badge.status-cancel { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }
.badge.status-rejected { background: rgba(244, 63, 94, 0.15); color: var(--red); }
.badge.status-error { background: rgba(244, 63, 94, 0.15); color: var(--red); }

/* Autocomplete Suggestions */
.autocomplete-suggestions {
  position: absolute;
  top: 105%;
  left: 0;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}
.autocomplete-suggestions.hidden {
  display: none;
}
.suggestion-item {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}
.suggestion-item:last-child {
  border-bottom: none;
}
.suggestion-item:hover {
  background: rgba(255, 255, 255, 0.07);
}
.suggestion-item .stock-sym {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}
.suggestion-item .stock-name {
  color: var(--text-secondary);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Three Column Dashboard & Mobile Responsiveness Styles
   ========================================================================== */

/* Three Column Dashboard layout for desktop */
.dashboard-layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr;
  gap: 16px;
  align-items: start;
}

#groups-section-card {
  grid-column: span 3;
  margin-bottom: 8px;
}

.status-widgets-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Responsive Styles for Tablet and Mobile devices */
@media (max-width: 1024px) {
  .dashboard-layout-grid {
    grid-template-columns: 1fr 1fr;
  }
  .status-widgets-column {
    grid-column: span 2;
    flex-direction: row;
    gap: 16px;
  }
  .status-widgets-column > .card {
    flex: 1;
  }
}

@media (max-width: 768px) {
  html:not(.landing-active), body:not(.landing-active) {
    height: 100%;
    overflow: hidden;
  }

  /* Layout adjustments */
  .app-container {
    padding: 8px;
    height: 100% !important;
    overflow: hidden;
  }

  .app-header {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    text-align: left;
    margin-bottom: 8px;
    border-radius: 10px;
  }

  .logo h1 {
    font-size: 15px !important;
  }

  .logo-icon {
    font-size: 18px !important;
  }

  .system-status {
    padding: 4px 10px;
    font-size: 11px;
    gap: 6px;
  }

  .workspace {
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  /* Sidebar hidden on mobile (replaced by bottom nav) */
  .sidebar {
    display: none !important;
  }

  /* Main content area */
  .content-area {
    padding-right: 0;
    flex: 1;
    overflow: hidden !important;
    padding-bottom: 0 !important;
    height: 100% !important;
    display: flex;
    flex-direction: column;
  }

  .overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  
  .stat-card .stat-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
  }

  .stat-info h3 {
    font-size: 10px !important;
    letter-spacing: 0px !important;
  }

  .stat-info span {
    font-size: 16px !important;
    margin-top: 2px !important;
  }

  #tab-overview,
  #tab-accounts,
  #tab-simulator {
    padding-bottom: 90px !important;
  }

  .dashboard-layout-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #groups-section-card {
    grid-column: span 1 !important;
    margin-bottom: 8px !important;
  }

  .status-widgets-column {
    grid-column: span 1;
    flex-direction: column;
    gap: 12px;
  }

  /* Detail grids & forms */
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .simulator-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .grid-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .broker-fields {
    grid-template-columns: 1fr !important;
    grid-column: span 1 !important;
    gap: 12px;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-group input, .form-group select {
    font-size: 16px;
  }

  .colspan-2 {
    grid-column: span 1 !important;
  }

  .topology-container {
    overflow-x: auto !important;
    justify-content: flex-start !important;
  }

  .topology-graph {
    min-width: 480px;
  }

  /* Cards & Cards headers */
  .card {
    padding: 16px;
    border-radius: 12px;
  }

  .card-header {
    margin-bottom: 12px;
  }

  .card-header h2 {
    font-size: 15px;
  }

  /* Table responsiveness */
  .table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 500px; /* Force table scrolling rather than squeezing */
    font-size: 12px;
  }

  .data-table th, .data-table td {
    padding: 10px 8px;
  }

  /* Autocomplete box fit */
  .autocomplete-suggestions {
    width: 100%;
    max-width: 280px;
  }

  /* Account cards */
  .accounts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==========================================================================
   Mobile Bottom Navigation Bar Styles
   ========================================================================== */
.mobile-bottom-nav {
  display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
    padding-bottom: env(safe-area-inset-bottom); /* Safe area padding for iPhones */
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    gap: 4px;
    cursor: pointer;
    flex: 1;
    height: 100%;
    transition: var(--transition);
    padding: 8px 0;
  }

  .mobile-nav-btn i {
    font-size: 20px;
    transition: transform 0.2s ease;
  }

  .mobile-nav-btn span {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  .mobile-nav-btn:hover {
    color: var(--text-primary);
  }

  .mobile-nav-btn.active {
  color: var(--primary);
  text-shadow: none;
}

  .mobile-nav-btn.active i {
    transform: scale(1.1);
  }
}

/* ==========================================================================
   Premium List-Based Watchlist & Stock Details Modal Styles
   ========================================================================== */

.wl-tabs-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wl-tab {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.wl-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.wl-tab-add-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
}

.wl-tab-add-btn:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.06);
}

.wl-recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

#btn-clear-watchlist {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

#btn-clear-watchlist:hover {
  text-decoration: underline;
}

.watchlist-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.watchlist-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  transition: var(--transition);
  margin-bottom: 0;
}

.watchlist-item-row:hover {
  background: rgba(0, 184, 82, 0.04);
}

.wl-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.wl-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 184, 82, 0.08);
  border: 1px solid rgba(0, 184, 82, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  flex-shrink: 0;
}

.wl-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.wl-sym-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wl-sym {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.wl-exchange-badge {
  font-size: 9px;
  font-weight: 700;
  background: rgba(30, 27, 24, 0.04);
  color: var(--text-secondary);
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  text-transform: uppercase;
}

.wl-company {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-item-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.wl-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  cursor: pointer;
  min-width: 80px;
}

.wl-price {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.wl-change {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
}

.wl-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wl-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.wl-btn.buy {
  background: var(--green);
  color: #fff;
}

.wl-btn.buy:hover {
  background: #059669;
}

.wl-btn.sell {
  background: var(--red);
  color: #fff;
}

.wl-btn.sell:hover {
  background: #e11d48;
}

.wl-btn.star {
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
}

.wl-btn.star.active {
  color: var(--orange);
}

.wl-btn.star:hover {
  color: var(--text-primary);
}

/* Bottom Sheet / Modal */
.bottom-sheet-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.bottom-sheet-modal.hidden {
  display: none !important;
}

.bottom-sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}

.bottom-sheet-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid var(--border-color);
  border-bottom: none;
  padding: 24px;
  z-index: 1;
  box-shadow: 0 -8px 32px rgba(30, 27, 24, 0.04);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  will-change: transform, opacity;
}

@keyframes slideUp {
  from { transform: translate3d(0, 100%, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.bottom-sheet-drag-handle {
  width: 60px;
  height: 28px;
  align-self: center;
  margin-bottom: 8px;
  position: relative;
  cursor: grab;
}

.bottom-sheet-drag-handle::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 10px;
  width: 40px;
  height: 4px;
  background: var(--text-muted);
  opacity: 0.3;
  border-radius: 2px;
}

.bottom-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.bs-title-block h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.bs-title-block .subtitle {
  font-size: 10.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.bs-price-block {
  text-align: right;
}

#bs-price {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

#bs-change {
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.bs-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  gap: 8px;
  text-align: center;
}

.bs-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bs-stat .label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.bs-stat .value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Market Depth */
.bs-depth-section {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
}

.depth-table-header {
  display: grid;
  grid-template-columns: 1.2fr 2fr 2fr 1.2fr;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.depth-table-header span:nth-child(2),
.depth-table-header span:nth-child(4) {
  text-align: right;
}

.depth-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.depth-row {
  display: grid;
  grid-template-columns: 1.2fr 2fr 2fr 1.2fr;
  font-family: var(--font-mono);
}

.depth-row span:nth-child(2),
.depth-row span:nth-child(4) {
  text-align: right;
}

.depth-row .buy-qty { color: var(--text-secondary); text-align: left; }
.depth-row .buy-price { color: var(--green); }
.depth-row .sell-price { color: var(--red); text-align: left; }
.depth-row .sell-qty { color: var(--text-secondary); }

.depth-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 8px;
}

.depth-total-row span:nth-child(2) {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}

/* Tool Buttons and Action Buttons */
.bs-tool-buttons {
  display: flex;
  gap: 10px;
}

.bs-action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-buy {
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-buy:hover {
  background: #059669;
}

.btn-sell {
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-sell:hover {
  background: #e11d48;
}

/* Responsive centered modal on desktop */
@media (min-width: 769px) {
  .bottom-sheet-modal {
    align-items: center;
  }
  .bottom-sheet-content {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.25s ease;
  }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Indices Header Tickers --- */
.wl-index-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.index-widget {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
}

.index-widget:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 184, 82, 0.05);
}

.index-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.index-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.index-expiry {
  font-size: 9px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
}

.index-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 2px;
}

.index-ltp {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.index-change {
  font-size: 10px;
  font-weight: 600;
}

/* --- Watchlist Height Scroll Locks --- */
#watchlist-card {
  display: flex;
  flex-direction: column;
  height: auto;
}

@media (max-width: 768px) {
  .tab-content {
    height: calc(100% - 68px - env(safe-area-inset-bottom)) !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
    flex-direction: column;
    padding-bottom: 0 !important;
  }

  .tab-content.active {
    display: flex;
  }

  /* Watchlist Tab specific: no vertical scroll for the tab itself! */
  #tab-watchlist {
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }
  
  #mobile-watchlist-container {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  #watchlist-card {
    height: 100% !important;
    max-height: 100% !important;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 4px !important;
  }
}

.watchlist-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto !important;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.watchlist-list::-webkit-scrollbar,
#watchlist-card::-webkit-scrollbar,
#mobile-watchlist-container::-webkit-scrollbar,
#tab-watchlist::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

/* --- Order Placement Screen Styling --- */
.product-btn {
  flex: 1;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: var(--transition);
}

.product-btn span {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
}

.product-btn.active {
  border-color: var(--green);
  background: rgba(0, 184, 82, 0.06);
  color: var(--green);
}

.product-btn.active.sell-mode {
  border-color: var(--red);
  background: rgba(244, 63, 94,0.06);
  color: var(--red);
}

.product-btn.active span {
  color: inherit;
}

.price-adjuster input::-webkit-outer-spin-button,
.price-adjuster input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Base adjustment buttons and price mode toggles */
.mode-btn {
  flex: 1;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.adjust-btn-box {
  width: 44px;
  height: 100%;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.adjust-btn-box:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--primary);
}

.adjust-btn-box:active {
  background: rgba(0, 0, 0, 0.1);
}

.price-mode-toggle .mode-btn.active {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: #fff !important;
}

.price-mode-toggle .mode-btn.active.sell-mode {
  background: var(--red) !important;
  border-color: var(--red) !important;
  color: #fff !important;
}

.btn-order-submit.btn-buy {
  background: var(--green);
}

.btn-order-submit.btn-buy:hover {
  background: #059669;
}

.btn-order-submit.btn-sell {
  background: var(--red);
}

.btn-order-submit.btn-sell:hover {
  background: #e11d48;
}

/* Watchlist Footer Actions */
.wl-footer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: transparent;
  z-index: 10;
}

.wl-footer-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-primary);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.wl-footer-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: var(--border-color);
}

.wl-footer-more-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.wl-footer-more-btn:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
}

/* Order Placement Exchange Selectors */
.order-exchanges {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 12px !important;
  white-space: nowrap !important;
  width: 100% !important;
  margin-top: 4px;
}
.order-exchanges > span {
  transition: var(--transition);
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
}
.order-exchanges > span:hover {
  background: rgba(0, 0, 0, 0.02);
}
.order-exchanges > span.active-exchange {
  color: var(--text-primary) !important;
  font-weight: 700;
}

/* Disabled state styling for inputs and selects inside the order placement sheet */
#order-placement-modal input:disabled,
#order-placement-modal select:disabled {
  background: rgba(0, 0, 0, 0.02) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
  border-color: var(--border-color) !important;
  opacity: 0.65;
}

.price-type-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  gap: 8px !important;
  align-items: center !important;
}
.radio-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  transition: var(--transition);
}
.radio-dot.empty {
  border: 1px solid var(--text-muted) !important;
  background: transparent !important;
}

/* Global Hidden Utility */
.hidden {
  display: none !important;
}

/* Mobile Header Search Portal */
#header-mobile-search-portal {
  flex: 1;
  width: 100%;
  padding: 0;
}
#header-mobile-search-portal .search-container {
  margin-bottom: 0 !important;
  width: 100%;
}
#header-mobile-search-portal input {
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  font-size: 15px !important;
  padding: 10px 14px 10px 38px !important;
  border-radius: 8px !important;
  width: 100% !important;
}
#header-mobile-search-portal .autocomplete-suggestions {
  width: 100%;
  max-width: 100%;
  top: 110%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  z-index: 9999 !important;
}

/* Optimized Indices Widgets for mobile */
@media (max-width: 768px) {
  .wl-index-header {
    gap: 8px;
    margin-bottom: 10px;
  }
  .index-widget {
    padding: 8px 10px;
    border-radius: 8px;
    gap: 2px;
  }
  .index-name {
    font-size: 10px;
  }
  .index-expiry {
    font-size: 8px;
    padding: 0px 3px;
  }
  .index-ltp {
    font-size: 12px;
  }
  .index-change {
    font-size: 9px;
  }
}

/* Mobile Orders Unified Main & Sub Toggles */
.orders-main-toggle-header {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
  padding: 0 4px;
}

.orders-toggle-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary) !important;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.orders-toggle-tab.active {
  color: #000000 !important;
  font-weight: 700 !important;
  border-bottom: 3px solid var(--primary) !important;
}

.orders-sub-toggle-header {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  margin-bottom: 14px;
  padding: 0 8px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.orders-sub-toggle-header::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }

.orders-sub-btn {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: #000000 !important;
  padding: 6px 18px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  flex-shrink: 0;
}

.orders-sub-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
}

/* --- Mobile Order Card Layout Styles (Angel One replica) --- */
.mobile-order-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-main);
  transition: var(--transition);
}

.mobile-order-card:hover {
  border-color: var(--primary);
  background: var(--bg-card);
}

.mobile-order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-order-card-sym {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary) !important;
}

.mobile-order-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary) !important;
  font-family: var(--font-mono);
}

.mobile-order-card-middle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.mobile-order-card-ltp {
  font-size: 12px;
}

.mobile-order-card-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.mobile-order-card-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mobile-order-card-badge.buy {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #059669 !important;
  font-weight: 700 !important;
}

.mobile-order-card-badge.sell {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #e11d48 !important;
  font-weight: 700 !important;
}

.mobile-order-card-badge.normal {
  background: rgba(0, 0, 0, 0.05) !important;
  color: var(--text-secondary) !important;
}

.mobile-order-card-badge.status-pending {
  background: rgba(217, 119, 6, 0.15) !important;
  color: #d97706 !important;
  font-weight: 700 !important;
}

.mobile-order-card-badge.status-executed {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #059669 !important;
  font-weight: 700 !important;
}

.mobile-order-card-badge.status-rejected {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #e11d48 !important;
  font-weight: 700 !important;
}

.mobile-order-card-badge.status-cancelled {
  background: rgba(0, 0, 0, 0.06) !important;
  color: var(--text-muted) !important;
}

.mobile-order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 2px;
}

.mobile-order-card-time {
  font-size: 11px;
  color: var(--text-muted);
}

.mobile-order-card-actions {
  display: flex;
  gap: 8px;
}

.mobile-order-card-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-order-card-btn.cancel {
  background: rgba(244, 63, 94, 0.12);
  color: var(--red);
}

.mobile-order-card-btn.cancel:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* ==========================================================================
   Premium Authentication Screen Styles
   ========================================================================== */

.auth-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-primary);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.auth-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none !important;
}

.auth-split-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.auth-split-container:hover {
  box-shadow: 0 30px 70px rgba(0, 184, 82, 0.08);
}

.auth-screen.hidden .auth-split-container {
  transform: translateY(20px);
}

.auth-marketing-side {
  display: none;
}

.auth-form-side {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
}

.auth-card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  width: 100%;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Desktop Split Layout Media Query */
@media (min-width: 992px) {
  .auth-split-container {
    max-width: 960px;
    height: 600px;
    max-height: 85vh;
    flex-direction: row;
  }
  
  .auth-marketing-side {
    display: flex;
    flex: 1.25;
    background: #fffcf9; /* Light warm background matching ZuluTrade screenshot */
    border-right: 1px solid var(--border-color);
    align-items: center;
    justify-content: center;
    padding: 32px;
    position: relative;
  }
  
  .auth-marketing-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .auth-form-side {
    flex: 1;
    background: #ffffff;
    overflow-y: auto;
  }
  
  .auth-card {
    padding: 40px 48px;
    justify-content: flex-start;
    min-height: 100%;
  }
}

/* Modern Auth Screen Overrides (ZuluTrade layout) */
.auth-card .auth-input-group label {
  display: none !important;
}

.auth-card .phone-input-wrapper {
  border-radius: 10px !important;
  border-color: #d1d5db !important;
}

.auth-card .phone-input-wrapper:focus-within {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 184, 82, 0.12) !important;
}

.auth-card .btn-auth-submit {
  border-radius: 30px !important;
  font-size: 16px !important;
  height: 50px !important;
  font-weight: 700 !important;
  background: var(--primary) !important;
  box-shadow: none !important;
  border: none !important;
  color: #ffffff !important;
  margin-top: 8px !important;
  width: 100% !important;
  transition: var(--transition);
}

.auth-card .btn-auth-submit:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 184, 82, 0.2) !important;
}

.auth-card .btn-google-login {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  color: #374151 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  height: 48px !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  transition: var(--transition);
}

.auth-card .btn-google-login:hover {
  background: #f9fafb !important;
  border-color: #9ca3af !important;
  transform: none !important;
}

.auth-card .forgot-password-link {
  color: var(--primary) !important;
  font-size: 13px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: var(--transition);
}

.auth-card .forgot-password-link:hover {
  text-decoration: underline !important;
}

.auth-card .auth-form-footer a {
  color: var(--primary) !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.auth-card .auth-form-footer a:hover {
  text-decoration: underline !important;
}


.auth-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.auth-logo-icon {
  font-size: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 15px rgba(13, 148, 136, 0.3));
}

.auth-header h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin: 0;
}

.auth-header h2 span {
  font-weight: 300;
  color: var(--primary);
}

.auth-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
}

/* Auth Mode Toggle (Login vs Sign Up) */
.auth-mode-toggle {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 4px;
}

.auth-mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-mode-btn:hover {
  color: var(--text-primary);
}

.auth-mode-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 184, 82, 0.2);
}

.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 4px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-tab-btn:hover {
  color: var(--text-primary);
}

.auth-tab-btn.active {
  max-width: 440px;
  width: 100%;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(30, 27, 24, 0.05);
}

.auth-flow-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-flow-section.hidden {
  display: none;
}

.auth-step {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-step.hidden {
  display: none;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  height: 48px;
  overflow: hidden;
  transition: var(--transition);
}

.phone-input-wrapper:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 184, 82, 0.15);
}

.phone-prefix {
  padding: 0 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  border-right: 1px solid var(--border-color);
}

.phone-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  height: 100%;
}

.phone-input-wrapper.no-prefix input {
  padding: 0 16px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  margin: 8px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.auth-divider:not(:empty)::before {
  margin-right: 12px;
}
.auth-divider:not(:empty)::after {
  margin-left: 12px;
}

.btn-auth-submit {
  background: linear-gradient(135deg, var(--primary) 0%, #059669 100%) !important;
  color: #fff !important;
  height: 48px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 184, 82, 0.2);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 184, 82, 0.3);
}

.auth-footnote {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
  margin-top: 4px;
}

.btn-google-login {
  background: #fff !important;
  color: #1f2937 !important;
  height: 48px;
  border-radius: 10px;
  width: 100%;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.btn-google-login:hover {
  background: #f9fafb !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.google-icon {
  font-size: 16px;
  color: #4285f4; /* Google Blue */
}

.google-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
  margin: 0;
}

/* Modern OTP Digit Input Boxes */
.otp-inputs-wrapper {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 12px 0;
  width: 100%;
  box-sizing: border-box;
}

.otp-digit {
  width: 46px;
  height: 52px;
  background: rgba(232, 226, 213, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  font-family: var(--font-mono);
  box-sizing: border-box;
}

.otp-digit:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
  background: var(--bg-primary);
}

/* Invisible reCAPTCHA Styling */
#recaptcha-container {
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  overflow: hidden;
}

.resend-otp-container {
  text-align: center;
  margin-top: 14px;
}

.btn-resend-otp {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: default;
  transition: var(--transition);
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-resend-otp:not(:disabled) {
  color: var(--primary);
  cursor: pointer;
}

.btn-resend-otp:not(:disabled):hover {
  background: rgba(13, 148, 136, 0.08);
  color: var(--primary-hover);
}

/* ==========================================================================
   Simulated SMS Toast & OTP Autofill Pill Custom Stylings
   ========================================================================== */

.sms-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 360px;
  background: rgba(250, 246, 237, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 16px;
  z-index: 999999;
  box-shadow: 0 20px 40px rgba(30, 27, 24, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideInToast 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  will-change: transform, opacity;
}

.sms-toast.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px) scale(0.95) !important;
  pointer-events: none;
}

.sms-toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sms-toast-app {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.sms-icon {
  color: var(--cyan);
  font-size: 12px;
}

.sms-toast-time {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.sms-toast-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sms-sender {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.sms-message {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.sms-message strong {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 14px;
  background: rgba(34, 211, 238, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(34, 211, 238, 0.15);
}

.sms-toast-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  margin-top: 2px;
}

.sms-btn {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition);
  font-family: inherit;
}

.sms-btn-autofill {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  flex: 2;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}

.sms-btn-autofill:hover {
  opacity: 0.95;
  transform: translateY(-0.5px);
}

.sms-btn-dismiss {
  background: rgba(30, 27, 24, 0.04);
  color: var(--text-secondary);
  flex: 1;
  border: 1px solid var(--border-color);
}

.sms-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Floating OTP Autofill Suggestion Pill */
.otp-autofill-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.12);
  color: var(--primary-hover);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: var(--transition);
  animation: pulseSuggestion 2s infinite;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.1);
  align-self: center;
}

.otp-autofill-suggestion:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.otp-autofill-suggestion.hidden {
  display: none !important;
}

@keyframes slideInToast {
  from {
    transform: translate3d(0, -40px, 0) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes pulseSuggestion {
  0% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.25);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

/* Toast responsiveness */
@media (max-width: 480px) {
  .sms-toast {
    top: 12px;
    left: 12px;
    right: 12px;
    width: calc(100% - 24px);
  }
}

/* ==========================================================================
   Options Chain Modal & Table Stylings
   ========================================================================== */

.option-chain-sheet {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 24px 80px rgba(30, 27, 24, 0.06) !important;
  backdrop-filter: blur(40px) !important;
  -webkit-backdrop-filter: blur(40px) !important;
  border-radius: 24px 24px 0 0 !important;
}

.oc-table {
  width: 100%;
  border-collapse: collapse;
}

.oc-table th {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.oc-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  height: 44px;
}

.oc-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.015);
}

.oc-table tbody tr.strike-atm {
  background: rgba(13, 148, 136, 0.03);
}

.oc-table tbody tr.strike-atm td.oc-strike-col {
  border-left: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
}

.oc-strike-col {
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(13, 148, 136, 0.06);
  color: var(--text-primary);
  border-bottom: 1px solid rgba(13, 148, 136, 0.15) !important;
  font-size: 13.5px;
}

.oc-ltp-val {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
}

.oc-ltp-val.call-side {
  color: var(--green);
}

.oc-ltp-val.put-side {
  color: var(--red);
}

.oc-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-family: inherit;
  outline: none;
}

.oc-action-btn.buy-btn {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.oc-action-btn.buy-btn:hover {
  background: var(--green);
  color: #fff;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
  transform: scale(1.1);
}

.oc-action-btn.sell-btn {
  background: rgba(244, 63, 94, 0.1);
  color: var(--red);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.oc-action-btn.sell-btn:hover {
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.3);
  transform: scale(1.1);
}

/* Call side shaded (In the money) if strike < spot */
.oc-table td.call-itm {
  background: rgba(16, 185, 129, 0.02) !important;
}

/* Put side shaded (In the money) if strike > spot */
.oc-table td.put-itm {
  background: rgba(244, 63, 94, 0.02) !important;
}

/* Redesigned Option Chain Header Toggles & Segments */
.oc-asset-selectors {
  display: flex;
  gap: 8px;
}

.oc-asset-btn {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  outline: none;
  font-family: inherit;
}

.oc-asset-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.oc-asset-btn.active {
  border-color: rgba(13, 148, 136, 0.4);
  background: rgba(13, 148, 136, 0.08);
  color: var(--primary) !important;
  box-shadow: 0 0 12px rgba(13, 148, 136, 0.1);
}

.oc-asset-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.oc-asset-btn.active .oc-asset-name {
  color: var(--primary);
}

.oc-expiry-badge {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
  font-size: 8px;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
}

.oc-asset-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.oc-segment-bar {
  display: flex;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
}

.oc-segment-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  outline: none;
}

.oc-segment-btn.active {
  background: #fff;
  color: var(--primary) !important;
  box-shadow: 0 2px 4px rgba(30, 27, 24, 0.05);
}

.oc-expiry-item.active {
  background: var(--primary);
  color: #fff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Option Chain table enhancements matching screenshot */
.oc-table td.call-cell, .oc-table td.put-cell {
  cursor: pointer;
  transition: var(--transition);
}

.oc-table td.call-cell:hover, .oc-table td.put-cell:hover {
  background: rgba(0, 0, 0, 0.02);
}

.oc-volume-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.oc-change-pct {
  font-size: 10px;
  font-weight: 500;
  margin-top: 2px;
}

.oc-spot-separator-row td {
  background: rgba(34, 211, 238, 0.05) !important;
  border-top: 1px solid rgba(34, 211, 238, 0.2) !important;
  border-bottom: 1px solid rgba(34, 211, 238, 0.2) !important;
  font-family: var(--font-family) !important;
  color: var(--cyan) !important;
  font-weight: 600 !important;
  height: 38px !important;
}

/* Pull to Refresh CSS rules */
.pull-refresh-indicator {
  position: absolute;
  top: -60px;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 99999;
  pointer-events: none;
  transition: transform 0.15s ease-out;
}

.pull-refresh-circle {
  width: 34px;
  height: 34px;
  background: rgba(20, 24, 46, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  transition: transform 0.1s ease;
}

.pull-refresh-icon {
  color: var(--cyan);
  font-size: 13px;
  transition: transform 0.1s linear;
}

.pull-refresh-text {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Spinner Rotate Keyframe */
.pull-refresh-circle.refreshing .pull-refresh-icon {
  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#mobile-portfolio-portal-container {
  display: none !important;
}

/* ==========================================================================
   Mobile Responsive Screen Optimizations (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Dynamic Responsive Cards for Holdings & Positions Tables */
  #portfolio-holdings-list,
  #portfolio-positions-list {
    display: block;
    width: 100%;
  }

  .table-container table.data-table {
    display: block;
    width: 100%;
  }

  .table-container table.data-table thead {
    display: none; /* Hide header rows on mobile */
  }

  .table-container table.data-table tbody {
    display: block;
    width: 100%;
  }

  .table-container table.data-table tr {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 10px 14px;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
  }

  .table-container table.data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding: 8px 0;
    font-size: 12.5px;
    width: 100% !important;
  }

  .table-container table.data-table td:last-child {
    border-bottom: none;
  }

  /* Portfolio Positions Label Generation */
  #portfolio-positions-list td::before {
    content: "";
    font-weight: 600;
    color: var(--text-secondary);
    float: left;
    text-align: left;
  }
  #portfolio-positions-list td:nth-of-type(1)::before { content: "Symbol"; }
  #portfolio-positions-list td:nth-of-type(2)::before { content: "Exchange"; }
  #portfolio-positions-list td:nth-of-type(3)::before { content: "Net Qty"; }
  #portfolio-positions-list td:nth-of-type(4)::before { content: "Avg Price"; }
  #portfolio-positions-list td:nth-of-type(5)::before { content: "LTP"; }
  #portfolio-positions-list td:nth-of-type(6)::before { content: "MTM P&L"; }

  /* Portfolio Holdings Label Generation */
  #portfolio-holdings-list td::before {
    content: "";
    font-weight: 600;
    color: var(--text-secondary);
    float: left;
    text-align: left;
  }
  #portfolio-holdings-list td:nth-of-type(1)::before { content: "Symbol"; }
  #portfolio-holdings-list td:nth-of-type(2)::before { content: "Exchange"; }
  #portfolio-holdings-list td:nth-of-type(3)::before { content: "Qty"; }
  #portfolio-holdings-list td:nth-of-type(4)::before { content: "Avg Price"; }
  #portfolio-holdings-list td:nth-of-type(5)::before { content: "LTP"; }
  #portfolio-holdings-list td:nth-of-type(6)::before { content: "Current Value"; }
  #portfolio-holdings-list td:nth-of-type(7)::before { content: "Overall P&L"; }

  /* Option Chain Modal Mobile Spacing Optimizations */
  .option-chain-sheet {
    padding: 12px 8px !important;
  }

  .oc-new-header {
    gap: 8px !important;
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
  }

  .oc-asset-selectors {
    gap: 6px !important;
  }

  .oc-asset-btn {
    padding: 6px 10px !important;
    border-radius: 10px !important;
  }

  .oc-asset-name {
    font-size: 10px !important;
  }

  .oc-asset-price-row {
    font-size: 12.5px !important;
    gap: 4px !important;
  }

  .oc-controls-row {
    gap: 4px !important;
  }

  .oc-segment-btn {
    padding: 5px 10px !important;
    font-size: 11px !important;
  }

  #oc-expiry-select {
    padding: 5px 8px !important;
    font-size: 11px !important;
  }

  /* Compact Option Chain Table for Mobile screens */
  .oc-table th {
    padding: 6px 3px !important;
    font-size: 9px !important;
  }

  .oc-table td {
    padding: 6px 3px !important;
    font-size: 11.5px !important;
    height: 38px !important;
  }

  .oc-volume-val {
    font-size: 10px !important;
  }

  .oc-ltp-val {
    font-size: 11px !important;
  }

  .oc-change-pct {
    font-size: 9px !important;
  }

  .oc-strike-col {
    font-size: 11.5px !important;
  }

  .oc-spot-separator-row td {
    font-size: 11px !important;
    padding: 6px !important;
    height: 32px !important;
  }

  /* Bottom Sheet Modal and Order Sheet Mobile Layout Optimization */
  .bottom-sheet-content {
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    padding: 16px 16px 24px 16px !important;
    gap: 12px !important;
    max-height: 94vh !important;
    overflow-y: auto !important;
  }

  .bottom-sheet-content.order-sheet {
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    max-height: 95vh !important;
    overflow-y: hidden !important;
  }

  .order-sheet .order-header {
    padding: 16px 16px 8px 16px !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid var(--border-color) !important;
    flex-shrink: 0 !important;
  }

  .order-scroll-content {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 12px 16px !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    -webkit-overflow-scrolling: touch;
  }

  .order-title-block h2 {
    font-size: 16px !important;
  }

  .order-exchanges {
    font-size: 10.5px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .order-product-toggle {
    margin-bottom: 12px !important;
    gap: 6px !important;
  }

  .product-btn {
    padding: 8px 6px !important;
    font-size: 10.5px !important;
  }

  .product-btn span {
    font-size: 8px !important;
  }

  .order-input-group {
    margin-bottom: 12px !important;
    gap: 4px !important;
  }

  .order-input-group label {
    font-size: 12px !important;
  }

  .order-input-group select,
  .order-input-group input {
    padding: 10px !important;
    font-size: 14px !important;
  }

  .order-price-group {
    margin-bottom: 12px !important;
    gap: 4px !important;
  }

  .order-price-group label {
    font-size: 12px !important;
  }

  .price-adjuster {
    height: 40px !important;
  }

  .price-adjuster input {
    font-size: 14px !important;
  }

  .price-adjuster .adjust-btn {
    width: 38px !important;
  }

  .price-mode-toggle {
    height: 40px !important;
    gap: 4px !important;
  }

  .price-mode-toggle .mode-btn {
    font-size: 10px !important;
  }

  .smart-orders-accordion {
    margin-bottom: 12px !important;
    padding: 10px !important;
    border-radius: 10px !important;
  }

  .order-margin-info {
    margin-bottom: 14px !important;
  }

  .order-margin-info .value {
    font-size: 13px !important;
  }

  .btn-order-submit {
    padding: 12px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
  }

  /* Star Button and Tool Buttons Spacing Adjustments */
  #bs-btn-star {
    min-width: 44px !important;
    width: 44px !important;
    flex: 0 0 auto !important;
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .bs-tool-buttons {
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 8px !important;
  }

  .bs-tool-buttons .btn {
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 10px 8px !important;
    height: 40px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }
}

.order-footer-group {
  padding: 12px 16px 16px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  box-sizing: border-box;
}

.bottom-sheet-content.keypad-active {
  padding-bottom: 350px !important;
}

.bottom-sheet-content.keypad-active .order-footer-group {
  position: absolute !important;
  bottom: 240px !important;
  left: 0 !important;
  width: 100% !important;
  padding: 12px 16px !important;
  box-sizing: border-box !important;
  z-index: 11 !important;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -8px 24px rgba(30, 27, 24, 0.04);
}

.custom-keypad {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.22s ease;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  z-index: 10;
  height: 240px;
  overflow: hidden;
}

.custom-keypad.hidden {
  display: none !important;
}

.keypad-layout {
  display: flex;
  width: 100%;
  height: 100%;
}

.keypad-sidebar {
  width: 25%;
  display: flex;
  flex-direction: column;
}

.keypad-numeric-grid {
  width: 75%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
}

.keypad-btn {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(140, 133, 123, 0.08);
  border-bottom: 1px solid rgba(140, 133, 123, 0.08);
  color: var(--text-primary); font-size: 21px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: background 0.1s;
  height: 60px;
  box-sizing: border-box;
  margin: 0;
  border-radius: 0;
}

.keypad-btn:active {
  background: rgba(255, 255, 255, 0.05);
}

.keypad-sidebar .keypad-btn {
  border-right: 1px solid rgba(140, 133, 123, 0.08);
}

.keypad-sidebar .spacer-btn {
  height: 60px;
  cursor: default;
  border-bottom: 1px solid rgba(140, 133, 123, 0.08);
}

.keypad-sidebar .best5-btn {
  height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #5d9cec;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid rgba(140, 133, 123, 0.08);
}

.keypad-sidebar .best5-btn i {
  font-size: 20px;
  color: #3bafda;
  filter: drop-shadow(0 0 4px rgba(59, 175, 218, 0.3));
}

.keypad-sidebar .hide-key-btn {
  height: 60px;
  color: var(--text-secondary);
  font-size: 16px;
  border-bottom: none;
}

.keypad-numeric-grid .keypad-btn:nth-child(3n) {
  border-right: none;
}

.keypad-numeric-grid .keypad-btn:nth-child(n+10) {
  border-bottom: none;
}

.keypad-btn.backspace-key {
  color: var(--red);
}

#tradingview-widget-container,
#tv-chart-widget-inner {
  height: 100% !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Force chart modal content to take 100% of display without gaps */
#chart-modal .bottom-sheet-content {
  height: 100vh !important;
  max-height: 100vh !important;
  width: 100vw !important;
  max-width: 100vw !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Enforce layout rules for price adjustments on small mobile screens */
@media (max-width: 768px) {
  .price-type-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .price-adjuster-row {
    flex: 1.3 !important;
    display: flex !important;
    gap: 4px !important;
    align-items: center !important;
    height: 40px !important;
    box-sizing: border-box !important;
  }
  .price-adjuster-row input {
    font-size: 13.5px !important;
    width: 100% !important;
  }
  .adjust-btn-box {
    width: 38px !important;
    height: 100% !important;
    font-size: 14px !important;
  }
  .price-mode-toggle {
    flex: 1 !important;
    display: flex !important;
    gap: 4px !important;
    height: 40px !important;
    box-sizing: border-box !important;
  }
  .price-mode-toggle .mode-btn {
    font-size: 10px !important;
    padding: 0 !important;
    flex: 1 !important;
    height: 100% !important;
  }
}

/* ==========================================================================
   Mobile Position Cards & Summary Header Styles
   ========================================================================== */
@media (max-width: 768px) {
  #desktop-positions-container,
  #desktop-holdings-container,
  #desktop-pending-container,
  #desktop-executed-container {
    display: none !important;
  }

  #mobile-portfolio-portal-container {
    display: block !important;
  }
  
  #header-logo, #header-status {
    display: none !important;
  }
  
  .mobile-pos-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid var(--primary);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
    transition: var(--transition);
  }

  .mobile-pos-card:hover {
    border-color: var(--primary-hover);
  }

  .mobile-pos-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-pos-card-sym {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
  }

  .mobile-pos-card-pnl {
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-pos-card-middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-pos-card-qty-avg {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-pos-card-ltp {
    font-size: 12px;
    color: var(--text-secondary);
  }

  .mobile-pos-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    padding-top: 8px;
    margin-top: 2px;
  }

  .mobile-pos-card-badges {
    display: flex;
    gap: 6px;
    align-items: center;
  }

  .mobile-pos-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
  }

  .mobile-pos-badge.buy {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
  }

  .mobile-pos-badge.sell {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
  }

  .mobile-pos-badge.normal {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
  }

  .mobile-pos-card-btn-exit {
    background: transparent;
    border: none;
    color: #3b82f6;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
  }

  .mobile-pos-card-btn-exit:hover {
    background: rgba(59, 130, 246, 0.1);
  }

  /* Sticky Summary Footer styling */
  .mobile-pos-summary-footer {
    position: relative;
    background: #f0eae1;
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-radius: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin-top: 0;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  }

  .mobile-pos-summary-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
  }

  .mobile-pos-summary-title i {
    font-size: 14px;
  }

  .mobile-pos-summary-pnl {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
  }
}

.position-closed {
  opacity: 0.45 !important;
  filter: grayscale(30%);
  border-color: var(--text-muted) !important;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .workspace-header-tabs {
    display: none !important;
  }
  /* Watchlist and Orders Tab specific: no vertical scroll for the tab itself! */
  #tab-watchlist,
  #tab-orders {
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }

  /* Bottom Navigation Padding */
  .mobile-orders-list {
    padding-bottom: 90px !important;
  }
  #mobile-positions-container {
    padding-bottom: 0 !important;
  }
  #mobile-portfolio-positions-portal {
    padding-bottom: 140px !important;
  }

  /* Hide scrollbars */
  .tab-content::-webkit-scrollbar,
  .mobile-orders-list::-webkit-scrollbar,
  #mobile-positions-container::-webkit-scrollbar,
  .mobile-positions-list-content::-webkit-scrollbar,
  #mobile-portfolio-positions-portal::-webkit-scrollbar,
  .content-area::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
  .tab-content,
  .mobile-orders-list,
  #mobile-positions-container,
  .mobile-positions-list-content,
  #mobile-portfolio-positions-portal,
  .content-area {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
  }
}

/* --- Copy Trading Groups Styles --- */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .groups-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #groups-section-card {
    grid-column: span 1 !important;
  }
}

@media (max-width: 480px) {
  #groups-section-card .card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  #groups-section-card .card-header button {
    width: 100% !important;
    justify-content: center !important;
  }
}

#acc-clientcode, #acc-userid {
  text-transform: uppercase;
}

/* --- Mobile Order Placement Spacing Optimization --- */
@media (max-width: 768px) {
  .bottom-sheet-content.order-sheet {
    max-height: 96vh !important;
  }
  
  .order-sheet .order-header {
    padding: 10px 16px 6px 16px !important;
    border-bottom: 1px solid var(--border-color) !important;
  }
  
  .order-title-block h2 {
    font-size: 15px !important;
    font-weight: 700 !important;
  }
  
  .order-exchanges {
    font-size: 10px !important;
    gap: 8px !important;
    margin-top: 2px !important;
  }
  
  .order-exchanges > span {
    padding: 0 !important;
    font-size: 10.5px !important;
  }
  
  .order-exchanges > span.active-exchange {
    font-weight: 700 !important;
  }
  
  .order-scroll-content {
    padding: 6px 16px !important;
    gap: 6px !important;
  }
  
  .order-product-toggle {
    margin-bottom: 6px !important;
    gap: 4px !important;
  }
  
  .product-btn {
    padding: 5px 3px !important;
    font-size: 9.5px !important;
    border-radius: 6px !important;
    height: 32px !important;
  }
  
  .product-btn span {
    font-size: 7.5px !important;
  }
  
  .order-input-group {
    margin-bottom: 6px !important;
    gap: 2px !important;
  }
  
  .order-input-group label {
    font-size: 10.5px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
  }
  
  .order-input-group select,
  .order-input-group input {
    padding: 6px 8px !important;
    font-size: 13px !important;
    height: 34px !important;
    border-radius: 6px !important;
  }
  
  .order-price-group {
    margin-bottom: 6px !important;
    gap: 2px !important;
  }
  
  .order-price-group label {
    font-size: 10.5px !important;
    font-weight: 500 !important;
  }
  
  .price-type-row {
    gap: 6px !important;
    height: 34px !important;
  }
  
  .price-adjuster-row {
    flex: 1.3 !important;
    height: 34px !important;
    gap: 4px !important;
  }
  
  .price-adjuster-row input {
    height: 34px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    padding: 0 !important;
  }
  
  .adjust-btn-box {
    width: 32px !important;
    height: 34px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .price-mode-toggle {
    flex: 1 !important;
    height: 34px !important;
    gap: 4px !important;
  }
  
  .price-mode-toggle .mode-btn {
    height: 34px !important;
    font-size: 9.5px !important;
    border-radius: 6px !important;
    padding: 0 !important;
  }
  
  .smart-orders-accordion {
    margin-bottom: 6px !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
  }
  
  .smart-orders-accordion .accordion-header {
    font-size: 10.5px !important;
  }
  
  .order-footer-group {
    padding-top: 6px !important;
    margin-top: 0 !important;
  }
  
  .order-margin-info {
    margin-bottom: 8px !important;
  }
  
  .order-margin-info .margin-item {
    gap: 2px !important;
  }
  
  .order-margin-info .label {
    font-size: 10.5px !important;
  }
  
  .order-margin-info .value {
    font-size: 12.5px !important;
  }
  
  .btn-order-submit {
    padding: 10px !important;
    font-size: 13.5px !important;
    border-radius: 6px !important;
  }
  
  /* --- FnO Mobile UI Overrides --- */
  #order-placement-modal.bottom-sheet-modal {
    align-items: stretch !important;
  }
  #order-placement-modal .bottom-sheet-overlay {
    display: none !important;
  }
  #order-placement-modal .bottom-sheet-content.order-sheet {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: #f3f5f9 !important;
  }
  
  .dark-mode #order-placement-modal .bottom-sheet-content.order-sheet {
    background: #121212 !important;
  }
  
  #order-placement-modal .bottom-sheet-drag-handle {
    display: none !important;
  }
  
  #order-placement-modal .order-header {
    background: var(--bg-card) !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--border-color) !important;
  }
  
  #order-placement-modal .order-scroll-content {
    background: #f3f5f9 !important;
    padding: 12px 16px !important;
    gap: 12px !important;
  }
  
  .dark-mode #order-placement-modal .order-scroll-content {
    background: #121212 !important;
  }
  
  #order-placement-modal .order-product-toggle,
  #order-placement-modal .order-inputs-card,
  #order-placement-modal .smart-orders-accordion {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    margin-bottom: 0 !important;
  }
  
  #order-placement-modal .order-product-toggle {
    display: flex !important;
    gap: 8px !important;
    padding: 6px !important;
  }
  
  #order-placement-modal .order-product-toggle .product-btn {
    flex: 1 !important;
    height: 38px !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 !important;
  }
  
  #order-placement-modal.side-buy .order-product-toggle .product-btn.active {
    background: #e8f7f2 !important;
    color: #008b6b !important;
  }
  #order-placement-modal.side-sell .order-product-toggle .product-btn.active {
    background: #fdebee !important;
    color: #f43f5e !important;
  }
  
  #order-placement-modal .order-product-toggle .product-btn span {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-secondary) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
  }
  
  #order-placement-modal.side-buy .order-product-toggle .product-btn.active span {
    background: rgba(0, 139, 107, 0.1) !important;
    color: #008b6b !important;
  }
  #order-placement-modal.side-sell .order-product-toggle .product-btn.active span {
    background: rgba(244, 63, 94, 0.1) !important;
    color: #f43f5e !important;
  }
  
  #order-placement-modal .order-inputs-card .order-input-group label,
  #order-placement-modal .order-inputs-card .order-price-group label {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    text-transform: capitalize !important;
  }
  
  #order-placement-modal .qty-input-wrapper input {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    height: 44px !important;
    font-size: 15px !important;
    color: var(--text-primary) !important;
    padding: 0 12px !important;
    padding-right: 140px !important;
  }
  
  #order-lotsize-indicator {
    right: 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
  }
  
  #order-placement-modal .price-type-row {
    height: 44px !important;
  }
  #order-placement-modal .price-adjuster-row {
    height: 44px !important;
  }
  #order-placement-modal .price-adjuster-row input {
    height: 44px !important;
    font-size: 15px !important;
    background: var(--bg-primary) !important;
  }
  
  #order-placement-modal .adjust-btn-box {
    width: 44px !important;
    height: 44px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
  }
  
  #order-placement-modal.side-buy .adjust-btn-box {
    background: #e8f7f2 !important;
    color: #008b6b !important;
    border: none !important;
  }
  #order-placement-modal.side-sell .adjust-btn-box {
    background: #fdebee !important;
    color: #f43f5e !important;
    border: none !important;
  }
  
  #order-placement-modal .price-mode-toggle {
    height: 44px !important;
  }
  #order-placement-modal .price-mode-toggle .mode-btn {
    height: 44px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-primary) !important;
  }
  
  #order-placement-modal.side-buy .price-mode-toggle .mode-btn.active {
    background: #008b6b !important;
    border-color: #008b6b !important;
    color: #fff !important;
  }
  #order-placement-modal.side-sell .price-mode-toggle .mode-btn.active {
    background: #f43f5e !important;
    border-color: #f43f5e !important;
    color: #fff !important;
  }
  
  #order-placement-modal .smart-orders-accordion {
    padding: 14px 12px !important;
  }
  #order-placement-modal .smart-orders-accordion .accordion-header {
    font-size: 12px !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
  }
  
  #order-placement-modal .order-footer-group {
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 16px 16px 24px 16px !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03) !important;
  }
  
  #order-placement-modal .order-margin-info {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 14px !important;
  }
  
  #order-placement-modal .order-margin-info .margin-item .label {
    font-size: 11px !important;
    color: var(--text-secondary) !important;
  }
  
  #order-placement-modal .order-margin-info .margin-item .value {
    font-size: 16px !important;
    font-weight: 700 !important;
  }
  
  #order-placement-modal .btn-order-submit {
    height: 48px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  #order-placement-modal.side-buy .btn-order-submit {
    background: #008b6b !important;
  }
  #order-placement-modal.side-sell .btn-order-submit {
    background: #f43f5e !important;
  }
  
  #order-placement-modal .custom-keypad {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(250px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-color) !important;
    z-index: 100 !important;
  }
  
  #order-placement-modal .keypad-layout {
    height: 250px !important;
  }
  
  #order-placement-modal .keypad-btn {
    height: 62.5px !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    background: transparent !important;
    border-right: 1px solid rgba(140, 133, 123, 0.08) !important;
    border-bottom: 1px solid rgba(140, 133, 123, 0.08) !important;
  }
  
  #order-placement-modal .keypad-btn:active {
    background: rgba(0, 0, 0, 0.05) !important;
  }
  
  #order-placement-modal .keypad-sidebar .spacer-btn {
    height: 62.5px !important;
  }
  #order-placement-modal .keypad-sidebar .best5-btn {
    height: 125px !important;
    color: #5d9cec !important;
  }
  #order-placement-modal .keypad-sidebar .hide-key-btn {
    height: 62.5px !important;
  }

  /* Adjust sheet active padding and footer bottom when keypad is active */
  #order-placement-modal .bottom-sheet-content.keypad-active {
    padding-bottom: calc(250px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #order-placement-modal .bottom-sheet-content.keypad-active .order-footer-group {
    bottom: calc(250px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

.order-inputs-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Watchlist Full Screen Search Mode */
#watchlist-card.search-active .wl-index-header,
#watchlist-card.search-active .wl-tabs-row,
#watchlist-card.search-active .wl-table-header,
#watchlist-card.search-active .watchlist-list,
#watchlist-card.search-active .wl-footer-actions {
  display: none !important;
}

#watchlist-card.search-active #watchlist-search-desktop-placeholder {
  margin-top: 0 !important;
  width: 100% !important;
}

#watchlist-card.search-active {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 16px 10px !important;
  background: var(--bg-primary) !important;
  overflow-y: auto !important;
}

#watchlist-card.search-active .autocomplete-suggestions {
  position: absolute !important;
  top: 96px !important;
  left: 0 !important;
  width: 100% !important;
  max-width: none !important;
  height: calc(100vh - 120px) !important;
  max-height: calc(100vh - 120px) !important;
  background: var(--bg-primary) !important;
  border: none !important;
  box-shadow: none !important;
  z-index: 1001 !important;
  overflow-y: auto !important;
}

#watchlist-search-icon.fa-arrow-left {
  color: var(--primary) !important;
  cursor: pointer;
}

/* Prevent clipping and containment of fixed watchlist search overlay on mobile/desktop */
body.search-active-global .tab-content,
body:has(#watchlist-card.search-active) .tab-content {
  animation: none !important;
  transform: none !important;
  overflow: visible !important;
}

body.search-active-global .content-area,
body:has(#watchlist-card.search-active) .content-area {
  overflow: visible !important;
}

body.search-active-global .workspace,
body:has(#watchlist-card.search-active) .workspace {
  overflow: visible !important;
}

/* Prevent bottom nav visibility in active search overlay */
body.search-active-global .mobile-bottom-nav,
body:has(#watchlist-card.search-active) .mobile-bottom-nav {
  display: none !important;
}

/* Search filter bar and tabs */
.search-filter-bar {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: none; /* Hide scrollbar for clean tab look */
}
.search-filter-bar::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
.search-filter-bar.hidden {
  display: none !important;
}
.search-filter-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.search-filter-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.search-filter-tab.active {
  background: var(--primary) !important;
  color: #0d1117 !important;
  border-color: var(--primary) !important;
  font-weight: 600;
}

.search-clear-icon.hidden {
  display: none !important;
}

/* Premium Watchlist Price Flashing Animations */
@keyframes price-flash-green {
  0% { background-color: rgba(16, 185, 129, 0.25); }
  100% { background-color: transparent; }
}

@keyframes price-flash-red {
  0% { background-color: rgba(244, 63, 94, 0.25); }
  100% { background-color: transparent; }
}

.flash-up {
  animation: price-flash-green 0.8s ease-out;
  border-radius: 4px;
}

.flash-down {
  animation: price-flash-red 0.8s ease-out;
  border-radius: 4px;
}

/* Shimmer Skeleton Loader */
.skeleton-loader {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.skeleton-loader::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translate3d(-100%, 0, 0);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 255, 255, 0.1) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
  will-change: transform;
}

@keyframes shimmer {
  100% {
    transform: translate3d(100%, 0, 0);
  }
}

/* Sub-navigation bar styling */
.sub-nav-bar {
  display: flex;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 20px;
  gap: 6px;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.04));
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 10;
}

.sub-nav-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary, #9ca3af);
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
  user-select: none;
}

.sub-nav-btn i {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.sub-nav-btn:hover {
  color: var(--text-primary, #ffffff);
  background: rgba(255, 255, 255, 0.06);
}

.sub-nav-btn:hover i {
  transform: scale(1.15);
}

.sub-nav-btn.active {
  background: linear-gradient(135deg, #00b852 0%, #00d964 100%);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 184, 82, 0.32);
  transform: translateY(-1px);
}

.sub-nav-btn.active i {
  color: #ffffff !important;
}

/* Sliding Panels Containers */
.panels-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.panels-wrapper {
  display: flex;
  width: 100%; /* Changed from 300% */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.panel {
  width: 100%; /* Changed from 33.333% */
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 4px;
  transition: opacity 0.4s ease;
}

.panel-groups,
.panel-accounts {
  display: none !important;
}

.overview-two-col {
  grid-template-columns: 1.2fr 1fr !important;
}

@media (max-width: 768px) {
  .overview-two-col {
    grid-template-columns: 1fr !important;
  }
  .panels-container {
    height: 100% !important;
  }
  .panels-wrapper {
    height: 100% !important;
  }
  .panel {
    height: 100% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 90px !important;
  }
}

/* === ZuluTrade-inspired Premium Dark Landing Page Styles === */
.landing-page {
  width: 100%;
  min-height: 100vh;
  background-color: #0b0f19;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 184, 82, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(34, 211, 238, 0.04) 0%, transparent 40%);
  color: #f3f4f6;
  font-family: 'Outfit', 'Inter', sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.landing-page.hidden {
  display: none !important;
}

/* Header styling */
.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 6%;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.landing-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-header .logo i {
  font-size: 26px;
  color: var(--primary, #00b852);
  filter: drop-shadow(0 0 10px rgba(0, 184, 82, 0.4));
}

.landing-header .logo h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0;
  color: #ffffff;
}

.landing-header .logo h1 span {
  color: var(--primary, #00b852);
  text-shadow: 0 0 10px rgba(0, 184, 82, 0.2);
}

.landing-nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.landing-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  background: transparent;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.landing-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.landing-btn.btn-login-nav {
  border: 1px solid rgba(0, 184, 82, 0.3);
  background: rgba(0, 184, 82, 0.05);
  color: var(--primary, #00b852) !important;
}

.landing-btn.btn-login-nav:hover {
  background: var(--primary, #00b852);
  color: #ffffff !important;
  border-color: var(--primary, #00b852);
  box-shadow: 0 4px 20px rgba(0, 184, 82, 0.3);
  transform: translateY(-2px);
}

.landing-btn.btn-primary {
  background: var(--primary, #00b852);
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 184, 82, 0.2);
}

.landing-btn.btn-primary:hover {
  background: #00cd5c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 82, 0.35);
}

/* Hero section with visual effects */
.landing-hero {
  padding: 100px 6% 80px 6%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  z-index: 10;
}

.hero-badge {
  background: rgba(0, 184, 82, 0.1);
  color: var(--primary, #00b852);
  border: 1px solid rgba(0, 184, 82, 0.2);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0, 184, 82, 0.05);
}

.hero-badge i {
  animation: flash 1.5s infinite;
}

@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: 54px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -1px;
  color: #ffffff;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary, #00b852), #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(0, 184, 82, 0.1);
}

.hero-subtitle {
  font-size: 17px;
  color: #9ca3af;
  line-height: 1.6;
  margin: 0 0 10px 0;
  max-width: 700px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.btn-hero-cta {
  box-shadow: 0 8px 24px rgba(0, 184, 82, 0.2);
  background: var(--primary);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-hero-cta:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 184, 82, 0.3);
}

.btn-hero-secondary {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  color: #1f2328;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Stats Strip */
/* Stats strip in glass console style */
.landing-stats-strip {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 30px 6%;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  margin: 30px 0;
  width: 100%;
  box-sizing: border-box;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-box:nth-child(3) .stat-number, 
.stat-box:nth-child(5) .stat-number {
  background: linear-gradient(135deg, var(--primary, #00b852), #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 184, 82, 0.15));
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
}

/* Feature grid in dark glassmorphism card style */
.landing-features {
  padding: 80px 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  box-sizing: border-box;
}

.section-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.section-header p {
  font-size: 15px;
  color: #9ca3af;
  margin: 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  width: 100%;
  max-width: 1200px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.feature-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 184, 82, 0.3);
  box-shadow: 0 12px 30px rgba(0, 184, 82, 0.08);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(0, 184, 82, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary, #00b852);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: var(--primary, #00b852);
  color: #ffffff;
  transform: rotate(6deg) scale(1.05);
  box-shadow: 0 0 15px rgba(0, 184, 82, 0.3);
}

.feature-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.feature-card p {
  font-size: 14px;
  color: #9ca3af;
  line-height: 1.6;
  margin: 0;
}

/* Supported Brokers Section */
.landing-brokers {
  padding: 60px 6%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  box-sizing: border-box;
}

.landing-brokers h3 {
  font-size: 15px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0;
}

.brokers-logos {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.broker-logo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 24px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.broker-logo-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.broker-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #ffffff;
  padding: 2px;
}

/* Footer styling */
.landing-footer {
  padding: 40px 6%;
  text-align: center;
  background: #080b12;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: #9ca3af;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
  .landing-stats-strip {
    flex-direction: column;
    gap: 28px;
    padding: 30px 6%;
  }
  .stat-divider {
    display: none;
  }
  .landing-header {
    padding: 16px 4%;
  }
  .landing-hero {
    padding: 70px 4% 50px 4%;
  }
}

/* Premium System Status & Trade Logs Buttons */
.system-status {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.system-status:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-1px);
}

.btn-trade-logs {
  padding: 8px 14px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: 1px solid rgba(0, 184, 148, 0.3) !important;
  background: rgba(0, 184, 148, 0.06) !important;
  color: var(--primary) !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 4px rgba(0, 184, 148, 0.05) !important;
}

.btn-trade-logs:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(0, 184, 82, 0.25) !important;
  transform: translateY(-2px) !important;
}

.btn-trade-logs:active {
  transform: translateY(0) !important;
}

/* Desktop Optimization for Positions Total Floating Bar */
@media (min-width: 769px) {
  #positions-total-fixed-bar {
    bottom: 16px !important;
    left: calc(320px + 32px) !important;
    right: 16px !important;
    border-radius: 12px !important;
  }
  #positions-total-detail-drawer {
    left: calc(320px + 32px) !important;
    right: 16px !important;
    border-radius: 12px 12px 0 0 !important;
  }
}

/* Sticky Orders Buttons Group */
#tab-orders.active {
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.orders-header-sticky-wrapper {
  position: sticky !important;
  top: 0 !important;
  z-index: 980 !important;
  background: var(--bg-card, #ffffff) !important;
  backdrop-filter: blur(16px) !important;
  padding-top: 4px;
  padding-bottom: 4px;
  flex-shrink: 0;
}



#account-form-container {
  padding: 24px !important;
  margin-bottom: 40px !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: 14px !important;
}
@media (max-width: 768px) {
  #account-form-container {
    padding: 16px !important;
    margin-bottom: 80px !important;
  }
}














/* ================= PERMANENT NON-HIDING FLEX MOBILE ARCHITECTURE (STICKY WATCHLIST HEADERS) ================= */
@media (max-width: 768px) {
  /* 1. Viewport & Root Containers */
  body:not(.landing-active) {
    height: 100% !important;
    overflow: hidden !important;
  }

  body:not(.landing-active) .app-container {
    padding: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.landing-active .app-container {
    display: none !important;
  }
  body.landing-active .landing-page {
    display: block !important;
  }

  .workspace {
    margin-top: 0 !important;
    padding-top: 0 !important;
    flex: 1 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .content-area {
    padding: 0 !important;
    margin-top: 0 !important;
    flex: 1 !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
  }

  /* 2. STRICT TAB ISOLATION (ZERO OVERLAPPING GUARANTEE) */
  .tab-content,
  #tab-overview,
  #tab-watchlist,
  #tab-portfolio,
  #tab-orders,
  #tab-accounts,
  #tab-mappings,
  #tab-simulator,
  #tab-profile {
    display: none !important;
  }

  .tab-content.active,
  #tab-overview.active,
  #tab-watchlist.active,
  #tab-portfolio.active,
  #tab-orders.active,
  #tab-accounts.active,
  #tab-mappings.active,
  #tab-simulator.active,
  #tab-profile.active {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  /* 3. Permanent Non-Hiding Top Headers for Home & Orders */
  .sub-nav-bar,
  .orders-header-sticky-wrapper,
  .orders-main-toggle-header,
  .orders-tab-header {
    position: relative !important;
    top: auto !important;
    flex-shrink: 0 !important;
    z-index: 1000 !important;
    background: var(--bg-card, #ffffff) !important;
    margin: 0 0 6px 0 !important;
    padding: 8px 10px !important;
    border-radius: 0 0 14px 14px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    border-bottom: 1px solid var(--border-color) !important;
  }

  /* 4. Home Sub-Panel Sliding Architecture */
  .panels-container {
    flex: 1 !important;
    height: 100% !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  .panels-wrapper {
    display: flex !important;
    width: 100% !important; /* Changed from 300% */
    height: 100% !important;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
  }

  .panel-overview,
  .panel-groups,
  .panel-accounts,
  .panel {
    width: 100% !important; /* Changed from 33.333333% */
    flex-shrink: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
    padding: 6px 8px 140px 8px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* 5. WATCHLIST FIXED HEADERS & INDEPENDENT STOCK LIST SCROLL */
  #mobile-watchlist-container {
    flex: 1 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #watchlist-card {
    flex: 1 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 6px 8px 0 8px !important;
  }

  /* Anchored Top Watchlist Elements (CANNOT MOVE OR SCROLL AWAY) */
  .wl-index-header,
  #watchlist-search-desktop-placeholder,
  .wl-tabs-row,
  .wl-table-header {
    flex-shrink: 0 !important;
    background: var(--bg-card, #ffffff) !important;
    z-index: 10 !important;
  }

  .wl-index-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 6px !important;
  }

  #watchlist-search-desktop-placeholder {
    margin-top: 0 !important;
  }

  #watchlist-search-container {
    margin-bottom: 6px !important;
  }

  .wl-tabs-row {
    padding-bottom: 6px !important;
    margin-bottom: 6px !important;
  }

  .wl-table-header {
    padding: 4px 10px !important;
    margin-bottom: 4px !important;
  }

  /* The only scrollable container in Watchlist: Stock Rows List */
  .watchlist-list {
    flex: 1 !important;
    height: 100% !important;
    overflow-y: auto !important;
    padding-bottom: 140px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* 6. Other Tabs Smooth Scrolling */
  #tab-profile.active,
  #tab-portfolio.active,
  #tab-accounts.active,
  #tab-mappings.active,
  #tab-simulator.active {
    overflow-y: auto !important;
    padding: 8px 8px 140px 8px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #tab-orders .orders-container,
  #tab-orders .orders-list-wrapper {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 6px 8px 140px 8px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #tab-orders > div:not(.orders-header-sticky-wrapper) {
    flex: 1 !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  /* 7. Card styling & safety */
  .overview-grid {
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .card {
    margin-bottom: 12px !important;
  }

  .status-item-card {
    background: var(--bg-card, #ffffff) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    margin-bottom: 8px !important;
    box-shadow: var(--shadow-sm) !important;
  }
}








/* ================= PRECISE INDEX CARDS FORMAT (STRICT SINGLE HORIZONTAL LINE) ================= */
.wl-index-header,
.header-indices-wrapper {
  display: flex !important;
  gap: 6px !important;
  width: 100% !important;
}

.index-card {
  flex: 1 !important;
  min-width: 0 !important;
  background: var(--bg-card, #111827) !important;
  border: 1px solid var(--border-color, rgba(255,255,255,0.1)) !important;
  border-radius: 12px !important;
  padding: 6px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.12)) !important;
  box-sizing: border-box !important;
}

.index-card-top {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 4px !important;
}

.index-title {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--text-primary, #ffffff) !important;
  letter-spacing: 0.3px !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

.expiry-badge {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-muted, rgba(255, 255, 255, 0.6)) !important;
  font-size: 9.5px !important;
  font-weight: 500 !important;
  padding: 2px 6px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.index-card-bottom {
  display: flex !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  flex-wrap: nowrap !important; /* STRICT NO-WRAP FOR SINGLE ROW */
  white-space: nowrap !important;
  width: 100% !important;
  overflow: hidden !important;
}

.index-card-bottom .index-ltp {
  font-size: 13px !important;
  font-weight: 800 !important;
  font-family: var(--font-mono, monospace) !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  flex-shrink: 0 !important;
}

.index-card-bottom .index-change {
  font-size: 10px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  flex-shrink: 0 !important;
}

@media (max-width: 380px) {
  .index-card {
    padding: 5px 6px !important;
  }
  .index-title {
    font-size: 12px !important;
  }
  .index-card-bottom .index-ltp {
    font-size: 12px !important;
  }
  .index-card-bottom .index-change {
    font-size: 9.5px !important;
  }
}

@media (max-width: 768px) {

  /* Mobile Sub-Nav Bar (Fit all 4 buttons: Dashboard, Groups, Brokers, Blog) */
  .sub-nav-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 4px !important;
    gap: 4px !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 10px !important;
  }

  .sub-nav-btn {
    flex: 1 !important;
    min-width: max-content !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    gap: 4px !important;
  }

}


/* Landing Header Blog Button Styling */
.landing-btn.btn-blog-nav {
  border: 1.5px solid var(--border-color, #cbd5e1) !important;
  background: var(--bg-hover, rgba(0, 0, 0, 0.04)) !important;
  color: var(--text-primary, #1f2328) !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.landing-btn.btn-blog-nav:hover {
  background: var(--primary-hover, #00b852) !important;
  color: #ffffff !important;
  border-color: var(--primary, #00b852) !important;
}


/* Landing Header IPO Button Styling */
.landing-btn.btn-ipo-nav {
  border: 1.5px solid var(--border-color, #cbd5e1) !important;
  background: var(--bg-hover, rgba(0, 0, 0, 0.04)) !important;
  color: var(--text-primary, #1f2328) !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.landing-btn.btn-ipo-nav:hover {
  background: var(--primary, #00b852) !important;
  color: #ffffff !important;
  border-color: var(--primary, #00b852) !important;
}


/* ================= PUBLIC LANDING PAGE MOBILE OPTIMIZATION ================= */
@media (max-width: 768px) {
  body.landing-active .landing-header,
  body.landing-active header.header {
    padding: 12px 16px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  
  body.landing-active .landing-nav-actions {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  body.landing-active .landing-nav-actions::-webkit-scrollbar {
    display: none !important;
  }
  
  body.landing-active .landing-hero {
    padding: 32px 16px 40px 16px !important;
    text-align: center !important;
  }
  
  body.landing-active .hero-title {
    font-size: 26px !important;
    line-height: 1.3 !important;
  }
  
  body.landing-active .hero-subtitle {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
  }
  
  body.landing-active .hero-cta-group {
    flex-direction: column !important;
    width: 100% !important;
    gap: 12px !important;
  }
  
  body.landing-active .hero-cta-group button,
  body.landing-active .hero-cta-group a {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px !important;
    font-size: 14px !important;
  }
  
  body.landing-active .features-grid,
  body.landing-active .blog-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding: 0 16px !important;
  }
}


/* ================= LANDING HEADER BUTTONS CONTRAST FIX ================= */
body.landing-active .landing-nav-actions button,
body.landing-active .landing-nav-actions a,
body.landing-active .landing-btn {
  color: #334155 !important;
  background: transparent !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  box-shadow: none !important;
  text-decoration: none !important;
  min-width: 80px !important; /* Make all button widths uniform */
  box-sizing: border-box !important;
  height: 32px !important;
}

body.landing-active .landing-nav-actions button i,
body.landing-active .landing-nav-actions a i,
body.landing-active .landing-btn i {
  color: var(--primary, #00b852) !important;
  font-size: 13px !important;
}

body.landing-active .landing-nav-actions button:hover,
body.landing-active .landing-nav-actions a:hover,
body.landing-active .landing-btn:hover {
  background: rgba(0, 184, 82, 0.08) !important;
  color: var(--primary-dark, #008f3f) !important;
  border: none !important;
}

/* Hide TeleTrade name text globally in headers */
.landing-header .logo h1,
header.header .logo h1 {
  display: none !important;
}

body.landing-active .landing-header,
body.landing-active header.header {
  padding: 6px 16px !important;
  min-height: auto !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

/* ================= MOBILE LANDING HEADER LAYOUT (LOGO + LANG TOGGLE PARALLEL) ================= */
@media (max-width: 768px) {
  body.landing-active .landing-header,
  body.landing-active header.header {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 16px !important;
    gap: 12px !important;
  }
  
  body.landing-active .landing-header-top-row,
  body.landing-active .header-top-row-mob {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  body.landing-active .landing-nav-actions {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 0 !important;
  }

  body.landing-active .landing-nav-actions button,
  body.landing-active .landing-nav-actions a {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 8px 6px !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
  }
}


/* ================= MOBILE LANDING UNIFORM BUTTONS LAYOUT ================= */
@media (max-width: 768px) {
  body.landing-active .landing-header {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 16px !important;
    gap: 12px !important;
  }
  
  body.landing-active .landing-header-top-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  body.landing-active .landing-nav-actions {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 0 !important;
  }

  body.landing-active .landing-nav-actions .landing-btn {
    flex: none !important;
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 10px 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
  }

  /* Make the primary button span full width (2 columns) at the bottom */
  body.landing-active .landing-nav-actions .landing-btn.btn-primary {
    grid-column: span 2 !important;
    padding: 12px 8px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
  }
}


/* ==========================================================================
   OPTIMIZED BROKERS & GROUPS RESPONSIVE BUTTONS (MOBILE & PC)
   ========================================================================== */
@media (max-width: 768px) {
  .sub-nav-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding: 4px !important;
    gap: 4px !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 14px !important;
    border-radius: 12px !important;
  }

  .sub-nav-btn {
    flex: 1 1 0px !important;
    min-width: 0 !important;
    padding: 9px 6px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    gap: 5px !important;
    border-radius: 8px !important;
  }

  .sub-nav-btn i {
    font-size: 12px !important;
  }

  /* Brokers & Groups Header Action Buttons Mobile Layout */
  .section-actions,
  #groups-section-card .card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .section-actions > div:last-child,
  #groups-section-card .card-header > div:last-child {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .section-actions .btn,
  #groups-section-card .btn {
    flex: 1 !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }
}


/* ==========================================================================
   SUPER-OPTIMIZED MOBILE LANDING & BOTTOM NAV FIXES
   ========================================================================== */

/* 1. Strictly hide logged-in bottom navigation bar when on public landing page */
html.landing-active .mobile-bottom-nav,
body.landing-active .mobile-bottom-nav,
body.landing-active ~ .mobile-bottom-nav {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* 2. Redundant mobile landing header navigation buttons styling removed */

/* ================= PUBLIC STOCK SCREENER STYLES ================= */
.screener-quick-link:hover {
  background: rgba(0, 184, 82, 0.15) !important;
  color: var(--primary) !important;
  border-color: rgba(0, 184, 82, 0.3) !important;
  transform: translateY(-1px);
}

.screener-autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: all 0.2s ease;
}

.screener-autocomplete-item:hover {
  background: rgba(255,255,255,0.05);
}

.screener-autocomplete-item:last-child {
  border-bottom: none;
}

.screener-ratio-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.screener-ratio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 184, 82, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.screener-ratio-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 184, 82, 0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

.screener-ratio-card:hover::before {
  transform: translateX(100%);
}

.screener-ratio-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.screener-ratio-value {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= LIGHT MODE SCREENER-THEME FOR GUEST LANDING PAGE ================= */
body.landing-active {
  background-color: #ffffff !important;
  color: #1e293b !important;
}

body.landing-active .landing-page {
  background: #ffffff !important;
  color: #1e293b !important;
}

/* Style Landing Header in Light Mode */
body.landing-active .landing-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

body.landing-active .landing-header .logo h1 {
  color: #0f172a !important;
}

body.landing-active .landing-header .logo i {
  color: var(--primary, #00b852) !important;
  filter: none !important;
}

body.landing-active .landing-header .lang-toggle-group {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

body.landing-active .landing-header .lang-toggle-btn {
  color: #64748b !important;
}

body.landing-active .landing-header .lang-toggle-btn.active {
  background: var(--primary, #00b852) !important;
  color: #ffffff !important;
}

body.landing-active .landing-nav-actions .landing-btn {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
}

body.landing-active .landing-nav-actions .landing-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body.landing-active .landing-nav-actions .btn-login-nav {
  background: rgba(0, 184, 82, 0.08) !important;
  color: var(--primary, #00b852) !important;
  border: 1px solid rgba(0, 184, 82, 0.2) !important;
}

body.landing-active .landing-nav-actions .btn-signup-nav {
  background: var(--primary, #00b852) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
}

/* Style Landing Screener Section to be Centered and clean */
body.landing-active .landing-screener {
  background: #ffffff !important;
  border: none !important;
  padding: 80px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: calc(100vh - 120px) !important;
  box-sizing: border-box !important;
}

body.landing-active .screener-container {
  width: 100% !important;
  max-width: 1400px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

body.landing-active .screener-container h2 {
  color: #0f172a !important;
  font-size: 40px !important;
  font-weight: 800 !important;
  margin-bottom: 8px !important;
}

body.landing-active .screener-container p {
  color: #475569 !important;
  font-size: 16px !important;
}

body.landing-active #screener-search-input {
  flex: 1 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #1e293b !important;
  font-size: 19px !important;
  font-weight: 400 !important;
  width: 100% !important;
  font-family: inherit !important;
  padding: 2px 0 !important;
}

body.landing-active #screener-search-input::placeholder {
  color: #94a3b8 !important;
}

body.landing-active .landing-screener input[type="text"] {
  background: #ffffff !important;
}

body.landing-active .screener-search-bar-container {
  display: flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 18px 24px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

body.landing-active .screener-search-bar-container:focus-within {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Quick links */
body.landing-active .screener-quick-link {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

body.landing-active .screener-quick-link:hover {
  background: rgba(0, 184, 82, 0.1) !important;
  color: var(--primary, #00b852) !important;
  border-color: rgba(0, 184, 82, 0.2) !important;
}

/* Autocomplete dropdown in light mode */
body.landing-active #screener-autocomplete-dropdown {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

body.landing-active .screener-autocomplete-item {
  border-bottom: 1px solid #f1f5f9 !important;
}

body.landing-active .screener-autocomplete-item:hover {
  background: #f8fafc !important;
}

body.landing-active .screener-autocomplete-item strong {
  color: #0f172a !important;
}

body.landing-active .screener-autocomplete-item span {
  color: #64748b !important;
}

/* Results panel light mode */
body.landing-active #screener-results-wrapper {
  background: #ffffff !important;
  color: #1e293b !important;
  margin-top: 30px !important;
}

body.landing-active #screener-results-wrapper div[style*="background: rgba(255,255,255,0.02);"] {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

body.landing-active #screener-company-name {
  color: #0f172a !important;
}

body.landing-active #screener-company-price {
  color: #0f172a !important;
}

/* Ratio grid and cards in light mode (Screener.in layout) */
body.landing-active .screener-ratios-grid {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 16px 24px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 0px !important;
  row-gap: 8px !important;
  column-gap: 32px !important;
}

body.landing-active .screener-ratio-card {
  background: transparent !important;
  border: none !important;
  border-bottom: 1px dashed #e2e8f0 !important;
  border-radius: 0px !important;
  padding: 10px 0px !important;
  margin: 0px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}

body.landing-active .screener-ratio-card::before {
  display: none !important;
}

body.landing-active .screener-ratio-card:hover {
  background: transparent !important;
  border-bottom-color: #cbd5e1 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.landing-active .screener-ratio-label {
  color: #475569 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  margin-bottom: 0px !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  width: auto !important;
}

body.landing-active .screener-ratio-label i {
  display: none !important;
}

body.landing-active .screener-ratio-value {
  color: #0f172a !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
}

/* Pros and Cons */
body.landing-active div[style*="background: rgba(16, 185, 129, 0.03);"] {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
}

body.landing-active #screener-pros-list {
  color: #166534 !important;
}

body.landing-active div[style*="background: rgba(239, 68, 68, 0.03);"] {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
}

body.landing-active #screener-cons-list {
  color: #991b1b !important;
}

/* Tables in light mode */
body.landing-active #screener-results-wrapper tr {
  border-bottom-color: #e2e8f0 !important;
}

body.landing-active #screener-results-wrapper tr:hover {
  background-color: #f8fafc !important;
}

body.landing-active #screener-quarters-head {
  color: #475569 !important;
}

body.landing-active #screener-shareholding-head {
  color: #475569 !important;
}

body.landing-active #screener-quarters-body td {
  color: #334155 !important;
}

body.landing-active #screener-shareholding-body td {
  color: #334155 !important;
}

body.landing-active #screener-quarters-body tr td[style*="color: #fff;"] {
  color: #0f172a !important;
}

body.landing-active #screener-results-wrapper h4, body.landing-active #screener-results-wrapper h5 {
  color: #0f172a !important;
}

body.landing-active #screener-ai-insight-box {
  background: rgba(0, 184, 82, 0.03) !important;
  border: 1px dashed rgba(0, 184, 82, 0.25) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
}

body.landing-active #screener-ai-insight-text {
  color: #334155 !important;
}

/* News and Events lists in light mode */
body.landing-active #screener-news-list li strong {
  color: #0f172a !important;
}

body.landing-active #screener-news-list li strong a {
  color: #0f172a !important;
}

body.landing-active #screener-news-list li strong a:hover {
  color: var(--primary) !important;
}

body.landing-active #screener-events-list li strong {
  color: #0f172a !important;
}

body.landing-active #screener-news-list li p {
  color: #64748b !important;
}

body.landing-active #screener-events-list li p {
  color: #64748b !important;
}

/* Screener Search Results Mode overrides (matches screener.in flow) */
body.screener-results-active .screener-main-search-wrapper,
body.screener-results-active .screener-brand-intro {
  display: none !important;
}

body.screener-results-active .header-search-container {
  display: block !important;
}

/* Center header search bar absolutely so header buttons on left/right do not shift on desktop */
@media (min-width: 769px) {
  .landing-header .header-search-container {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    z-index: 10;
  }
}

/* Responsive adjustments for header search on mobile */
@media (max-width: 768px) {
  body.screener-results-active .landing-header-top-row {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }
  body.screener-results-active .header-search-container {
    max-width: 100% !important;
    width: 100% !important;
    order: 3 !important;
    margin: 4px 0 0 0 !important;
  }
}

/* Screener Premium Aesthetics & Dynamic Interactive Features */
body.landing-active .screener-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 24px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
  margin-bottom: 24px !important;
}

body.landing-active .screener-tab {
  color: #64748b !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  border-bottom: 3px solid transparent !important;
  padding-bottom: 8px !important;
}

body.landing-active .screener-tab:hover {
  color: #3b82f6 !important;
  border-bottom-color: rgba(59, 130, 246, 0.4) !important;
}

body.landing-active .screener-tab.active {
  color: #3b82f6 !important;
  font-weight: 700 !important;
  border-bottom-color: #3b82f6 !important;
}

/* Make sure the sticky tab bar background has glassmorphism blur and slight shadow on scroll */
body.landing-active .screener-tabs-bar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px) !important;
  border-bottom: 2px solid #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
}

/* Table styling overrides */
body.landing-active table {
  width: 100% !important;
}

body.landing-active th {
  color: #475569 !important;
  font-weight: 600 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

body.landing-active td {
  color: #334155 !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

body.landing-active tr:hover {
  background-color: #f8fafc !important;
}

/* Pros & Cons overrides for light mode */
body.landing-active .screener-card-pros {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  border-radius: 8px !important;
  padding: 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01) !important;
}

body.landing-active .screener-card-cons {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  border-radius: 8px !important;
  padding: 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01) !important;
}

/* ================= SCREENER MOBILE RESPONSIVENESS AND OPTIMIZATIONS ================= */
@media (max-width: 768px) {
  body.landing-active .landing-screener {
    padding: 30px 12px !important;
    min-height: auto !important;
  }
  body.landing-active .screener-container h2 {
    font-size: 28px !important;
    text-align: center !important;
  }
  body.landing-active .screener-container p {
    font-size: 14px !important;
    text-align: center !important;
  }
  body.landing-active .screener-search-bar-container {
    padding: 12px 16px !important;
  }
  body.landing-active #screener-search-input {
    font-size: 16px !important;
  }
  body.landing-active .screener-split-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  body.landing-active .screener-ratios-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 16px !important;
    column-gap: 16px !important;
  }
  body.landing-active .company-header-screener {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  body.landing-active .screener-tabs-bar {
    top: 60px !important;
  }
}

@media (max-width: 480px) {
  body.landing-active .screener-ratios-grid {
    grid-template-columns: 1fr !important;
  }
  body.landing-active .screener-tab {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
}

/* Hide scrollbar track for premium feel on tabs bar */
body.landing-active .screener-tabs-bar::-webkit-scrollbar {
  display: none !important;
}
body.landing-active .screener-tabs-bar {
  scrollbar-width: none !important;
}

/* Fix header search overlap & spacing issues when screener results are active */
@media (max-width: 1250px) {
  body.screener-results-active .btn-learn-nav,
  body.screener-results-active .btn-blog-nav {
    display: none !important;
  }
}

body.screener-results-active .landing-screener {
  min-height: auto !important;
  padding: 15px 20px !important;
}

@media (max-width: 768px) {
  body.screener-results-active .landing-screener {
    padding: 12px 12px !important;
  }
}

/* Hide watchlist index headers ONLY on PC screens (width > 768px) */
@media (min-width: 769px) {
  .wl-index-header {
    display: none !important;
  }
}

/* TradingView Chart Pre-rendering and Instant Loading Classes */
.bottom-sheet-modal.chart-modal-closed {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: visibility 0.3s, opacity 0.3s ease !important;
}

.bottom-sheet-modal.chart-modal-closed .bottom-sheet-content {
  transform: translateY(100%) !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bottom-sheet-modal .bottom-sheet-content {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ================= NEW SCREENER SPACE OPTIMIZATIONS ================= */
.screener-overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
.screener-overview-about {
  border-left: 1px solid #f1f5f9;
  padding-left: 24px;
}

@media (max-width: 991px) {
  .screener-overview-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .screener-overview-about {
    border-left: none !important;
    padding-left: 0 !important;
    border-top: 1px dashed #e2e8f0 !important;
    padding-top: 20px !important;
  }
  #screener-ai-research-section {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}

@media (max-width: 768px) {
  .landing-header-indices {
    display: none !important;
  }
}

/* Redesigned Order Placement Components styling */
.order-side-switch-container {
  margin-bottom: 12px;
}
.order-side-switch {
  display: flex;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border-color);
}
.side-switch-btn {
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}
.side-switch-btn.buy.active {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(46, 189, 133, 0.25);
}
.side-switch-btn.sell.active {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
}

.quick-qty-row, .quick-price-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.quick-badge-btn {
  flex: 1;
  min-width: 50px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-secondary);
  transition: all 0.25s ease;
  text-align: center;
}
.quick-badge-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.quick-badge-btn:active {
  transform: scale(0.96);
}
.quick-badge-btn.clear-badge {
  background: rgba(244, 63, 94, 0.04);
  border-color: rgba(244, 63, 94, 0.15);
  color: var(--red);
}
.quick-badge-btn.clear-badge:hover {
  background: rgba(244, 63, 94, 0.08);
}

/* Dashboard & Confirmation Modal Styling */
.dash-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.index-card-dash {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.index-card-dash:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dash-holding-item, .dash-activity-item {
  transition: background-color 0.2s;
}
.dash-holding-item:hover, .dash-activity-item:hover {
  background-color: var(--bg-hover);
}

@media (max-width: 768px) {
  .dash-two-col-grid {
    grid-template-columns: 1fr;
  }
}

/* Paper order ticket: compact layout and same-screen confirmation review. */
.order-review-actions {
  display: none !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  width: 100%;
}

.order-review-actions.is-visible {
  display: grid !important;
}

#order-placement-modal.review-mode #btn-submit-order {
  display: none !important;
}

#order-placement-modal .keypad-sidebar .best5-btn {
  gap: 4px !important;
}

#order-placement-modal .keypad-sidebar .best5-btn span {
  font-size: 9px !important;
  line-height: 1.1 !important;
}

#order-placement-modal .keypad-sidebar .best5-btn i {
  font-size: 16px !important;
}

.btn-order-edit,
.btn-order-confirm {
  min-width: 0;
  height: 48px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.btn-order-edit {
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.btn-order-confirm {
  border: 1px solid transparent;
  color: #fff;
}

#order-placement-modal.side-buy .btn-order-confirm {
  background: #008b6b;
}

#order-placement-modal.side-sell .btn-order-confirm {
  background: #f43f5e;
}

.btn-order-confirm:disabled {
  cursor: wait;
  opacity: 0.72;
}

#order-placement-modal.review-mode .order-scroll-content {
  pointer-events: none;
}

#order-placement-modal.review-mode .keypad-numeric-grid,
#order-placement-modal.review-mode .keypad-sidebar .best5-btn {
  pointer-events: none;
  opacity: 0.68;
}

#order-placement-modal .order-scroll-content > .order-product-toggle,
#order-placement-modal .order-scroll-content > .order-inputs-card,
#order-placement-modal .order-scroll-content > .smart-orders-accordion {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  #order-placement-modal .order-header {
    padding: 10px 16px !important;
  }

  #order-placement-modal .order-scroll-content {
    padding: 10px 16px !important;
    gap: 10px !important;
  }

  #order-placement-modal .order-product-toggle {
    padding: 5px !important;
    gap: 6px !important;
    border-radius: 10px !important;
  }

  #order-placement-modal .order-product-toggle .product-btn {
    height: 36px !important;
    border-radius: 7px !important;
    font-size: 11.5px !important;
  }

  #order-placement-modal .order-inputs-card {
    padding: 10px !important;
    gap: 10px !important;
    border-radius: 10px !important;
  }

  #order-placement-modal .order-input-group,
  #order-placement-modal .order-price-group {
    gap: 5px !important;
    margin-bottom: 0 !important;
  }

  #order-placement-modal .qty-input-wrapper input,
  #order-placement-modal .price-type-row,
  #order-placement-modal .price-adjuster-row,
  #order-placement-modal .price-adjuster-row input,
  #order-placement-modal .adjust-btn-box,
  #order-placement-modal .price-mode-toggle,
  #order-placement-modal .price-mode-toggle .mode-btn {
    height: 42px !important;
  }

  #order-placement-modal .adjust-btn-box {
    width: 42px !important;
  }

  #order-placement-modal .price-type-row {
    gap: 8px !important;
  }

  #order-placement-modal .price-adjuster-row {
    gap: 5px !important;
  }

  #order-placement-modal .smart-orders-accordion {
    min-height: 44px !important;
    padding: 11px 12px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
  }

  #order-placement-modal .order-footer-group {
    padding: 12px 16px 16px !important;
  }

  #order-placement-modal .order-margin-info {
    margin-bottom: 10px !important;
  }

  #order-placement-modal .btn-order-submit,
  #order-placement-modal .btn-order-edit,
  #order-placement-modal .btn-order-confirm {
    height: 46px !important;
    font-size: 14px !important;
  }

  #order-placement-modal .order-review-actions {
    gap: 10px;
  }

  #order-placement-modal .custom-keypad {
    height: calc(240px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #order-placement-modal .keypad-layout {
    height: 240px !important;
  }

  #order-placement-modal .keypad-btn,
  #order-placement-modal .keypad-sidebar .spacer-btn,
  #order-placement-modal .keypad-sidebar .hide-key-btn {
    height: 60px !important;
  }

  #order-placement-modal .keypad-sidebar .best5-btn {
    height: 120px !important;
    gap: 4px !important;
  }

  #order-placement-modal .keypad-sidebar .best5-btn span {
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  #order-placement-modal .keypad-sidebar .best5-btn i {
    font-size: 16px !important;
  }

  #order-placement-modal .bottom-sheet-content.keypad-active {
    padding-bottom: calc(240px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #order-placement-modal .bottom-sheet-content.keypad-active .order-footer-group {
    bottom: calc(240px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #order-placement-modal .bottom-sheet-content.keypad-active .order-scroll-content {
    padding-bottom: 128px !important;
    scroll-padding-bottom: 128px !important;
  }
}
