:root {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  font-weight: 400;
  color: #dbe7ff;
  background-color: #010416;
  --bg-dark: #010416;
  --bg-panel: #050c28;
  --bg-card: #0b1738;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #6c63ff;
  --accent-strong: #a76bff;
  --text-primary: #f4f6ff;
  --text-muted: #8a96bf;
  --success: #43e6b1;
  --danger: #ff8b8b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(47, 72, 159, 0.45), transparent 55%),
    linear-gradient(135deg, #010416 0%, #030a20 50%, #050c28 100%);
  color: var(--text-primary);
}

#root {
  min-height: 100vh;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-strong);
}
/* User shell layout */
.shell {
    min-height: 100vh;
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.shell__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.shell__auth {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.shell__nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 9, 20, 0.7);
    width: fit-content;
}

.shell__nav-link {
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.shell__nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.shell__nav-link.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 15px 35px rgba(108, 99, 255, 0.35);
}

.shell__main {
    flex: 1;
}

.page-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.muted {
    color: var(--text-muted);
}

.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.6rem, 5vw, 3.4rem);
    margin: 0.2rem 0;
}

.lead {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0.5rem auto 1.5rem;
}

.metric-list {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}/* Component Styles */

/* Auth Chips */
.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.4);
    font-size: 0.95rem;
}

