/* ============================================================
   SMC Zella Journal - Stylesheet
   ============================================================ */

/* CSS Variables */
:root {
  --color-bg-deep: #030610;
  --color-bg-dark: #060d1a;
  --color-panel: rgba(10, 18, 38, 0.75);
  --color-panel-border: rgba(255, 255, 255, 0.05);
  --color-cyan: #00d2ff;
  --color-cyan-glow: rgba(0, 210, 255, 0.15);
  --color-blue: #3b82f6;
  --color-purple: #a855f7;
  --color-green: #10b981;
  --color-green-glow: rgba(16, 185, 129, 0.15);
  --color-red: #ef4444;
  --color-red-glow: rgba(239, 68, 68, 0.15);
  --color-orange: #f59e0b;
  
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-dark: #64748b;
  
  --font-family: 'Outfit', sans-serif;
  --sidebar-width: 260px;
  --header-height: 80px;
  --transition: all 0.3s ease;
}

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.journal-body {
  font-family: var(--font-family);
  background-color: var(--color-bg-deep);
  color: var(--text);
  overflow-x: hidden;
  height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-cyan);
}

/* Layout Wrapper */
.journal-wrapper {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* SIDEBAR STYLING */
.journal-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-deep) 100%);
  border-right: 1px solid var(--color-panel-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--color-panel-border);
}

.brand-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-smc {
  color: var(--color-cyan);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  line-height: 1;
}

.brand-title {
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.sidebar-user {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--color-panel-border);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 210, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cyan);
  font-size: 1.2rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.user-status {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-green);
  animation: pulse 1.8s infinite;
}

.sidebar-nav {
  flex-grow: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: var(--transition);
}

.sidebar-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  transition: var(--transition);
}

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

.sidebar-link.active {
  color: var(--color-text);
  background: var(--color-cyan-glow);
  border-left: 3px solid var(--color-cyan);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.sidebar-link.active i {
  color: var(--color-cyan);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--color-panel-border);
}

.btn-back-site {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-muted);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.btn-back-site:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
}

/* MAIN CONTENT WRAPPER */
.journal-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* HEADER STYLING */
.journal-header {
  height: var(--header-height);
  padding: 0 40px;
  border-bottom: 1px solid var(--color-panel-border);
  background: rgba(6, 13, 26, 0.5);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.header-left h1 {
  font-size: 1.6rem;
  font-weight: 800;
}

.header-left p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-panel-border);
  padding: 8px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-date i {
  color: var(--color-cyan);
}

/* CONTENT CONTAINER */
.journal-content {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
  background-color: var(--color-bg-deep);
}

/* Hide all sections by default */
.journal-tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

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

/* BUTTONS */
.btn {
  font-family: var(--font-family);
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-primary-journal {
  background: linear-gradient(135deg, #00b4db 0%, #00d2ff 100%);
  color: #030610;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
  font-family: var(--font-family);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-primary-journal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.45);
}

.btn-secondary-journal {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  font-family: var(--font-family);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

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

.btn-danger-journal {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--color-red);
  font-family: var(--font-family);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-danger-journal:hover {
  background: var(--color-red);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-icon-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon-round:hover {
  background: var(--color-cyan-glow);
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-cyan);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-text:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.btn-full-width {
  width: 100%;
}

/* KPI GRID & CARD STYLING */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background: var(--color-panel);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
}

.kpi-card:nth-child(1)::before { background: var(--color-cyan); }
.kpi-card:nth-child(2)::before { background: var(--color-purple); }
.kpi-card:nth-child(3)::before { background: var(--color-green); }
.kpi-card:nth-child(4)::before { background: var(--color-orange); }

.kpi-card .kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.icon-cyan { background: var(--color-cyan-glow); color: var(--color-cyan); }
.icon-purple { background: rgba(168, 85, 247, 0.1); color: var(--color-purple); }
.icon-green { background: var(--color-green-glow); color: var(--color-green); }
.icon-orange { background: rgba(245, 158, 11, 0.1); color: var(--color-orange); }

.kpi-data {
  display: flex;
  flex-direction: column;
}

.kpi-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 4px;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--color-text-dark);
  margin-top: 8px;
}

.kpi-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-top: 15px;
  overflow: hidden;
}

.kpi-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-purple) 0%, var(--color-cyan) 100%);
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

/* PANELS & GRIDS */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 20px;
  margin-bottom: 30px;
}

.dashboard-panel {
  background: var(--color-panel);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

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

.panel-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.panel-tag {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-panel-border);
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--color-text-muted);
}

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

.chart-container.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* BOTTOM DASHBOARD ROW */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* TABLES STYLING */
.recent-trades-table-wrap {
  overflow-x: auto;
  position: relative;
}

.journal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.journal-table th {
  padding: 12px 16px;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-panel-border);
  font-weight: 700;
}

.journal-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.journal-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.outcome-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  text-transform: uppercase;
}

.outcome-win {
  background-color: var(--color-green-glow);
  color: var(--color-green);
}

