/* ==== BASE ==== */
body {
  background: #163459;
  color: #fff;
  font-family: 'Segoe UI', 'Nunito Sans', 'Montserrat', Arial, sans-serif;
  margin: 0;
  padding: 0;
}
.hidden { display: none !important; }

.dashboard-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: hidden;
}

/* ==== HEADER ==== */
header.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px 18px 16px;
  background: #133259;
  border-bottom: 3px solid #11e1ff36;
  border-radius: 0 0 16px 16px;
  margin-bottom: 32px;
}
.company-title {
  font-size: 2.3rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 1px;
}
nav {
  display: flex;
  gap: 3px;
  align-items: center;
  position: relative;
}
nav a {
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  padding-bottom: 3px;
  transition: color .2s;
}
nav a.active,
nav a:hover {
  color: #25e2fc;
  border-bottom: 2.5px solid #25e2fc;
}

/* ==== DROPDOWN ==== */
.dropdown-nav {
  position: relative;
  display: inline-block;
}
.dropdown-nav > a {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  padding-bottom: 3px;
  background: none;
  border: none;
  text-decoration: none;
  transition: color .2s;
}
.dropdown-nav > a.active,
.dropdown-nav > a:hover {
  color: #25e2fc;
  border-bottom: 2.5px solid #25e2fc;
}
.dropdown-content {
  display: block;
  position: absolute;
  left: 0;
  top: 110%;
  min-width: 180px;
  background: #163459;
  box-shadow: 0 6px 18px #0002;
  border-radius: 10px;
  z-index: 20;
  padding: 6px 0;
  animation: dropdown-in .15s;
  opacity: 1;
  border: 1.5px solid #15eaff44;
}
.dropdown-content.hidden {
  display: none;
  opacity: 0;
}
.dropdown-content a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  font-size: 1.15rem;
  border-radius: 7px;
  transition: background 0.16s, color 0.18s;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: .2px;
}
.dropdown-content a:hover,
.dropdown-content a.active {
  background: #25e2fc22;
  color: #25e2fc;
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-16px);}
  to { opacity: 1; transform: translateY(0);}
}

/* ==== PROFILE ==== */
.profile-section {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-pic {
  font-size: 1.5rem;
  background: #224466;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-label {
  color: #e2f4ff;
  font-weight: 600;
}
.logout-btn {
  background: #fe256b;
  color: #fff;
  border: none;
  padding: 8px 22px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 1rem;
  margin-left: 10px;
  cursor: pointer;
}

/* ==== DASHBOARD ==== */
.dashboard-main {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
.dashboard-flex-main {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 64px;
  margin-top: 48px;
  width: 100%;
}
.dashboard-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 32px;
}
.dash-card {
  background: #15345a;
  border-radius: 18px;
  padding: 36px 38px;
  min-width: 240px;
  min-height: 150px;
  text-align: center;
  box-shadow: 0 2px 24px #001a3662;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.dash-label {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.dash-value {
  margin-top: 20px;
  font-size: 2.3rem;
  font-weight: bold;
  background: #e8f1fa;
  color: #15345a;
  padding: 13px 44px;
  border-radius: 13px;
  display: inline-block;
  min-width: 60px;
  border: 3px solid #15eaff;
}

#customer-list-section {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 30px 20px 50px;
  overflow: hidden;
}

.customer-list-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
#customer-list-section h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  white-space: nowrap;
}

#customer-list-section table {
  width: 100%;
  background: #1c3c62;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px #0b1c2e38;
  margin: 0 auto;
}
#customer-list-section th,
#customer-list-section td {
  padding: 12px 8px;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#customer-list-section th {
  background: #245487;
  color: #fff;
  font-weight: 700;
  border-bottom: 2px solid #16e1ff2f;
}
#customer-list-section tbody tr {
  background: #214474;
  transition: background 0.14s;
}
#customer-list-section tbody tr:nth-child(even) {
  background: #223e66;
}
#customer-list-section tbody tr:hover {
  background: #2b4f7f;
}
#customer-list-section td {
  border-bottom: 1px solid #18558928;
}

/* ==== TABLE GENERIC ==== */
.table-responsive {
  width: 100%;
  max-width: 1300px;
  margin: 34px auto 0 auto;
  background: transparent;
  border-radius: 17px;
  overflow-x: auto;
  box-shadow: 0 2px 16px #1e294a11;
}
table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  background: #1c3c62;
  border-radius: 15px;
  overflow: hidden;
}
th, td {
  padding: 18px 10px;
  text-align: left;
  font-size: 1.17rem;
  color: #f4faff;
  font-family: inherit;
  white-space: nowrap;
}
th {
  background: #245487;
  color: #fff;
  font-weight: 700;
  border-bottom: 2px solid #16e1ff2f;
}
tbody tr {
  background: #214474;
  transition: background 0.14s;
}
tbody tr:nth-child(even) {
  background: #223e66;
}
tbody tr:hover {
  background: #2b4f7f;
}
td {
  border-bottom: 1px solid #18558928;
}

