/* Trading Workspace — matches Edmond portal light theme (dashboard cards) */
.portal-terminal-wrap {
    margin-bottom: 1.5rem;
}

.portal-terminal-sync-banner {
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 2px solid #f59e0b;
    border-left-width: 5px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    font-size: 0.875rem;
    line-height: 1.55;
}

.portal-terminal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.75rem;
}

.portal-terminal-tab {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.15s ease;
}

.portal-terminal-tab:hover {
    border-color: #a5b4fc;
    color: #4f46e5;
    background: #eef2ff;
}

.portal-terminal-tab.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.portal-terminal-tab-locked:not(.active) {
    opacity: 0.88;
    border-style: dashed;
    border-color: #c4b5fd;
    background: #faf5ff;
    color: #6d28d9;
}

.portal-terminal-tab-locked.active {
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
}

.portal-terminal-tab-pro-tag {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.1rem 0.35rem;
    margin-left: 0.25rem;
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.25);
    vertical-align: middle;
}

.portal-terminal-tab-locked:not(.active) .portal-terminal-tab-pro-tag {
    background: #ede9fe;
    color: #5b21b6;
}

.portal-terminal-pro-teaser {
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    border: 1px dashed #c4b5fd;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
}

.portal-terminal-pro-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6d28d9;
    background: #ede9fe;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.portal-terminal-pro-teaser-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #4c1d95;
    margin: 0 0 0.5rem;
}

.portal-terminal-pro-teaser-body {
    font-size: 0.9375rem;
    color: #5b21b6;
    margin: 0 auto 1rem;
    max-width: 36rem;
    line-height: 1.55;
}

.portal-terminal-pro-teaser-list {
    text-align: left;
    max-width: 22rem;
    margin: 0 auto 1rem;
    padding-left: 1.25rem;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
}

.portal-terminal-pro-teaser-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.portal-terminal-panel.hidden {
    display: none;
}

.portal-terminal-metric-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .portal-terminal-metric-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portal-terminal-card {
    background: #f9fafb;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.portal-terminal-card.center {
    text-align: center;
}

.portal-terminal-card-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.portal-terminal-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.portal-terminal-card-value.indigo {
    color: #4f46e5;
}

.portal-terminal-card-value.green {
    color: #059669;
}

.portal-terminal-card-value.cyan {
    color: #0891b2;
}

.portal-terminal-card-sub {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: #6b7280;
}

.portal-terminal-card-sub.positive {
    color: #059669;
    font-weight: 600;
}

.portal-terminal-card-sub.negative {
    color: #dc2626;
    font-weight: 500;
}

.portal-terminal-progress {
    width: 100%;
    background: #e5e7eb;
    border-radius: 9999px;
    height: 0.5rem;
    margin-top: 0.75rem;
    overflow: hidden;
}

.portal-terminal-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(135deg, #4f46e5 0%, #059669 100%);
}

.portal-terminal-progress-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.portal-terminal-chart-box {
    background: #fff;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.portal-terminal-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portal-terminal-chart-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-terminal-chart-title-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #4f46e5;
}

.portal-terminal-chart-note {
    font-size: 0.75rem;
    color: #9ca3af;
}

.portal-terminal-period-pills {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.portal-terminal-period-pill {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.portal-terminal-period-pill:hover {
    border-color: #a5b4fc;
    color: #4f46e5;
}

.portal-terminal-period-pill.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.portal-terminal-period-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.portal-terminal-period-stat {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.portal-terminal-period-stat .label {
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 0.2rem;
}

.portal-terminal-period-stat .value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
}

.portal-terminal-period-stat .value.positive {
    color: #059669;
}

.portal-terminal-period-stat .value.negative {
    color: #dc2626;
}

.portal-terminal-chart-mode-note {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0 0 0.75rem;
}

.portal-terminal-chart-canvas-wrap {
    height: 11rem;
    position: relative;
}

.portal-terminal-dual-charts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-terminal-chart-panel {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem 1rem;
}

.portal-terminal-subchart-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.65rem;
}

.portal-terminal-empty-chart {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    padding: 2.5rem 1rem;
    background: #f9fafb;
    border-radius: 0.65rem;
    border: 1px dashed #d1d5db;
}

.portal-terminal-chart-bars {
    height: 11rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.25rem;
    padding-top: 0.5rem;
}

.portal-terminal-bar-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.portal-terminal-bar {
    width: 100%;
    min-height: 4px;
    border-radius: 4px 4px 0 0;
    transition: opacity 0.2s;
}

.portal-terminal-bar-date {
    margin-top: 0.35rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
}

.portal-terminal-bar-pnl {
    font-size: 0.625rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.portal-terminal-bar-pnl.positive {
    color: #059669;
}

.portal-terminal-bar-pnl.negative {
    color: #dc2626;
}

.portal-terminal-bar.positive {
    background: linear-gradient(to top, rgba(79, 70, 229, 0.15), rgba(79, 70, 229, 0.45));
    border-top: 2px solid #4f46e5;
}

.portal-terminal-bar.negative {
    background: linear-gradient(to top, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.35));
    border-top: 2px solid #dc2626;
}

.portal-terminal-insight-box {
    background: #f9fafb;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.portal-terminal-insight-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.portal-terminal-insight-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.portal-terminal-insight-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #312e81;
}

.portal-terminal-insight-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.portal-terminal-coach-block {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #374151;
    border-left: 3px solid #4f46e5;
    padding-left: 0.75rem;
    margin-bottom: 0.75rem;
}

.portal-terminal-coach-block.rec {
    border-left-color: #059669;
}

.portal-terminal-coach-block strong.title {
    color: #4f46e5;
}

.portal-terminal-coach-block.rec strong.title {
    color: #059669;
}

.portal-terminal-check-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.portal-terminal-check-row:last-child {
    border-bottom: none;
}

.portal-terminal-check-label {
    color: #374151;
    flex: 1;
}

.portal-terminal-check-pass {
    color: #059669;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.portal-terminal-check-fail {
    color: #dc2626;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.portal-terminal-check-pending {
    color: #d97706;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.portal-terminal-badge-review {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 700;
}

.portal-terminal-badge-eligible {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    background: #d1fae5;
    color: #065f46;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.portal-terminal-badge-pending {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.portal-terminal-checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.portal-terminal-checklist-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1f2937;
}

.portal-terminal-loading {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.portal-terminal-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.portal-terminal-btn {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.portal-terminal-btn-primary {
    background: #059669;
    color: #fff;
}

.portal-terminal-btn-primary:hover {
    background: #047857;
}

.portal-terminal-btn-primary.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.portal-terminal-btn-secondary {
    background: #fff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}

.portal-terminal-btn-secondary:hover {
    background: #eef2ff;
}

.portal-terminal-disclaimer {
    font-size: 0.6875rem;
    color: #9ca3af;
    margin-top: 0.75rem;
    line-height: 1.4;
}

.portal-terminal-sync-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #d1d5db;
    display: inline-block;
}

.portal-terminal-sync-dot.live {
    background: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
}

.portal-terminal-account-select {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    background: #fff;
    color: #111827;
    min-width: 200px;
}

.portal-terminal-account-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.portal-terminal-account-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem 1rem;
}

.portal-terminal-chart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.portal-terminal-chart-link:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #4338ca;
}

.portal-terminal-empty-chart {
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.portal-terminal-pa-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #6ee7b7;
    color: #065f46;
    text-decoration: none;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-terminal-pa-banner:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.portal-terminal-pa-banner-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.portal-terminal-pa-banner-cta {
    margin-left: auto;
    font-weight: 700;
    color: #047857;
    white-space: nowrap;
}
