/* ═══════════════════════════════════════════════════
   TFT Trading Checklist — CSS
   Fonts: Krona One (headings), Montserrat (body)
═══════════════════════════════════════════════════ */
:root {
    --bg:         #060606;
    --card-bg:    rgba(10, 10, 12, 0.82);
    --card-border:rgba(255,255,255,0.06);
    --white:      #ffffff;
    --grey:       #9a9a9a;
    --grey-light: #c8c8c8;
    --accent:     #ffffff;
    --toggle-on:  #4ade80;
    --toggle-off: #3a3a3d;
    --conf-high:  #4ade80;
    --conf-mid:   #facc15;
    --conf-low:   #f87171;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    background: var(--bg);
    color: var(--white);
    line-height: 1.5;
    min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* ═══════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════ */
.tft-navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(6, 6, 6, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    height: 60px;
}

.tft-navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 32px;
}

.tft-logo img {
    height: 32px;
    width: auto;
    display: block;
}

.tft-navbar-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--white);
    letter-spacing: 0.02em;
}

.tft-nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    /* push to center */
    flex: 1;
    justify-content: center;
}

.tft-nav-links a {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--grey-light);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.02em;
}
.tft-nav-links a:hover,
.tft-nav-links a.active {
    color: var(--white);
}

.tft-nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    white-space: nowrap;
}

.tft-username {
    font-size: 13px;
    font-weight: 500;
    color: var(--grey-light);
}

.tft-signout {
    font-size: 13px;
    font-weight: 500;
    color: var(--grey);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.tft-signout:hover { color: var(--white); }

/* ═══════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    padding-top: 60px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-short {
    min-height: auto;
    padding-bottom: 60px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(6,6,6,0.55) 0%,
        rgba(6,6,6,0.72) 40%,
        rgba(6,6,6,0.88) 100%
    );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 52px 24px 36px;
}

.hero-title {
    font-family: 'Krona One', sans-serif;
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 400;
    letter-spacing: 0.12em;
    color: var(--white);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: var(--grey-light);
    letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════
   CHECKLIST CARD WRAPPER
═══════════════════════════════════════════════════ */
.checklist-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1000px;
    padding: 0 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Timeframe Card ── */
.tf-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.tf-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tf-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--white);
    text-transform: uppercase;
}

.tf-confluence-label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: var(--grey);
    margin-top: 2px;
    letter-spacing: 0.04em;
}

.tf-percent {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
}

/* ── Item Row ── */
.tf-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}
.tf-item:last-child { border-bottom: none; }

.item-row {
    cursor: pointer;
    user-select: none;
}
.item-row:hover { background: rgba(255,255,255,0.03); }
.item-row-active { background: rgba(255,255,255,0.04); }

.tf-item-name {
    font-size: 16px;
    font-weight: 400;
    color: var(--white);
    letter-spacing: 0.01em;
}

.item-unchecked {
    opacity: 0.4;
}

.tf-item-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.tf-item-weight {
    font-size: 14px;
    font-weight: 500;
    color: var(--grey);
    min-width: 40px;
    text-align: right;
}

/* ═══════════════════════════════════════════════════
   TOGGLE — visual-only (controlled via Yes/No)
═══════════════════════════════════════════════════ */
.tft-toggle-visual {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    border-radius: 24px;
    background: var(--toggle-off);
    flex-shrink: 0;
    transition: background 0.2s;
    pointer-events: none;
}
.tft-toggle-visual .tft-toggle-slider-visual {
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.22s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.tft-toggle-visual.toggle-on {
    background: var(--toggle-on);
}
.tft-toggle-visual.toggle-on .tft-toggle-slider-visual {
    transform: translateX(20px);
}

/* Static toggle for session detail view */
.toggle-indicator {
    display: inline-block;
    width: 44px;
    height: 24px;
    border-radius: 24px;
    position: relative;
    flex-shrink: 0;
}
.toggle-indicator::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 3px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.toggle-on  { background: var(--toggle-on); }
.toggle-on::before  { left: auto; right: 3px; }
.toggle-off { background: var(--toggle-off); }
.toggle-off::before { left: 3px; }

/* ═══════════════════════════════════════════════════
   ITEM EXPAND PANEL
═══════════════════════════════════════════════════ */
.item-panel {
    display: none;
    background: rgba(6, 6, 8, 0.98);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.item-panel.open { display: block; }

.item-panel-inner {
    padding: 24px 24px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.item-panel-images {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    width: 100%;
}

.item-panel-img-slot {
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a1e;
    width: min(420px, 100%);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.item-panel-img-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-panel-img-slot.no-img img { display: none; }

/* Slot 1 gets white bg to look like a chart screenshot */
.item-panel-img-slot:first-child {
    background: #ffffff;
}
.item-panel-img-slot:first-child .item-panel-img-label {
    color: #333;
}

/* Fallback brand logo for items without a chart image */
.item-panel-img-slot:has(.item-panel-img-fallback) {
    background: #101014;
}
.item-panel-img-slot img.item-panel-img-fallback {
    width: 65%;
    height: auto;
    object-fit: contain;
    margin: 36px auto;
}

.item-panel-img-label {
    position: absolute;
    bottom: 10px;
    left: 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--grey);
    letter-spacing: 0.04em;
    pointer-events: none;
}

.item-panel-question {
    font-size: 14px;
    font-weight: 400;
    color: var(--grey-light);
    text-align: center;
    max-width: 560px;
    line-height: 1.6;
    margin: 0;
}

.item-panel-actions {
    display: flex;
    gap: 12px;
}

.item-btn {
    min-width: 120px;
    padding: 12px 32px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: opacity 0.15s;
}
.item-btn:hover { opacity: 0.85; }
.item-btn:active { opacity: 0.7; }

/* Disabled state for in-flight submits */
.btn-save-trade:disabled,
.trade-btn:disabled,
.trade-btn-icon:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.item-btn-yes {
    background: #1b4332;
    color: #d1fae5;
    border: 1px solid #2d6a4f;
}

.item-btn-no {
    background: #450a0a;
    color: #fecaca;
    border: 1px solid #7f1d1d;
}

/* ═══════════════════════════════════════════════════
   ACTIONS BAR
═══════════════════════════════════════════════════ */
.checklist-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
}

.total-confluence-bar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.total-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--grey);
    text-transform: uppercase;
}