/* ==== FORM/BOX SECTIONS ==== */
.add-customer-box, .add-admin-box {
  background: #15345a;
  border-radius: 17px;
  padding: 32px 28px 24px 28px;
  margin: 36px auto 24px auto;
  box-shadow: 0 2px 12px #11284e44;
  max-width: 1250px;
  width: 95%;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.add-customer-box h3,
.add-admin-box h3 {
  margin-top: 0;
  font-size: 1.38rem;
  color: #fff;
  margin-right: 22px;
  flex-basis: 120px;
  min-width: 90px;
}
.add-customer-box input,
.add-admin-box input,
.add-admin-box select {
  background: #e8f1fa;
  color: #163050;
  border: 2.5px solid #15eaff;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 1.05rem;
  min-width: 180px;
  max-width: 260px;
  margin-right: 7px;
  outline: none;
  transition: border-color .15s;
}
.add-customer-box input:focus,
.add-admin-box input:focus,
.add-admin-box select:focus {
  border-color: #25e2fc;
}
.add-customer-box .glow-btn,
.add-admin-box .glow-btn {
  background: #25e2fc;
  color: #133259;
  border: none;
  border-radius: 11px;
  padding: 11px 27px;
  font-weight: bold;
  margin-left: 10px;
  font-size: 1.06rem;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 2px 7px #1dcfff3a;
}
.add-customer-box .glow-btn:hover,
.add-admin-box .glow-btn:hover {
  background: #15eaff;
  color: #15345a;
}

/* ==== TRADE PUNCH ==== */
#trades-section label,
#trades-section input,
#trades-section select {
  font-size: 1.11rem;
}
#trades-section label {
  font-weight: 600;
  color: #fff;
  margin-right: 11px;
  margin-bottom: 7px;
}
#trades-section input,
#trades-section select {
  background: #e8f1fa;
  color: #163050;
  border: 2.5px solid #15eaff;
  border-radius: 10px;
  padding: 10px 13px;
  margin-right: 7px;
  outline: none;
  margin-bottom: 10px;
  min-width: 140px;
  transition: border-color .15s;
}
#trades-section input:focus,
#trades-section select:focus {
  border-color: #25e2fc;
}
#trades-section .glow-btn {
  background: #25e2fc;
  color: #133259;
  border: none;
  border-radius: 11px;
  padding: 11px 22px;
  font-weight: bold;
  font-size: 1.09rem;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 2px 7px #1dcfff3a;
}
#trades-section .glow-btn:hover {
  background: #15eaff;
  color: #15345a;
}

/* ==== NOTIFICATION ==== */
#notification-section {
  background: #14325c;
  border-radius: 20px;
  width: 470px;
  min-height: 344px;
  padding: 0px 40px 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: 0 2px 24px #10254440;
  margin-left: 0;
}
#notification-section h2 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  text-align: left;
}
#notification-section label {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 4px;
  margin-top: 12px;
  font-weight: 500;
  display: block;
}

#notifCustomer,
#notifSubject,
#notifDesc {
  min-height: 56px;
  padding: 8px 14px;
  font-size: 1.19rem;
  box-sizing: border-box; /* Make sure padding is included in height */
  height: 56px; /* Force exact height */
  line-height: normal; /* Ensure text line-height matches */
}


#notifCustomer,
#notifSubject,
#notifDesc {
  width: 100%;
  min-height: 56px;
  font-size: 1.19rem;
  border-radius: 13px;
  padding: 8px 14px;
  border: 3px solid #15eaff;
  background: #e8f1fa;
  color: #163050;
  margin-bottom: 13px;
  margin-top: 5px;
  outline: none;
  transition: border-color 0.2s;
}
#notifCustomer:focus,
#notifSubject:focus,
#notifDesc:focus {
  border-color: #25e2fc;
}
#notification-section .glow-btn {
  font-size: 1.15rem;
  padding: 16px 0;
  background: #22deff;
  color: #133259;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  margin-top: 18px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px #1dcfff66;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
#notification-section .glow-btn:hover {
  background: #15eaff;
  color: #15345a;
}
#notifMsg {
  margin-top: 8px;
  font-size: 1rem;
  min-height: 20px;
  text-align: center;
}