.outcome-loss {
  background-color: var(--color-red-glow);
  color: var(--color-red);
}

.tag-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--color-cyan);
  margin-right: 5px;
  margin-bottom: 4px;
  display: inline-block;
}

.actions-row {
  display: flex;
  gap: 8px;
}

.btn-table-action {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-table-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
}

.btn-delete:hover {
  background: var(--color-red-glow);
  color: var(--color-red);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--color-text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* QUICK STATS LIST */
.stats-summary-list {
  list-style: none;
}

.stats-summary-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.stats-summary-list li:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 700;
}

.text-success { color: var(--color-green); }
.text-danger { color: var(--color-red); }

/* CALENDAR STYLING */
.calendar-controls-panel {
  background: var(--color-panel);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.calendar-header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.calendar-header-controls h2 {
  font-size: 1.4rem;
  font-weight: 800;
  min-width: 180px;
  text-align: center;
}

.calendar-stats-summary {
  display: flex;
  gap: 30px;
}

.cal-stat-item {
  display: flex;
  flex-direction: column;
}

.cal-stat-lbl {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.cal-stat-val {
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 2px;
}

.calendar-container {
  background: var(--color-panel);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
  margin-bottom: 30px;
}

.calendar-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  border-bottom: 1px solid var(--color-panel-border);
  padding-bottom: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.calendar-day {
  aspect-ratio: 1.15;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.calendar-day:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.calendar-day.empty-day {
  background: transparent !important;
  border: none !important;
  cursor: default;
}

.calendar-day.selected-day {
  background: var(--color-cyan-glow);
  border-color: var(--color-cyan);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.15) inset;
}

.day-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  align-self: flex-start;
}

.calendar-day.selected-day .day-number {
  color: var(--color-cyan);
}

.calendar-day.other-month {
  opacity: 0.3;
}

.day-pnl {
  font-size: 0.85rem;
  font-weight: 800;
  align-self: center;
}

.day-pnl-win {
  color: var(--color-green);
}

.day-pnl-loss {
  color: var(--color-red);
}

/* Day Details section */
.calendar-day-details-panel {
  background: var(--color-panel);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 24px;
}

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

.details-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.day-pnl-badge {
  font-size: 1rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 30px;
}

.day-pnl-badge.positive { background: var(--color-green-glow); color: var(--color-green); }
.day-pnl-badge.negative { background: var(--color-red-glow); color: var(--color-red); }
.day-pnl-badge.neutral { background: rgba(255, 255, 255, 0.05); color: var(--color-text); }

/* TRADES HISTORY SECTIONS */
.trades-toolbar {
  background: var(--color-panel);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.toolbar-search {
  flex-grow: 1;
  position: relative;
  min-width: 250px;
}

.toolbar-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.toolbar-search input {
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding-left: 45px;
  padding-right: 16px;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 0.9rem;
  transition: var(--transition);
}

.toolbar-search input:focus {
  outline: none;
  border-color: var(--color-cyan);
  background: rgba(255, 255, 255, 0.05);
}

.toolbar-selects {
  display: flex;
  gap: 10px;
}

.toolbar-selects select {
  height: 42px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.toolbar-selects select:focus {
  border-color: var(--color-cyan);
}

.panel-full-table {
  min-height: 400px;
}

.table-container {
  overflow-x: auto;
}

/* ANALYTICS SECTION GRID */
.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 25px;
}

/* SYNC / ACCOUNT CONNECTION PANEL */
.sync-panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

.panel-sync-card {
  align-items: center;
  text-align: center;
  padding: 40px 30px;
}

.sync-card-logo {
  margin-bottom: 24px;
}

.sync-card-logo h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: 15px;
}

.sync-card-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.tradovate-sync-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.sync-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-disconnected {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-muted);
}

.badge-connected {
  background: var(--color-green-glow);
  color: var(--color-green);
}

.sync-status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.badge-disconnected .status-dot { background-color: var(--color-text-muted); }
.badge-connected .status-dot { 
  background-color: var(--color-green); 
  box-shadow: 0 0 8px var(--color-green); 
  animation: pulse 1.8s infinite;
}

.sync-info-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 10px 15px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.sync-info-lbl { color: var(--color-text-muted); }
.sync-info-val { font-weight: 700; color: var(--color-cyan); }

/* CSV Upload zone */
.csv-upload-zone {
  width: 100%;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 30px 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.csv-upload-zone:hover {
  border-color: var(--color-green);
  background: rgba(16, 185, 129, 0.02);
}

.csv-upload-zone i {
  font-size: 2.5rem;
  color: var(--color-green);
}

.csv-upload-zone p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.csv-upload-zone span {
  color: var(--color-green);
  font-weight: 600;
  text-decoration: underline;
}

.csv-format-help {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  width: 100%;
}

.csv-format-help h4 {
  font-size: 0.8rem;
  color: var(--color-text);
  margin-bottom: 5px;
}

.csv-format-help p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.csv-format-help code {
  color: var(--color-green);
  background: rgba(16, 185, 129, 0.08);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
}

/* Local Data Management */
.data-mgmt-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-icon-text {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 18px;
}

.btn-import-wrapper {
  width: 100%;
  position: relative;
}

.sync-separator {
  border: none;
  height: 1px;
  background: var(--color-panel-border);
  margin: 10px 0;
}

/* MODALS */
.journal-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 6, 16, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.journal-modal.modal-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #060d1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.journal-modal.modal-open .modal-content {
  transform: translateY(0);
}

