/* ============================================
   TVJournal – Design System Dark Mode
   Trading Journal ICT/SMC
   ============================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables (Design Tokens) ---- */
:root {
    /* Background */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #1a1a26;
    --bg-sidebar: #0d0d14;

    /* Borders */
    --border-primary: #2a2a3a;
    --border-subtle: #1f1f2e;
    --border-focus: #4a9eff;

    /* Text */
    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --text-muted: #5c5c74;
    --text-inverse: #0a0a0f;

    /* Accent */
    --accent-blue: #4a9eff;
    --accent-blue-dim: rgba(74, 158, 255, 0.12);
    --accent-blue-hover: #6bb3ff;

    /* Win/Loss (silenciados) */
    --color-win: #34d399;
    --color-win-bg: rgba(52, 211, 153, 0.08);
    --color-win-dim: rgba(52, 211, 153, 0.15);
    --color-loss: #e8734a;
    --color-loss-bg: rgba(232, 115, 74, 0.08);
    --color-loss-dim: rgba(232, 115, 74, 0.15);
    --color-be: #f5c542;
    --color-be-bg: rgba(245, 197, 66, 0.08);

    /* Badges */
    --badge-blue: rgba(74, 158, 255, 0.15);
    --badge-purple: rgba(168, 85, 247, 0.15);
    --badge-amber: rgba(245, 158, 11, 0.15);
    --badge-red: rgba(239, 68, 68, 0.15);
    --badge-green: rgba(34, 197, 94, 0.15);

    /* Sizes */
    --sidebar-width: 64px;
    --sidebar-expanded: 220px;
    --header-height: 56px;
    --slide-over-width: 440px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slide: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow-blue: 0 0 20px rgba(74, 158, 255, 0.15);
}

/* ---- Light Theme ---- */
:root[data-theme="light"] {
    /* Background */
    --bg-primary: #f5f5f8;
    --bg-secondary: #eeeef2;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f5;
    --bg-input: #f0f0f5;
    --bg-sidebar: #e8e8ee;

    /* Borders */
    --border-primary: #d0d0da;
    --border-subtle: #dddde5;
    --border-focus: #4a9eff;

    /* Text */
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #8888a0;
    --text-inverse: #ffffff;

    /* Accent (mesmos tons, levemente ajustados) */
    --accent-blue: #3580e0;
    --accent-blue-dim: rgba(53, 128, 224, 0.1);
    --accent-blue-hover: #2670cc;

    /* Win/Loss */
    --color-win: #16a06a;
    --color-win-bg: rgba(22, 160, 106, 0.08);
    --color-win-dim: rgba(22, 160, 106, 0.12);
    --color-loss: #d4562c;
    --color-loss-bg: rgba(212, 86, 44, 0.08);
    --color-loss-dim: rgba(212, 86, 44, 0.12);
    --color-be: #c9a30e;
    --color-be-bg: rgba(201, 163, 14, 0.08);

    /* Badges */
    --badge-blue: rgba(53, 128, 224, 0.12);
    --badge-purple: rgba(128, 60, 200, 0.12);
    --badge-amber: rgba(200, 130, 10, 0.12);
    --badge-red: rgba(200, 50, 50, 0.12);
    --badge-green: rgba(22, 160, 94, 0.12);

    /* Shadows (lighter) */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-glow-blue: 0 0 16px rgba(53, 128, 224, 0.12);
}

/* Smooth theme transition */
html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Calendar indicator fix for light mode */
:root[data-theme="light"] .tl-filter-input::-webkit-calendar-picker-indicator {
    filter: none;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    color: var(--accent-blue-hover);
}

::selection {
    background: var(--accent-blue);
    color: var(--text-inverse);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---- LOGIN PAGE ---- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.login-logo h1 span {
    color: var(--accent-blue);
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* ---- FORM ELEMENTS ---- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow-blue);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
    width: 100%;
    padding: 12px;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    box-shadow: var(--shadow-glow-blue);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.btn-ghost:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ---- APP LAYOUT ---- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    z-index: 100;
    transition: width var(--transition-normal);
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 32px;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 0 8px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-nav li a:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar-nav li a.active {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
}

.sidebar-nav li a svg {
    width: 22px;
    height: 22px;
}

/* Sidebar user avatar */
.sidebar-user {
    margin-top: 12px;
    margin-bottom: 8px;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    padding: 0;
}

.sidebar-avatar:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow-blue);
}