/* ==== LOGIN ==== */
.glass-card {
  margin: 70px auto;
  width: 410px;
  background: rgba(30,40,60,.95);
  border-radius: 20px;
  padding: 36px 30px;
  box-shadow: 0 4px 32px #10254440;
}
.logo-text {
  text-align:center;
  margin-bottom: 18px;
  font-size: 2rem;
  font-weight: bold;
}
.login-fields input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  background: #e8f1fa;
  color: #163050;
  font-size: 1.18rem;
  margin-bottom: 14px;
}
.login-fields .glow-btn {
  width: 100%;
  background: #25e2fc;
  color: #15345a;
  border: none;
  padding: 13px 0;
  font-size: 1.15rem;
  border-radius: 11px;
  margin-top: 10px;
  font-weight: bold;
  transition: background 0.2s, color 0.2s;
}
.login-fields .glow-btn:hover {
  background: #13c2f9;
  color: #fff;
}

/* ==== BUTTONS/ICONS ==== */
.delete-customer-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 9px;
  border-radius: 7px;
  transition: background 0.18s;
}
.delete-customer-btn:hover {
  background: #ff305c22;
}
.delete-icon {
  color: #ff305c;
  font-size: 1.2em;
  line-height: 1;
  vertical-align: middle;
  transition: color 0.18s;
}
.delete-customer-btn:hover .delete-icon {
  color: #ff1744;
  text-shadow: 0 0 4px #ff305c88;
}
.edit-btn:hover {
  color: #25e2fc;
  transform: scale(1.18);
}

/* ==== SWITCH ==== */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  margin: 0 4px;
  vertical-align: middle;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 22px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 22px; width: 22px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #25aafc;
}
input:focus + .slider {
  box-shadow: 0 0 1px #25aafc;
}
input:checked + .slider:before {
  transform: translateX(24px);
}

/* ==== RESPONSIVE ==== */
@media (max-width: 1100px) {
  .dashboard-flex-main {
    flex-direction: column;
    gap: 28px;
    align-items: center;
  }
  .dashboard-cards {
    width: 100%;
    min-width: 0;
  }
  #notification-section {
    width: 100%;
    min-width: 0;
    margin-top: 0;
  }
  .table-responsive,
  .add-customer-box,
  .add-admin-box {
    max-width: 98vw;
    min-width: 0;
    padding: 0 5px;
  }
  #customer-list-section table {
    min-width: 600px;
    width: 99vw;
  }
}
@media (max-width: 700px) {
  .dashboard-wrapper {
    max-width: 98vw;
    margin: 20px auto;
  }
  .dashboard-flex-main {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }
  .dashboard-cards, #notification-section {
    width: 100%;
    min-width: 0;
    padding: 14px 6px;
  }
  .glass-card {
    width: 96vw;
    padding: 15px 6px;
  }
  header.dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 7vw;
    gap: 14px;
  }
  nav {
    gap: 18px;
  }
  table,
  #customer-list-section table {
    min-width: 430px;
    font-size: .95rem;
    width: 99vw;
  }
  th, td,
  #customer-list-section th, #customer-list-section td {
    padding: 11px 7px;
    font-size: .95rem;
  }
}
/* --- Trade History Table Container Fixed Height --- */
#trade-history-section .table-responsive {
  width: 100%;
  max-width: 1400px;
  margin: 34px auto 0 auto;
  background: transparent;
  border-radius: 17px;
  overflow-x: auto;
  box-shadow: 0 2px 16px #1e294a11;
  /* FIXED HEIGHT: */
  min-height: 340px; /* You can adjust this value for more/less height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Make table always fill the container */
#trade-history-section table.orders-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  background: #1c3c62;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px #0b1c2e38;
  margin: 0 auto;
}