.modal-content.modal-medium {
  max-width: 480px;
}

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

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}

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

.modal-form {
  padding: 24px;
}

.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

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

.modal-form input,
.modal-form select,
.modal-form textarea {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  border-color: var(--color-cyan);
  background: rgba(255, 255, 255, 0.05);
}

.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* WIZARD STEPS FOR SYNC */
.wizard-steps-container {
  padding: 24px;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

.wizard-intro-txt {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.wizard-footer-buttons {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Wizard step 2: Loading anim */
.sync-loading-content {
  text-align: center;
  padding: 20px 0;
}

.spinner-glow {
  font-size: 3rem;
  color: var(--color-cyan);
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
}

.sync-loading-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 25px;
}

.sync-checklist {
  list-style: none;
  text-align: left;
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sync-checklist li {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chk-pending { color: var(--color-text-dark); }
.chk-active { color: var(--color-cyan); font-weight: 600; }
.chk-done { color: var(--color-green); }

.chk-done i {
  color: var(--color-green);
}

/* Wizard step 3: Account preview */
.account-preview-details {
  margin-top: 15px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-panel-border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.preview-item .lbl { color: var(--color-text-muted); }
.preview-item .val { font-weight: 700; }

/* Wizard step 4: Success */
.sync-success-content {
  text-align: center;
  padding: 20px 10px;
}

.success-icon-glow {
  font-size: 4rem;
  color: var(--color-green);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.3));
}

.sync-success-content h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.sync-success-content p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.success-sub-txt {
  font-size: 0.75rem !important;
  color: var(--color-text-dark) !important;
  margin-bottom: 25px !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 12px var(--color-green); }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .journal-wrapper {
    flex-direction: column;
  }
  
  .journal-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-panel-border);
  }
  
  .sidebar-user {
    display: none; /* Ocultar para compactar header móvil */
  }
  
  .sidebar-nav {
    padding: 10px 20px;
  }
  
  .sidebar-nav ul {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px;
  }
  
  .sidebar-nav li {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  
  .sidebar-link.active {
    border-left: none;
    border-bottom: 3px solid var(--color-cyan);
    border-radius: 8px;
  }

  .sidebar-footer {
    display: none;
  }

  .journal-header {
    padding: 20px;
  }

  .journal-content {
    padding: 20px;
  }

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

  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .analytics-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .calendar-week-header {
    font-size: 0.75rem;
  }
  
  .calendar-day {
    aspect-ratio: 1;
    padding: 4px;
  }
  
  .day-number {
    font-size: 0.75rem;
  }
  
  .day-pnl {
    font-size: 0.7rem;
  }

  .trades-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-selects {
    flex-direction: column;
  }
}

/* ============================================================
   MULTI-ACCOUNT SYSTEM STYLES
   ============================================================ */

/* Global Account Selector in Header */
.header-account-selector-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-panel-border);
  padding: 8px 16px;
  border-radius: 30px;
  transition: var(--transition);
}

.header-account-selector-wrap:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 210, 255, 0.3);
}

.header-account-selector-wrap select {
  background: transparent;
  border: none;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  padding-right: 5px;
}

.header-account-selector-wrap select option {
  background: var(--color-bg-dark);
  color: var(--color-text);
}

/* Accounts List Manager in Sync Tab */
.accounts-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.account-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.account-item-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.account-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.account-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.account-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.account-card-type {
  font-size: 0.75rem;
  color: var(--color-text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.account-card-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.account-card-balance {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-text);
}

.btn-account-delete {
  background: transparent;
  border: none;
  color: var(--color-text-dark);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-account-delete:hover {
  color: var(--color-red);
  background: var(--color-red-glow);
}

.empty-accounts-state {
  text-align: center;
  color: var(--color-text-dark);
  padding: 20px;
  font-size: 0.85rem;
  border: 1px dashed var(--color-panel-border);
  border-radius: 8px;
}

/* ============================================================
   AUTH & LOGIN CARD STYLES
   ============================================================ */
.admin-login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--color-bg-deep);
  font-family: var(--font-family);
  color: var(--color-text);
}

.admin-login-card {
  background: var(--color-panel);
  border: 1px solid var(--color-panel-border);
  padding: 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(10px);
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.admin-login-logo img {
  width: 70px;
  margin-bottom: 20px;
}

.admin-login-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--color-text);
}

.admin-login-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 30px;
  line-height: 1.4;
}

