:root {
    --bg: #0d0d1a;
    --card: rgba(20, 25, 40, 0.6);
    --border: #1e88e5;
    --text: #eee;
    --text-dim: #aaa;
    --green: #00e676;
    --red: #ff3d00;
    --blue: #00ccff;
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   HEADER AND TICKER STYLES (FROM MOCKUP)
   ============================================ */

.sample-header {
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1729 100%);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #2a3555;
    margin-bottom: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

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

.brand-info h2 {
    font-size: 20px;
    color: #00e676;
    margin-bottom: 8px;
}

.summary-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-label {
    color: #8e99b8;
}

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

.user-info {
    font-size: 13px;
    color: #8e99b8;
}

/* Compact Grid */
.ticker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ticker-grid-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    border-top: 3px solid;
}

.ticker-grid-item.btc { border-top-color: #f7931a; }
.ticker-grid-item.ltc { border-top-color: #345d9d; }
.ticker-grid-item.sol { border-top-color: #14f195; }
.ticker-grid-item.xrp { border-top-color: #23292f; }
.ticker-grid-item.eth { border-top-color: #627eea; }
.ticker-grid-item.ada { border-top-color: #0033ad; }

.grid-symbol {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    margin-bottom: 6px;
}

.grid-price {
    color: #00e676;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}

.grid-holdings {
    color: #8e99b8;
    font-size: 11px;
}

.grid-holdings-value {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

/* MAIN */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section-card {
    background: var(--card);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 1.4rem;
    color: var(--blue);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

/* TABLE — CARD ON MOBILE/TABLET PORTRAIT */
.lots-table {
    display: block;
    width: 100%;
    font-size: 0.95rem;
    background: rgba(10, 15, 30, 0.4);
    border-radius: 12px;
    overflow: hidden;
}

.lots-table thead {
    display: none;
}

.lots-table tbody {
    display: block;
}

.lots-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(20, 25, 40, 0.8);
    border-radius: 10px;
    border: 1px solid #333;
}

.lots-table td {
    display: block;
    text-align: right;
    padding: 0.4rem 0;
    border: none;
    font-size: 0.9rem;
}

.lots-table td::before {
    content: attr(data-label) ": ";
    float: left;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.lots-table td a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.lots-table td a:hover {
    color: #00e5ff;
    text-decoration: underline;
}

.na-cell { color: #666; font-style: italic; }
.bold-cell { font-weight: 600; }
.green-text { color: var(--green); }
.red-text { color: var(--red); }
.blue-text { color: #4488ff; }

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    padding: 0.85rem 1.6rem;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.btn-primary {
    background: linear-gradient(135deg, #1e88e5, #0066cc);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 136, 229, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid #444;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--blue);
}

footer {
    text-align: center;
    padding: 2rem;
    color: #555;
    font-size: 0.8rem;
    border-top: 1px solid #333;
    margin-top: 3rem;
}

/* MOBILE (<600px) */

/* TABLET PORTRAIT (600px - 1023px) */
@media (min-width: 600px) and (max-width: 1023px) {
    .price-tickers { flex-direction: row; gap: 1rem; padding: 1rem; }
    .ticker-item { min-width: 160px; }
    .ticker-price { font-size: 1.1rem; }
    .lots-table td { font-size: 0.85rem; }
    .lots-table tbody tr { padding: 0.75rem; }
    .lots-table td { padding: 0.3rem 0; }
    .section-card { padding: 1.25rem; }
}

/* IPAD LANDSCAPE & DESKTOP (>=1024px) - SWITCH TO FULL TABLE */
@media (min-width: 1024px) {
    .lots-table {
        display: table;
        border-collapse: separate;
        border-spacing: 0;
        overflow: visible;
    }
    .lots-table thead {
        display: table-header-group;
        background: rgba(30, 136, 229, 0.15);
    }
    .lots-table tbody {
        display: table-row-group;
    }
    .lots-table tbody tr {
        display: table-row;
        margin-bottom: 0;
        padding: 0;
        background: none;
        border: none;
    }
    .lots-table td {
        display: table-cell;
        text-align: left;
        padding: 1rem 0.8rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .lots-table td::before {
        content: none;
    }
    .lots-table tbody tr:hover {
        background: rgba(30, 136, 229, 0.1);
    }
    .price-tickers { padding: 0.8rem 1.5rem; gap: 2rem; }
    .ticker-item { min-width: 220px; }
    .ticker-price { font-size: 1.15rem; }
    .header-container { flex-direction: row; text-align: left; }
    .portfolio-summary { text-align: left; }
}

/* FINE-TUNE FONTS */

/* Form and Table Enhancements for Lot/Order Management */
.compact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compact-form table {
    width: 100%;
    border-collapse: collapse;
}

.compact-form td {
    padding: 0.5rem;
    vertical-align: top;
}

.compact-form input, .compact-form select {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 4px;
    color: var(--text);
    font-size: 0.9rem;
}

.compact-form input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

.compact-form label {
    display: flex;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

.button-row {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.button-row button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #1e88e5, #0066cc);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.button-row button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

.filter-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hidden {
    display: none;
}

/* Orders Table - Reuse and Extend .lots-table */
#orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

#orders-table thead {
    background: rgba(30, 136, 229, 0.15);
}



/* Responsive Adjustments */

@media (min-width: 1024px) {
    .compact-form {
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Enhanced Form Styling for Better Mobile Responsiveness */
.compact-form input[type="radio"] {
    appearance: none;  /* Remove native styles for consistency */
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--text-dim);
    border-radius: 50%;
    margin-right: 0.5rem;
    position: relative;
    cursor: pointer;
}

.compact-form input[type="radio"]:checked {
    border-color: var(--blue);
    background: radial-gradient(circle, var(--blue) 40%, transparent 45%);
}

.compact-form input[type="radio"]:focus,
.compact-form input[type="radio"]:hover {
    box-shadow: 0 0 0 2px rgba(0, 204, 255, 0.3);  /* Focus ring for accessibility/touch */
}

.radio-group {
    display: flex;
    flex-wrap: wrap;  /* Allow wrapping on small screens */
    gap: 0.75rem;
    align-items: center;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
}

.radio-group input[type="text"] {
    margin-left: 0.5rem;
    width: auto;  /* Flexible for inline fields like initialPriceField */
}

/* Improve Overall Responsiveness */
.compact-form {
    padding: 1rem;  /* Add internal padding for touch devices */
}

.button-row button {
    min-width: 120px;  /* Prevent too-small buttons on mobile */
    touch-action: manipulation;  /* Improve tap response on iOS */
}

#orderWarning {
    color: var(--red);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
}

/* Tighter Mobile Fixes for iPhone */

/* iPad-Specific Tweaks (Tablet Portrait) */
@media (min-width: 600px) and (max-width: 1023px) {
    .radio-group {
        flex-wrap: wrap;  /* Prevent crowding */
        gap: 1rem;
    }

    .radio-group label {
        flex-basis: calc(50% - 1rem);  /* Two-column for iPad */
    }
}

/* Enhanced Checkbox Styling for iOS Consistency */
.compact-form input[type="checkbox"] {
    appearance: none;  /* Remove native iOS/Safari styles */
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--text-dim);
    border-radius: 4px;  /* Slight rounding for modern feel */
    margin-right: 0.5rem;
    position: relative;
    cursor: pointer;
    background: transparent;
    transition: background 0.2s, border-color 0.2s;
}

.compact-form input[type="checkbox"]:checked {
    border-color: var(--blue);
    background: var(--blue);
}

.compact-form input[type="checkbox"]:checked::after {
    content: '\2713';  /* Checkmark symbol */
    position: absolute;
    top: -2px;
    left: 2px;
    color: var(--bg);  /* Dark check on blue bg */
    font-size: 1rem;
    font-weight: bold;
}

.compact-form input[type="checkbox"]:focus,
.compact-form input[type="checkbox"]:hover {
    box-shadow: 0 0 0 2px rgba(0, 204, 255, 0.3);  /* iOS-friendly focus ring */
}

.filter-row label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
    touch-action: manipulation;  /* Faster taps on iOS */
}

/* iPhone/iPad Specific Adjustments */

@media (min-width: 600px) and (max-width: 1023px) {  /* iPad Portrait */
    .filter-row {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .filter-row label {
        flex-basis: calc(33% - 1rem);  /* Three-column for balance */
    }
}
/* Warning and Conditional Styles */
.order-warning {
    color: var(--red);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    padding: 0.5rem;
    border: 1px solid var(--red);
    border-radius: 4px;
    background: rgba(255, 61, 0, 0.1);
}


/* Tab Container for Section Organization */
.tab-container {
    margin-bottom: 1rem;
}

.tab-buttons {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #333;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s, border-bottom 0.3s;
}

.tab-button.active {
    color: var(--blue);
    border-bottom: 2px solid var(--blue);
}

.tab-content {
    display: none;
}

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

/* Mobile: Stack tabs vertically */

/* Timestamps */
.timestamp {
    font-family: 'Courier New', monospace;  /* Monospace for readability in dates/times */
    color: var(--text-dim, var(--text));  /* Dimmed with fallback to main text color */
    font-size: 0.88rem;  /* Slightly smaller than body text */
    white-space: nowrap;  /* Prevent wrapping */
    overflow: hidden;  /* Hide overflow */
    text-overflow: ellipsis;  /* Add ellipsis if clipped */
    padding: 0.25rem 0;  /* Light padding for breathing room in cells */
    max-width: 100%;  /* Ensure it fits cell */
}

.timestamp:hover {
    color: var(--blue);  /* Highlight on hover for interactivity */
    cursor: pointer;  /* Optional: Indicate clickable if we add tooltips later */
    text-overflow: unset;  /* Show full on hover */
}

/* Mobile adjustments */

/* Order Status Badges */
.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.status-open {
    background: rgba(0, 230, 118, 0.2);  /* Green tint */
    color: var(--green);
    border: 1px solid var(--green);
}

.status-closed {
    background: rgba(170, 170, 170, 0.2);  /* Gray tint */
    color: #aaa;
    border: 1px solid #aaa;
}

.status-canceled {
    background: rgba(255, 61, 0, 0.2);  /* Red tint */
    color: var(--red);
    border: 1px solid var(--red);
}

/* Mobile adjustments */

.error-message {
    color: #ff3d00;  /* Red for errors, matching ticker-change negative */
    background-color: rgba(255, 61, 0, 0.1);  /* Light red bg */
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-weight: bold;
}

/* AUTH / LOGIN LAYOUT */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: radial-gradient(circle at top, rgba(30, 136, 229, 0.2), transparent 55%);
}

.auth-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #333;
    padding: 2rem 2.5rem;
    max-width: 420px;
    width: 100%;
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--blue);
    text-align: center;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 1.5rem;
}

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

.auth-field label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.auth-field input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 1px rgba(0, 204, 255, 0.4);
}

.auth-submit {
    width: 100%;
    margin-top: 0.25rem;
}

.auth-footer {
    margin-top: 1.2rem;
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.auth-link {
    color: var(--blue);
    text-decoration: none;
}

.auth-link:hover {
    color: #00e5ff;
    text-decoration: underline;
}

/* Mobile tweaks */

/* --------------------------
   USER BAR (Top Right)
   -------------------------- */

.user-bar {
    font-size: 0.9rem;
    color: var(--text-dim);
    opacity: 0.85;
}

.user-bar strong {
    color: var(--text);
}

.user-role {
    color: var(--blue);
    font-weight: 500;
}

.user-logout {
    color: var(--blue);
    text-decoration: none;
}

.user-logout:hover {
    color: #00e5ff;
    text-decoration: underline;
}

.dashboard-userbar-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
}

.header-right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    padding-right: 1.5rem;
}

/* Fix alignment of user login bar */
.header-right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;    /* Right-align both user bar + tickers */
    gap: 0.35rem;
    padding-right: 1.2rem;    /* Aligns perfectly with the ticker box edge */
}

.user-bar {
    font-size: 0.9rem;
    color: #d1d1d1;
    margin-top: 0.2rem;
}

.user-bar a {
    color: #48aaff;
}

.user-role {
    color: #aaa;
    font-size: 0.85rem;
}

/* Lots Grid and Cards (With Enhanced Hover Animations) */
.lots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 250px));  /* Fixed max width keeps cards consistent */
    gap: 1rem;  /* Reduced gap for density */
    justify-content: start;  /* Align cards to the left when fewer cards are present */
}

.lot-card {
    background: var(--card);
    border: 1px solid #333;
    border-radius: var(--radius);
    padding: 0.8rem;  /* Reduced padding for compactness */
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;  /* Tighter gap between details */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;  /* Smooth multi-property transition */
}

.lot-card:hover {
    transform: translateY(-3px);  /* Subtler lift for pro feel */
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);  /* Slightly less dramatic shadow */
    border-color: var(--blue);  /* Subtle border highlight */
}

.lot-header .lot-name {
    font-size: 1.1rem;  /* Slightly smaller for tightness */
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}

.lot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;  /* Tighter spacing */
}

.lot-header .lot-state {
    margin-bottom: 0;
}

.lot-header .lot-name:hover {
    text-decoration: underline;
}

.lot-state {
    align-self: flex-start;
    padding: 0.25rem 0.5rem;  /* Tighter padding */
    border-radius: 4px;
    font-size: 0.78rem;  /* Smaller for density */
    font-weight: bold;
    text-transform: uppercase;
}

.status-sell { background: rgba(0, 230, 118, 0.2); color: var(--green); border: 1px solid var(--green); }
.status-buy { background: rgba(255, 61, 0, 0.2); color: var(--red); border: 1px solid var(--red); }
.status-sold-out { background: rgba(170, 170, 170, 0.2); color: #aaa; border: 1px solid #aaa; }
.status-no-orders { background: rgba(170, 170, 170, 0.2); color: #aaa; border: 1px solid #aaa; }  /* Grey for subtlety */

.lot-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;  /* Reduced for overall density */
    /* Text-only focus */
}

.detail-label {
    color: var(--text-dim);  /* Subtle grey for context */
    font-weight: 400;
}

.detail-value {
    font-weight: 400;  /* Base light weight */
}

/* Text color/weight hierarchy for interest and focus */
.lot-detail:nth-child(3) .detail-value {  /* Pair: dim grey, neutral */
    color: var(--text-dim);
}

.lot-detail:nth-child(4) .detail-value {  /* Qty: off-white, factual */
    color: var(--text);
    font-weight: 500;
}

.lot-detail:nth-child(5) .detail-value {  /* Target: vibrant blue, actionable */
    color: var(--blue);
    font-weight: 600;
}

.lot-detail:nth-child(6) .detail-value {  /* Last Trade: blue for comparison */
    color: var(--blue);
    font-weight: 600;
}

.lot-detail:nth-child(7) .detail-value {  /* Realized: exciting green/red, bold/large */
    font-weight: 700;
    font-size: 1rem;  /* Slightly smaller than before but still emphasized */
    /* Green/red from Jinja class */
}

.lot-detail:nth-child(8) .detail-value {  /* Age: soft yellow, interesting temporal note */
    color: #ffc107;  /* Yellow for subtle highlight */
    font-weight: 400;
    font-style: italic;
}

.lot-detail:nth-child(9) .detail-value {  /* Potential: dynamic green/red, bold/large */
    font-weight: 700;
    font-size: 1rem;  /* Slightly smaller but emphasized */
    /* Green/red from JS */
}

/* Responsive Lot Grid Adjustments */
/* Mobile - iPhone and small phones (< 600px) */
@media (max-width: 599px) {
    .lots-grid {
        grid-template-columns: 1fr;  /* Single column, full width */
        justify-content: stretch;  /* Cards take full width */
    }
}

/* iPad Portrait (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .lots-grid {
        grid-template-columns: repeat(3, 1fr);  /* Force exactly 3 columns for iPad portrait */
        justify-content: center;
    }
}

/* iPad Landscape (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .lots-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 240px));  /* Fixed max width prevents full expansion */
        justify-content: center;  /* This will now center the grid tracks */
        gap: 1rem;
    }
}