/* 'No Trade History' row styling */
#trade-history-section table.orders-table tbody tr.no-data-row td {
  text-align: left;
  font-size: 1.4rem;
  color: #fff;
  min-height: 260px;
  padding: 100px 0 100px 30px; /* Large vertical padding to fill container */
  background: #223e66;
  border-bottom: none;
}
@media (max-width: 700px) {
  #trade-history-section .table-responsive {
    min-height: 200px;
  }
}
/* Ensures Trade History/Orders tables keep consistent card size, even with no data */
.table-responsive {
  min-height: 340px; /* or whatever works for your design */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.orders-table {
  flex: 1 1 auto;
}
.orders-table tbody tr td {
  height: 70px; /* Optional: to add extra height to "No Trade History" row */
  vertical-align: middle;
  text-align: left;
}
.modal-bg {
  position: fixed; inset: 0;
  background: #121212cc;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.modal-content {
  background: #1b283a;
  padding: 32px 36px;
  border-radius: 16px;
  box-shadow: 0 2px 30px #0007;
  min-width: 450px;
  color: #fff;
  max-width: 96vw;
}
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-row > div { flex: 1; }
input[readonly] {
  background: #232b36 !important;
  color: #aab7c4 !important;
  cursor: not-allowed;
  border: 1px solid #2a3955;
}

.pg-ellipsis { color: #38e4c3; font-weight:bold; font-size:1.3em; padding:0 7px; }
#push-trade-table tr:empty {
  display: none;
}
.otp-modal-bg { display:none; position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(30,44,60,.84);z-index:99;align-items:center;justify-content:center;}
.otp-modal-bg.show { display:flex; }
.otp-modal-content { background:#161f34;padding:32px 24px;border-radius:18px;box-shadow:0 8px 28px #1d233e6c;min-width:320px;text-align:center; }
.otp-copy-btn { margin:8px 0; }
.client-login-btn { background:none;border:none;cursor:pointer;font-size:1.2em;color:#18eaff;}
.client-login-btn:hover { color:#15c7d5; }

/* ===== UPGRADED CUSTOMER MODAL (Chips/Modern Look) ===== */
#editCustomerModal .modal-content {
  background: #1c2536;
  color: #fff;
  border-radius: 22px;
  box-shadow: 0 6px 48px #000a;
  padding: 42px 48px 30px 48px;
  min-width: 430px;
  max-width: 97vw;
  font-size: 1.05rem;
  position: relative;
  animation: popIn .38s cubic-bezier(.16,.7,.51,1.1) forwards;
  opacity: 0;
  transform: translateY(-36px) scale(.98);
}
@keyframes popIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
#editCustomerModal label {
  font-weight: 600;
  display: inline-block;
  margin-bottom: 5px;
  letter-spacing: .3px;
}
#editCustomerModal input[type="text"],
#editCustomerModal input[type="email"],
#editCustomerModal select {
  background: #151d2b;
  color: #eee;
  border: 1.5px solid #2a436b;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 1em;
  margin-bottom: 8px;
  width: 97%;
  outline: none;
  transition: border-color .15s;
}
#editCustomerModal input[type="text"]:focus,
#editCustomerModal input[type="email"]:focus,
#editCustomerModal select:focus {
  border-color: #15eaff;
}
#editCustomerModal .form-row {
  display: flex;
  gap: 18px;
  margin-bottom: 10px;
}
#editCustomerModal .form-row > div {
  flex: 1;
  min-width: 130px;
}

/* "Chip" style for Segments/Strategies */
#editSegmentsBox, #editStrategiesBox {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 16px;
  margin-bottom: 7px;
}
#editSegmentsBox label, #editStrategiesBox label {
  background: #232e45;
  color: #bde6ff;
  border-radius: 15px;
  padding: 6px 16px 6px 10px;
  font-size: .97em;
  font-weight: 500;
  box-shadow: 0 1.5px 7px #0e1c3455;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background .18s, color .16s;
}
#editSegmentsBox input[type="checkbox"],
#editStrategiesBox input[type="checkbox"] {
  accent-color: #23f3c5;
  transform: scale(1.15);
  margin-right: 3px;
}

/* Buttons */
#editCustomerModal .glow-btn {
  background: linear-gradient(90deg, #15eaff 10%, #16f3b4 100%);
  color: #103058;
  border: none;
  border-radius: 9px;
  font-weight: 600;
  padding: 8px 34px;
  margin-right: 7px;
  box-shadow: 0 2px 15px #10e4dd20;
  cursor: pointer;
  font-size: 1em;
  transition: filter .14s, background .18s;
}
#editCustomerModal .glow-btn:hover {
  filter: brightness(1.09) contrast(1.1);
}
#editCustomerModal .glow-btn[style*="background:#222"] {
  background: #232e45 !important;
  color: #9ccfff !important;
  border: 1.2px solid #243040 !important;
}
#editCustomerMsg {
  margin-top: 12px;
  color: #22f373;
  font-weight: 500;
  letter-spacing: .03em;
  font-size: 1.07em;
}
/* Make all form-row inputs same width, aligned and responsive */
#editCustomerModal .form-row > div {
  flex: 1 1 0;
  min-width: 210px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* All input/select inside modal get 100% width */
#editCustomerModal .form-row input,
#editCustomerModal .form-row select {
  width: 100% !important;
  box-sizing: border-box;
  margin-bottom: 0;
}

/* Prevent one field from overflowing to multi-line on large screens */
#editCustomerModal .form-row {
  flex-wrap: nowrap;
  gap: 28px;
}

