/* TradeJournal - Made by Kashan */
/* Fully Responsive Theme CSS across all device screen sizes */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-main: #1f1f22;          /* Main dark background from user image */
    --bg-card: #27272b;          /* Slightly lighter card background */
    --bg-card-hover: #2e2e34;    /* Card hover state */
    --bg-input: #171719;         /* Input field background */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(38, 166, 154, 0.25);

    /* Candlestick Colors */
    --candle-green: #26a69a;      /* Trading View Bullish Green */
    --candle-green-glow: rgba(38, 166, 154, 0.2);
    --candle-green-bright: #00e676;
    
    --candle-red: #ef5350;        /* Trading View Bearish Red */
    --candle-red-glow: rgba(239, 83, 80, 0.2);
    --candle-red-bright: #ff5252;

    /* Text Colors */
    --text-primary: #f0f2f5;
    --text-secondary: #9da3ae;
    --text-muted: #656a76;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing & Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Reset & Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(38, 166, 154, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(239, 83, 80, 0.04) 0%, transparent 40%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #36363c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--candle-green);
}

/* Layout Container */
.app-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
    box-sizing: border-box;
}

/* Top Header Bar */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: rgba(39, 39, 43, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-icon {
    width: 44px;
    height: 44px;
    background: rgba(38, 166, 154, 0.15);
    border: 1px solid var(--candle-green);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--candle-green-bright);
    font-size: 22px;
    box-shadow: 0 0 15px rgba(38, 166, 154, 0.3);
    flex-shrink: 0;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-title a {
    color: inherit;
    text-decoration: none;
    background: linear-gradient(90deg, #ffffff 40%, var(--candle-green-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.brand-tagline {
    font-size: 13px;
    font-weight: 500;
    color: var(--candle-green);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    background: rgba(38, 166, 154, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(38, 166, 154, 0.2);
    display: inline-block;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.header-time {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-input);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--candle-green-bright);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--candle-green-bright);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* User Profile Header Badge */
#userProfileSection {
    width: auto;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-input);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

.user-profile-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--candle-green), #00bfa5);
    color: #0b1a17;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, var(--candle-green), #00bfa5);
    color: #0b1a17;
    box-shadow: 0 4px 15px rgba(38, 166, 154, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(38, 166, 154, 0.45);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #2b2b31;
    border-color: rgba(255,255,255,0.2);
}

.btn-danger {
    background: rgba(239, 83, 80, 0.15);
    color: var(--candle-red-bright);
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.btn-danger:hover {
    background: var(--candle-red);
    color: #ffffff;
}

.btn-admin {
    background: rgba(255, 193, 7, 0.15);
    color: #ffca28;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.btn-admin:hover {
    background: #ffca28;
    color: #000;
}

/* Dashboard Metrics KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
    width: 100%;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    min-width: 0;
}

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

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-color);
}

.kpi-card.pnl-positive::before { background: var(--candle-green-bright); }
.kpi-card.pnl-negative::before { background: var(--candle-red-bright); }
.kpi-card.winrate::before { background: linear-gradient(90deg, var(--candle-green), var(--candle-red)); }

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.kpi-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-icon {
    font-size: 16px;
    color: var(--text-muted);
}

.kpi-value {
    font-family: var(--font-mono);
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    word-break: break-word;
}

.kpi-subtext {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-word;
}

.text-green { color: var(--candle-green-bright) !important; }
.text-red { color: var(--candle-red-bright) !important; }

/* Charts Layout Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    width: 100%;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-card);
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.chart-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Control & Filter Bar */
.control-bar {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.search-filter-group {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 12px;
    width: 100%;
    align-items: center;
}

.input-search-wrapper {
    position: relative;
    width: 100%;
}

.input-search-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.input-search-wrapper .form-control {
    padding-left: 38px;
}

.form-control:focus {
    border-color: var(--candle-green);
    box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.15);
}

select.form-control {
    cursor: pointer;
}

/* Trades History Section */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 30px;
    width: 100%;
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
    min-width: 850px;
}

.trades-table th {
    background: #1d1d20;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.trades-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.trades-table tbody tr {
    transition: background 0.15s ease;
}