/* Mobile */

/* ===================================
   TRADING PAIRS MANAGEMENT STYLES
   =================================== */

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

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

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

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

input:checked + .slider {
    background-color: var(--green);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:disabled + .slider {
    background-color: #333;
    cursor: not-allowed;
}

/* Pairs Table */
.pairs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.pairs-table th {
    background: rgba(30, 136, 229, 0.15);
    font-weight: bold;
    color: var(--text);
}

.pairs-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Settings Table */
.settings-table {
    width: 100%;
    border-collapse: collapse;
}

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

.settings-table th {
    background: rgba(30, 136, 229, 0.15);
    font-weight: bold;
    color: var(--text);
}

.settings-table input[type="text"],
.settings-table select {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    border-radius: 4px;
    color: var(--text);
}

/* Strategies Table */
.strategies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.strategies-table th,
.strategies-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #333;
    vertical-align: middle;
}

.strategies-table th {
    background: rgba(30, 136, 229, 0.15);
    font-weight: bold;
    color: var(--text);
}

/* Column widths for strategies table */
.strategies-table th:nth-child(1),
.strategies-table td:nth-child(1) {
    width: 20%;
}

.strategies-table th:nth-child(2),
.strategies-table td:nth-child(2) {
    width: 40%;
}

.strategies-table th:nth-child(3),
.strategies-table td:nth-child(3) {
    width: 12%;
    text-align: center;
}