/* Responsive for small screens */
@media (max-width: 900px) {
  #editCustomerModal .form-row {
    flex-direction: column;
    gap: 10px;
  }
  #editCustomerModal .form-row > div {
    max-width: 100%;
    min-width: 0;
  }
}
/* Uniform input height for all modal fields */
#editCustomerModal .form-row input,
#editCustomerModal .form-row select {
  height: 48px !important;        /* Change this value if you want taller/shorter */
  padding-top: 0;
  padding-bottom: 0;
  font-size: 1.18em;
  border-radius: 9px;
  /* Remove box-shadow or border if any input has a special focus/active state */
  box-shadow: none !important;
  margin-bottom: 0;
  background: #232933;
  color: #d6eaff;
  border: 1.7px solid #325e8f;
  transition: border-color 0.15s, background 0.13s;
}

#editCustomerModal .form-row input:focus,
#editCustomerModal .form-row select:focus {
  border-color: #25e2fc;
  background: #242f3f;
  color: #fff;
}

/* Improve table readability */
.orders-table {
  border-collapse: separate !important;
  border-spacing: 0 8px; /* Add spacing between rows */
  background: transparent;
}

.orders-table thead tr th {
  background: #223366;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.95em;
  padding: 14px 10px;
  border-bottom: none;
}

.orders-table tbody tr {
  background: #2b3a67;
  border-radius: 12px;
  box-shadow: 0 3px 6px rgb(18 31 64 / 0.5);
  transition: background 0.25s ease;
}

.orders-table tbody tr:hover {
  background: #3a4b8f;
}

.orders-table tbody tr td {
  border: none !important;
  padding: 14px 12px;
  font-size: 0.9em;
  color: #d0d9ff;
}

.orders-table tbody tr td:first-child {
  padding-left: 20px;
}

.orders-table tbody tr td:nth-child(9) { /* Status cell */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Better status badges */
.status-badge {
  padding: 6px 12px;
  font-size: 0.8em;
  font-weight: 700;
  border-radius: 14px;
  letter-spacing: 0.05em;
  text-align: center;
  display: inline-block;
  min-width: 80px;
  box-shadow: 0 0 6px rgb(0 0 0 / 0.15);
}

.status-open {
  background: #1b9df0;
  color: #e1f0ff;
  text-shadow: 0 0 3px #1284ff;
}

.status-closed {
  background: #28b85a;
  color: #dbf8e8;
  text-shadow: 0 0 3px #1f8a46;
}

.status-failed,
.status-rejected {
  background: #f74343;
  color: #ffeaea;
  text-shadow: 0 0 3px #af2a2a;
}

/* Responsive improvements */
@media (max-width: 900px) {
  .orders-table thead {
    display: none;
  }
  .orders-table tbody tr {
    display: block;
    margin-bottom: 20px;
    padding: 14px;
    border-radius: 12px;
  }
  .orders-table tbody tr td {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #40548c;
    font-size: 0.85em;
  }
  .orders-table tbody tr td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #a0b0ff;
  }
  .orders-table tbody tr td:last-child {
    border-bottom: none;
  }
}
/* ==== HISTORY MAIN ==== */
#history-main {
  max-width: 1300px;       /* increase max width */
  margin: 60px auto;       /* more vertical spacing */
  padding: 50px 40px 60px 40px; /* add padding inside */
  background: #202c48;     /* same or adjust darker/lighter */
  border-radius: 18px;
  box-shadow: 0 8px 32px #13294e14;
}

/* If you want trade history panel area bigger as well */
#trade-history-section {
  width: 100%;
  padding: 20px;
  background: #202c48;  /* or similar dark blue */
  border-radius: 18px;
  box-shadow: 0 8px 24px #13294e14;
}