.total-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
}

.btn-save-trade {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #060606;
    border: none;
    border-radius: 50px;
    padding: 11px 26px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
    letter-spacing: 0.02em;
}
.btn-save-trade:hover { opacity: 0.88; color: #060606; }

/* ═══════════════════════════════════════════════════
   CONFLUENCE COLOUR CLASSES
═══════════════════════════════════════════════════ */
.conf-high { color: var(--conf-high) !important; }
.conf-mid  { color: var(--conf-mid)  !important; }
.conf-low  { color: var(--conf-low)  !important; }

/* ═══════════════════════════════════════════════════
   HISTORY
═══════════════════════════════════════════════════ */
.history-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}
.history-card:hover { border-color: rgba(255,255,255,0.15); }

.history-notes {
    font-size: 13px;
    color: var(--grey);
    padding: 10px 24px 16px;
    margin: 0;
}

/* ═══════════════════════════════════════════════════
   DASHBOARD STATS
═══════════════════════════════════════════════════ */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--grey);
    text-transform: uppercase;
    text-align: center;
}

/* ═══════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════ */
.empty-state {
    padding: 40px 24px;
    text-align: center;
    color: var(--grey);
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════ */
.tft-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30,30,32,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
    white-space: nowrap;
}
.tft-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6,6,6,0.72);
}

.login-card {
    position: relative;
    z-index: 1;
    background: rgba(10,10,12,0.88);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.login-logo {
    height: 36px;
    width: auto;
    margin-bottom: 8px;
}

.login-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.04em;
}

.login-sub {
    font-size: 13px;
    color: var(--grey);
    margin-bottom: 16px;
}

.login-error {
    font-size: 13px;
    color: var(--conf-low);
    margin-bottom: 8px;
}

.login-field {
    width: 100%;
    margin-bottom: 12px;
}

.login-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s;
}
.login-input::placeholder { color: var(--grey); }
.login-input:focus { border-color: rgba(255,255,255,0.3); }

/* ═══════════════════════════════════════════════════
   HISTORY PAGE — SPLIT LAYOUT
═══════════════════════════════════════════════════ */
.history-section {
    position: relative;
    min-height: 100vh;
    padding-top: 60px;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    display: flex;
}

.history-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6,6,6,0.72);
    pointer-events: none;
    z-index: 0;
}

.history-left {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 52px 48px 60px;
}

.history-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.history-sub {
    font-size: 14px;
    color: var(--grey);
    margin-bottom: 28px;
}

/* ── Filter Tabs ── */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.filter-tab {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--grey-light);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.02em;
}
.filter-tab:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.filter-tab.active {
    background: var(--white);
    color: #060606;
    border-color: var(--white);
    font-weight: 600;
}

/* ── Trade Card Grid ── */
.trade-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.trade-card {
    background: rgba(14,14,16,0.95);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.trade-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 16px 0;
}

.trade-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #1a1a1e;
}
.trade-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}
.trade-direction-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-pair-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.trade-pair {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.02em;
}
.trade-dir {
    font-size: 11px;
    font-weight: 600;
    color: var(--grey);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trade-stats {
    padding: 14px 16px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.trade-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}
.trade-stat-label {
    font-size: 12px;
    color: var(--grey);
    font-weight: 400;
}
.trade-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}
.trade-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
}

.trade-notes {
    font-size: 12px;
    color: var(--grey);
    padding: 10px 16px;
    margin: 0;
    font-style: italic;
    line-height: 1.5;
}

.trade-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 16px;
    margin-top: auto;
}

.trade-btn {
    flex: 1;
    text-align: center;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    letter-spacing: 0.02em;
}
.trade-btn:hover { background: rgba(255,255,255,0.14); color: var(--white); }