.strategies-table th:nth-child(4),
.strategies-table td:nth-child(4) {
    width: 28%;
}

.strategies-table input[type="text"] {
    width: 100%;
    padding: 0.3rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    border-radius: 4px;
    color: var(--text);
}

.strategies-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Center the lot count in its cell */
.strategies-table .lot-count {
    display: inline-block;
    min-width: 30px;
    text-align: center;
}

/* Button styling for strategies table */
.btn-danger {
    padding: 0.3rem 0.6rem;
    background: linear-gradient(135deg, #ff3d00, #d32f2f);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff5722, #e64a19);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 61, 0, 0.4);
}

/* Status Badge Extensions for Pairs */
.status-active-pair {
    background: rgba(0, 230, 118, 0.2);
    color: var(--green);
    border: 1px solid var(--green);
}

.status-deprecated {
    background: rgba(255, 61, 0, 0.2);
    color: var(--red);
    border: 1px solid var(--red);
}

/* Mobile Responsive */

/* Filter Controls Styling */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    margin: 0;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(30, 136, 229, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(30, 136, 229, 0.15);
    border-color: rgba(30, 136, 229, 0.5);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #1e88e5, #0066cc);
    border-color: #1e88e5;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-controls {
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        text-align: center;
    }
}

/* ========================================
   ORDER DETAILS MODAL - Namespaced & Conflict-Free
   Add this to the END of your style.css
   ======================================== */

