/* ===========================================
   LIVE LOGGER PAGE - TradeRune Elite
   Pure Vanilla CSS
=========================================== */

:root {
    --live-purp-main: #a855f7;
    --live-purp-light: #c084fc;
    --live-purp-deep: #7e22ce;
    --live-purp-glow: rgba(168, 85, 247, 0.4);
    
    --live-white-pure: #ffffff;
    --live-white-soft: rgba(255, 255, 255, 0.95);
    --live-white-muted: rgba(255, 255, 255, 0.6);
    --live-white-faded: rgba(255, 255, 255, 0.3);
    
    --live-cyan: #06b6d4;
    --live-green: #22c55e;
    --live-red: #ef5350;
    --live-gold: #fbbf24;

    --live-bg-card: rgba(14, 12, 18, 0.85);
    --live-bg-hover: rgba(30, 20, 45, 0.9);
    --live-border-base: rgba(192, 132, 252, 0.2);
    
    --live-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.live-text-cyan { color: var(--live-cyan); text-shadow: 0 0 10px rgba(6,182,212,0.4); }
.live-text-green { color: var(--live-green); text-shadow: 0 0 10px rgba(34,197,94,0.4); }
.live-text-red { color: var(--live-red); text-shadow: 0 0 10px rgba(239,83,80,0.4); }
.live-muted-text { color: var(--live-white-muted); font-size: 11px; font-weight: 500; font-family: 'JetBrains Mono', monospace; }
.live-font-bold { font-weight: 800 !important; font-family: 'JetBrains Mono', monospace; }
.live-border-red { border-color: rgba(239,83,80,0.3) !important; }
.live-border-red:focus { border-color: var(--live-red) !important; box-shadow: 0 0 10px rgba(239,83,80,0.3) !important; }
.live-border-green { border-color: rgba(34,197,94,0.3) !important; }
.live-border-green:focus { border-color: var(--live-green) !important; box-shadow: 0 0 10px rgba(34,197,94,0.3) !important; }

/* Main Wrapper */
.live-main-wrapper {
    margin-left: 20px; padding: 30px 40px; font-family: 'Inter', sans-serif;
    color: var(--live-white-soft); display: flex; flex-direction: column; gap: 24px; min-height: calc(100vh - 80px);
}

/* Header */
.live-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 20px; }
.live-subtitle { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--live-purp-light); text-transform: uppercase; margin-bottom: 8px; }
.live-pulse-icon { animation: lPulse 2s infinite; opacity: 0.8; }
@keyframes lPulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.2); opacity: 1; text-shadow: 0 0 15px var(--live-purp-light); } }
.live-title { font-size: 36px; font-weight: 900; margin: 0; letter-spacing: -1px; color: var(--live-white-pure); line-height: 1.1; }
.live-text-gradient { background: linear-gradient(90deg, var(--live-white-pure), var(--live-purp-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 30px var(--live-purp-glow); }
.live-desc { margin: 8px 0 0 0; color: var(--live-white-muted); font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* Clock & Timer */
.live-header-right { display: flex; gap: 20px; align-items: center; }
.live-clock-card { background: rgba(0,0,0,0.4); border: 1px solid var(--live-border-base); padding: 10px 20px; border-radius: 12px; text-align: center; }
.live-clock-time { font-size: 24px; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: #fff; line-height: 1; }
.live-clock-session { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--live-purp-light); text-transform: uppercase; margin-top: 4px; }

.live-speed-timer { font-size: 20px; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: var(--live-gold); display: flex; align-items: center; gap: 8px; background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.3); padding: 10px 16px; border-radius: 12px; }

/* Buttons */
.live-btn-primary { background: linear-gradient(135deg, var(--live-purp-deep), var(--live-purp-main)); color: var(--live-white-pure); border: 1px solid var(--live-purp-light); padding: 12px 24px; border-radius: 12px; font-weight: 800; font-size: 12px; letter-spacing: 1px; cursor: pointer; transition: all 0.3s var(--live-ease); box-shadow: 0 8px 24px var(--live-purp-glow); display: flex; align-items: center; gap: 8px; }
.live-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 32px var(--live-purp-glow); filter: brightness(1.1); }
.live-btn-secondary { background: rgba(255,255,255,0.05); color: var(--live-white-soft); border: 1px solid var(--live-border-base); padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: 12px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.live-btn-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.3); }