.trades-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.symbol-badge {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.market-tag {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Direction & Status Badges (Never wrap) */
.badge-direction {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-long {
    background: rgba(38, 166, 154, 0.15);
    color: var(--candle-green-bright);
    border: 1px solid rgba(38, 166, 154, 0.3);
}

.badge-short {
    background: rgba(239, 83, 80, 0.15);
    color: var(--candle-red-bright);
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.badge-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.status-closed { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.status-open { background: rgba(255, 193, 7, 0.15); color: #ffca28; border: 1px solid rgba(255, 193, 7, 0.3); }

.price-val {
    font-family: var(--font-mono);
    font-size: 14px;
}

.pnl-cell {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 15px;
}

/* Image Thumbnails in Table */
.table-img-thumbs {
    display: flex;
    gap: 4px;
}

.thumb-img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s;
}

.thumb-img:hover {
    transform: scale(1.15);
    border-color: var(--candle-green);
}

.no-images {
    color: var(--text-muted);
    font-size: 12px;
}

/* Actions Cell */
.action-btns {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: #ffffff;
    background: #333339;
    border-color: rgba(255,255,255,0.2);
}

.btn-icon.delete-btn:hover {
    background: rgba(239, 83, 80, 0.2);
    color: var(--candle-red-bright);
    border-color: var(--candle-red);
}

/* Mobile Trade Cards Container */
.mobile-trades-view {
    display: none;
    padding: 14px;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.mobile-trade-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    transition: border-color 0.2s;
}

.mobile-trade-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.mobile-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mobile-badges-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background: var(--bg-input);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.m-stat-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.m-stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m-stat-val {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-card-images {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mobile-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.mobile-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.m-date-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* Modal Overlay & Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 18, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    overflow-y: auto;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    transition: transform 0.25s ease;
    margin: auto;
}

.modal-overlay.active .modal-dialog {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 20px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    width: 100%;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Username Live Check Badge */
.username-status {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.username-status.available { color: var(--candle-green-bright); }
.username-status.unavailable { color: var(--candle-red-bright); }

/* Live Calculator Box in Form */
.calc-preview-box {
    grid-column: span 2;
    background: var(--bg-input);
    border: 1px dashed var(--candle-green);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 4px;
    flex-wrap: wrap;
    gap: 10px;
}

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

.calc-item .calc-lbl {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.calc-item .calc-val {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
}

/* File Upload Drop Area */
.file-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    background: var(--bg-input);
    width: 100%;
}

.file-drop-area:hover {
    border-color: var(--candle-green);
}

.file-drop-icon {
    font-size: 24px;
    color: var(--candle-green);
    margin-bottom: 6px;
}

.preview-images-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.preview-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 22px;
    border-top: 1px solid var(--border-color);
    background: #1d1d20;
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 16px;
}

.lightbox-modal.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 95vw;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
}

/* Auth Dialog */
.auth-dialog {
    max-width: 440px;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: #1d1d20;
}

.auth-tab-btn {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab-btn.active {
    color: var(--candle-green-bright);
    border-bottom: 2px solid var(--candle-green);
    background: var(--bg-card);
}

.alert-message {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.alert-danger {
    background: rgba(239, 83, 80, 0.15);
    color: var(--candle-red-bright);
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.alert-success {
    background: rgba(38, 166, 154, 0.15);
    color: var(--candle-green-bright);
    border: 1px solid rgba(38, 166, 154, 0.3);
}

/* Admin Portal Dialog */
.admin-dialog {
    max-width: 900px;
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 14px;
    min-width: 600px;
}

.admin-users-table th, .admin-users-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.admin-users-table th {
    background: #1d1d20;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
}

.badge-blocked {
    background: rgba(239, 83, 80, 0.2);
    color: var(--candle-red-bright);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-active {
    background: rgba(38, 166, 154, 0.2);
    color: var(--candle-green-bright);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 44px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

/* Footer Tagline */
.app-footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.app-footer span {
    color: var(--candle-green);
    font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Tablet & Mobile Devices)
   ========================================================================== */

/* 1. Laptops & Large Tablets (<= 1024px) */
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .search-filter-group {
        grid-template-columns: 1fr 1fr;
    }
}

/* 2. Medium Tablets & Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    .app-container {
        padding: 10px;
        overflow-x: hidden;
    }

    /* Clean Mobile Header Layout (No Overflow) */
    .app-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: var(--radius-md);
        gap: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .brand-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .brand-logo-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        background: rgba(38, 166, 154, 0.2);
        border: 1px solid var(--candle-green);
        color: var(--candle-green-bright);
        box-shadow: 0 0 10px rgba(38, 166, 154, 0.3);
        flex-shrink: 0;
    }

    .brand-title {
        font-size: 20px;
        line-height: 1.2;
    }

    .brand-tagline {
        font-size: 10px;
        padding: 1px 6px;
    }

    .header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        box-sizing: border-box;
    }

    .header-time {
        align-self: flex-start;
        font-size: 11px;
        padding: 4px 10px;
    }

    #userProfileSection {
        width: 100%;
    }

    .user-profile-badge {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
        background: rgba(23, 23, 25, 0.7);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        box-sizing: border-box;
        overflow: hidden;
    }

    .user-profile-left {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .user-profile-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        width: 100%;
    }

    .user-profile-actions .btn {
        flex: 1;
        padding: 8px 6px;
        font-size: 12px;
        justify-content: center;
        box-sizing: border-box;
    }

    .header-actions #btnOpenAddModal {
        width: 100%;
        max-width: 100%;
        padding: 10px 14px;
        font-size: 14px;
        border-radius: var(--radius-md);
        box-sizing: border-box;
    }

    /* Switch to Mobile Trade Cards */
    .desktop-table-view {
        display: none;
    }
    .mobile-trades-view {
        display: flex;
    }

    .search-filter-group {
        grid-template-columns: 1fr;
    }

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

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

    .calc-preview-box {
        grid-column: span 1;
    }

    .chart-container {
        height: 240px;
    }
}

/* 3. Small Mobile Devices / Phones (<= 480px) */
@media (max-width: 480px) {
    .brand-title {
        font-size: 18px;
    }
    
    .brand-logo-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kpi-card {
        padding: 16px;
    }

    .kpi-value {
        font-size: 20px;
    }

    .btn {
        width: 100%;
        padding: 10px 14px;
        font-size: 13px;
    }

    .modal-dialog {
        max-height: 95vh;
        border-radius: var(--radius-md);
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 14px 16px;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
        padding: 14px 16px;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .chart-container {
        height: 200px;
    }

    .calc-preview-box {
        flex-direction: column;
        gap: 12px;
    }

    .file-drop-area {
        padding: 14px;
    }
}