/* Details Button - Specific to orders table */
#orders-table .btn-details {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

#orders-table .btn-details:hover {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#orders-table .btn-details:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#orders-table .btn-details svg {
    flex-shrink: 0;
}

/* Order Details Modal - Highly specific selectors to avoid conflicts */
#orderDetailsModal.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: orderModalFadeIn 0.2s ease;
}

@keyframes orderModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content Box */
#orderDetailsModal .modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: orderModalSlideIn 0.3s ease;
}

@keyframes orderModalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
#orderDetailsModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: rgba(30, 136, 229, 0.1);
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
}

#orderDetailsModal .modal-header h3 {
    margin: 0;
    color: var(--border);
    font-size: 1.3rem;
    font-weight: 600;
}

/* Close Button */
#orderDetailsModal .close-modal {
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 0.5rem;
    background: none;
    border: none;
}

#orderDetailsModal .close-modal:hover,
#orderDetailsModal .close-modal:focus {
    color: #fff;
    transform: rotate(90deg);
}

/* Modal Body */
#orderDetailsModal .modal-body {
    padding: 1.5rem;
    color: var(--text);
}

/* Loading Spinner */
#orderDetailsModal .loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1rem;
}

#orderDetailsModal .spinner {
    border: 3px solid rgba(30, 136, 229, 0.2);
    border-top: 3px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: orderSpinnerRotate 1s linear infinite;
}

@keyframes orderSpinnerRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#orderDetailsModal .loading-spinner p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin: 0;
}

/* Details Table */
#orderDetailsModal .details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

#orderDetailsModal .details-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#orderDetailsModal .details-table tr:last-child {
    border-bottom: none;
}