.trade-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: var(--grey);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.trade-btn-icon:hover { background: rgba(248,113,113,0.15); color: #f87171; }

.empty-state-history {
    grid-column: span 2;
    text-align: center;
    color: var(--grey);
    font-size: 14px;
    padding: 60px 20px;
}

/* ═══════════════════════════════════════════════════
   SAVE MODAL
═══════════════════════════════════════════════════ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-backdrop.open { display: flex; }

.save-modal-card {
    background: #0e0e10;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 36px 32px;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.save-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.save-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    justify-content: flex-end;
}

/* ── Meta form rows (used in modal + update page) ── */
.trade-meta-form { padding: 4px 24px 20px; }

.meta-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}
.meta-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--grey);
    text-transform: uppercase;
}
.meta-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}
.meta-input::placeholder { color: var(--grey); }
.meta-input:focus { border-color: rgba(255,255,255,0.28); }
.meta-textarea { resize: vertical; min-height: 72px; }
select.meta-input { cursor: pointer; }
select.meta-input option { background: #0e0e10; }

/* ═══════════════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════════════ */
.dash-page {
    min-height: 100vh;
    padding-top: 60px;
    background: var(--bg);
}

.dash-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 44px 32px 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-header { margin-bottom: 4px; }

.dash-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.dash-sub {
    font-size: 14px;
    color: var(--grey);
}

.dash-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.01em;
    margin-top: 8px;
}

/* ── Row 1: P&L + side cards ── */
.dash-row-top {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
}

.dash-card {
    background: #0d0d0f;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 24px;
}

/* Net P&L card */
.dash-pnl-card { display: flex; flex-direction: column; gap: 4px; }

.dash-pnl-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.dash-card-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--grey);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dash-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.dash-pnl-value {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin: 6px 0 4px;
}

.dash-pnl-trades {
    font-size: 12px;
    color: var(--grey);
    margin-bottom: 20px;
}

.dash-mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 4px;
}

.dash-mini-stat {
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dash-mini-label {
    font-size: 11px;
    color: var(--grey);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.dash-mini-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
}

/* Side stacked cards */
.dash-col-right { display: flex; flex-direction: column; gap: 16px; }

.dash-side-card { padding: 20px 22px; }

.dash-side-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-side-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    margin: 6px 0 4px;
}

.dash-side-sub {
    font-size: 12px;
    color: var(--grey);
}

.dash-trend-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Row 2: 4 mini stat cards ── */
.dash-row-mini {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.dash-mini-card {
    background: #0d0d0f;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 18px 20px 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-mini-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.dash-mini-card-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-mini-card-label {
    font-size: 11px;
    color: var(--grey);
    font-weight: 500;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.dash-mini-card-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}

.dash-mini-card-icon {
    position: absolute;
    bottom: 10px;
    right: 14px;
    opacity: 0.6;
}

/* ── Calendar ── */
.dash-calendar-row {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 16px;
    align-items: start;
}

.dash-calendar-card { padding: 24px 28px; }

.cal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.cal-today-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--grey);
    background: rgba(255,255,255,0.06);
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    text-decoration: none;
}

.cal-today-link {
    color: var(--conf-high);
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.25);
    cursor: pointer;
    transition: background 0.2s;
}
.cal-today-link:hover {
    background: rgba(74,222,128,0.2);
}

.cal-nav-btn {
    font-size: 22px;
    font-weight: 700;
    color: var(--grey);
    text-decoration: none;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    user-select: none;
}
.cal-nav-btn:hover {
    color: var(--white);
    background: rgba(255,255,255,0.08);
}

.cal-header {
    justify-content: flex-start;
}

.cal-month {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.01em;
}

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

.cal-table th {
    font-size: 11px;
    font-weight: 600;
    color: var(--grey);
    letter-spacing: 0.06em;
    padding: 0 0 10px;
    text-align: center;
}

.cal-table td {
    padding: 4px;
    text-align: center;
    width: 14.28%;
}

.cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 64px;
    padding: 5px 4px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    font-size: 13px;
    font-weight: 500;
    color: var(--grey-light);
    cursor: default;
    box-sizing: border-box;
}

.cal-day-empty {
    display: block;
    width: 100%;
    min-height: 64px;
}

.cal-today {
    border-color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.06);
    color: var(--white);
    font-weight: 700;
}

.cal-has-trade {
    border-color: rgba(82,183,136,0.45);
    background: rgba(82,183,136,0.08);
}

/* Weekly summary */
.dash-weekly-col { display: flex; flex-direction: column; gap: 10px; }

.week-summary-card {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.week-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}

.week-stats {
    display: flex;
    gap: 10px;
    align-items: center;
}

.week-stat {
    font-size: 12px;
    font-weight: 600;
    color: var(--grey);
}

.week-win  { color: var(--conf-high); }
.week-loss { color: var(--conf-low); }