kbd { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; font-family: monospace; border: 1px solid rgba(255,255,255,0.2); }

/* Layout */
.live-content-layout { display: flex; gap: 32px; align-items: flex-start; flex: 1; padding-bottom: 80px; }
.live-form-card { flex: 1; margin-left: 20px; background: var(--live-bg-card); backdrop-filter: blur(24px); border: 1px solid var(--live-border-base); border-radius: 24px; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08); }
.live-context-panel { width: 320px; display: flex; flex-direction: column; gap: 16px; flex-shrink: 0; }

@media (max-width: 1024px) {
    .live-content-layout { flex-direction: column; }
    .live-context-panel { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

/* Form Inputs */
.live-input-group label { display: block; font-size: 11px; font-weight: 800; color: var(--live-white-faded); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.live-input { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid var(--live-border-base); padding: 14px 16px; border-radius: 12px; color: #fff; font-family: 'Inter', sans-serif; font-size: 14px; transition: 0.3s; outline: none; }
.live-input:focus { border-color: var(--live-purp-light); background: rgba(20,15,30,0.8); box-shadow: 0 0 15px var(--live-purp-glow); }
.live-input-huge { font-size: 24px; font-weight: 900; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; padding: 18px 20px; }

.live-cat-chip { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--live-purp-light); background: rgba(168,85,247,0.1); padding: 4px 10px; border-radius: 6px; }
.live-mini-btn { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--live-white-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
.live-mini-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Direction Toggles */
.live-dir-toggles { display: flex; gap: 12px; height: 100%; }
.live-dir-btn { flex: 1; border: 1px solid var(--live-border-base); background: rgba(0,0,0,0.3); border-radius: 12px; color: var(--live-white-muted); font-size: 20px; font-weight: 900; letter-spacing: 1px; cursor: pointer; transition: all 0.3s var(--live-ease); }
.live-dir-btn:hover { background: rgba(255,255,255,0.05); color: #fff; }
.live-dir-btn.active[data-dir="LONG"] { background: rgba(34,197,94,0.15); border-color: var(--live-green); color: var(--live-green); box-shadow: 0 0 25px rgba(34,197,94,0.3); transform: scale(1.02); }
.live-dir-btn.active[data-dir="SHORT"] { background: rgba(239,83,80,0.15); border-color: var(--live-red); color: var(--live-red); box-shadow: 0 0 25px rgba(239,83,80,0.3); transform: scale(1.02); }

/* Risk Display */
.live-risk-display { width: 100%; height: 47px; background: rgba(0,0,0,0.3); border: 1px solid var(--live-border-base); border-radius: 12px; display: flex; align-items: center; padding: 0 16px; font-size: 18px; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: #fff; transition: 0.3s; }
.live-risk-display.danger { border-color: var(--live-red); color: var(--live-red); box-shadow: inset 0 0 15px rgba(239,83,80,0.2); }

/* Tag Chips */
.live-tags-wrap { display: flex; gap: 8px; flex-wrap: wrap; background: rgba(0,0,0,0.3); padding: 8px; border-radius: 12px; border: 1px solid var(--live-border-base); }
.live-tag-btn { padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; color: var(--live-white-muted); cursor: pointer; transition: 0.2s; border: 1px solid transparent; }
.live-tag-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.live-tag-btn.active { background: rgba(168,85,247,0.2); color: var(--live-white-pure); border-color: rgba(168,85,247,0.5); }

/* Emotion Grid */
.live-emo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.live-emo-btn { background: rgba(0,0,0,0.3); border: 1px solid var(--live-border-base); border-radius: 12px; padding: 12px 0; color: var(--live-white-muted); font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.live-emo-btn:hover { background: rgba(255,255,255,0.05); color: #fff; transform: translateY(-2px); }
.live-emo-btn.active { background: rgba(168,85,247,0.2); border-color: var(--live-purp-light); color: #fff; box-shadow: 0 5px 15px var(--live-purp-glow); transform: translateY(-2px); }

/* Attachments */
.live-attachments { margin-top: 24px; padding-top: 24px; border-top: 1px dashed rgba(255,255,255,0.1); }
.live-attach-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.03); border: 1px dashed var(--live-border-base); padding: 10px 16px; border-radius: 10px; color: var(--live-white-muted); font-size: 12px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.live-attach-btn:hover { background: rgba(168,85,247,0.1); color: var(--live-purp-light); border-color: var(--live-purp-main); }
.live-attach-btn.recording { background: rgba(239,83,80,0.2); color: var(--live-red); border-color: var(--live-red); animation: recPulse 1s infinite; }
@keyframes recPulse { 0% { box-shadow: 0 0 5px rgba(239,83,80,0.2); } 50% { box-shadow: 0 0 15px rgba(239,83,80,0.6); } 100% { box-shadow: 0 0 5px rgba(239,83,80,0.2); } }

/* Context Panel */
.live-panel-title { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--live-white-muted); text-transform: uppercase; margin: 0 0 8px 0; }
.live-ctx-card { background: rgba(255,255,255,0.02); border: 1px solid var(--live-border-base); border-radius: 16px; padding: 16px; }
.live-ctx-card h5 { margin: 0 0 8px 0; font-size: 12px; font-weight: 800; color: #fff; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.live-ctx-card p { margin: 0; font-size: 12px; line-height: 1.5; }
.live-btn-text { background: transparent; border: none; color: var(--live-purp-light); font-size: 11px; font-weight: 700; cursor: pointer; padding: 0; margin-top: 8px; }
.live-btn-text:hover { filter: brightness(1.2); text-decoration: underline; }
.live-select { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--live-border-base); padding: 8px 12px; border-radius: 8px; color: #fff; font-size: 11px; font-weight: 600; outline: none; cursor: pointer; appearance: none; }

/* Sticky Submit Bar */
.live-submit-bar { position: fixed; bottom: 0; left: 280px; right: 0; background: rgba(10, 8, 15, 0.95); backdrop-filter: blur(20px); border-top: 1px solid var(--live-border-base); padding: 20px 72px; display: flex; gap: 20px; z-index: 100; box-shadow: 0 -10px 30px rgba(0,0,0,0.5); }
.live-btn-execute { flex: 1; background: linear-gradient(135deg, var(--live-purp-deep), var(--live-purp-main)); color: #fff; border: 1px solid var(--live-purp-light); height: 60px; border-radius: 16px; font-size: 20px; font-weight: 900; letter-spacing: 2px; cursor: pointer; transition: all 0.3s var(--live-ease); box-shadow: 0 10px 30px var(--live-purp-glow); }
.live-btn-execute:hover:not(.disabled) { transform: translateY(-4px); box-shadow: 0 15px 40px var(--live-purp-glow); filter: brightness(1.1); animation: none; }
.live-btn-execute:not(.disabled) { animation: btnBreath 2s infinite alternate; }
.live-btn-execute.disabled { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: var(--live-white-muted); box-shadow: none; cursor: not-allowed; transform: none; animation: none; }
@keyframes btnBreath { 0% { box-shadow: 0 5px 20px var(--live-purp-glow); } 100% { box-shadow: 0 10px 35px var(--live-purp-glow); } }
.live-btn-cancel { background: transparent; border: 1px solid var(--live-white-faded); color: var(--live-white-muted); height: 60px; padding: 0 30px; border-radius: 16px; font-weight: 800; font-size: 14px; cursor: pointer; transition: 0.3s; }
.live-btn-cancel:hover { background: rgba(255,255,255,0.05); color: #fff; }

@media (max-width: 768px) {
    .live-submit-bar { left: 0; padding: 15px 20px; }
    .live-emo-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
    .live-input-row { grid-template-columns: 1fr !important; }
}

/* Success Modal */
.live-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(15px); z-index: 100000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: 0.3s; }
.live-modal-backdrop.show { opacity: 1; pointer-events: all; }
.live-success-card { background: var(--live-bg-card); border: 1px solid var(--live-green); border-radius: 24px; padding: 40px; text-align: center; box-shadow: 0 0 50px rgba(34,197,94,0.2); transform: scale(0.9); transition: 0.4s var(--live-ease); }
.live-modal-backdrop.show .live-success-card { transform: scale(1); }

/* SVG Checkmark Anim */
.live-checkmark { width: 80px; height: 80px; border-radius: 50%; display: block; stroke-width: 4; stroke: #fff; stroke-miterlimit: 10; margin: 0 auto; box-shadow: inset 0px 0px 0px var(--live-green); animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both; }
.live-checkmark-circle { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 4; stroke-miterlimit: 10; stroke: var(--live-green); fill: none; animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.live-checkmark-check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; }
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 50px var(--live-green); } }

/* ===========================================
   ENHANCED STYLES - TRADE-LOGGER SPEC
   =========================================== */

/* Session P&L Display */
.live-session-pnl {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--live-border-base);
    padding: 10px 16px;
    border-radius: 12px;
    min-width: 120px;
}
.live-spnl-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--live-white-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.live-spnl-value {
    font-size: 18px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: var(--live-green);
    text-shadow: 0 0 10px rgba(34,197,94,0.3);
}
.live-session-pnl.negative .live-spnl-value {
    color: var(--live-red);
    text-shadow: 0 0 10px rgba(239,83,80,0.3);
}

/* Quick Size Buttons */
.live-quick-size-btns {
    display: flex;
    gap: 8px;
}
.live-quick-btn {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--live-border-base);
    border-radius: 8px;
    padding: 10px 0;
    color: var(--live-white-muted);
    font-size: 13px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: 0.2s;
}
.live-quick-btn:hover {
    background: rgba(168,85,247,0.15);
    border-color: var(--live-purp-light);
    color: #fff;
}
.live-quick-btn.active {
    background: rgba(168,85,247,0.25);
    border-color: var(--live-purp-main);
    color: #fff;
}

/* Session Tags */
.live-tag-session {
    background: rgba(251,191,36,0.1) !important;
    border-color: rgba(251,191,36,0.3) !important;
}
.live-tag-session:hover {
    background: rgba(251,191,36,0.2) !important;
}
.live-tag-session.active {
    background: rgba(251,191,36,0.25) !important;
    border-color: var(--live-gold) !important;
    color: var(--live-gold) !important;
}

/* Quick Presets Panel */
.live-preset-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.live-preset-btn {
    width: 100%;
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--live-gold);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
}
.live-preset-btn:hover {
    background: rgba(251,191,36,0.2);
    border-color: var(--live-gold);
}

/* Hotkey Reference Bar */
.live-hotkey-ref {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--live-white-muted);
}
.live-hk-label {
    font-weight: 700;
    color: var(--live-purp-light);
}
.live-hotkey-ref kbd {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 10px;
    color: #fff;
}

/* Success Modal P&L Preview */
.live-success-pnl {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}
.live-success-pnl-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--live-white-muted);
    margin-bottom: 8px;
}
.live-success-pnl-value {
    font-size: 28px;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: var(--live-green);
    text-shadow: 0 0 15px rgba(34,197,94,0.4);
}

/* Input Grid Adjustments */
.live-input-row {
    display: contents;
}

/* Mini Price Button (Use Current Price) */
#live-btn-use-price {
    background: rgba(168,85,247,0.15);
    border-color: rgba(168,85,247,0.3);
    color: var(--live-purp-light);
}
#live-btn-use-price:hover {
    background: rgba(168,85,247,0.25);
    color: #fff;
}