.auth-chip.ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn {
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.3rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s;
    color: #fff;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4f6d, #ff8b8b);
    box-shadow: 0 10px 30px rgba(255, 79, 109, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.btn-warning:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Notices */
.notice {
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(4, 8, 35, 0.9);
}

.notice.success {
    border-color: rgba(67, 230, 177, 0.6);
    color: var(--success);
}

.notice.error {
    border-color: rgba(255, 139, 139, 0.6);
    color: var(--danger);
}

.notice.info {
    border-color: rgba(108, 99, 255, 0.6);
}

.notice.idle-notice {
    margin-bottom: 1rem;
}

/* Cards & Sections */
.section-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 35px 65px rgba(1, 4, 22, 0.55);
}

.section-card.highlight {
    border: 1px solid rgba(108, 99, 255, 0.4);
    box-shadow: 0 40px 80px rgba(108, 99, 255, 0.15);
}

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

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header h2 {
    margin: 0 0 0.25rem;
}

.section-header p {
    margin: 0;
    color: var(--text-muted);
}

/* Forms */
.form-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 18px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.form-card h3 {
    margin: 0;
}

.form-card.wide {
    margin-top: 0.5rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input,
textarea,
select {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(2, 8, 28, 0.9);
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.input-small {
    width: 60px;
}

.hint {
    color: var(--text-muted);
}

.broker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

/* Strategy Selection */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.strategy-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
    background: rgba(6, 11, 32, 0.8);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.strategy-card header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.strategy-card.active {
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(108, 99, 255, 0.2);
}

.strategy-key {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-pill.success {
    color: var(--success);
    border-color: rgba(67, 230, 177, 0.4);
}

.status-pill.muted {
    color: var(--text-muted);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th,
td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.6rem 0.4rem;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--text-muted);
    font-weight: 600;
}

td pre {
    margin: 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.5rem;
    font-size: 0.8rem;
    max-height: 120px;
    overflow: auto;
}

code {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
    color: var(--accent-strong);
}

/* Generic Actions & Lists */
.actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.empty-placeholder {
    text-align: center;
    color: var(--text-muted);
    margin: 0;
}

.empty-placeholder.success {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.hint-list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.hint-list li {
    margin-bottom: 0.35rem;
}

/* Side Badges */
.side-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.side-badge.buy {
    background: rgba(67, 230, 177, 0.15);
    color: var(--success);
    border: 1px solid rgba(67, 230, 177, 0.3);
}

.side-badge.sell {
    background: rgba(255, 139, 139, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 139, 139, 0.3);
}

/* Mixed utility */
h4 {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.danger-zone {
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.06);
}

.danger-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.danger-note {
    margin-top: 0.75rem;
}/* Admin Console */
.admin-shell {
    min-height: 100vh;
    background: radial-gradient(circle at top, rgba(19, 25, 54, 0.95), #050914);
    color: #fff;
    padding: 2.5rem clamp(1.5rem, 4vw, 3rem) 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.admin-shell__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.admin-shell__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 0.3rem;
}

.admin-shell__subtitle {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.65);
}

.admin-shell__nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(5, 9, 20, 0.8);
    width: fit-content;
}

.admin-shell__nav-link {
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-shell__nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.admin-shell__nav-link.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    box-shadow: 0 15px 35px rgba(108, 99, 255, 0.35);
}

.admin-shell__main {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
}

/* Admin page building blocks */
.admin-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-card {
    background: rgba(8, 12, 28, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.admin-card--headline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.25rem;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.admin-section-header h3 {
    margin: 0;
}

.admin-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.9rem;
}

.admin-metric {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 0.9rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-metric span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.admin-metric strong {
    font-size: 1.35rem;
    font-weight: 700;
}

.admin-metric small {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-page__split {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 1.5rem;
}

@media (max-width: 1100px) {
    .admin-page__split {
        grid-template-columns: 1fr;
    }
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-filters input[type='search'] {
    flex: 1;
    min-width: 220px;
}

.inline-checkbox {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.inline-checkbox input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

.admin-card label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
}

.admin-card input:not([type='checkbox']),
.admin-card textarea,
.admin-card select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    color: #fff;
}

.admin-card textarea {
    resize: vertical;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    min-height: 100px;
}

.admin-card input:focus:not([type='checkbox']),
.admin-card textarea:focus,
.admin-card select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.25);
}

.admin-table-wrapper {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    overflow-y: visible;
    background: rgba(5, 9, 20, 0.6);
}

.admin-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

.admin-table thead th {
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.admin-table tbody td {
    padding: 0.95rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.admin-table tbody tr.is-selected {
    background: rgba(108, 99, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(108, 99, 255, 0.35);
}

.admin-table__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.link-button {
    background: none;
    border: none;
    color: var(--accent);
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.link-button:hover {
    color: var(--accent-strong);
}

.admin-notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-radius: 18px;
    padding: 0.9rem 1.2rem;
    border: 1px solid transparent;
}

.admin-notice--success {
    background: rgba(67, 230, 177, 0.1);
    border-color: rgba(67, 230, 177, 0.4);
    color: #c9ffef;
}

.admin-notice--error {
    background: rgba(255, 139, 139, 0.12);
    border-color: rgba(255, 139, 139, 0.35);
    color: #ffdede;
}

.admin-notice button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.admin-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.admin-detail__section {
    margin-top: 1.5rem;
}

.admin-detail__section ul {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.admin-inline-form input {
    flex: 1;
    min-width: 220px;
}

.admin-empty-state {
    margin: 0;
    padding: 1rem 0;
    color: var(--text-muted);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.admin-form__actions {
    display: flex;
    justify-content: flex-end;
}

.admin-button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.status-pill.ghost {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 720px) {
    .admin-inline-form {
        flex-direction: column;
    }

    .admin-form__actions {
        justify-content: stretch;
    }

    .admin-form__actions .btn {
        width: 100%;
    }
}/* Feature Styles */

/* Trades & PnL */
.trades-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.trades-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trades-group h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.positions-section {
    border: 1px solid rgba(67, 230, 177, 0.25);
    background: linear-gradient(180deg, rgba(11, 23, 56, 1) 0%, rgba(6, 15, 40, 1) 100%);
}

.pnl-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pnl-card {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pnl-card.total {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(167, 107, 255, 0.1));
    border-color: rgba(108, 99, 255, 0.3);
    grid-column: span 1;
}

@media (min-width: 600px) {
    .pnl-card.total {
        grid-column: span 2;
    }
}

.pnl-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.pnl-value {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pnl-value.profit {
    color: var(--success);
}

.pnl-value.loss {
    color: var(--danger);
}

.pnl-value.neutral {
    color: var(--text-primary);
}

.profit {
    color: var(--success);
}

.loss {
    color: var(--danger);
}

.flat-position {
    opacity: 0.5;
}

.instrument-cell {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    font-size: 0.85rem;
}

.side-badge.flat {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.timestamp {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Scrollable trades container */
.trades-scroll-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
    scrollbar-width: thin;
    scrollbar-color: rgba(108, 99, 255, 0.4) transparent;
}

.trades-scroll-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.trades-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.trades-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(108, 99, 255, 0.4);
    border-radius: 4px;
}

.trades-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 99, 255, 0.6);
}

.trades-scroll-container table {
    margin: 0;
}

.trades-scroll-container thead {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.trades-scroll-container thead th {
    background: rgba(11, 23, 56, 0.95);
    backdrop-filter: blur(8px);
}

.trades-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn.load-more,
.btn.collapse-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

.btn.load-more {
    color: var(--accent);
}

.btn.collapse-btn {
    color: var(--text-muted);
}

.trades-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 720px) {
    .section-card {
        padding: 1.3rem;
    }

    .broker-actions,
    .actions {
        flex-direction: column;
    }

    .pnl-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .pnl-card.total {
        grid-column: span 2;
    }
}

/* Strategy Status Display */
.strategy-status-card {
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(11, 23, 56, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.strategy-status-card .status-section {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.strategy-status-card .status-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strategy-status-card .status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0;
}

.strategy-status-card .status-row .label {
    color: var(--text-muted);
    font-weight: 500;
}

.strategy-status-card .status-row .value {
    font-weight: 600;
    color: var(--text-default);
}

.strategy-status-card .status-row .value.success {
    color: var(--success);
}

.strategy-status-card .status-row .value.warning {
    color: #f59e0b;
}

.strategy-status-card .status-row .value.danger {
    color: var(--danger);
}

.strategy-status-card .status-row .value.muted {
    color: var(--text-muted);
}

/* ============================================================================
   ORB Strategy Status Styles
   ============================================================================ */

.orb-strategy-status {
    background: linear-gradient(135deg, rgba(26, 31, 54, 0.95) 0%, rgba(15, 19, 36, 0.98) 100%);
    border-radius: 12px;
    padding: 14px;
    color: #e1e5f0;
    font-size: 0.85rem;
    border: 1px solid rgba(108, 99, 255, 0.15);
}

.orb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 8px;
}

.orb-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.orb-meta {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.orb-meta .meta-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.orb-meta .trading-status {
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.orb-meta .trading-status.active {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.orb-meta .trading-status.inactive {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.orb-empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

.orb-instrument-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.orb-instrument-card:last-child {
    margin-bottom: 0;
}

.instrument-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.instrument-token {
    font-weight: 600;
    font-size: 0.8rem;
    color: #818cf8;
    font-family: 'JetBrains Mono', monospace;
}

.position-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-badge.flat {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.position-badge.long {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.position-badge.short {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.orb-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
}

.orb-section:last-child {
    margin-bottom: 0;
}

.orb-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.range-values,
.position-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.range-row,
.indicator-row,
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 0.8rem;
}

.orb-section .label {
    color: #94a3b8;
    font-weight: 500;
}

.orb-section .value {
    font-weight: 600;
    color: #e2e8f0;
}

.orb-section .value.high {
    color: #4ade80;
}

.orb-section .value.low {
    color: #f87171;
}

.orb-section .value.above {
    color: #4ade80;
}

.orb-section .value.below {
    color: #f87171;
}

.orb-section .value.inside {
    color: #fbbf24;
}

.orb-section .value.profit {
    color: #4ade80;
}

.orb-section .value.loss {
    color: #f87171;
}

.orb-section .value.ready {
    color: #60a5fa;
}

.orb-section .value.warming {
    color: #fbbf24;
}

.orb-section .value.stop {
    color: #f87171;
}

.orb-section .value.target {
    color: #4ade80;
}

.range-status {
    text-align: center;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
}

.range-status.captured {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.range-status.waiting {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.position-section.active {
    border: 1px solid rgba(129, 140, 248, 0.3);
    background: rgba(129, 140, 248, 0.08);
}

.breakout-section {
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.breakout-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checklist-item {
    font-size: 0.8rem;
    padding: 4px 0;
}

.checklist-item.done {
    color: #4ade80;
}

.checklist-item.pending {
    color: #fbbf24;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.summary-item {
    text-align: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-item .label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.summary-item .value {
    font-size: 0.9rem;
    font-weight: 700;
}

.summary-item .value.profit {
    color: #4ade80;
}

.summary-item .value.loss {
    color: #f87171;
}

.summary-item .value.confirmed {
    color: #4ade80;
}

.summary-item .value.pending {
    color: #94a3b8;
}

.option-section.active {
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.08);
}

.option-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-contract {
    font-weight: 700;
    color: #fbbf24 !important;
}

@media (max-width: 480px) {
    .orb-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* New additions */
.instrument-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-badge {
    font-size: 0.75rem;
    color: #fbbf24;
    font-weight: 500;
}

.reason-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==================== Trade Reports Page ==================== */

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
}

.filter-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.filter-row input[type="date"],
.filter-row input[type="number"],
.filter-row select {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 0.9rem;
}

.filter-row input:focus,
.filter-row select:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-inline label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.stat-value.positive {
    color: #4ade80;
}

.stat-value.negative {
    color: #f87171;
}

.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1rem;
}

.stat-mini {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-mini strong {
    color: #fff;
    font-weight: 600;
}

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

.text-success {
    color: #4ade80 !important;
}

.text-warning {
    color: #fbbf24 !important;
}

.text-mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
}

.positive {
    color: #4ade80;
}

.negative {
    color: #f87171;
}

.table-scroll {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.table-scroll table {
    width: 100%;
    min-width: 600px;
}

.row-warning {
    background: rgba(251, 191, 36, 0.08);
}

.row-warning td {
    border-color: rgba(251, 191, 36, 0.2);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* ORB Dashboard Layout */
.orb-dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.orb-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
    align-items: start;
}

.orb-section.summary-section {
    /* margin-top: auto; */
}

/* ============================================================================
   Subscriptions Dashboard
   ============================================================================ */

.subscriptions-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-title h2 {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.dashboard-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.auto-refresh-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-box.active {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(74, 222, 128, 0.05));
    border-color: rgba(74, 222, 128, 0.25);
}

.stat-box.paper {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.05));
    border-color: rgba(251, 191, 36, 0.25);
}

.stat-box.live {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), rgba(248, 113, 113, 0.05));
    border-color: rgba(248, 113, 113, 0.25);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-box.active .stat-number {
    color: #4ade80;
}

.stat-box.paper .stat-number {
    color: #fbbf24;
}

.stat-box.live .stat-number {
    color: #f87171;
}

.stat-box .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Empty State */
.empty-state-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.empty-state-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: #fff;
}

.empty-state-card p {
    margin: 0;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* Subscription Grid */
.subscription-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 440px) {
    .subscription-grid {
        grid-template-columns: 1fr;
    }
}

/* Subscription Card */
.subscription-card {
    background: linear-gradient(145deg, rgba(15, 23, 56, 0.9), rgba(8, 14, 36, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.25rem;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subscription-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.subscription-card.is-active {
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.1), 0 12px 40px rgba(74, 222, 128, 0.1);
}

.subscription-card.is-expanded {
    grid-column: span 1;
}

@media (min-width: 900px) {
    .subscription-card.is-expanded {
        grid-column: span 2;
    }
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strategy-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.card-title-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.subscription-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.card-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mode-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mode-badge.paper {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.mode-badge.live {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.status-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-badge.idle {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Card Config */
.card-config {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.85rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.config-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.config-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.action-btn {
    flex: 1;
    padding: 0.65rem 0.75rem;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.action-btn.primary {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.action-btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 222, 128, 0.4);
}

.action-btn.warning {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.action-btn.warning:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.4);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn.secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
}

.action-btn.danger {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.25);
    flex: 0 0 auto;
    min-width: 42px;
}

.action-btn.danger:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.25);
}

/* Status Panel */
.card-status-panel {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    animation: slideDown 0.25s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Override ORB status styles when inside subscription card */
.subscription-card .orb-strategy-status {
    background: transparent;
    border: none;
    padding: 0;
}

.subscription-card .orb-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.subscription-card .orb-instrument-card {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.04);
}

/* BYO Credentials Page */
.credentials-setup {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-box {
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-box.info {
    background: rgba(108, 99, 255, 0.08);
    border-color: rgba(108, 99, 255, 0.3);
}

.info-box.warning {
    background: rgba(255, 193, 7, 0.08);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffd54f;
}

.info-box h3,
.info-box h4 {
    margin: 0 0 0.75rem;
}

.info-box ul,
.info-box ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.info-box li {
    margin-bottom: 0.5rem;
}

.setup-steps {
    list-style-position: inside;
    color: rgba(255, 255, 255, 0.85);
}

.setup-steps a {
    color: var(--accent);
    text-decoration: underline;
}

.credentials-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.required {
    color: var(--danger);
}

.password-field {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.password-field input {
    flex: 1;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(108, 99, 255, 0.4);
    color: var(--accent);
    border-radius: 12px;
    padding: 0.65rem 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-1px);
}/* CatalogPage.css - Strategy Catalog Styling */

/* Strategy Card Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

/* Individual Strategy Card */
.catalog-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem;
  background: rgba(6, 11, 32, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.catalog-card:hover {
  border-color: rgba(108, 99, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.catalog-card.active {
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(108, 99, 255, 0.25);
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(6, 11, 32, 0.9));
}

/* Card Header */
.catalog-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.catalog-card__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: break-word;
}

.catalog-card__key {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Card Description */
.catalog-card__desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  min-height: 3.8em;
}

/* Config Form */
.config-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.config-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.config-field span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.config-field select {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 8, 28, 0.9);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.config-field select:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.config-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

/* Config Actions */
.config-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
}

/* Checkbox Field Style */
.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-field span {
  color: var(--text-secondary);
  font-weight: 400;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  
  .config-row {
    grid-template-columns: 1fr;
  }
  
  .catalog-card__header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .catalog-card__key {
    align-self: flex-start;
  }
}
/* DashboardPage.css - Modern Dashboard Styling */

.dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Dashboard Card */
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.dash-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.dash-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dash-card__icon {
    font-size: 1.5rem;
    padding: 0.75rem;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 14px;
}

.dash-card__info {
    flex: 1;
}

.dash-card__info h3 {
    margin: 0 0 0.15rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.dash-card__info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Broker Card */
.broker-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.broker-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.broker-status.connected .broker-indicator {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.broker-status.disconnected .broker-indicator {
    background: #ff6b6b;
}

.broker-text {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* P&L Grid */
.pnl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.pnl-box {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pnl-box.main {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(6, 11, 32, 0.9));
    border-color: rgba(108, 99, 255, 0.3);
}

.pnl-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.pnl-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.pnl-value.profit {
    color: var(--success);
}

.pnl-value.loss {
    color: #ff6b6b;
}

.pnl-value.neutral {
    color: var(--text-primary);
}

/* Empty State */
.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    text-align: center;
}

.dash-empty span {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.dash-empty p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Subscription List */
.subscription-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sub-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.15s ease;
}

.sub-item:hover {
    background: rgba(0, 0, 0, 0.3);
}

.sub-item.active {
    border-color: rgba(67, 230, 177, 0.3);
    background: linear-gradient(135deg, rgba(67, 230, 177, 0.05), rgba(0, 0, 0, 0.2));
}

.sub-icon {
    font-size: 1.25rem;
}

.sub-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sub-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.sub-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mode-tag,
.status-tag {
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mode-tag.paper {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.mode-tag.live {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.status-tag.active {
    background: rgba(67, 230, 177, 0.15);
    color: var(--success);
}

.status-tag.idle {
    color: var(--text-muted);
}

/* Strategy P&L Table */
.strategy-pnl-table {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.strategy-pnl-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.strategy-pnl-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.strategy-pnl-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.strategy-pnl-table td.profit {
    color: var(--success);
}

.strategy-pnl-table td.loss {
    color: #ff6b6b;
}

/* Catalog Preview */
.catalog-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.catalog-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.catalog-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(108, 99, 255, 0.4);
    transform: translateY(-2px);
}

.catalog-item__header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.catalog-item__icon {
    font-size: 1.5rem;
}

.catalog-item__header h4 {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.catalog-item__key {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.catalog-item__desc {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Responsive */
@media (max-width: 768px) {
    .dash-card__header {
        flex-wrap: wrap;
    }

    .pnl-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalog-preview {
        grid-template-columns: 1fr;
    }
}/* StrategyPositionPage.css - Detailed Strategy View Styling */

.strategy-position-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-btn {
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.strategy-icon-large {
  font-size: 2rem;
  padding: 0.5rem;
  background: rgba(108, 99, 255, 0.15);
  border-radius: 14px;
}

.header-title h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.subscription-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Error Banner */
.error-banner {
  padding: 1rem 1.5rem;
  background: rgba(255, 107, 107, 0.15);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 12px;
  color: #ff6b6b;
  font-size: 0.9rem;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Status Overview Grid */
.status-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .status-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .status-overview-grid {
    grid-template-columns: 1fr;
  }
}

.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.overview-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.overview-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Health Card */
.health-status {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.health-indicator {
  font-size: 1.1rem;
  font-weight: 600;
}

.health-indicator.running {
  color: var(--success);
}

.health-indicator.stopped {
  color: #ff6b6b;
}

.last-seen,
.started-at {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Position Card */
.position-status {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.position-indicator {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
}

.position-indicator.flat {
  color: var(--text-muted);
}

.position-indicator.long {
  color: var(--success);
}

.position-indicator.short {
  color: #ff6b6b;
}

.option-info {
  font-size: 0.8rem;
  color: var(--accent);
}

/* PnL Cards */
.pnl-display {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pnl-display .pnl-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.pnl-display .pnl-value.profit {
  color: var(--success);
}

.pnl-display .pnl-value.loss {
  color: #ff6b6b;
}

.trades-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Section Cards */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
}

.section-card h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0;
}

/* Config Section */
.config-section .config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.config-section .config-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.config-section .config-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.config-section .config-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Range Section */
.range-display {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.range-status-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.range-status-badge.captured {
  background: rgba(67, 230, 177, 0.15);
  color: var(--success);
  border: 1px solid rgba(67, 230, 177, 0.3);
}

.range-status-badge.waiting {
  background: rgba(245, 166, 35, 0.15);
  color: #f5a623;
  border: 1px solid rgba(245, 166, 35, 0.3);
}

.range-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.range-value {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.range-value .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.range-value .value {
  font-size: 1.1rem;
  font-weight: 600;
}

.range-value.high .value {
  color: var(--success);
}

.range-value.low .value {
  color: #ff6b6b;
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  text-align: center;
}

.stat-item .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-item .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.stat-item .stat-value.profit {
  color: var(--success);
}

.stat-item .stat-value.loss {
  color: #ff6b6b;
}

/* Strategy State Section */
.strategy-state-section {
  overflow: hidden;
}

.generic-state pre {
  margin: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  font-size: 0.8rem;
  overflow-x: auto;
  color: var(--text-muted);
}

/* Trades Section */
.trades-table-wrapper {
  overflow-x: auto;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

.trades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.trades-table th,
.trades-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trades-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.trades-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.instrument-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.instrument-name {
  font-weight: 500;
}

.option-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  background: rgba(108, 99, 255, 0.2);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--accent);
}

.side-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.side-badge.buy {
  background: rgba(67, 230, 177, 0.15);
  color: var(--success);
}

.side-badge.sell {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.trades-table .pnl-value {
  font-weight: 600;
}

.trades-table .pnl-value.profit {
  color: var(--success);
}

.trades-table .pnl-value.loss {
  color: #ff6b6b;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.filled {
  background: rgba(67, 230, 177, 0.15);
  color: var(--success);
}

.status-badge.pending {
  background: rgba(245, 166, 35, 0.15);
  color: #f5a623;
}

.status-badge.cancelled {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.time-cell {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Trades Pagination */
.trades-pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trades-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Empty States */
.empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.empty-state-card p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

.empty-trades {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* Button Styles */
.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  text-decoration: none;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Auto-refresh Toggle */
.auto-refresh-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.auto-refresh-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-left {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .trades-table {
    font-size: 0.8rem;
  }

  .trades-table th,
  .trades-table td {
    padding: 0.5rem 0.35rem;
  }
}
/* SubscriptionsPage.css - Modern Subscriptions Dashboard Styling */

/* Dashboard Container */
.subscriptions-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.dashboard-title h2 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}

.dashboard-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.auto-refresh-toggle input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

/* Stats Summary Row */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    background: rgba(6, 11, 32, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-box:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-box.active {
    background: linear-gradient(135deg, rgba(67, 230, 177, 0.1), rgba(6, 11, 32, 0.9));
    border-color: rgba(67, 230, 177, 0.4);
}

.stat-box.paper {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(6, 11, 32, 0.9));
    border-color: rgba(108, 99, 255, 0.3);
}

.stat-box.live {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(6, 11, 32, 0.9));
    border-color: rgba(255, 107, 107, 0.3);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-box.active .stat-number {
    color: var(--success);
}

.stat-box.paper .stat-number {
    color: var(--accent);
}

.stat-box.live .stat-number {
    color: #ff6b6b;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Empty State */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.empty-state-card p {
    margin: 0;
    color: var(--text-muted);
    max-width: 320px;
}

/* Subscription Grid */
.subscription-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 480px) {
    .subscription-grid {
        grid-template-columns: 1fr;
    }
}

/* Individual Subscription Card */
.subscription-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.subscription-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.subscription-card.is-active {
    border-color: rgba(67, 230, 177, 0.3);
    box-shadow: 0 0 24px rgba(67, 230, 177, 0.1);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.strategy-icon {
    font-size: 1.5rem;
    padding: 0.5rem;
    background: rgba(108, 99, 255, 0.15);
    border-radius: 12px;
}

.card-title-info h3 {
    margin: 0 0 0.15rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.subscription-id {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Badges */
.card-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mode-badge,
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mode-badge.paper {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.mode-badge.live {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.status-badge.active {
    background: rgba(67, 230, 177, 0.15);
    color: var(--success);
    border: 1px solid rgba(67, 230, 177, 0.3);
}

.status-badge.idle {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card Config */
.card-config {
    padding: 0 1.25rem 1rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.config-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.config-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-word;
    font-weight: 500;
}

.config-value.stop-loss {
    color: #ff6b6b;
}

.config-value.target {
    color: var(--success);
}

.config-value.accent {
    color: var(--accent);
    font-weight: 700;
}

.config-item.highlight {
    background: rgba(108, 99, 255, 0.1);
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(108, 99, 255, 0.3);
}


/* Card Actions */
.card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.25rem 1.25rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn.primary {
    flex: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
}

.action-btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.action-btn.warning {
    flex: 1;
    background: linear-gradient(135deg, #f5a623, #f58223);
    color: white;
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.3);
}

.action-btn.warning:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4);
}

.action-btn.secondary {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.action-btn.secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.action-btn.danger {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.25);
    padding: 0.65rem;
}

.action-btn.danger:hover:not(:disabled) {
    background: rgba(255, 107, 107, 0.25);
}

.action-btn.quick-status {
    flex: 0 0 auto;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}

.action-btn.quick-status:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Status Panel */
.card-status-panel {
    padding: 0 1.25rem 1.25rem;
    animation: slideDown 0.2s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Strategy Status Card */
.strategy-status-card {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-section {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.status-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.status-section:first-child {
    padding-top: 0;
}

.status-section h4 {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.85rem;
}

.status-row .label {
    color: var(--text-muted);
}

.status-row .value {
    font-weight: 500;
}

.status-row .value.success {
    color: var(--success);
}

.status-row .value.warning {
    color: #f5a623;
}

.status-row .value.danger {
    color: #ff6b6b;
}

.status-row .value.muted {
    color: var(--text-muted);
}