#orderDetailsModal .detail-label {
    padding: 0.8rem 1rem;
    font-weight: 600;
    color: var(--text-dim);
    width: 40%;
    vertical-align: top;
    font-size: 0.9rem;
}

#orderDetailsModal .detail-value {
    padding: 0.8rem 1rem;
    color: var(--text);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    font-size: 0.9rem;
}

/* Profit Row Styling */
#orderDetailsModal #profitRow .detail-value {
    color: var(--green);
    font-weight: 600;
}

/* Error Message */
#orderDetailsModal .error-message {
    padding: 1rem;
    background: rgba(255, 61, 0, 0.1);
    border: 1px solid var(--red);
    border-radius: 6px;
    color: var(--red);
    text-align: center;
}

#orderDetailsModal .error-message p {
    margin: 0;
}

/* Responsive Design for Modal */
@media (max-width: 768px) {
    #orderDetailsModal .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    #orderDetailsModal .details-table {
        font-size: 0.85rem;
    }

    #orderDetailsModal .detail-label {
        width: 45%;
        padding: 0.6rem 0.8rem;
    }

    #orderDetailsModal .detail-value {
        padding: 0.6rem 0.8rem;
    }

    #orders-table .btn-details {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }

    #orders-table .btn-details svg {
        width: 14px;
        height: 14px;
    }
}


/* ========================================
   TARGET PRICE CALCULATOR BUTTONS
   ======================================== */

.calc-btn {
    padding: 0.5rem 0.9rem;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.2) 0%, rgba(21, 101, 192, 0.2) 100%);
    color: var(--text);
    border: 1px solid rgba(30, 136, 229, 0.4);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
}

.calc-btn:hover {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.4) 0%, rgba(21, 101, 192, 0.4) 100%);
    border-color: var(--border);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.calc-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(30, 136, 229, 0.2);
}

@media (max-width: 768px) {
    .calc-btn {
        font-size: 0.8rem;
        padding: 0.45rem 0.7rem;
    }
}


/* ========================================
   ORDER REVIEW MODAL STYLING
   ======================================== */

#orderReviewModal.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: orderModalFadeIn 0.2s ease;
}

#orderReviewModal .modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: orderModalSlideIn 0.3s ease;
}

#orderReviewModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: rgba(30, 136, 229, 0.1);
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
}

#orderReviewModal .modal-header h3 {
    margin: 0;
    color: var(--border);
    font-size: 1.3rem;
    font-weight: 600;
}

#orderReviewModal .close-modal {
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 0.5rem;
    background: none;
    border: none;
}

#orderReviewModal .close-modal:hover,
#orderReviewModal .close-modal:focus {
    color: #fff;
    transform: rotate(90deg);
}

#orderReviewModal .modal-body {
    padding: 1.5rem;
    color: var(--text);
}

#orderReviewModal .details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

#orderReviewModal .details-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#orderReviewModal .details-table tr:last-child {
    border-bottom: none;
}

#orderReviewModal .detail-label {
    padding: 0.8rem 1rem;
    font-weight: 600;
    color: var(--text-dim);
    width: 40%;
    vertical-align: top;
    font-size: 0.9rem;
}

#orderReviewModal .detail-value {
    padding: 0.8rem 1rem;
    color: var(--text);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Modal Action Buttons */
.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-review-confirm,
.btn-review-cancel {
    flex: 1;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

.btn-review-confirm {
    background: linear-gradient(135deg, #00e676 0%, #00c853 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

.btn-review-confirm:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.5);
}

.btn-review-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-review-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid #444;
}

.btn-review-cancel:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: #666;
}

.btn-review-cancel:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive adjustments for Order Review Modal */
@media (max-width: 768px) {
    #orderReviewModal .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .btn-review-confirm,
    .btn-review-cancel {
        width: 100%;
    }
}


/* ============================================
   MOBILE PHONE OPTIMIZATIONS
   ============================================ */