/* Tooltip */
.sidebar-nav li a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-md);
}

.sidebar-nav li a:hover::after {
    opacity: 1;
}

.sidebar-spacer {
    flex: 1;
}

/* Add Trade FAB */
.fab-add-trade {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--accent-blue);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-glow-blue);
    margin-top: 16px;
}

.fab-add-trade:hover {
    background: var(--accent-blue-hover);
    transform: scale(1.05);
}

/* ---- MAIN CONTENT ---- */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    padding: 24px 32px;
}

/* ---- PAGE HEADER ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ---- FILTER PILLS ---- */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-pill:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.filter-pill.active {
    background: var(--accent-blue-dim);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* ---- METRIC CARDS ---- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: border-color var(--transition-fast);
}

.metric-card:hover {
    border-color: var(--border-focus);
}

.metric-card .metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.metric-card .metric-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.metric-card .metric-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

.metric-value.positive {
    color: var(--color-win);
}

.metric-value.negative {
    color: var(--color-loss);
}

/* ---- CHART CONTAINER ---- */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ---- TRADE LOG TABLE ---- */
.trade-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.trade-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.trade-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.trade-table th {
    background: var(--bg-secondary);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-primary);
}

.trade-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}

.trade-table tbody tr {
    transition: background var(--transition-fast);
}

.trade-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.trade-table td.pnl-positive {
    color: var(--color-win);
    font-weight: 600;
}

.trade-table td.pnl-negative {
    color: var(--color-loss);
    font-weight: 600;
}

.trade-table td.pnl-be {
    color: var(--color-be);
    font-weight: 600;
}

/* ---- BADGES / TAGS ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 500;
    margin: 1px 2px;
    white-space: nowrap;
}

.badge-blue {
    background: var(--badge-blue);
    color: #7cb3ff;
}

.badge-purple {
    background: var(--badge-purple);
    color: #c084fc;
}

.badge-amber {
    background: var(--badge-amber);
    color: #fbbf24;
}

.badge-red {
    background: var(--badge-red);
    color: #f87171;
}

.badge-green {
    background: var(--badge-green);
    color: #4ade80;
}

.badge-win {
    background: var(--color-win-bg);
    color: var(--color-win);
}

.badge-loss {
    background: var(--color-loss-bg);
    color: var(--color-loss);
}

.badge-be {
    background: var(--color-be-bg);
    color: var(--color-be);
}

.badge-long {
    background: var(--badge-blue);
    color: #7cb3ff;
}

.badge-short {
    background: var(--badge-red);
    color: #f87171;
}

/* ---- SLIDE-OVER (BOLETA) ---- */
.slide-over-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slide);
}

.slide-over-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

.slide-over {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: var(--slide-over-width);
    max-width: 90vw;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-primary);
    z-index: 201;
    transform: translateX(100%);
    transition: transform var(--transition-slide);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.slide-over.open {
    transform: translateX(0);
}

.slide-over-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

.slide-over-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.slide-over-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1.2rem;
    transition: color var(--transition-fast);
}

.slide-over-close:hover {
    color: var(--text-primary);
}

.slide-over-body {
    padding: 20px 24px;
    flex: 1;
}

.slide-over-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary);
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
}

/* ---- FORM SECTIONS ---- */
.form-section {
    margin-bottom: 20px;
}

.form-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.form-row>* {
    flex: 1;
}

