/* Basic styling for trading ledger UI */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    color: #2c3e50;
}

.back-link {
    color: #3498db;
    text-decoration: none;
    margin-bottom: 1rem;
    display: inline-block;
}

/* Dashboard */
.pockets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.pocket-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pocket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.pocket-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.pocket-card .balance {
    font-size: 1.5rem;
    font-weight: bold;
    color: #27ae60;
    margin: 0.5rem 0;
}

.pocket-card .currency {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.pocket-card .performance {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.pocket-card .performance p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

/* Info Cards */
.pocket-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-card h3 {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.info-card .balance {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.info-card .pnl {
    font-size: 1.5rem;
    font-weight: bold;
}

.info-card .pnl.positive {
    color: #27ae60;
}

.info-card .pnl.negative {
    color: #e74c3c;
}

/* Tables */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table thead {
    background-color: #34495e;
    color: white;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
}

.data-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #2c3e50;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    background-color: #ecf0f1;
    text-align: center;
    color: #7f8c8d;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
}

.filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Settings */
.settings-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

/* Transaction types */
.tx-type {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.tx-transfer_in {
    background-color: #d4edda;
    color: #155724;
}

.tx-transfer_out {
    background-color: #f8d7da;
    color: #721c24;
}

.tx-trade_buy {
    background-color: #d1ecf1;
    color: #0c5460;
}

.tx-trade_sell {
    background-color: #fff3cd;
    color: #856404;
}

/* Order status */
.status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-open {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-filled {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #e2e3e5;
    color: #383d41;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Trade side colors */
.side-buy {
    color: #27ae60;
    font-weight: 600;
}

.side-sell {
    color: #e74c3c;
    font-weight: 600;
}

/* Trading mode indicators */
.mode-testnet {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.mode-production {
    background-color: #d4edda;
    color: #155724;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Error messages */
.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

/* Pocket actions */
.pocket-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Strategy label */
.strategy {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Authentication Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.auth-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.auth-description {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    color: #7f8c8d;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links .separator {
    margin: 0 0.5rem;
}

.btn-block {
    width: 100%;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    color: #7f8c8d;
    font-size: 0.8rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* User navigation */
.user-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-nav .user-email {
    color: #ecf0f1;
    font-size: 0.9rem;
}

.user-nav .btn-logout {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    background-color: transparent;
    border: 1px solid #ecf0f1;
    color: #ecf0f1;
}

.user-nav .btn-logout:hover {
    background-color: rgba(255,255,255,0.1);
}

.user-nav .btn-login {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   Strategy Catalog Styles
   ========================================================================== */

/* Page Header */
.catalog-page .page-description {
    color: #7f8c8d;
    margin-top: 0.5rem;
}

/* Toolbar with search and filters */
.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.catalog-search {
    flex: 1;
    min-width: 200px;
}

.catalog-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.catalog-filters select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.95rem;
}

.toggle-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.toggle-filter input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

/* Strategy Cards Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.strategy-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.strategy-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.strategy-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.strategy-card-title {
    font-size: 1.1rem;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.strategy-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.strategy-card-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.strategy-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #7f8c8d;
    padding-top: 0.75rem;
    border-top: 1px solid #ecf0f1;
}

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

.badge-category {
    background-color: #e8f4f8;
    color: #2980b9;
}

.badge-complexity {
    background-color: #f5f5f5;
    color: #666;
}

.badge-complexity.complexity-beginner {
    background-color: #d4edda;
    color: #155724;
}

.badge-complexity.complexity-intermediate {
    background-color: #fff3cd;
    color: #856404;
}

.badge-complexity.complexity-advanced {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-complexity.complexity-expert {
    background-color: #d6d8db;
    color: #383d41;
}

.badge-certification {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Compatibility Indicators */
.compat-indicator {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
}

.compat-yes {
    background-color: #d4edda;
    color: #155724;
}

.compat-partial {
    background-color: #fff3cd;
    color: #856404;
}

.compat-no {
    background-color: #f8d7da;
    color: #721c24;
}

.compat-unknown {
    background-color: #e2e3e5;
    color: #6c757d;
}

/* Compatibility Status (detail page) */
.compat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
}

.compat-status-yes {
    background-color: #d4edda;
    color: #155724;
}

.compat-status-partial {
    background-color: #fff3cd;
    color: #856404;
}

.compat-status-no {
    background-color: #f8d7da;
    color: #721c24;
}

.compat-status-unknown {
    background-color: #e2e3e5;
    color: #6c757d;
}

.compat-icon {
    font-size: 1.1rem;
}

.compat-detail {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Pagination */
.catalog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

#page-info {
    color: #666;
    font-size: 0.95rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* ==========================================================================
   Strategy Detail Page
   ========================================================================== */

.catalog-detail-page {
    max-width: 900px;
    margin: 0 auto;
}

.strategy-detail {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.strategy-header {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.strategy-header-main {
    flex: 1;
}

.strategy-title {
    font-size: 1.75rem;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
}

.strategy-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.strategy-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.strategy-header-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.btn-install {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}

.btn-disabled:hover {
    background-color: #adb5bd;
}

/* Strategy Sections */
.strategy-content {
    padding: 2rem;
}

.strategy-section {
    margin-bottom: 2rem;
}

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

.strategy-section h3 {
    font-size: 1.15rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.no-data {
    color: #7f8c8d;
    font-style: italic;
}

/* Requirements */
.requirements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    background: #f8f9fa;
}

.requirement-item.req-met {
    background-color: #d4edda;
}

.requirement-item.req-missing {
    background-color: #f8d7da;
}

.requirement-item.req-optional {
    background-color: #fff3cd;
}

.requirement-item.req-unknown {
    background-color: #f8f9fa;
}

/* Strategy Documentation */
.strategy-docs {
    line-height: 1.7;
    color: #333;
}

.strategy-docs h2 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.5rem;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3rem;
}

.strategy-docs h3 {
    font-size: 1.1rem;
    margin: 1.2rem 0 0.4rem;
    color: #2c3e50;
}

.strategy-docs p {
    margin: 0.5rem 0;
}

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

.strategy-docs li {
    margin: 0.25rem 0;
}

.strategy-docs code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: #c7254e;
}

.strategy-docs strong {
    color: #2c3e50;
}

.strategy-docs table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.92em;
}

.strategy-docs th,
.strategy-docs td {
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.strategy-docs th {
    background: #f7f7f7;
    font-weight: 600;
    color: #2c3e50;
}

.strategy-docs tr:nth-child(even) {
    background: #fafafa;
}

.strategy-docs pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0.75rem 0;
}

.strategy-docs pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.88em;
}

.strategy-docs hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2rem 0;
}

.strategy-docs h1 {
    font-size: 1.6rem;
    margin: 0 0 0.75rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.4rem;
}

/* Help Page */
.help-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 0;
}

.req-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.req-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.req-name {
    font-weight: 500;
    color: #2c3e50;
}

.req-type {
    font-size: 0.85rem;
    color: #666;
}

.req-label {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
}

/* Parameters Table */
.params-table {
    width: 100%;
    border-collapse: collapse;
}

.params-table th,
.params-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.params-table thead {
    background-color: #f8f9fa;
}

.params-table th {
    font-weight: 600;
    color: #2c3e50;
}

.params-table code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* Outputs */
.output-item {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.output-name {
    font-weight: 500;
    color: #2c3e50;
}

.output-type {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-left: 0.5rem;
}

.output-desc {
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0 0 0;
}

/* Changelog Accordion */
.changelog-entry {
    border: 1px solid #ecf0f1;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    text-align: left;
}

.changelog-header:hover {
    background: #e9ecef;
}

.changelog-version {
    font-weight: 600;
    color: #2c3e50;
}

.changelog-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.changelog-toggle {
    font-size: 1.25rem;
    color: #7f8c8d;
}

.changelog-content {
    padding: 1rem;
    background: white;
}

.changelog-content ul {
    margin: 0;
    padding-left: 1.25rem;
}

.changelog-content li {
    margin-bottom: 0.25rem;
    color: #666;
}

/* Strategy Meta */
.strategy-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.meta-item {
    text-align: center;
}

.meta-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-weight: 500;
    color: #2c3e50;
}

/* Responsive */
@media (max-width: 768px) {
    .catalog-toolbar {
        flex-direction: column;
    }

    .catalog-filters {
        width: 100%;
    }

    .catalog-filters select {
        flex: 1;
    }

    .strategy-header {
        flex-direction: column;
    }

    .strategy-header-actions {
        align-items: stretch;
    }

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

/* =============================================================================
   Install Wizard Modal
   ============================================================================= */

.wizard-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
}

.wizard-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.wizard-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #2c3e50;
}

.wizard-header .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.wizard-header .close-btn:hover {
    color: #333;
}

/* Progress Indicators */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: #3498db;
    color: white;
}

.step-indicator.completed .step-number {
    background: #27ae60;
    color: white;
}

.step-label {
    font-size: 0.75rem;
    color: #666;
}

.step-indicator.active .step-label {
    color: #3498db;
    font-weight: 600;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 0.5rem;
    margin-bottom: 1rem;
}

/* Wizard Body */
.wizard-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.wizard-body h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.step-description {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Pocket Selection */
.pocket-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pocket-option {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pocket-option:hover:not(.disabled) {
    border-color: #3498db;
    background: #f8f9ff;
}

.pocket-option.selected {
    border-color: #3498db;
    background: #e8f4fc;
}

.pocket-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pocket-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pocket-name {
    font-weight: 600;
    color: #2c3e50;
}

.pocket-option-details {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.pocket-option-details .balance {
    font-weight: 500;
}

/* Requirements Section */
.requirements-section {
    margin-bottom: 1.5rem;
}

.requirements-section h4 {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.requirements-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.requirement-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.requirement-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requirement-id {
    font-weight: 600;
}

.requirement-details {
    font-size: 0.85rem;
    color: #666;
}

.requirement-details code {
    background: #e0e0e0;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Connector Bindings */
.bindings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.binding-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.binding-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.binding-header label {
    font-weight: 600;
    color: #2c3e50;
}

.required-star {
    color: #e74c3c;
}

.optional-label {
    color: #666;
    font-size: 0.85rem;
    font-weight: normal;
}

.connector-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.binding-capabilities {
    font-size: 0.85rem;
    color: #666;
}

.binding-capabilities code {
    background: #e0e0e0;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

/* Parameter Form */
.parameter-group {
    margin-bottom: 1.5rem;
}

.parameter-group.advanced.collapsed .group-fields {
    display: none;
}

.group-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1rem;
}

.toggle-icon {
    font-weight: bold;
    color: #666;
}

.parameter-field {
    margin-bottom: 1rem;
}

.parameter-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #2c3e50;
}

.param-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.param-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.help-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #3498db;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Validation Section */
.validation-section {
    margin-bottom: 1.5rem;
}

.validation-result {
    margin-top: 1rem;
}

.validation-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #d4edda;
    border-radius: 6px;
    color: #155724;
}

.validation-errors {
    padding: 1rem;
    background: #f8d7da;
    border-radius: 6px;
    color: #721c24;
}

.validation-errors ul {
    margin: 0.5rem 0 0 1.5rem;
}

/* Execution Mode Selection */
.execution-mode-section {
    margin-bottom: 1.5rem;
}

.mode-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mode-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-option:hover {
    border-color: #3498db;
}

.mode-option.selected {
    border-color: #3498db;
    background: #e8f4fc;
}

.mode-option input {
    margin-right: 1rem;
}

.mode-content {
    display: flex;
    flex-direction: column;
}

.mode-name {
    font-weight: 600;
    color: #2c3e50;
}

.mode-desc {
    font-size: 0.85rem;
    color: #666;
}

/* Activate Section */
.activate-section {
    text-align: center;
    padding-top: 1rem;
}

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

/* Wizard Footer */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

/* =============================================================================
   Strategy Tab (Pocket Page)
   ============================================================================= */

.no-strategy-state {
    text-align: center;
    padding: 3rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

.active-strategy-state {
    padding: 1rem;
}

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

.strategy-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.strategy-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strategy-info h3 {
    margin: 0;
    color: #2c3e50;
}

.version-badge {
    background: #e0e0e0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.strategy-status {
    display: flex;
    gap: 0.5rem;
}

.state-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.state-badge.state-running {
    background: #d4edda;
    color: #155724;
}

.state-badge.state-paused {
    background: #fff3cd;
    color: #856404;
}

.state-badge.state-error,
.state-badge.state-risk_off {
    background: #f8d7da;
    color: #721c24;
}

.state-badge.state-degraded {
    background: #ffe4cc;
    color: #8a4500;
}

.state-badge.state-installed,
.state-badge.state-configured,
.state-badge.state-validated {
    background: #e2e3e5;
    color: #383d41;
}

.mode-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #e8f4fc;
    color: #2980b9;
    font-size: 0.9rem;
}

.strategy-health h4 {
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.connector-health-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.connector-health-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.connector-health-item.health-good {
    border-left: 3px solid #27ae60;
}

.connector-health-item.health-bad {
    border-left: 3px solid #e74c3c;
}

.health-icon {
    font-size: 1rem;
}

.health-good .health-icon {
    color: #27ae60;
}

.health-bad .health-icon {
    color: #e74c3c;
}

.connector-name {
    font-weight: 500;
    flex: 1;
}

.connector-status {
    color: #666;
    font-size: 0.85rem;
}

.strategy-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.strategy-metrics h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

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

.metric-card {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.metric-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

/* =============================================================================
   Toast Notifications
   ============================================================================= */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: #27ae60;
}

.toast-error {
    background: #e74c3c;
}

.toast-info {
    background: #3498db;
}

.toast-warning {
    background: #f39c12;
}

/* ==========================================================================
   Strategy Dashboard Styles (Sprint 5.2)
   ========================================================================== */

/* Strategy Header */
.strategy-header {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.strategy-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.strategy-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strategy-info h3 {
    margin: 0;
    color: #2c3e50;
}

.version-badge {
    background: #ecf0f1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.strategy-status {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.state-badge, .mode-badge, .health-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.state-badge {
    background: #3498db;
    color: white;
}

.state-badge.state-running { background: #27ae60; }
.state-badge.state-paused { background: #f39c12; }
.state-badge.state-error { background: #e74c3c; }
.state-badge.state-retired { background: #95a5a6; }

.mode-badge {
    background: #9b59b6;
    color: white;
}

.health-badge {
    background: #27ae60;
    color: white;
}

.health-badge.health-degraded { background: #f39c12; }
.health-badge.health-unhealthy { background: #e74c3c; }
.health-badge.health-unknown { background: #95a5a6; }

/* Strategy Sub-Tabs */
.strategy-subtabs {
    display: flex;
    gap: 0;
    background: white;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subtab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: #f8f9fa;
    color: #7f8c8d;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.subtab-btn:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.subtab-btn.active {
    background: white;
    color: #3498db;
    border-bottom: 2px solid #3498db;
}

.strategy-subtab-content {
    display: none;
    background: white;
    border-radius: 0 0 8px 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.strategy-subtab-content.active {
    display: block;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.dashboard-card h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    color: #7f8c8d;
    text-transform: uppercase;
}

/* Status Card */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #95a5a6;
}

.status-dot.running { background: #27ae60; }
.status-dot.paused { background: #f39c12; }
.status-dot.error { background: #e74c3c; }
.status-dot.retired { background: #95a5a6; }

.status-details {
    font-size: 0.85rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.detail-row .label {
    color: #7f8c8d;
}

.detail-row .value {
    color: #2c3e50;
    font-weight: 500;
}

/* Exposure Card */
.exposure-summary {
    text-align: center;
}

.exposure-amount {
    margin-bottom: 0.5rem;
}

.exposure-amount .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

.exposure-pct .value {
    font-size: 2rem;
    font-weight: 700;
    color: #3498db;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

.stat-value.positive { color: #27ae60; }
.stat-value.negative { color: #e74c3c; }

.stat-label {
    font-size: 0.75rem;
    color: #7f8c8d;
}

/* Countdown Card */
.countdown-display {
    text-align: center;
    margin-bottom: 0.75rem;
}

.countdown-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    font-family: monospace;
}

.countdown-label {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.last-evaluation {
    font-size: 0.85rem;
    text-align: center;
}

/* Dashboard Sections */
.dashboard-section {
    margin-top: 1.5rem;
}

.dashboard-section h4 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1rem;
}

/* Connector Health List */
.connector-health-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.connector-health-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.85rem;
}

.connector-health-item.health-good {
    background: #d4edda;
    color: #155724;
}

.connector-health-item.health-bad {
    background: #f8d7da;
    color: #721c24;
}

/* Pending Intents */
.pending-intents-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pending-intent-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #f39c12;
}

.intent-action {
    font-weight: 500;
}

.intent-symbol {
    color: #7f8c8d;
}

/* Performance Charts */
.performance-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.chart-container h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.chart-container canvas {
    height: 200px !important;
}

/* Intent Pipeline */
.intent-pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.pipeline-stage {
    text-align: center;
    padding: 1rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stage-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.25rem;
}

.stage-count {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.pipeline-arrow {
    font-size: 1.5rem;
    color: #bdc3c7;
}

/* Event Log */
.event-log {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.event-log-list {
    max-height: 300px;
    overflow-y: auto;
}

.event-log-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    border-bottom: 1px solid #ecf0f1;
    font-size: 0.85rem;
}

.event-log-item:last-child {
    border-bottom: none;
}

.event-time {
    color: #7f8c8d;
    white-space: nowrap;
}

.event-type {
    font-weight: 500;
    color: #2c3e50;
}

.event-payload {
    color: #7f8c8d;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-log-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

/* Risk Metrics Grid */
.risk-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.risk-metric {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.risk-metric .metric-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.risk-metric .metric-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Rule Violations */
.rule-violations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.violation-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8d7da;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

.violation-time {
    color: #721c24;
    font-size: 0.85rem;
}

.violation-message {
    color: #721c24;
}

/* Reasoning Box */
.reasoning-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.reasoning-box p {
    margin: 0;
    line-height: 1.6;
}

/* Regime Indicator */
.regime-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.regime-badge {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    background: #95a5a6;
    color: white;
}

.regime-badge.regime-bullish { background: #27ae60; }
.regime-badge.regime-bearish { background: #e74c3c; }
.regime-badge.regime-sideways { background: #f39c12; }
.regime-badge.regime-volatile { background: #9b59b6; }

.regime-description {
    color: #7f8c8d;
}

/* Decision Log */
.decision-log {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.decision-log-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #ecf0f1;
}

.decision-log-item:last-child {
    border-bottom: none;
}

.decision-time {
    color: #7f8c8d;
    font-size: 0.85rem;
    white-space: nowrap;
}

.decision-action {
    font-weight: 500;
    color: #2c3e50;
}

.decision-reason {
    color: #7f8c8d;
}

/* No data placeholder */
.no-data {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Small button variant */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

/* Positive/Negative text colors */
.positive { color: #27ae60; }
.negative { color: #e74c3c; }

/* ==========================================================================
   Pocket Card Strategy Badge (Sprint 5.2)
   ========================================================================== */

.pocket-strategy-info {
    margin: 0.75rem 0;
}

.pocket-strategy-badge {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid #3498db;
}

.strategy-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.strategy-name {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.version-tag {
    background: #ecf0f1;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    color: #7f8c8d;
}

.strategy-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.state-dot, .health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.state-dot {
    background: #95a5a6;
}

.state-dot.state-running { background: #27ae60; }
.state-dot.state-paused { background: #f39c12; }
.state-dot.state-error { background: #e74c3c; }
.state-dot.state-degraded { background: #f39c12; }
.state-dot.state-retired { background: #95a5a6; }

.health-dot {
    background: #95a5a6;
}

.health-dot.health-good { background: #27ae60; }
.health-dot.health-warning { background: #f39c12; }
.health-dot.health-bad { background: #e74c3c; }

.pending-badge {
    background: #f39c12;
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
}

/* Cash-Only Notice (Sprint 5.2 fix) */
.cash-only-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cash-only-badge {
    background: #f39c12;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.cash-only-text {
    color: #856404;
    font-size: 0.85rem;
}

.chart-badge {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: normal;
    margin-left: 0.5rem;
}

/* =============================================================================
   Sprint 5.3 - UX Polish
   ============================================================================= */

/* Toast Notifications (UX Polish - scoped to .toast-container to avoid
   overriding the standalone showToast() styles defined earlier) */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast-container .toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.toast-container .toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-container .toast-hiding {
    opacity: 0;
    transform: translateX(100%);
}

.toast-container .toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-container .toast-message {
    flex: 1;
    font-size: 0.9rem;
}

.toast-container .toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.toast-container .toast-close:hover {
    color: #666;
}

.toast-container .toast-success {
    border-left: 4px solid #27ae60;
}

.toast-container .toast-success .toast-icon {
    color: #27ae60;
}

.toast-container .toast-error {
    border-left: 4px solid #e74c3c;
}

.toast-container .toast-error .toast-icon {
    color: #e74c3c;
}

.toast-container .toast-warning {
    border-left: 4px solid #f39c12;
}

.toast-container .toast-warning .toast-icon {
    color: #f39c12;
}

.toast-container .toast-info {
    border-left: 4px solid #3498db;
}

.toast-container .toast-info .toast-icon {
    color: #3498db;
}

/* Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Form Validation */
.field-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2) !important;
}

.field-error-message {
    display: block;
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Confirmation Dialog */
.confirm-modal {
    max-width: 400px;
}

.confirm-modal .modal-body {
    padding: 1.5rem;
}

.confirm-modal .modal-body p {
    margin: 0;
    color: #555;
}

.confirm-modal .modal-footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid #eee;
}

.confirm-danger .modal-header {
    background: #fdf2f2;
    border-bottom-color: #fecaca;
}

.confirm-danger .modal-header h3 {
    color: #dc2626;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Keyboard Shortcuts Help Modal */
.shortcuts-modal {
    max-width: 500px;
}

.shortcuts-modal .modal-body {
    padding: 1rem 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.shortcut-group {
    margin-bottom: 1.5rem;
}

.shortcut-group:last-child {
    margin-bottom: 0;
}

.shortcut-group h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.shortcut-list {
    margin: 0;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.shortcut-item dt {
    flex-shrink: 0;
}

.shortcut-item dd {
    margin: 0;
    color: #666;
    text-align: right;
}

kbd {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Modal close button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: #666;
}

.modal-header {
    position: relative;
}