/* MOBILE PHONES (< 600px) */
@media (max-width: 599px) {
    html { font-size: 14px; }
    
    .sample-header {
        padding: 12px;
    }

    .header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-bottom: 12px;
    }

    .brand-info h2 {
        font-size: 18px;
        margin-bottom: 10px;
        text-align: center;
    }

    .summary-stats {
        flex-direction: column;
        gap: 8px;
        font-size: 12px;
    }

    .stat {
        justify-content: space-between;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 13px;
        font-weight: 700;
    }

    .user-info {
        text-align: center;
        font-size: 12px;
        padding: 6px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 4px;
    }

    /* Ticker grid on mobile */
    .ticker-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ticker-grid-item {
        padding: 14px;
    }

    .grid-symbol {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .grid-price {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .grid-holdings {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .grid-holdings-value {
        font-size: 13px;
    }

    /* Existing mobile styles for other elements */
    .action-buttons { flex-direction: column; }
    .btn-primary, .btn-secondary { width: 100%; min-width: unset; }
    .section-card { padding: 1rem; }
    .main-container { padding: 0 0.5rem; margin: 1rem auto; }
}

/* VERY SMALL PHONES (< 375px) */
@media (max-width: 374px) {
    .sample-header {
        padding: 10px;
    }

    .brand-info h2 {
        font-size: 16px;
    }

    .summary-stats {
        font-size: 11px;
    }

    .stat {
        padding: 5px 8px;
    }

    .stat-value {
        font-size: 12px;
    }

    .user-info {
        font-size: 11px;
    }

    .ticker-grid-item {
        padding: 12px;
    }

    .grid-symbol {
        font-size: 15px;
    }

    .grid-price {
        font-size: 16px;
    }

    .grid-holdings {
        font-size: 11px;
    }
}

/* TABLET PORTRAIT (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .ticker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .brand-info h2 {
        font-size: 19px;
    }

    .summary-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* TABLET LANDSCAPE (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .ticker-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .brand-info h2 {
        font-size: 20px;
    }
}

/* DESKTOP (>= 1024px) */
@media (min-width: 1024px) {
    .ticker-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   BOT CONTROL WIDGET STYLES
   Add to end of style.css
   ======================================== */

.bot-control-widget {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(20, 25, 40, 0.6) 100%);
    border: 1px solid rgba(30, 136, 229, 0.3);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
}

/* Status Header */
.bot-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.bot-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.status-running {
    background: var(--green);
    box-shadow: 0 0 12px var(--green);
}

.status-dot.status-paused {
    background: #ff9800;
    box-shadow: 0 0 12px #ff9800;
    animation: none;
}

.status-dot.status-error {
    background: var(--red);
    box-shadow: 0 0 12px var(--red);
    animation: none;
}

.status-dot.status-loading {
    background: #666;
    animation: pulse 1s ease-in-out infinite;
}

.status-dot.status-off {
    background: #444;
    box-shadow: 0 0 8px #444;
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.bot-status-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.05em;
}

.bot-status-subtext {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}

/* Control Buttons */
.bot-control-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Toggle Switch Container */
.bot-toggle-container {
    display: flex;
    align-items: center;
}

.bot-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.bot-toggle-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* Toggle Switch (reuse existing .switch styles from your CSS) */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

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

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

input:checked + .slider {
    background-color: var(--green);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.bot-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bot-btn svg {
    flex-shrink: 0;
}

.bot-btn-pause {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.bot-btn-pause:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.5);
}

.bot-btn-resume {
    background: linear-gradient(135deg, var(--green), #00c853);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 230, 118, 0.3);
}

.bot-btn-resume:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 230, 118, 0.5);
}

/* Stats Grid */
.bot-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.bot-stat {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.bot-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 0.25rem;
}

.bot-stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Error Alert */
.bot-error-alert {
    display: flex;
    gap: 1rem;
    background: rgba(255, 61, 0, 0.1);
    border: 1px solid rgba(255, 61, 0, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.bot-error-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.bot-error-content {
    flex: 1;
}

.bot-error-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 0.25rem;
}

.bot-error-message {
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-family: 'Courier New', monospace;
}

.bot-error-time {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .bot-status-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bot-control-buttons {
        width: 100%;
    }
    
    .bot-btn {
        flex: 1;
        justify-content: center;
    }
    
    .bot-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .bot-stat {
        padding: 0.75rem 0.5rem;
    }
    
    .bot-stat-value {
        font-size: 1.2rem;
    }
    
    .bot-stat-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .bot-control-widget {
        padding: 1rem;
    }
    
    .bot-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .bot-stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 0.75rem 1rem;
    }
    
    .bot-stat-value {
        order: 2;
        font-size: 1.3rem;
    }
    
    .bot-stat-label {
        order: 1;
        font-size: 0.85rem;
    }
}

/* ========================================
   P&L REPORT STYLES
   ======================================== */

/* Report Header */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.report-title {
    font-size: 1.6rem;
    color: var(--blue);
    font-weight: 600;
}

.report-subtitle {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

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

/* Report Table */
.report-table-wrapper {
    overflow-x: auto;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 900px;
}

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

.report-table th {
    background: rgba(30, 136, 229, 0.15);
    color: var(--blue);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

.report-table th:first-child,
.report-table td:first-child {
    text-align: left;
    padding-left: 1rem;
    position: sticky;
    left: 0;
    background: var(--card);
    z-index: 1;
}

.report-table th:first-child {
    background: rgba(30, 136, 229, 0.15);
    z-index: 2;
}

.report-table tbody tr:hover {
    background: rgba(30, 136, 229, 0.08);
}

.report-table .totals-row {
    background: rgba(0, 230, 118, 0.08);
    font-weight: 600;
}

.report-table .totals-row td {
    border-top: 2px solid var(--green);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.pair-name {
    font-weight: 600;
    color: var(--text);
}

/* Clickable Cells */
.cell-clickable {
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
}

.cell-clickable:hover {
    background: rgba(30, 136, 229, 0.2);
}

/* Cell Profit/Loss States */
.cell-profit {
    font-weight: 500;
}

.cell-positive { color: var(--green); }
.cell-negative { color: var(--red); }
.cell-zero { color: var(--text-dim); }

.cell-secondary {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: block;
    margin-top: 2px;
}

/* Unrealized & Pending Columns */
.unrealized-col {
    background: rgba(255, 255, 255, 0.03);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.pending-col {
    background: rgba(255, 193, 7, 0.05);
    border-left: 1px solid rgba(255, 193, 7, 0.2);
}

.pending-col .cell-profit {
    font-style: italic;
}

.pending-label {
    font-size: 0.65rem;
    color: rgba(255, 193, 7, 0.8);
    display: block;
    margin-top: 1px;
}

/* Loading State */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

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

/* Drill-down Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card);
    border: 1px solid #333;
    border-radius: var(--radius);
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-title {
    font-size: 1.2rem;
    color: var(--blue);
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Drilldown Table */
.drilldown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.drilldown-table th,
.drilldown-table td {
    padding: 0.6rem 0.5rem;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drilldown-table th {
    background: rgba(30, 136, 229, 0.1);
    color: var(--blue);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.drilldown-table th:first-child,
.drilldown-table td:first-child {
    text-align: left;
}

.drilldown-table tbody tr:hover {
    background: rgba(30, 136, 229, 0.08);
}

.drilldown-table a {
    color: var(--blue);
    text-decoration: none;
}

.drilldown-table a:hover {
    text-decoration: underline;
}

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

.summary-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.summary-card-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.summary-card-value {
    font-size: 1.4rem;
    font-weight: 600;
}

.summary-card-value.positive { color: var(--green); }
.summary-card-value.negative { color: var(--red); }

/* Pending Toggle */
.pending-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 3px;
    gap: 2px;
}

.pending-toggle-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.pending-toggle-btn:hover {
    color: var(--text);
}

.pending-toggle-btn.active {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.toggle-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-right: 0.5rem;
}

.toggle-container {
    display: flex;
    align-items: center;
}

/* Chart Section */
.chart-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

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

.chart-title {
    font-size: 1rem;
    color: var(--text);
    font-weight: 500;
}

.chart-controls select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2a3555;
    color: var(--text);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.chart-controls select:hover {
    background: rgba(255, 255, 255, 0.08);
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Report Tab Navigation */
.report-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #2a3555;
}

.report-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.report-tab:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.report-tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.details-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

/* P&L Report Responsive */
@media (max-width: 768px) {
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Modal Dynamic Content */
.modal-empty-state {
    text-align: center;
    color: var(--text-dim);
    padding: 2rem;
}

.modal-subtext {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.report-timestamp {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 1rem;
}
/* ========================================
   CAPITAL TAB STYLES
   ======================================== */

/* Compact Performance Card */
.performance-card {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(0, 230, 118, 0.05) 100%);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(30, 136, 229, 0.2);
}

.performance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.performance-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--blue);
}

.perf-summary {
    font-size: 1.1rem;
    font-weight: 700;
}

.perf-summary.positive { color: var(--green); }
.perf-summary.negative { color: var(--red); }

.perf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1.5rem;
}

.perf-col {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.perf-col.highlight-col {
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.perf-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}

.perf-row.compact {
    padding: 0.15rem 0;
}

.perf-row.subtotal {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.15rem;
    padding-top: 0.25rem;
    font-weight: 500;
}

.perf-row.final {
    margin-top: 0.15rem;
    padding-top: 0.15rem;
}

.perf-label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.perf-value {
    font-size: 0.9rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.perf-value.positive { color: var(--green); }
.perf-value.negative { color: var(--red); }
.perf-value.large { font-size: 1.1rem; }

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

.capital-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.capital-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.capital-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--blue);
}

.capital-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.capital-badge.equity { background: rgba(0, 230, 118, 0.15); color: var(--green); }
.capital-badge.heloc { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.capital-badge.interest { background: rgba(255, 152, 0, 0.15); color: #ff9800; }


.capital-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.capital-row.indent { padding-left: 1rem; font-size: 0.85rem; }

.capital-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-weight: 600;
}

.capital-label { color: var(--text-dim); }
.capital-value { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.capital-value.positive { color: var(--green); }
.capital-value.negative { color: var(--red); }
.capital-value.highlight { font-size: 1.15rem; font-weight: 600; }

.capital-row.interest-due {
    background: rgba(255, 152, 0, 0.08);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    margin-top: 0.5rem;
}

/* Ledger */
.capital-ledger-section { margin-top: 2rem; }
.capital-ledger-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.capital-ledger-title { font-size: 1.1rem; font-weight: 600; color: var(--text); }

.capital-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.capital-table th, .capital-table td { padding: 0.6rem 0.75rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.capital-table th { background: rgba(30, 136, 229, 0.1); color: var(--blue); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
.capital-table tbody tr:hover { background: rgba(30, 136, 229, 0.08); }
.capital-amount { text-align: right; font-variant-numeric: tabular-nums; }
.capital-notes { color: var(--text-dim); font-size: 0.8rem; }
.capital-empty-state { text-align: center; color: var(--text-dim); padding: 2rem; }

.capital-type-badge { display: inline-block; padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.7rem; font-weight: 500; text-transform: uppercase; }
.capital-type-badge.equity { background: rgba(0, 230, 118, 0.15); color: var(--green); }
.capital-type-badge.heloc { background: rgba(255, 193, 7, 0.15); color: #ffc107; }
.capital-type-badge.interest { background: rgba(255, 152, 0, 0.15); color: #ff9800; }

.capital-delete-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 0.25rem 0.5rem; border-radius: 4px; transition: all 0.2s; }
.capital-delete-btn:hover { background: rgba(255, 61, 0, 0.2); color: var(--red); }

/* Forms */
.capital-form { display: none; background: rgba(255, 255, 255, 0.03); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; border: 1px solid rgba(255, 255, 255, 0.08); }
.capital-form.active { display: block; }
.capital-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.capital-form-group { display: flex; flex-direction: column; gap: 0.25rem; }
.capital-form-group label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; }
.capital-form-group input, .capital-form-group select { background: rgba(255, 255, 255, 0.05); border: 1px solid #2a3555; color: var(--text); padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.9rem; }
.capital-form-group input:focus, .capital-form-group select:focus { outline: none; border-color: var(--blue); }
.capital-form-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }

/* Rate Section */
.capital-rate-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.capital-rate-table { width: 100%; max-width: 500px; border-collapse: collapse; font-size: 0.85rem; }
.capital-rate-table th, .capital-rate-table td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.capital-rate-table th { color: var(--text-dim); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; }
.capital-current-badge { background: rgba(0, 230, 118, 0.15); color: var(--green); padding: 0.1rem 0.4rem; border-radius: 3px; font-size: 0.7rem; margin-left: 0.5rem; }

/* Capital Tab Responsive */
@media (max-width: 768px) {
    .perf-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .perf-col.highlight-col { padding-left: 0; border-left: none; padding-top: 0.5rem; border-top: 1px solid rgba(255,255,255,0.1); }
    .capital-grid { grid-template-columns: 1fr; }
    .capital-form-row { grid-template-columns: 1fr; }
}
/* ============================================
   INTEREST PAYMENT FEATURE ADDITIONS
   Add these styles to style.css
   ============================================ */

/* Small button variant for inline actions */
.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-accent {
    background: linear-gradient(135deg, #ff9800, #ff5722);
    border: none;
    color: white;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #ffa726, #ff7043);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

/* Interest section specific styling */
.interest-section {
    border: 1px solid rgba(255, 152, 0, 0.2);
    background: rgba(255, 152, 0, 0.03);
}

.interest-section .capital-section-title {
    color: #ff9800;
}

/* Modal size variant */
.modal-small {
    max-width: 420px;
}

.modal-description {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* Interest preview display */
.interest-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.interest-preview-label {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.interest-preview-amount {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ff9800;
    font-variant-numeric: tabular-nums;
}

/* Modal actions */
.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Disabled button state */
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ========================================
   PROFILE PAGE STYLES (TABBED VERSION)
   Add to end of style.css
   ======================================== */

/* Profile Form Layout */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.security-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(0, 204, 255, 0.2);
}

.form-group input.input-disabled {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-dim);
    cursor: not-allowed;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-style: italic;
}

.form-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
}

/* Activity Tab Styles */
.activity-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.activity-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(30, 136, 229, 0.1);
    border-radius: 10px;
    color: var(--blue);
    flex-shrink: 0;
}

.activity-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.activity-card-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-card-value {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.activity-ip {
    font-family: 'Courier New', monospace;
}

.activity-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(30, 136, 229, 0.08);
    border-radius: 8px;
    border-left: 3px solid var(--blue);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.activity-note svg {
    flex-shrink: 0;
    color: var(--blue);
    margin-top: 2px;
}

/* Security Tab Styles */
.security-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.security-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.security-section-title svg {
    color: var(--blue);
}

.security-section-future {
    opacity: 0.6;
}

.security-description {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

.coming-soon-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Notification Tab Styles */
.notification-section {
    margin-bottom: 1.5rem;
}

.notification-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.notification-section-title svg {
    color: var(--blue);
}

.notification-section-future {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0.6;
}

.notification-description {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* SMS Toggle Row */
.sms-toggle-row {
    margin-bottom: 1rem;
}

.toggle-label-inline {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.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: #444;
    transition: 0.3s;
    border-radius: 26px;
}

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

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--green);
}

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

.toggle-text-inline {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toggle-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

.toggle-description {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.sms-destination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: rgba(0, 230, 118, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.sms-destination-label {
    color: var(--text-dim);
}

.sms-destination-value {
    color: var(--green);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.sms-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #ffc107;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.sms-consent-record {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-style: italic;
    margin-top: 0.5rem;
}

.notification-legal {
    margin: 1.25rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border-left: 3px solid var(--text-dim);
}

.notification-legal p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin: 0;
}

/* Flash Messages */
.flash-message {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flash-success {
    background: rgba(0, 230, 118, 0.15);
    border: 1px solid var(--green);
    color: var(--green);
}

.flash-error {
    background: rgba(255, 61, 0, 0.15);
    border: 1px solid var(--red);
    color: var(--red);
}

.flash-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid #ffc107;
    color: #ffc107;
}

/* Profile Page Responsive */
@media (max-width: 768px) {
    .profile-form-grid,
    .security-form-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-cards {
        grid-template-columns: 1fr;
    }
    
    .activity-card {
        flex-direction: row;
        align-items: center;
    }
    
    .toggle-label-inline {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Stack tabs on mobile */
    .report-tabs {
        flex-wrap: wrap;
    }
    
    .report-tab {
        flex: 1 1 auto;
        min-width: calc(50% - 1px);
        text-align: center;
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .activity-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