/* ═══════════════════════════════════════════════════
   HAMBURGER NAV
═══════════════════════════════════════════════════ */
.tft-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}
.tft-hamburger span {
    display: block;
    height: 2px;
    width: 22px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.tft-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tft-hamburger.open span:nth-child(2) { opacity: 0; }
.tft-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.tft-mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0; right: 0;
    background: rgba(6,6,6,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 99;
    padding: 16px 24px 24px;
    flex-direction: column;
    gap: 4px;
}
.tft-mobile-menu.open { display: flex; }
.tft-mobile-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--grey-light);
    text-decoration: none;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.2s;
}
.tft-mobile-menu a:last-child { border-bottom: none; }
.tft-mobile-menu a.active, .tft-mobile-menu a:hover { color: var(--white); }
.tft-mobile-signout {
    margin-top: 12px;
    padding: 13px 0 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tft-mobile-signout span { font-size: 13px; color: var(--grey); }
.tft-mobile-signout a { font-size: 13px; color: #f87171; font-weight: 600; text-decoration: none; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .history-left { flex: 1; padding: 40px 24px 60px; }
    .history-bg-overlay { background: rgba(6,6,6,0.8); }
    .staff-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
    .dash-row-top   { grid-template-columns: 1fr; }
    .dash-row-mini  { grid-template-columns: 1fr 1fr; }
    .dash-calendar-row { grid-template-columns: 1fr; }
    .dash-col-right { flex-direction: row; }
    .dash-side-card { flex: 1; }
    .staff-summary-row { grid-template-columns: repeat(3,1fr); }
    .view-modal-card { width: 95vw; max-height: 90vh; overflow-y: auto; }
    .save-modal-card { width: 95vw; max-height: 90vh; overflow-y: auto; }
}

@media (max-width: 640px) {
    /* Navbar — show hamburger, hide desktop links */
    .tft-nav-links { display: none; }
    .tft-nav-user  { display: none; }
    .tft-navbar-title { display: none; }
    .tft-hamburger { display: flex; }

    /* Checklist */
    .checklist-actions { flex-direction: column; align-items: stretch; gap: 12px; }
    .btn-save-trade { width: 100%; justify-content: center; min-height: 48px; }
    .tf-card-header { padding: 14px 16px 12px; }
    .tf-item { padding: 12px 16px; min-height: 48px; }
    .checklist-wrapper { padding: 0 12px 60px; }

    /* History */
    .trade-grid { grid-template-columns: 1fr; }
    .history-left { padding: 32px 16px 48px; }
    .filter-tabs { gap: 6px; }
    .filter-tab { padding: 8px 14px; min-height: 40px; font-size: 11px; }
    .trade-actions { flex-wrap: wrap; gap: 8px; }
    .trade-btn { min-height: 44px; flex: 1; justify-content: center; }

    /* Dashboard */
    .dash-row-mini  { grid-template-columns: 1fr 1fr; }
    .dash-inner { padding: 28px 16px 60px; }
    .dash-mini-stats { grid-template-columns: 1fr 1fr; }
    .dash-col-right { flex-direction: column; }
    .cal-table th, .cal-table td { font-size: 11px; padding: 2px; }
    .cal-day { min-height: 48px; font-size: 11px; padding: 3px 2px; }
    .cal-day-empty { min-height: 48px; }
    .monthly-chart { gap: 4px; }

    /* Staff */
    .staff-grid { grid-template-columns: 1fr; }
    .staff-summary-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
    .staff-pill { padding: 10px 8px; min-width: unset; }
    .staff-pill-val { font-size: 20px; }
    .staff-stats-row { grid-template-columns: repeat(2,1fr); }
    .staff-section { padding: 80px 16px 60px; }
    .staff-filter-tabs { gap: 6px; }
    .staff-tab { padding: 7px 12px; font-size: 11px; }

    /* Modals */
    .view-modal-card { width: 100vw; min-height: 60vh; border-radius: 18px 18px 0 0; position: fixed; bottom: 0; top: auto; transform: none; max-height: 90vh; overflow-y: auto; }
    .view-modal-backdrop { align-items: flex-end; }
    .save-modal-card { width: 100vw; border-radius: 18px 18px 0 0; position: fixed; bottom: 0; margin: 0; max-height: 90vh; overflow-y: auto; }
    .modal-backdrop { align-items: flex-end; }
    .vm-stat-grid { grid-template-columns: 1fr 1fr; }

    /* Perf breakdown */
    .perf-type-row { flex-direction: column; }
    .perf-wlp-row  { flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 400px) {
    .staff-summary-row { grid-template-columns: repeat(2,1fr); }
    .dash-mini-stats { grid-template-columns: 1fr; }
    .tft-logo img { height: 26px; }
}

/* ── History: outcome badge ── */
.trade-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.trade-icon-wrap {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.icon-long  { background: rgba(74, 222, 128, 0.15); }
.icon-short { background: rgba(248, 113, 113, 0.15); }

.outcome-badge {
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    flex-shrink: 0;
}
.outcome-win       { background: rgba(74,222,128,.15); color: #4ade80; border: 1px solid rgba(74,222,128,.35); }
.outcome-loss      { background: rgba(248,113,113,.15); color: #f87171; border: 1px solid rgba(248,113,113,.35); }
.outcome-before    { background: rgba(255,255,255,.08); color: #c8c8c8; border: 1px solid rgba(255,255,255,.15); }
.outcome-breakeven { background: rgba(250,204,21,.15); color: #facc15; border: 1px solid rgba(250,204,21,.35); }

.conf-green { color: #4ade80 !important; }
.loss-red   { color: #f87171 !important; }

/* ── View Modal ── */
.view-modal-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 1000;
    align-items: center; justify-content: center;
}
.view-modal-backdrop.open { display: flex; }
.view-modal-card {
    background: #0e0e10;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    width: min(640px, 95vw);
    max-height: 88vh;
    overflow-y: auto;
}
.view-modal-head {
    display: flex; align-items: center;
    padding: 20px 24px 0;
    gap: 12px;
}
.view-modal-pair-wrap { display: flex; align-items: center; gap: 10px; flex: 1; }
.view-modal-pair { font-size: 20px; font-weight: 700; color: #fff; }
.view-modal-dir-badge {
    padding: 3px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
}
.dir-long  { background: rgba(74,222,128,.15); color: #4ade80; border: 1px solid rgba(74,222,128,.35); }
.dir-short { background: rgba(248,113,113,.15); color: #f87171; border: 1px solid rgba(248,113,113,.35); }
.view-modal-close {
    background: none; border: none; color: #9a9a9a;
    font-size: 18px; cursor: pointer; padding: 4px 8px;
}
.view-modal-close:hover { color: #fff; }

.vm-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin: 16px 24px 0;
}
.vm-tab {
    background: none; border: none;
    padding: 10px 16px; color: #9a9a9a;
    font-size: 14px; font-family: 'Montserrat', sans-serif;
    font-weight: 500; cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.vm-tab.active { color: #fff; border-bottom-color: #4ade80; }

.vm-body { padding: 20px 24px 24px; }
.vm-stat-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 12px; margin-bottom: 14px;
}
.vm-stat-chip {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 14px 16px;
}
.vm-chip-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); display: block; margin-bottom: 6px; }
.vm-chip-value { font-size: 16px; font-weight: 700; color: var(--white); font-family: 'Montserrat', sans-serif; }
.vm-total-card {
    background: rgba(74,222,128,.06);
    border: 1px solid rgba(74,222,128,.18);
    border-radius: 12px; padding: 16px;
    margin-bottom: 14px;
}
.vm-total-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); display: block; margin-bottom: 6px; }
.vm-total-value { font-size: 26px; font-weight: 800; font-family: 'Montserrat', sans-serif; }
.vm-notes-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px; padding: 14px 16px;
}
.vm-notes-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); display: block; margin-bottom: 6px; }
.vm-notes-text  { color: var(--grey-light); font-size: 14px; margin: 0; }

.vm-summary-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    background: rgba(74,222,128,.05);
    border: 1px solid rgba(74,222,128,.12);
    border-radius: 12px; padding: 16px; margin-bottom: 20px;
}
.vm-summary-score-wrap { display: flex; align-items: center; gap: 12px; }
.vm-summary-icon { font-size: 20px; color: #4ade80; }
.vm-summary-score { font-size: 28px; font-weight: 800; font-family: 'Montserrat', sans-serif; }
.vm-quality-label { font-size: 14px; font-weight: 600; color: #4ade80; margin-top: 4px; }
.vm-selected-label {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; color: var(--white); margin-bottom: 12px;
    font-size: 13px;
}
.vm-tf-group { margin-bottom: 14px; }
.vm-tf-name { font-size: 11px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .08em; }
.vm-tf-items { margin: 6px 0 0 0; padding: 0; list-style: none; }
.vm-tf-items li {
    padding: 6px 12px; background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px; margin-bottom: 4px;
    color: var(--grey-light); font-size: 13px;
}
.vm-empty-conf { text-align: center; padding: 32px 16px; color: var(--grey); }
.vm-empty-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.vm-empty-conf p { margin: 0 0 4px; font-size: 14px; }
.vm-empty-conf small { font-size: 12px; }

/* ── Dashboard: Best/Worst pair ── */
.dash-pair-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; margin-bottom: 20px;
}
@media (max-width: 600px) { .dash-pair-row { grid-template-columns: 1fr; } }
.dash-pair-card { padding: 18px 20px; }
.dash-pair-badge {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600;
    margin-bottom: 10px;
}
.dash-pair-best .dash-pair-badge { color: #4ade80; }
.dash-pair-worst .dash-pair-badge { color: #f87171; }
.dash-pair-name { font-size: 20px; font-weight: 800; color: var(--white); margin-bottom: 14px; font-family: 'Montserrat', sans-serif; }
.dash-pair-stats { display: flex; gap: 24px; }
.dash-pair-stats div { font-size: 15px; font-weight: 700; }
.dash-pair-stats small { font-size: 11px; color: var(--grey); font-weight: 400; }

/* ── Dashboard: Performance Breakdown ── */
.dash-perf-card { padding: 20px; margin-bottom: 20px; }
.perf-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.perf-label { font-size: 13px; color: var(--grey); }
.perf-value { font-size: 13px; font-weight: 700; color: var(--white); }
.perf-bar-track {
    height: 8px; background: rgba(255,255,255,0.07);
    border-radius: 4px; overflow: hidden; margin-bottom: 16px;
}
.perf-bar-fill { height: 100%; background: #4ade80; border-radius: 4px; }
.perf-type-row { display: flex; gap: 12px; margin-bottom: 16px; }
.perf-type-card { flex: 1; padding: 14px 16px; }
.perf-type-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); display: block; margin-bottom: 4px; }
.perf-type-value { font-size: 22px; font-weight: 800; display: block; font-family: 'Montserrat', sans-serif; }
.perf-type-short .perf-type-value { color: #f87171; }
.perf-type-sub   { font-size: 11px; color: var(--grey); }
.perf-wlp-row { display: flex; justify-content: space-around; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.perf-wlp-item { text-align: center; }
.perf-wlp-num   { font-size: 26px; font-weight: 800; color: var(--white); display: block; font-family: 'Montserrat', sans-serif; }
.perf-wlp-label { font-size: 12px; color: var(--grey); }

/* ── Dashboard: Recent Trades ── */
.dash-recent-card { padding: 20px; margin-bottom: 20px; }
.recent-trade-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.recent-trade-row:last-child { border-bottom: none; }
.recent-trade-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.recent-trade-info { flex: 1; }
.recent-trade-pair { display: block; font-weight: 700; color: var(--white); font-size: 14px; }
.recent-trade-date { font-size: 12px; color: var(--grey); }

/* ── Dashboard: Monthly P&L chart ── */
.dash-monthly-card { padding: 20px; }
.monthly-chart {
    display: flex; align-items: flex-end; gap: 8px;
    height: 180px; padding-top: 30px;
}
.monthly-bar-col {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: flex-end; height: 100%;
}
.monthly-bar-val { font-size: 11px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; }
.monthly-bar { width: 100%; border-radius: 6px 6px 0 0; min-height: 4px; transition: height .3s; }
.bar-profit { background: #4ade80; }
.bar-loss   { background: #f87171; }
.bar-zero   { background: rgba(255,255,255,0.07); }
.monthly-bar-label { font-size: 11px; color: var(--grey); margin-top: 6px; text-align: center; }


/* ═══════════════════════════════════════════
   STAFF DASHBOARD
═══════════════════════════════════════════ */

.staff-section {
    min-height: 100vh;
    background: var(--bg);
    padding: 100px 32px 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.staff-hero {
    margin-bottom: 32px;
}
.staff-title {
    font-family: 'Krona One', sans-serif;
    font-size: 28px;
    color: var(--white);
    margin: 0 0 6px;
}
.staff-sub {
    font-size: 14px;
    color: var(--grey);
    margin: 0;
}

/* Summary Pills */
.staff-summary-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.staff-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px 22px;
    min-width: 110px;
    gap: 4px;
}
.staff-pill-val {
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}
.staff-pill-label {
    font-size: 11px;
    color: var(--grey);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.staff-pill-green  { border-color: rgba(74,222,128,0.3); }
.staff-pill-green .staff-pill-val  { color: #4ade80; }
.staff-pill-gold   { border-color: rgba(250,204,21,0.3); }
.staff-pill-gold .staff-pill-val   { color: #facc15; }
.staff-pill-red    { border-color: rgba(248,113,113,0.3); }
.staff-pill-red .staff-pill-val    { color: #f87171; }
.staff-pill-orange { border-color: rgba(251,146,60,0.3); }
.staff-pill-orange .staff-pill-val { color: #fb923c; }
.staff-pill-grey   { border-color: rgba(255,255,255,0.1); }
.staff-pill-grey .staff-pill-val   { color: var(--grey); }

/* Filter Tabs */
.staff-filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.staff-tab {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--grey);
    background: transparent;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.staff-tab:hover, .staff-tab.active {
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border-color: rgba(255,255,255,0.2);
}
.staff-tab-gold.active  { background: rgba(250,204,21,0.12); color: #facc15; border-color: rgba(250,204,21,0.3); }
.staff-tab-red.active   { background: rgba(248,113,113,0.12); color: #f87171; border-color: rgba(248,113,113,0.3); }
.staff-tab-orange.active{ background: rgba(251,146,60,0.12); color: #fb923c; border-color: rgba(251,146,60,0.3); }

/* Grid */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

/* Card */
.staff-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color 0.2s;
}
.staff-card:hover { border-color: rgba(255,255,255,0.15); }
.staff-card-alert { border-color: rgba(251,146,60,0.35) !important; }

/* Card Header */
.staff-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.staff-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #060606;
    flex-shrink: 0;
    background: var(--grey);
}
.staff-avatar.tier-elite     { background: #facc15; }
.staff-avatar.tier-strong    { background: #4ade80; }
.staff-avatar.tier-average   { background: #60a5fa; }
.staff-avatar.tier-struggling{ background: #f87171; }
.staff-avatar.tier-new       { background: #a78bfa; }
.staff-avatar.tier-inactive  { background: #4b5563; color: var(--grey); }

.staff-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.staff-username {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
}
.staff-fullname {
    font-size: 12px;
    color: var(--grey);
}
.staff-joined {
    font-size: 11px;
    color: rgba(154,154,154,0.6);
}

/* Tier Badge */
.staff-tier-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: 50px;
    white-space: nowrap;
}
.tier-badge-elite     { background: rgba(250,204,21,0.15); color: #facc15; border: 1px solid rgba(250,204,21,0.3); }
.tier-badge-strong    { background: rgba(74,222,128,0.12); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.tier-badge-average   { background: rgba(96,165,250,0.12); color: #60a5fa; border: 1px solid rgba(96,165,250,0.3); }
.tier-badge-struggling{ background: rgba(248,113,113,0.12); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.tier-badge-new       { background: rgba(167,139,250,0.12); color: #a78bfa; border: 1px solid rgba(167,139,250,0.3); }
.tier-badge-inactive  { background: rgba(255,255,255,0.05); color: var(--grey); border: 1px solid rgba(255,255,255,0.1); }

/* Attention Bar */
.staff-attention-bar {
    background: rgba(251,146,60,0.1);
    border: 1px solid rgba(251,146,60,0.3);
    border-radius: 8px;
    font-size: 12px;
    color: #fb923c;
    padding: 8px 12px;
    font-weight: 600;
}

/* Stats Row */
.staff-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.staff-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 10px 6px;
    gap: 4px;
}
.staff-stat-val {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}
.staff-stat-label {
    font-size: 10px;
    color: var(--grey);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* W/L Bar */
.staff-wl-bar-wrap { display: flex; flex-direction: column; gap: 6px; }
.staff-wl-bar {
    height: 5px;
    background: rgba(248,113,113,0.3);
    border-radius: 50px;
    overflow: hidden;
}
.staff-wl-win {
    height: 100%;
    background: #4ade80;
    border-radius: 50px;
    transition: width 0.4s;
}
.staff-wl-labels {
    display: flex;
    gap: 14px;
    font-size: 12px;
    font-weight: 600;
}
.staff-grey { color: var(--grey); }
.staff-amber { color: #fb923c; }

/* Meta Row */
.staff-meta-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 14px;
}
.staff-meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.staff-meta-label {
    font-size: 10px;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.staff-meta-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
}

/* Recent Trades */
.staff-recent-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 14px;
}
.staff-recent-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.staff-recent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 7px 10px;
}
.staff-recent-pair {
    font-weight: 700;
    color: var(--white);
    min-width: 60px;
}
.staff-recent-dir {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}
.dir-long  { background: rgba(74,222,128,0.15); color: #4ade80; }
.dir-short { background: rgba(248,113,113,0.15); color: #f87171; }

.outcome-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}
.outcome-win       { background: rgba(74,222,128,0.15); color: #4ade80; }
.outcome-loss      { background: rgba(248,113,113,0.15); color: #f87171; }
.outcome-before    { background: rgba(255,255,255,0.07); color: var(--grey); }
.outcome-breakeven { background: rgba(96,165,250,0.15); color: #60a5fa; }

.staff-recent-pnl  { margin-left: auto; font-weight: 700; }
.staff-recent-date { color: var(--grey); font-size: 11px; }

/* Empty State */
.staff-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--grey);
    font-size: 15px;
}

/* ═══════════════════════════════════════════
   PRELOADER
═══════════════════════════════════════════ */
#tft-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #060606;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
#tft-preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-ring-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preloader-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255,255,255,0.07);
    border-top-color: #4ade80;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.preloader-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════
   ENTRANCE ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

/* Elements that animate on scroll via JS IntersectionObserver */
.anim-ready {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.anim-ready.anim-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid children */
.anim-ready:nth-child(1)  { transition-delay: 0.00s; }
.anim-ready:nth-child(2)  { transition-delay: 0.03s; }
.anim-ready:nth-child(3)  { transition-delay: 0.06s; }
.anim-ready:nth-child(4)  { transition-delay: 0.09s; }
.anim-ready:nth-child(5)  { transition-delay: 0.12s; }
.anim-ready:nth-child(6)  { transition-delay: 0.15s; }
.anim-ready:nth-child(7)  { transition-delay: 0.18s; }
.anim-ready:nth-child(8)  { transition-delay: 0.20s; }
.anim-ready:nth-child(9)  { transition-delay: 0.20s; }
.anim-ready:nth-child(10) { transition-delay: 0.20s; }

/* Hero text entrance */
.hero-content .hero-title    { animation: fadeUp 0.3s ease both; }
.hero-content .hero-subtitle { animation: fadeUp 0.3s 0.08s ease both; }

/* Navbar fade in */
.tft-navbar { animation: fadeIn 0.2s ease both; }

/* Page-level fade for main */
main { animation: fadeIn 0.25s ease both; }

/* ════════ Perfect-trade spec additions ════════ */

/* Confluence Summary card */
.summary-card { margin-top: 22px; }
.summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 24px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.summary-tf-name { color: rgba(255,255,255,0.75); font-size: 16px; letter-spacing: 0.04em; }
.summary-tf-pct { font-weight: 700; }
.summary-total-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 24px 6px; font-weight: 800;
}
.summary-total-label { color: #fff; letter-spacing: 0.08em; font-size: 16px; }
.summary-total-value { font-size: 26px; }
.summary-quality {
    text-align: center; margin: 8px 24px 18px; padding: 8px 14px;
    border: 1px solid rgba(74,222,128,0.35); border-radius: 10px;
    color: #4ade80; font-weight: 700; letter-spacing: 0.05em;
    background: rgba(74,222,128,0.08);
}

/* Save modal extras */
.save-modal-card { max-height: 88vh; overflow-y: auto; }
.save-modal-banner {
    background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.35);
    color: #34d399; border-radius: 10px; padding: 10px 14px; font-weight: 700;
    text-align: center; margin-bottom: 16px;
}
.save-modal-error {
    background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.4);
    color: #f87171; border-radius: 10px; padding: 9px 13px; font-size: 13px;
    margin-bottom: 14px;
}
.req { color: #f87171; }

/* Currency pair dropdown */
.pair-dd { position: relative; }
.pair-dd-trigger {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    text-align: left; cursor: pointer;
}
.pair-dd-placeholder { color: rgba(255,255,255,0.4); }
.pair-dd-caret { color: rgba(255,255,255,0.5); margin-left: 8px; }
.pair-dd-menu {
    display: none; position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px);
    max-height: 280px; overflow-y: auto;
    background: #0e0e10; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.6);
}
.pair-dd-menu.open { display: block; }
.pair-dd-group {
    padding: 8px 14px 4px; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
    color: #34d399; font-weight: 700; position: sticky; top: 0; background: #0e0e10;
}
.pair-dd-item {
    display: flex; gap: 10px; align-items: center; width: 100%;
    background: none; border: none; padding: 8px 14px; cursor: pointer;
    color: #f1f1f1; font-size: 14px;
}
.pair-dd-item:hover, .pair-dd-item.selected { background: rgba(16,185,129,0.15); }
.pair-dd-flags { font-size: 15px; }
.pair-dd-name { font-weight: 600; }
.pair-dd-code { margin-left: auto; color: rgba(255,255,255,0.4); font-size: 12px; }

/* Direction toggle */
.dir-toggle { display: flex; gap: 10px; }
.dir-btn {
    flex: 1; padding: 10px 0; border-radius: 10px; font-weight: 800; letter-spacing: 0.06em;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dir-btn-long.active  { background: rgba(16,185,129,0.2);  border-color: #10b981; color: #34d399; }
.dir-btn-short.active { background: rgba(248,113,113,0.18); border-color: #f87171; color: #f87171; }

/* Trade parameters */
.trade-params-card {
    border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
    padding: 16px; margin-bottom: 16px; background: rgba(255,255,255,0.03);
}
.trade-params-title { font-weight: 700; color: #fff; margin-bottom: 12px; font-size: 14px; letter-spacing: 0.05em; }
.trade-params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trade-params-grid .meta-input { margin-top: 4px; }
.lot-calc-panel {
    margin-top: 14px; border: 1px solid rgba(16,185,129,0.3); border-radius: 12px;
    background: rgba(16,185,129,0.07); padding: 12px 14px;
}
.lot-calc-title { color: #34d399; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.lot-calc-empty { color: rgba(255,255,255,0.45); font-size: 13px; margin: 0; }
.lot-calc-row { display: flex; justify-content: space-between; color: #f1f1f1; font-size: 13px; padding: 3px 0; }
.lot-calc-lots span:last-child { color: #34d399; font-weight: 800; font-size: 16px; }

/* Image upload */
.img-upload-box {
    display: block; border: 1px dashed rgba(255,255,255,0.25); border-radius: 12px;
    padding: 18px; text-align: center; cursor: pointer; transition: border-color .15s;
}
.img-upload-box:hover { border-color: #34d399; }
.img-upload-text { color: rgba(255,255,255,0.5); font-size: 13px; }
.img-upload-preview { max-width: 100%; max-height: 220px; border-radius: 8px; margin: 0 auto; }

/* History card flags */
.trade-card-flags { font-size: 22px; margin-right: 10px; }
.view-modal-flags { font-size: 22px; margin-right: 8px; }
.trade-btn-update { color: #34d399; border-color: rgba(16,185,129,0.4); }

/* View modal chart images */
.vm-images-card { margin-top: 14px; }
.vm-images-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.vm-image-slot {
    border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 10px;
    background: rgba(255,255,255,0.03);
}
.vm-image-label { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.vm-image-slot img { width: 100%; border-radius: 8px; display: none; }
.vm-image-empty { color: rgba(255,255,255,0.35); font-size: 13px; margin: 12px 0; text-align: center; }

/* Update modal */
.um-locked-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.um-locked-field {
    border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 9px 12px;
    background: rgba(255,255,255,0.04);
}
.um-locked-value { display: block; color: #f1f1f1; font-weight: 600; font-size: 14px; margin-top: 2px; }
.um-outcome-row { display: flex; gap: 10px; }
.um-outcome-btn {
    flex: 1; padding: 10px 0; border-radius: 10px; font-weight: 700;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.um-win.active  { background: rgba(16,185,129,0.2); border-color: #10b981; color: #34d399; }
.um-loss.active { background: rgba(248,113,113,0.18); border-color: #f87171; color: #f87171; }
.um-be.active   { background: rgba(251,191,36,0.15); border-color: #fbbf24; color: #fbbf24; }
.um-target-profit {
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid rgba(16,185,129,0.3); background: rgba(16,185,129,0.08);
    border-radius: 10px; padding: 11px 14px; margin-bottom: 14px;
    color: #34d399; font-weight: 600;
}
.um-target-profit .conf-green { font-weight: 800; font-size: 18px; }

/* Calendar day stats */
.cal-day-num { font-weight: 600; }
.cal-day-pnl { font-size: 10px; font-weight: 700; }
.cal-day-trades { font-size: 9px; color: rgba(255,255,255,0.5); }
.cal-day-wr { font-size: 9px; color: #34d399; }

@media (max-width: 640px) {
    .trade-params-grid, .um-locked-grid, .vm-images-grid { grid-template-columns: 1fr; }
    .summary-row { padding: 10px 16px; }
    .summary-total-row { padding: 16px 16px 6px; }
    .summary-quality { margin: 8px 16px 14px; }
}
