﻿/* Account features share the existing UKS palette and compact responsive scale. */
.appearance-control { display:flex; align-items:center; gap:8px; font-size:11px; color:var(--muted); }
.appearance-control select { min-height:32px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); padding:3px 25px 3px 8px; font-size:11px; }
.footer-bottom { flex-wrap:wrap; align-items:center; }
.net-position-panel { margin-top:16px; padding:13px 16px; background:var(--surface); border-radius:12px; box-shadow:var(--shadow); }
.position-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.position-heading h2 { font-size:15px; font-weight:700; }
.position-refresh { background:var(--soft); border:0; color:var(--blue-deep); padding:4px 10px; border-radius:6px; font-size:11px; min-height:32px; }
#position-status { font-size:11px; color:var(--muted); margin:5px 0; }
#position-login { font-size:11px; }
#position-list { display:flex; flex-wrap:wrap; gap:8px; }
.position-chip { padding:4px 8px; font-size:11px; border-radius:6px; overflow-wrap:anywhere; }
.is-long { color:#086737!important; background:#e6f7ed; }
.is-short { color:#a32336!important; background:#fcecf0; }
.inline-position { width:max-content; max-width:100%; padding:2px 5px; border-radius:4px; margin-top:3px; font-size:10px!important; }
.account-status { color:var(--muted); font-size:13px; margin:15px 0; min-height:20px; }
.account-context { font-size:13px; color:var(--muted); margin:-12px 0 22px; }
.account-gate { display:flex; justify-content:space-between; align-items:center; gap:24px; margin:20px 0; padding:22px 26px; }
.account-gate>div>.icon { color:var(--blue); float:left; margin-right:12px; margin-top:3px; }
.account-gate h2 { font-size:19px; margin-bottom:7px; }
.account-gate p { font-size:12px; }
.account-gate .btn { white-space:nowrap; }
.native-login { max-width:580px; margin:0 auto; }
.native-login .portal-link { display:flex; width:max-content; max-width:100%; margin:20px 0 0; font-size:12px; }
.native-login>.small-note { margin-top:22px; }
.native-login #account-logout { margin-top:20px; }
.native-login h2 { font-size:24px; }
.form-message { font-size:13px; color:var(--muted); line-height:1.8; margin-top:13px; overflow-wrap:anywhere; }
.form-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:20px; }
.kyc-requirements { display:flex; flex-direction:column; gap:3px; color:var(--navy); background:var(--soft); padding:16px 20px; border-radius:10px; font-size:13px; }
.kyc-requirements span { color:var(--muted); font-size:12px; }
.kyc-form { max-width:970px; margin-inline:auto; }
.kyc-form fieldset { min-width:0; margin:0; padding:0 0 10px; border:0; }
.kyc-form fieldset+fieldset { padding-top:25px; border-top:1px solid var(--line); }
.kyc-form legend { font-size:20px; font-weight:650; color:var(--navy); margin-bottom:23px; float:none; width:auto; }
.optional-label { font-size:11px; font-weight:400; color:var(--muted); margin-left:4px; }
.required-mark { color:#a52236; }
.field-error { font-size:12px!important; color:#aa2634!important; line-height:1.6; margin:5px 0 0; }
[aria-invalid=true] { border-color:#b83145; }
.kyc-form input[name=gst],.kyc-form input[name=CompanyPAN],.kyc-form input[name=ifsccode] { text-transform:uppercase; }
.document-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; margin-top:20px; }
.document-field input { font-size:12px; padding:8px; max-width:100%; }
.file-details { font-size:11px!important; color:var(--muted); overflow-wrap:anywhere; margin-top:5px; }
.consent-check { display:flex; align-items:flex-start; gap:11px; margin-top:15px; font-size:13px; color:var(--ink); }
.consent-check input { margin-top:5px; width:17px; height:17px; flex-shrink:0; accent-color:var(--blue); }
.order-form,.order-review { max-width:760px; margin:0 auto; }
.live-order-quote { padding:12px 16px; margin:5px 0 23px; border-radius:8px; color:var(--navy); background:var(--soft); font-size:13px; font-variant-numeric:tabular-nums; }
.order-form input[readonly] { background:var(--soft); }
.order-review { margin-top:24px; border:2px solid var(--blue); box-shadow:none; }
.review-details { margin-top:20px; }
.review-details>div { display:grid; grid-template-columns:1fr 1.8fr; gap:15px; padding:10px 0; border-bottom:1px solid var(--line); font-size:13px; }
.review-details dt { font-weight:500; color:var(--muted); }
.review-details dd { margin:0; font-weight:650; overflow-wrap:anywhere; }
.account-toolbar { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:22px; }
.trades-panel { padding:25px; }
.trades-panel .section-heading h2 { font-size:24px; margin:0; }
.trade-table { width:100%; table-layout:fixed; margin:18px 0 0; --bs-table-color:var(--ink); --bs-table-bg:transparent; --bs-table-border-color:var(--line); }
.trade-table thead { background:var(--soft); }
.trade-table th { font-size:12px; color:var(--navy); padding:12px 9px; }
.trade-table th:nth-child(1) { width:48%; }
.trade-table th:nth-child(2) { width:70px; }
.trade-table th:nth-child(3) { width:110px; }
.trade-table th:nth-child(4) { width:auto; }
.trade-table td { padding:16px 9px; font-size:13px; vertical-align:top; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.trade-table td>strong { font-size:14px; }
.trade-table td>small { display:block; color:var(--muted); font-size:11px; margin-top:5px; }
.trade-table td:last-child { text-align:right; }
.trade-comment { display:block; margin-top:7px; color:var(--muted); font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.trade-check { width:18px; height:18px; accent-color:var(--blue); }
.buy-text { color:#087340!important; font-weight:650; }
.sell-text { color:#a32336!important; font-weight:650; }
.table-empty { text-align:center!important; padding:30px 12px!important; color:var(--muted)!important; }
.tds-context { display:flex; justify-content:space-between; gap:24px; align-items:center; margin-bottom:24px; font-size:13px; color:var(--muted); }
.tds-context p { max-width:65ch; }
.tds-context>a { white-space:nowrap; }
.tds-panel { max-width:970px; margin-inline:auto; }
.tds-row { border-bottom:1px solid var(--line); padding:22px 0; }
.tds-row-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:6px; }
.tds-row-heading h3 { font-size:17px; }
.remove-tds-row { min-height:38px; padding:5px 10px; border:0; border-radius:6px; color:#a32336; background:#fcecf0; font-size:11px; }
.tds-row-comment { font-size:12px!important; color:var(--muted); margin:5px 0 15px; white-space:pre-wrap; overflow-wrap:anywhere; }
.tds-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.tds-fields .field { margin-bottom:10px; }
.tds-row-amount { display:flex; justify-content:space-between; align-items:center; gap:15px; font-size:12px; color:var(--muted); }
.tds-row-amount output { color:var(--navy); font-size:16px; font-weight:700; font-variant-numeric:tabular-nums; }
.tds-summary { background:var(--soft); border-radius:10px; padding:20px; margin-top:24px; }
.tds-summary>div { display:flex; justify-content:space-between; gap:15px; font-size:14px; color:var(--muted); margin:8px 0; }
.tds-summary output { color:var(--navy); font-weight:700; font-variant-numeric:tabular-nums; }
.tds-summary .tds-total { border-top:1px solid var(--line); padding-top:13px; margin-top:13px; color:var(--navy); font-size:18px; font-weight:650; }
.tds-metal { max-width:150px; min-height:36px; font-size:12px; }
#tds-form>.small-note { margin-top:20px; }
html[data-theme=dark] .is-long,html[data-theme=dark] .buy-text { background:#173e32; color:#a5ebc0!important; }
html[data-theme=dark] .is-short,html[data-theme=dark] .sell-text { background:#482535; color:#ffc2cb!important; }
html[data-theme=dark] .field-error,html[data-theme=dark] .required-mark { color:#ffbdc7!important; }
html[data-theme=dark] .remove-tds-row { color:#ffc2cb; background:#482535; }
@media(max-width:700px) {
  .account-gate { padding:20px; gap:18px; align-items:flex-start; flex-direction:column; }
  .tds-context { flex-direction:column; align-items:flex-start; gap:12px; }
  .tds-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .trades-panel { padding:18px 12px; }
  .trade-table th:nth-child(1) { width:46%; }
  .trade-table th:nth-child(2) { width:40px; }
  .trade-table th:nth-child(3) { width:62px; }
  .trade-table th { padding:10px 4px; font-size:10px; }
  .trade-table td { padding:13px 4px; font-size:11px; }
  .trade-table td>strong { font-size:12px; }
  .trade-comment { font-size:10px; }
  .trade-table td>small { font-size:9px; }
  .trade-check { width:16px; height:16px; }
  .trades-panel .section-heading { align-items:flex-start; gap:10px; }
  .trades-panel .section-heading h2 { font-size:22px; }
  #calculate-selected { font-size:11px; padding:9px 10px; white-space:nowrap; }
}
@media(max-width:600px) {
  .appearance-control { margin-block:7px; font-size:12px; }
  .appearance-control select { min-height:38px; font-size:12px; }
  .net-position-panel { margin-top:12px; padding:10px 12px; border-radius:10px; }
  .position-heading h2 { font-size:13px; }
  #position-status,#position-login { font-size:10px; }
  .position-chip { font-size:10px; }
  .kyc-requirements { padding:13px 16px; font-size:12px; }
  .kyc-requirements span { font-size:11px; }
  .kyc-form .form-pair,.document-grid { grid-template-columns:1fr; }
  .kyc-form legend { font-size:19px; margin-bottom:20px; }
  .optional-label { font-size:10px; }
  .kyc-form .field label { font-size:12px; }
  .document-field input { min-width:0; font-size:12px; }
  .consent-check { font-size:12px; }
  .form-message,.account-status { font-size:12px; }
  .review-details>div { font-size:12px; }
  .order-review { padding:20px; }
  .tds-panel { padding:20px; }
  .tds-row-heading { flex-wrap:wrap; }
  .tds-row-heading h3 { flex:1; font-size:16px; min-width:120px; }
  .tds-summary { padding:14px; }
  .tds-summary>div { font-size:12px; }
  .tds-summary .tds-total { font-size:16px; }
}
.kyc-required-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.kyc-optional { border-top:1px solid var(--line); }
.kyc-optional>summary { color:var(--navy); font-size:16px; font-weight:650; padding:18px 0; cursor:pointer; }
.kyc-optional>summary::marker { color:var(--blue); font-size:12px; }
.kyc-details-body { padding:9px 0 13px; }
.kyc-optional .field { margin-bottom:15px; }
.kyc-optional .form-pair { row-gap:0; }
.kyc-form .consent-check { margin-top:25px; }
@media(max-width:600px) {
 .kyc-required-grid { grid-template-columns:1fr; gap:0; }
 .kyc-optional>summary { font-size:15px; }
}
.rates-toolbar { margin-top:18px; }
.rates-toolbar .search-box { margin-top:0; }
.scrip-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.scrip-actions .btn { min-height:38px; font-size:12px; padding:7px 13px; }
.rates-status { flex-wrap:wrap; gap:5px 12px; }
.connection-state { color:#086737; font-weight:650; }
.connection-state.is-stale { color:#925b14; }
.rate-quote,.product-link { color:var(--ink); }
.rate-quote:hover,.product-link:hover { color:var(--blue); text-decoration:underline; text-underline-offset:4px; }
.scrip-dialog { width:min(740px,calc(100% - 28px)); max-height:85vh; border:0; border-radius:16px; padding:27px; color:var(--ink); background:var(--surface); box-shadow:0 15px 55px #071c5845; }
.scrip-dialog::backdrop { background:#071a3c80; }
.dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:23px; }
.dialog-heading h2 { font-size:23px; }
.dialog-heading p { font-size:12px; color:var(--muted); margin-top:8px; }
.dialog-close { width:36px; height:36px; border:0; border-radius:50%; background:var(--soft); color:var(--navy); font-size:25px; line-height:1; flex-shrink:0; }
#scrip-list { margin-top:14px; }
.scrip-editor-row { display:grid; grid-template-columns:1fr 1fr auto; align-items:center; gap:15px; padding:17px 0; border-bottom:1px solid var(--line); }
.scrip-editor-row .field { min-width:0; margin:0; }
.scrip-editor-row input.form-control { font-size:12px; }
.scrip-select { display:flex; align-items:center; gap:10px; color:var(--navy); font-size:14px; font-weight:650; }
.scrip-select input { width:18px; height:18px; accent-color:var(--blue); }
.scrip-select small { display:block; color:var(--muted); font-size:10px; font-weight:400; margin-top:4px; }
.scrip-order-buttons { display:flex; gap:5px; }
.scrip-order-buttons button { border:0; border-radius:6px; background:var(--soft); color:var(--blue-deep); width:31px; height:35px; }
.client-id-details { border-top:1px solid var(--line); padding-top:18px; margin-top:24px; }
.client-id-details summary { color:var(--blue); cursor:pointer; font-size:13px; font-weight:650; }
.client-id-details form { margin-top:22px; }
#otp-verify-form { border-top:1px solid var(--line); padding-top:22px; margin-top:23px; }
.pending-order { border-bottom:1px solid var(--line); padding:24px 0; }
.pending-order:last-child { border-bottom:0; padding-bottom:5px; }
.pending-order-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.pending-order-heading h3 { font-size:19px; }
.pending-order-values { display:flex; flex-wrap:wrap; gap:15px 35px; font-size:14px; margin-top:16px; font-variant-numeric:tabular-nums; }
.pending-order>.small-note { margin-top:6px; }
.pending-edit { margin-top:25px; }
.pending-panel,.pending-edit { max-width:970px; margin-inline:auto; }
.cancel-order { color:#a32336; border-color:#a32336; }
html[data-theme=dark] .connection-state { color:#a5ebc0; }
html[data-theme=dark] .connection-state.is-stale { color:#f3d491; }
html[data-theme=dark] .cancel-order { color:#ffc2cb; border-color:#b96f7b; }
@media(max-width:600px) {
 .rates-toolbar { margin-top:13px; }
 .scrip-actions { gap:7px; margin-top:9px; }
 .scrip-actions .btn { flex:1; min-height:36px; font-size:10px; padding:6px 8px; white-space:nowrap; }
 .scrip-dialog { padding:20px; }
 .dialog-heading h2 { font-size:21px; }
 .scrip-editor-row { grid-template-columns:1fr auto; gap:10px; }
 .scrip-select { font-size:13px; }
 .scrip-editor-row .field { grid-column:1/-1; grid-row:2; }
 .scrip-order-buttons { grid-column:2; grid-row:1; }
 .pending-order-heading h3 { font-size:17px; }
 .pending-order-values { font-size:13px; }
}

/* Keep the complete Product / Buy / Sell table visible at every viewport. */
.rates-wrap .rates-fit {
  width:100%;
  min-width:0;
  max-height:none;
  overflow:visible;
}
.rates-fit .rates-table { width:100%; min-width:0; table-layout:fixed; }
.rates-fit .rates-table thead th:first-child { border-radius:9px 0 0 0; }
.rates-fit .rates-table thead th:last-child { border-radius:0 9px 0 0; }
.rates-fit .rates-table tbody th,
.rates-fit .rates-table tbody td { height:80px; }
.rates-fit .product-cell>span { min-width:0; overflow-wrap:anywhere; }
.rates-fit .product-link { display:block; }
.rates-fit .rate-quote { display:inline-block; max-width:100%; padding-block:8px; }
.rates-fit .rates-table td>small { margin-top:0; }
@media(max-width:600px) {
  .rates-fit .product-col { width:44%; }
  .rates-fit .price-col { width:28%; }
  .rates-fit .rates-table thead th,
  .rates-fit .rates-table tbody th,
  .rates-fit .rates-table tbody td { padding-inline:7px; }
  .rates-fit .rates-table tbody th,
  .rates-fit .rates-table tbody td { height:72px; padding-block:8px; }
  .rates-fit .product-cell { gap:6px; }
  .rates-fit .product-cell .metal-image { width:28px; height:32px; }
  .rates-fit .product-cell>span { font-size:clamp(12px,3.2vw,15px); line-height:1.35; }
  .rates-fit .rates-table td>strong { font-size:clamp(15px,4.1vw,22px); letter-spacing:-.025em; }
  .rates-fit .rates-table td>small { font-size:clamp(9px,2.3vw,11px); }
  .rates-fit .rate-quote { overflow-wrap:anywhere; white-space:normal; }
}

/* Contact uses the same content width and surfaces as the Live Rates desk. */
.contact-page .content-main {
  width:min(970px,calc(100% - 32px));
  padding-top:25px;
  padding-bottom:42px;
}
.contact-page .page-intro { margin-bottom:22px; }
.contact-page .page-intro h1 { font-size:28px; letter-spacing:-.025em; }
.contact-page .page-intro>p { font-size:14px; margin-top:8px; }
.contact-page .contact-layout {
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:start;
  gap:20px;
}
.contact-page .contact-layout>.panel { min-width:0; padding:24px; }
.contact-page .contact-layout h2 { font-size:20px; margin-bottom:16px; }
.contact-page .contact-info>a { overflow-wrap:anywhere; }
.contact-page .contact-info>a .icon { flex-shrink:0; }
.contact-page .contact-info address { margin-bottom:16px; }
.contact-page .contact-layout form>p { margin-bottom:18px; }
.contact-page .contact-layout form>.small-note { margin-bottom:0; }
.contact-page .branch-section { margin-top:26px; padding-top:22px; }
.contact-page .branch-section h2 { font-size:22px; margin-bottom:16px; }
.contact-page .branch-section>div { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; }
.contact-page .branch-section article {
  background:var(--surface);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px 24px;
}
.contact-page .branch-section h3 { font-size:17px; }
@media(max-width:600px) {
  .contact-page .content-main { width:calc(100% - 20px); padding-top:15px; padding-bottom:27px; }
  .contact-page .page-intro { margin-bottom:18px; }
  .contact-page .page-intro h1 { font-size:24px; }
  .contact-page .page-intro>p { font-size:13px; }
  .contact-page .contact-layout,
  .contact-page .branch-section>div { grid-template-columns:minmax(0,1fr); gap:16px; }
  .contact-page .contact-layout>.panel,
  .contact-page .branch-section article { padding:20px; }
  .contact-page .contact-layout h2 { font-size:19px; }
  .contact-page .contact-info .contact-large { font-size:21px!important; }
  .contact-page .contact-info address,
  .contact-page .branch-section p { font-size:13px; }
  .contact-page .branch-section h2 { font-size:20px; }
}

/* Existing UKS palette, with readable controls for the extended trading forms. */
.net-position-panel { margin:0 0 18px; }
.position-heading h2 { margin:0; }
#position-list { gap:8px; margin-top:8px; }
.position-chip { font-size:13px; }
.tds-selection-toolbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin:16px 0 8px; }
.trade-select-heading,.trade-select-cell { width:44px; text-align:center; }
.trade-checkbox { display:inline-flex; justify-content:center; align-items:center; min-width:36px; min-height:44px; cursor:pointer; }
.trade-checkbox input { width:18px; height:18px; accent-color:var(--blue); }
.trade-table td small { display:block; color:var(--muted); margin-top:5px; font-size:12px; overflow-wrap:anywhere; }
.trade-comment { max-width:44ch; }
.review-comment { white-space:pre-wrap; overflow-wrap:anywhere; margin:12px 0; }
.kyc-section { min-width:0; border:0; padding:0; margin:0 0 32px; }
.kyc-section legend { font-size:20px; font-weight:700; color:var(--navy); margin-bottom:20px; }
.kyc-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 24px; }
.kyc-form label,.kyc-form .field>span { font-size:14px; }
.kyc-form .form-control,.kyc-form .form-select { font-size:16px; min-height:44px; }
.kyc-form .optional-label { color:var(--muted); font-size:12px; font-weight:400; }
.kyc-form input[type=file] { padding:10px; max-width:100%; }
.document-field small { color:var(--muted); font-size:12px; }
.radio-options { display:flex; gap:24px; padding:12px 0; }
.radio-options label { display:flex; gap:8px; align-items:center; }
#order-comment { font-size:16px; resize:vertical; }
@media(max-width:600px) { .kyc-fields { grid-template-columns:minmax(0,1fr); } .tds-selection-toolbar .btn { min-height:44px; } .trade-table { font-size:12px; } .trade-table td,.trade-table th { padding:9px 5px; } }

/* Five-column trades table: selection is a utility column, product owns the free width. */
.trade-table th:nth-child(1) { width:56px; }
.trade-table th:nth-child(2) { width:auto; }
.trade-table th:nth-child(3) { width:10%; }
.trade-table th:nth-child(4) { width:16%; }
.trade-table th:nth-child(5) { width:22%; text-align:right; }
.trade-checkbox { min-width:28px; }
.kyc-form .field label { font-size:14px; }
.position-refresh { font-size:14px; min-height:44px; }
#position-status,#position-login { font-size:12px; }
@media(max-width:600px) {
 .trade-table th:nth-child(1) { width:42px; }
 .trade-table th:nth-child(2) { width:auto; }
 .trade-table th:nth-child(3) { width:9%; }
 .trade-table th:nth-child(4) { width:17%; }
 .trade-table th:nth-child(5) { width:25%; }
 .position-heading h2 { font-size:16px; }
}

@media(max-width:600px) {
 .trade-table th:nth-child(3) { width:44px; }
 .trade-table td:nth-child(3) { white-space:nowrap; overflow-wrap:normal; }
}

.scrip-row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.scrip-row-actions .btn { min-height:40px; font-size:13px; padding:8px 12px; }
.scrip-row-actions .delete-scrip { color:var(--ink); }
@media(max-width:600px) { .scrip-row-actions { grid-column:2; grid-row:1; flex-direction:column; align-items:stretch; } }