/* ---- TOGGLE BUTTONS (Long/Short) ---- */
.toggle-group {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.toggle-btn:hover {
    background: var(--bg-card-hover);
}

.toggle-btn.active-long {
    background: var(--color-win-dim);
    border-color: var(--color-win);
    color: var(--color-win);
}

.toggle-btn.active-short {
    background: var(--color-loss-dim);
    border-color: var(--color-loss);
    color: var(--color-loss);
}

/* ---- PILL BUTTONS (Tags) ---- */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill-btn {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.pill-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.pill-btn.active {
    background: var(--accent-blue-dim);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.pill-btn.active-emotion {
    background: var(--badge-amber);
    border-color: #f59e0b;
    color: #fbbf24;
}

/* ---- DROPZONE ---- */
.dropzone {
    border: 2px dashed var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.85rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dropzone:hover,
.dropzone.drag-over {
    border-color: var(--accent-blue);
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
}

.dropzone-preview {
    max-width: 100%;
    max-height: 120px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

/* ---- TOAST NOTIFICATION ---- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 300ms ease, toastOut 300ms ease 2700ms forwards;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-success {
    border-left: 3px solid var(--color-win);
}

.toast-error {
    border-left: 3px solid var(--color-loss);
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ---- SKELETON LOADING ---- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.85rem;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* ---- COMMAND PALETTE (Ctrl+K) ---- */
.cmd-palette-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 300;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.cmd-palette-backdrop.open {
    display: flex;
}

.cmd-palette {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.cmd-palette input {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.cmd-palette-results {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}

.cmd-result {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.cmd-result:hover,
.cmd-result.selected {
    background: var(--accent-blue-dim);
    color: var(--text-primary);
}

.cmd-result kbd {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 2px 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    color: var(--text-muted);
}

/* ---- SELECT DROPDOWN ---- */
.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238888a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-select:focus {
    border-color: var(--accent-blue);
}

.form-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ---- CHECKBOX ---- */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

/* ---- ACCOUNT SELECT BAR ---- */
.account-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .slide-over {
        width: 100vw;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
        margin-left: 0;
    }

    .sidebar {
        display: none;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- VIEW TRANSITIONS (SPA) ---- */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Inline Edit ---- */
.inline-editable {
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background var(--transition-fast);
}

.inline-editable:hover {
    background: var(--bg-input);
}

.inline-edit-input {
    padding: 4px 8px;
    background: var(--bg-input);
    border: 1px solid var(--accent-blue);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: inherit;
    outline: none;
    width: 100%;
}

/* ---- Account Selector (Dashboard header) ---- */
.account-selector {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ---- BADGE TAG (Confluences in trade log) ---- */
.badge-tag {
    background: var(--badge-purple);
    color: #c084fc;
}

/* ---- TEXT HELPERS ---- */
.text-accent {
    color: var(--color-win) !important;
}

.text-loss {
    color: var(--color-loss) !important;
}

.text-muted {
    color: var(--text-muted);
}

.text-bold {
    font-weight: 600;
}

.text-sm {
    font-size: 0.78rem;
}

.tags-cell {
    max-width: 200px;
}

/* ---- BIAS TOGGLE (5 options) ---- */
.toggle-group-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.toggle-sm {
    padding: 8px 4px;
    font-size: 0.72rem;
}

.toggle-btn.active,
.toggle-btn.active-long,
.toggle-btn[data-dir="LONG"].active {
    background: var(--color-win-dim);
    border-color: var(--color-win);
    color: var(--color-win);
}

.toggle-btn[data-dir="SHORT"].active {
    background: var(--color-loss-dim);
    border-color: var(--color-loss);
    color: var(--color-loss);
}

.toggle-btn[data-bias].active {
    background: var(--accent-blue-dim);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.toggle-btn[data-result="WIN"].active {
    background: var(--color-win-dim);
    border-color: var(--color-win);
    color: var(--color-win);
}

.toggle-btn[data-result="LOSS"].active {
    background: var(--color-loss-dim);
    border-color: var(--color-loss);
    color: var(--color-loss);
}

.toggle-btn[data-result="BE"].active {
    background: var(--color-be-bg);
    border-color: var(--color-be);
    color: var(--color-be);
}

/* ---- SCREENSHOT GALLERY ---- */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.screenshot-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-primary);
    aspect-ratio: 16/9;
    background: var(--bg-input);
}

.screenshot-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.screenshot-item:hover .screenshot-remove {
    opacity: 1;
}

/* Screenshot slot (Macro/Exec individual preview) */
.screenshot-slot-preview {
    aspect-ratio: 16/9;
    width: 100%;
    max-height: 140px;
}

.screenshot-slot-preview .screenshot-thumb {
    border-radius: var(--radius-md);
}

/* ---- BUTTON XS ---- */
.btn-xs {
    padding: 3px 8px;
    font-size: 0.7rem;
}

/* ---- METRICS GRID 3 COLS ---- */
.metrics-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ---- CALENDAR ---- */
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-month-label {
    font-size: 1rem;
    font-weight: 600;
    min-width: 160px;
    text-align: center;
}

.calendar-grid {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr) 100px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.calendar-header-cell {
    padding: 10px 8px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.calendar-header-cell.calendar-week-col {
    color: var(--accent-blue);
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr) 100px;
    border-bottom: 1px solid var(--border-subtle);
}

.calendar-row:last-child {
    border-bottom: none;
}

.calendar-cell {
    padding: 8px;
    min-height: 80px;
    border-right: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
    cursor: default;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar-cell:last-child {
    border-right: none;
}

.calendar-cell-empty {
    background: var(--bg-primary);
    opacity: 0.3;
}

.calendar-cell.cal-positive {
    background: rgba(52, 211, 153, 0.06);
}

.calendar-cell.cal-negative {
    background: rgba(232, 115, 74, 0.06);
}

.calendar-cell.cal-positive:hover {
    background: rgba(52, 211, 153, 0.12);
}

.calendar-cell.cal-negative:hover {
    background: rgba(232, 115, 74, 0.12);
}

.calendar-day-num {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    width: 100%;
}

.calendar-today {
    color: var(--accent-blue);
    background: var(--accent-blue-dim);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-pnl {
    font-size: 0.82rem;
    font-weight: 700;
}

.cal-positive .calendar-pnl {
    color: var(--color-win);
}

.cal-negative .calendar-pnl {
    color: var(--color-loss);
}

.calendar-trades {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.calendar-wr {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.calendar-week-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-right: none;
}

.calendar-cell-clickable {
    cursor: pointer;
}

.calendar-cell-clickable:hover {
    outline: 2px solid var(--accent-blue);
    outline-offset: -2px;
}

/* ---- RESPONSIVE CALENDAR ---- */
@media (max-width: 768px) {

    .calendar-header-row,
    .calendar-row {
        grid-template-columns: repeat(7, 1fr);
    }

    .calendar-week-col,
    .calendar-week-summary {
        display: none;
    }

    .toggle-group-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================ */
/* TRADE LOG FILTERS                            */
/* ============================================ */

.tl-filters {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tl-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tl-filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tl-filter-dates {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tl-filter-sep {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.tl-filter-input,
.tl-filter-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
    min-width: 0;
}

.tl-filter-input:focus,
.tl-filter-select:focus {
    border-color: var(--accent-blue);
}

.tl-filter-input {
    width: 130px;
}

.tl-filter-select {
    min-width: 90px;
    cursor: pointer;
}

/* Color scheme for date inputs */
.tl-filter-input::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

.tl-filter-clear {
    color: var(--text-muted);
    align-self: flex-end;
    padding: 6px 12px;
}

/* Btn danger */
.btn-danger {
    background: var(--color-loss);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-danger:hover {
    opacity: 0.85;
    box-shadow: 0 0 12px rgba(232, 115, 74, 0.3);
}

@media (max-width: 768px) {
    .tl-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .tl-filter-input {
        width: 100%;
    }
}

/* ============================================ */
/* TRADE DETAIL – LAYOUT LIVRO                  */
/* ============================================ */

/* Linhas clicáveis do trade log */
.trade-row-clickable {
    cursor: pointer;
    transition: background var(--transition-fast);
}

.trade-row-clickable:hover {
    background: var(--bg-secondary) !important;
}

/* Topbar de navegação */
.td-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 24px;
}

.td-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.td-nav-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.td-nav-arrow:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow-blue);
    color: var(--accent-blue);
}

.td-nav-counter {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: center;
}

/* Conteúdo do trade */
.td-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.td-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.td-date {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

.td-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.td-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.td-asset {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-blue);
}

/* Screenshots */
.td-screenshots {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}

.td-screenshot-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
}

.td-screenshot-label {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-primary);
}

.td-screenshot-img {
    width: 100%;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.15s ease;
}

.td-screenshot-img:hover {
    opacity: 0.92;
}

.td-no-screenshots {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-primary);
    margin-bottom: 28px;
}

.td-no-screenshots span {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.td-no-screenshots p {
    margin: 0;
    font-size: 0.85rem;
}

/* Detalhes Grid */
.td-details {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.td-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.td-detail-item {
    text-align: center;
}

.td-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.td-detail-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Tags */
.td-tags {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-primary);
}

.td-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

/* Notas */
.td-notes {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 40px;
}

.td-notes-text {
    margin-top: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

/* Fullscreen overlay */
.td-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.15s ease;
}

.td-fullscreen-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
}

.td-fullscreen-close {
    position: fixed;
    top: 20px;
    right: 24px;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
}

.td-fullscreen-close:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .td-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .td-details-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .td-nav-arrow {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}

/* ---- SETTINGS PAGE ---- */
.settings-container {
    max-width: 720px;
}

.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.settings-section-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.settings-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.settings-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent-blue-dim);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-blue);
    transition: all var(--transition-fast);
}

.settings-tag:hover {
    border-color: var(--accent-blue);
}

.settings-tag-text {
    white-space: nowrap;
}

.settings-tag-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    line-height: 1;
    transition: color var(--transition-fast);
}

.settings-tag-remove:hover {
    color: var(--color-loss);
}

/* Botão de editar tag */
.settings-tag-edit {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    line-height: 1;
    transition: color var(--transition-fast);
    opacity: 0.6;
}

.settings-tag:hover .settings-tag-edit {
    opacity: 1;
}

.settings-tag-edit:hover {
    color: var(--accent-blue);
}

/* Input inline de renomear */
.settings-rename-input {
    background: var(--bg-secondary);
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
}

.settings-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.settings-add-input {
    flex: 1;
    max-width: 300px;
}

.settings-char-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

.settings-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.settings-actions .btn-primary {
    width: auto;
    padding: 10px 24px;
}

/* ============================================
   DIARY STYLES (Rich Text & Layout)
   ============================================ */

/* Botão de categoria na sidebar do Diário */
.diary-cat-btn {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.diary-cat-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.diary-cat-btn.active {
    background: var(--accent-blue-dim);
    color: var(--accent-blue);
    border-color: rgba(74, 158, 255, 0.2);
    font-weight: 600;
}

/* Tweak no QuillJS para Dark Mode */
.ql-toolbar.ql-snow {
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    padding: 12px;
}

.ql-toolbar.ql-snow .ql-stroke {
    stroke: var(--text-secondary);
}

.ql-toolbar.ql-snow .ql-fill, 
.ql-toolbar.ql-snow .ql-stroke.ql-fill {
    fill: var(--text-secondary);
}

.ql-toolbar.ql-snow .ql-picker {
    color: var(--text-secondary);
}

.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke,
.ql-toolbar.ql-snow button:focus .ql-stroke,
.ql-toolbar.ql-snow .ql-picker-label:focus .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke,
.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-stroke {
    stroke: var(--accent-blue);
}

.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow .ql-picker-label:hover .ql-fill,
.ql-toolbar.ql-snow button:focus .ql-fill,
.ql-toolbar.ql-snow .ql-picker-label:focus .ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-fill,
.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-fill {
    fill: var(--accent-blue);
}

.ql-toolbar.ql-snow .ql-picker-options {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-md);
}

.ql-container.ql-snow {
    border: none;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.ql-editor {
    padding: 24px;
    line-height: 1.6;
}

.ql-editor p {
    margin-bottom: 1em;
}

.ql-editor h1, .ql-editor h2 {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.ql-editor h1 { font-size: 1.8rem; }
.ql-editor h2 { font-size: 1.4rem; }

.ql-editor img {
    border-radius: var(--radius-md);
    max-width: 100%;
    margin: 1em 0;
    border: 1px solid var(--border-color);
}

/* ---- DIARY VIEWER (Read-Only) ---- */
#diaryViewerContent p {
    margin-bottom: 0.8em;
}

#diaryViewerContent h1, #diaryViewerContent h2 {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 1.2em;
    margin-bottom: 0.4em;
}

#diaryViewerContent h1 { font-size: 1.6rem; }
#diaryViewerContent h2 { font-size: 1.2rem; }

#diaryViewerContent img {
    border-radius: var(--radius-md);
    max-width: 100%;
    height: auto;
    margin: 0.8em 0;
    border: 1px solid var(--border-primary);
}

#diaryViewerContent ul,
#diaryViewerContent ol {
    padding-left: 1.5em;
    margin-bottom: 0.8em;
}

#diaryViewerContent a {
    color: var(--accent-blue);
    text-decoration: underline;
}

/* ---- DIARY CATEGORY BUTTONS ---- */
.diary-cat-btn {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 150ms ease;
}

.diary-cat-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-blue);
}

.diary-cat-btn.active {
    background: var(--accent-blue-dim);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    font-weight: 600;
}