.computer-icon { margin-left: 6px; transition: color 0.2s; }
.computer-icon:hover { color: #f8f8f8; }

.computer-otp {
  font-size: 1rem;     /* Adjust as needed */
  color: #ffffff;        /* Your desired color */
  font-weight: 600;
  letter-spacing: 1px;   /* Optional: spacing */
}

.no-trades-msg {
  min-height: 280px; /* or whatever looks right */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bac8ed;
  font-size: 1.35em;
  font-weight: 600;
  letter-spacing: 1px;
}
.pnl-profit {
  color: #19de82 !important;
  font-weight: 700 !important;
}
.pnl-loss {
  color: #ff4646 !important;
  font-weight: 700 !important;
}
.pnl-zero {
  color: #ffe164 !important;
}

/*======================
/* --- FINAL Dropdown Menu Styles (Forceful Version) --- */

.dropdown-nav {
  position: relative;
  display: inline-block;
}

.dropdown-nav .dropdown-content {
  display: block;
  position: absolute;
  background-color: white;
  min-width: 180px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  margin-top: 8px;
  overflow: hidden;
}

/* This is the key fix: using !important to override conflicting styles */
.dropdown-nav .dropdown-content a {
  display: block !important;
  padding: 12px 20px !important;
  color: #212529 !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  text-align: left !important;
  background-color: white !important;
  transition: background-color 0.2s;
  border: none !important;
}

.dropdown-nav .dropdown-content a:hover {
  background-color: #f1f1f1 !important;
}

.hidden {
  display: none !important;
}

/* --- Panel Header (Title + Toolbar) --- */

.panel-header {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  flex-wrap: wrap; 
  margin-bottom: 1.5rem; 
}

.panel-header h3 {
  margin: 0; /* Remove default heading margin */
}

section.panel .panel-header .toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

/* === Attractive Filter Dropdown Styles ============================= */

/* Style for the "Filter by Owner:" label */
.panel-header .toolbar label {
  color: #94a3b8; 
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Style for the dropdown box itself */
.panel-header .toolbar select {
  margin-right: 45px;
  background-color: #334155; 
  color: #e2f4ff; 
  border: 1px solid #475569; 
  border-radius: 6px; 
  padding: 0.5rem 0.75rem; 
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s; 
}

/* Style for when the dropdown is clicked (focus) */
.panel-header .toolbar select:focus {
  border-color: #25e2fc; 
}

/* Links in dark sections (role control / empty state) */
.page-container a,
.page-container a:visited {
  color: #22deff;              /* bright cyan to match your theme */
  text-decoration: underline;  /* keep it obviously clickable */
  font-weight: 600;
}

.page-container a:hover,
.page-container a:focus {
  color: #9ff0ff;              /* lighter on hover/focus */
  text-decoration: underline;
  outline: none;
}

.profile-section .profile-link{display:flex;align-items:center;gap:8px;color:inherit;text-decoration:none}
.profile-card{max-width:600px;margin:24px auto;padding:28px 24px;background:#233a5c;border-radius:16px;box-shadow:0 2px 20px #0005}
.profile-header{display:flex;gap:16px;align-items:center;margin-bottom:14px}
.profile-avatar{font-size:36px}
.profile-name{font-size:1.25rem;font-weight:700}
.profile-email,.profile-role{opacity:.85}
.profile-hr{border:0;height:1px;background:#3b557c;margin:14px 0 18px}
.profile-form label{display:block;margin:12px 0 6px}
.profile-form input{width:100%;padding:10px 12px;border-radius:10px;border:1.5px solid #18c2f7;background:#1c2e4a;color:#fff}
.profile-actions{margin-top:14px;text-align:right}
.profile-msg{text-align:center;margin-top:10px}
.profile-card{ width: clamp(520px, 60vw, 820px); margin: 32px auto; }

/* REPLACE this */
.profile-form input{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1.5px solid #18c2f7;
  background:#1c2e4a;
  color:#fff;
}

/* WITH this */
.profile-form input{
  width:min(100%, 560px);   /* set your preferred max width */
  margin:8px auto 14px;     /* centers the field */
  padding:10px 12px;
  border-radius:10px;
  border:1.5px solid #18c2f7;
  background:#1c2e4a;
  color:#fff;
}

/* ===== Admin Login Logo (final) ===== */
.login-logo{
  display: block;
  margin: 0 auto 12px auto;    /* center + spacing below */
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;         /* rounded like client logo */
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.28));
}

/* ===== Admin Login Fields Sizing ===== */
#login-box .login-fields {
  max-width:380px;    /* controls width of inputs/buttons */
  margin: 0 auto;      /* centers them */
}

#login-box .login-fields input,
#login-box .login-fields button {
  width: 100%;         /* fill the new max-width */
  box-sizing: border-box;
}
/*
  FIX: Resize the Stock Options checkbox in BOTH the
  'Add Customer' and 'Edit Customer' sections.
*/
#addSegmentsBox input[type="checkbox"][value="STOCKS"],
#editSegmentsBox input[type="checkbox"][value="STOCKS"] {
  width: 15px !important;
  height: 15px !important;
}



.license-pill{
  background:#fff;
  color:#222;
  padding:4px 10px;
  border-radius:20px;
  margin-right:14px;
  font-size:.85em;
  font-weight:600;
  box-shadow:0 2px 5px rgba(0,0,0,.2);
  white-space:nowrap;
  display:none; /* hidden until we fetch */
}


.badge { padding: 2px 8px; border-radius: 999px; font-size: 12px; display:inline-block; }
.badge--active  { background:#1e9f50; color:#fff; }
.badge--trial   { background:#1f6feb; color:#fff; }
.badge--none    { background:#4b5563; color:#fff; }


/*==========*/

.summary-row {
    display:flex; align-items:center; gap:12px; margin:12px 0 6px 0;
  }
  .overall-pill {
    font-weight:700; border-radius:999px; padding:8px 14px;
    background:#1b293b; color:#e6f6ff; border:1px solid #2b3f5e;
  }
  .overall-pill.profit { background:#123826; color:#30ffb1; border-color:#226149; }
  .overall-pill.loss   { background:#3a1d1f; color:#ff7575; border-color:#6a2c31; }
  .overall-pill.zero   { background:#3a341d; color:#ffe164; border-color:#6a5f2c; }
  .overall-label { opacity:.85; margin-right:6px; }

  .badge--expired {
  background-color: #dc3545;  /* Bootstrap danger red */
  color: #fff;
}


.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal-content {
  background: #141a2f;
  color: #eee;
  border-radius: 12px;
  padding: 20px 25px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}
.modal-content select {
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
}
.glow-btn {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  background: #2955f5;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
.glow-btn:hover {
  background: #3b67ff;
}
.hidden { display: none !important; }


/* ===============================
   FINAL MODAL FIX (DO NOT DUPLICATE)
   =============================== */

.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9999;

  /* 🔑 allow scrolling */
  overflow-y: auto;

  /* spacing so modal never touches edges */
  padding: 24px;
}

.modal-content {
  background: #1c2536;
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 48px #000a;

  /* 🔑 viewport-safe sizing */
  max-height: calc(100vh - 48px);
  overflow-y: auto;

  width: 100%;
  max-width: 1100px;

  margin: auto; /* center horizontally + vertically */
}



/* ---------- Add Customer Layout ---------- */

nav {
  display: flex;
  gap: 34px;
  align-items: center;
  position: relative;
}

.card {
  background: #0f2742;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

.card.full {
  grid-column: 1 / -1;
}

.card h4 {
  margin-bottom: 14px;
  color: #7fe9ff;
  font-weight: 600;
  border-bottom: 1px solid #1f3f5f;
  padding-bottom: 6px;
}

/* Inputs */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid input,
.card select {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #223c5a;
  background: #122b45;
  color: #fff;
}

/* Checkbox Layout */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #132f4c;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.checkbox-grid input {
  accent-color: #36e1ff;
}

/* Scroll for many strategies */
.scrollable {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Button Center */
.center-actions {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 10px;
}

/* Utility */
.mt {
  margin-top: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .add-customer-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================
   CUSTOMER TABLE – FINAL
   ========================= */

#customerTable {
  width: 100%;
  margin: 0 auto;
  border-collapse: collapse;
  background: #1c3c62;
  border-radius: 18px;
  overflow: hidden;
  table-layout: fixed;
}

#customerTable th:nth-child(1),  #customerTable td:nth-child(1)  { width: 7%; }
#customerTable th:nth-child(2),  #customerTable td:nth-child(2)  { width: 12%; }
#customerTable th:nth-child(3),  #customerTable td:nth-child(3)  { width: 11%; }
#customerTable th:nth-child(4),  #customerTable td:nth-child(4)  { width: 9%; }
#customerTable th:nth-child(5),  #customerTable td:nth-child(5)  { width: 11%; }
#customerTable th:nth-child(6),  #customerTable td:nth-child(6)  { width: 6%; }
#customerTable th:nth-child(7),  #customerTable td:nth-child(7)  { width: 8%; }
#customerTable th:nth-child(8),  #customerTable td:nth-child(8)  { width: 9%; }
#customerTable th:nth-child(9),  #customerTable td:nth-child(9)  { width: 9%; }
#customerTable th:nth-child(10), #customerTable td:nth-child(10) { width: 4%; text-align:center; }
#customerTable th:nth-child(11), #customerTable td:nth-child(11) { width: 4%; text-align:center; }
#customerTable th:nth-child(12), #customerTable td:nth-child(12) { width: 8%; text-align:center; }

#customerTable thead th {
  background: #245487;
  font-size: 0.95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#customerTable tbody tr {
  background: #214474;
}

#customerTable tbody tr:nth-child(even) {
  background: #223e66;
}

#customerTable tbody tr:hover {
  background: #2b4f7f;
}

/* Kill conflicting global rules */
#customerTable td,
#customerTable th {
  padding: 12px 8px !important;
  font-size: 0.82rem !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Only OTP cell should be visible */
#customerTable td:nth-child(11) {
  overflow: visible;
}


/* ===== Customer List Header (Centered Search) ===== */
.customer-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

/* Center search box */
.customer-search {
  justify-self: center;
  width: 360px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #122b45;
  color: #fff;
  font-size: 0.95rem;
}

.customer-search::placeholder {
  color: #9fb3c8;
}

.customer-search:focus {
  outline: none;
  border-color: #25e2fc;
  box-shadow: 0 0 0 2px rgba(37,226,252,.15);
}



/* ===============================
   CUSTOMER LIST HEADER – FINAL
   =============================== */

.panel-header.customer-header {
  display: grid;
  grid-template-columns: 260px minmax(320px, 1fr) 260px;
  align-items: center;
  width: 100%;
}

/* LEFT */
.panel-header.customer-header h3 {
  justify-self: start;
}

/* CENTER */
.panel-header.customer-header .customer-search {
  justify-self: center;
  width: 360px;
}

/* RIGHT */
.panel-header.customer-header #ownerFilterWrap {
  justify-self: end;
  white-space: nowrap;
}

/* Prevent zoom collapse */
.panel-header.customer-header > * {
  min-width: 0;
}


/* =========================
   PAGINATION
   ========================= */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination button {
  background: #1c3c62;
  color: #fff;
  border: 1px solid #2b5c8f;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.pagination button:hover {
  background: #2563eb;
}

.pagination button.active {
  background: #25e2fc;
  color: #103058;
  font-weight: 700;
}

.pagination span {
  color: #9fb3c8;
  padding: 0 6px;
}


/* =========================================
   Multi-Select Dropdown Styles
   ========================================= */

/* Container for the custom dropdown */
.multi-select-container {
  position: relative;
  display: inline-block;
  width: 100%;
  min-width: 170px;
}

/* The button that looks like a select box */
.multi-select-btn {
  width: 100%;
  padding: 10px 12px;
  background: #294874;
  color: #fff;
  border: 2.2px solid #38e4c3;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 1em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.18s, background 0.18s;
}

.multi-select-btn:hover {
  border-color: #15cab6;
  background: #19314d;
}

/* The hidden dropdown list */
.multi-select-dropdown {
  display: none; /* Hidden by default */
  position: absolute;
  top: 100%;
  left: 0;
  width: 250px; /* Wider than the button so text fits */
  max-height: 420px;
  min-height: 220px;  
  overflow-y: auto;
  background: #1e283e;
  border: 1px solid #38e4c3;
  z-index: 9999; /* Ensure it floats above table rows */
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  margin-top: 5px;
}

/* Class added via JS to show the dropdown */
.multi-select-dropdown.show {
  display: block;
}

/* Individual Strategy Options */
.multi-select-dropdown label {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  color: #ddd;
  font-size: 0.95em;
  border-radius: 4px;
  transition: background 0.1s;
  user-select: none;
}

.multi-select-dropdown label:hover {
  background: #2b3648;
  color: #fff;
}

/* Checkbox Styles */
.multi-select-dropdown input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: #38e4c3; /* Matches your theme color */
}

/* Custom Scrollbar for the dropdown */
.multi-select-dropdown::-webkit-scrollbar {
  width: 8px;
}
.multi-select-dropdown::-webkit-scrollbar-track {
  background: #132233;
}
.multi-select-dropdown::-webkit-scrollbar-thumb {
  background: #38e4c3;
  border-radius: 4px;
}

.service-badge {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

/* Monthly - Blue */
.service-badge.monthly {
  background: linear-gradient(45deg, #4067b7, #5a8dee);
}

/* Quarterly - Green */
.service-badge.quarterly {
  background: linear-gradient(45deg, #2bb673, #1f9d63);
}

/* Half-Yearly - Purple */
.service-badge.halfyearly {
  background: linear-gradient(45deg, #9b59b6, #6c3483);
}

/* Customer List Header */
.panel-header.customer-header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px 20px;
}

.customer-header h3 {
  margin: 0;
  white-space: nowrap;
}

.customer-search {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: white;
  font-size: 14px;
}

.customer-search::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Mask Toggle Button */
.mask-toggle-btn {
  background: linear-gradient(135deg, #fc4c84);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mask-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.mask-toggle-btn:active {
  transform: translateY(0);
}

.mask-toggle-btn.unmasked {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.mask-toggle-btn.unmasked:hover {
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.mask-toggle-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

#ownerFilterWrap {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

#ownerFilterWrap label {
  margin: 0;
  font-size: 14px;
}

#filterOwner {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 13px;
  min-width: 150px;
}

/* Masked text styling */
.masked-text {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  color: #999;
}

.unmasked-text {
  color: inherit;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
  .panel-header.customer-header {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  
  .mask-toggle-btn,
  #ownerFilterWrap {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 768px) {
  .panel-header.customer-header {
    grid-template-columns: 1fr;
  }
  
  .customer-search {
    max-width: 100%;
  }
  
  .mask-toggle-btn,
  #ownerFilterWrap {
    justify-self: start;
  }
}

/* Kill Switch Buttons */
.kill-btn {
  padding: 4px 10px;
  border-radius: 7px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.82em;
}
.kill-btn.off     { background: #2bb673; color: #fff; }
.kill-btn.on      { background: #e74c3c; color: #fff; }
.kill-btn.pending { background: #f39c12; color: #fff; }


#customer-list-section {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 30px 20px 50px;
  box-sizing: border-box;
}