/* FXBook Desktop Styles */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to bottom, #f8fafc 0%, white 100%);
  overflow: hidden;
  height: 100vh;
  color: #1e293b;
}

/* Desktop Container */
#desktop {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Menu Bar */
#menubar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  color: white;
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(226, 232, 240, 0.2);
  z-index: 1000;
}

.menu-left, .menu-center, .menu-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-item {
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  font-size: 14px;
}

.menu-item:hover {
  background: rgba(255,255,255,0.1);
}

.app-title {
  font-weight: 600;
  font-size: 16px;
}

.menu-icon {
  font-size: 18px;
  margin-right: 5px;
}

/* Start Menu */
.start-menu {
  position: absolute;
  left: 15px;
  top: 45px;
  width: 300px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 1001;
  overflow: hidden;
}

.start-menu.hidden {
  display: none;
}

.start-header {
  background: #3498db;
  color: white;
  padding: 15px;
}

.start-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.start-menu-section {
  padding: 10px 0;
}

.start-menu-item {
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
}

.start-menu-item:hover {
  background: #f0f0f0;
}

.start-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.start-footer {
  border-top: 1px solid #ddd;
  padding: 5px 0;
}

/* User Menu */
.user-menu {
  position: absolute;
  right: 15px;
  top: 45px;
  width: 180px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 1001;
  overflow: hidden;
}

.user-menu.hidden {
  display: none;
}

.user-menu-item {
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.user-menu-item:hover {
  background: #f0f0f0;
}

/* Windows Container */
#windows-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Window Styles */
.window {
  position: absolute;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  min-width: 400px;
  min-height: 300px;
  z-index: 100;
}

.window.active {
  z-index: 200;
  box-shadow: 0 15px 50px rgba(0,0,0,0.4);
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100vh - 80px) !important;
  border-radius: 0;
}

.window.minimized {
  display: none;
}

.window-header {
  background: #538d83;
  color: white;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.window-title {
  font-weight: 600;
  font-size: 14px;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-control {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 18px;
}

.window-control:hover {
  background: rgba(255,255,255,0.2);
}

.window-control.close:hover {
  background: #e74c3c;
}

.window-content {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.window-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
}

/* Taskbar */
#taskbar {
  background: #34495e;
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
}

#taskbar-items {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
}

.taskbar-item {
  background: rgba(255,255,255,0.1);
  color: white;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  font-size: 13px;
}

.taskbar-item:hover {
  background: rgba(255,255,255,0.2);
}

.taskbar-item.active {
  background: #3498db;
}

.taskbar-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.taskbar-status {
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #95a5a6;
}

.status-dot.connected {
  background: #2ecc71;
}

.status-dot.disconnected {
  background: #e74c3c;
}

/* Forms and Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  background: white;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #538d83;
  box-shadow: 0 0 0 3px rgba(83, 141, 131, 0.1);
}

.form-input.error {
  border-color: #e74c3c;
}

.form-error {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
}

/* Buttons */
.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: #538d83;
  color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-primary:hover {
  background: #47786f;
}

.btn-success {
  background: #2ecc71;
  color: white;
}

.btn-success:hover {
  background: #27ae60;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-secondary {
  background: white;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.data-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table tr:hover {
  background: #f8fafc;
}

.data-table td {
  font-size: 14px;
  color: #1e293b;
}

/* Cards */
.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.card-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #1e293b;
}

/* Readout Component */
.readout {
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.readout .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 4px;
}

.readout .value {
  font-size: 24px;
  font-weight: 600;
  color: #1e293b;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}

.stat-label {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

/* Notifications */
#notifications {
  position: fixed;
  top: 50px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

.notification {
  background: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  border-left: 4px solid #3498db;
  animation: slideIn 0.3s ease;
}

.notification.success {
  border-left-color: #2ecc71;
}

.notification.error {
  border-left-color: #e74c3c;
}

.notification.warning {
  border-left-color: #f39c12;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading Spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.gap-10 {
  gap: 10px;
}

.gap-20 {
  gap: 20px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

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

.text-right {
  text-align: right;
}

.fw-bold {
  font-weight: 700;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Login Screen */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-image: linear-gradient(rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.65)),
    url('../img/loginPageBackground.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 20px;
}

.login-box {
  background: white;
  padding: 48px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  border: 1px solid #e2e8f0;
  width: 100%;
  max-width: 440px;
}

.login-box h2 {
  margin-bottom: 32px;
  text-align: center;
  color: #1e293b;
  font-size: 28px;
  font-weight: 700;
}

.login-box .form-group {
  margin-bottom: 20px;
}

.login-box .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.login-box .form-group input,
.login-box .form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  transition: all 0.2s;
  background: white;
}

.login-box .form-group input:focus,
.login-box .form-group select:focus {
  outline: none;
  border-color: #538d83;
  box-shadow: 0 0 0 3px rgba(83, 141, 131, 0.1);
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: #538d83;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(83, 141, 131, 0.2);
}

.login-btn:hover {
  background: #47786f;
  box-shadow: 0 4px 12px rgba(83, 141, 131, 0.3);
}

/* SSO Login Button */
.sso-login-btn {
  width: 100%;
  padding: 14px;
  background: white;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sso-login-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Style Guide Components */

/* Chip/Badge Component */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}

.chip.success {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.chip.info {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.chip.warning {
  background: #fefce8;
  color: #a16207;
  border-color: #fef08a;
}

.chip.error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* Alert Component */
.alert {
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.alert-icon {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.alert.success {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.alert.success .alert-icon {
  background: #22c55e;
}

.alert.info {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.alert.info .alert-icon {
  background: #0ea5e9;
}

.alert.warning {
  background: #fefce8;
  color: #854d0e;
  border-color: #fef08a;
}

.alert.warning .alert-icon {
  background: #eab308;
}

.alert.error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.alert.error .alert-icon {
  background: #ef4444;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: #f1f5f9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #94a3b8;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
}

.modal-dialog {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90vh;
  overflow: auto;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #64748b;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
  line-height: 1;
}

.close-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* Theme Options */
.theme-option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.theme-option.active {
  border-color: #538d83;
  background: rgba(83, 141, 131, 0.05);
}

.theme-preview {
  width: 60px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.theme-info {
  flex: 1;
}

.theme-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.theme-description {
  font-size: 13px;
  color: #64748b;
}

/* Profile Info Row */
.profile-info-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.profile-info-row:last-child {
  border-bottom: none;
}

.profile-info-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  min-width: 140px;
}

.profile-info-value {
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
}

/* Theme Classes */
body.theme-light {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
}

body.theme-dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --border-color: #334155;
}

body.theme-dark .modal-dialog,
body.theme-dark .card,
body.theme-dark .window {
  background: #1e293b;
  color: #f1f5f9;
}

body.theme-dark .modal-header,
body.theme-dark .modal-footer {
  border-color: #334155;
}

body.theme-dark .profile-info-row {
  border-color: #334155;
}

body.theme-dark .profile-info-label {
  color: #cbd5e1;
}

body.theme-dark .profile-info-value {
  color: #f1f5f9;
}

body.theme-dark .theme-option {
  border-color: #334155;
  background: #0f172a;
}

body.theme-dark .theme-option:hover {
  border-color: #475569;
  background: #1e293b;
}

body.theme-blue {
  --bg-primary: #1e3a8a;
  --bg-secondary: #1e40af;
  --text-primary: #f1f5f9;
  --text-secondary: #bfdbfe;
  --border-color: #3b82f6;
}

body.theme-blue .modal-dialog,
body.theme-blue .card,
body.theme-blue .window {
  background: #1e40af;
  color: #f1f5f9;
}

body.theme-blue .modal-header,
body.theme-blue .modal-footer {
  border-color: #3b82f6;
}

body.theme-blue .profile-info-row {
  border-color: #3b82f6;
}

body.theme-blue .profile-info-label {
  color: #bfdbfe;
}

body.theme-blue .profile-info-value {
  color: #f1f5f9;
}

body.theme-blue .theme-option {
  border-color: #3b82f6;
  background: #1e3a8a;
}

body.theme-blue .theme-option:hover {
  border-color: #60a5fa;
  background: #1e40af;
}

/* File Upload Styles */
.file-upload-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.file-upload-header {
  margin-bottom: 30px;
}

.file-upload-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.file-upload-header .subtitle {
  color: #64748b;
  font-size: 14px;
}

.upload-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  margin-bottom: 30px;
}

.upload-area {
  border: 2px dashed #667eea;
  border-radius: 12px;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f8f9ff;
  margin: 20px 0;
}

.upload-area:hover {
  border-color: #764ba2;
  background-color: #f0f2ff;
  transform: scale(1.01);
}

.upload-area.dragover {
  border-color: #764ba2;
  background-color: #e8eaff;
  transform: scale(1.02);
}

/* Global Loading Overlay */
.global-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-in-out;
}

.loading-content {
  background: white;
  border-radius: 16px;
  padding: 40px 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  min-width: 350px;
  animation: scaleIn 0.3s ease-out;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-text {
  font-size: 18px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 8px;
}

.loading-subtext {
  font-size: 14px;
  color: #64748b;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.upload-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.upload-text {
  color: #667eea;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 8px;
}

.upload-hint {
  color: #94a3b8;
  font-size: 13px;
}

.file-info {
  background: #f0f9ff;
  border-radius: 8px;
  padding: 15px 20px;
  border-left: 4px solid #667eea;
  margin: 20px 0;
}

.file-info.hidden {
  display: none;
}

.file-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 5px;
}

.file-size {
  color: #64748b;
  font-size: 13px;
}

.upload-progress {
  margin: 20px 0;
}

.upload-progress.hidden {
  display: none;
}

.progress-bar {
  background: #e2e8f0;
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 100%;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.history-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
}

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

.history-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.history-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.history-filters .form-select {
  flex: 1;
  max-width: 250px;
}

.history-table-container {
  overflow-x: auto;
  margin-bottom: 20px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.form-hint {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination button {
  padding: 8px 15px;
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination button:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Dark theme adjustments for file upload */
body.theme-dark .upload-section,
body.theme-dark .history-section {
  background: #1e293b;
  border-color: #334155;
}

body.theme-dark .upload-area {
  background-color: #0f172a;
  border-color: #667eea;
}

body.theme-dark .upload-area:hover {
  background-color: #1e293b;
}

body.theme-dark .file-info {
  background: #0f172a;
  border-color: #667eea;
}

body.theme-dark .file-upload-header h2 {
  color: #f1f5f9;
}

body.theme-dark .history-header h3 {
  color: #f1f5f9;
}

/* Blue theme adjustments for file upload */
body.theme-blue .upload-section,
body.theme-blue .history-section {
  background: #1e40af;
  border-color: #3b82f6;
}

body.theme-blue .upload-area {
  background-color: #1e3a8a;
  border-color: #60a5fa;
}

body.theme-blue .upload-area:hover {
  background-color: #1e40af;
}

body.theme-blue .file-info {
  background: #1e3a8a;
  border-color: #60a5fa;
}

body.theme-blue .file-upload-header h2,
body.theme-blue .history-header h3 {
  color: #f1f5f9;
}

/* ================================================
   Broker Reconciliation Styles
   ================================================ */

/* Summary Cards */
.broker-recon-container .summary-card {
  transition: transform 0.15s, box-shadow 0.15s;
}

.broker-recon-container .summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Quality Bar */
.quality-bar-container {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.quality-segment {
  min-width: 2px;
}

/* Match Quality Badges */
.match-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.match-badge-exact {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #22c55e;
}

.match-badge-strong {
  background: #ecfccb;
  color: #3f6212;
  border: 1px solid #84cc16;
}

.match-badge-probable {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #eab308;
}

.match-badge-possible {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #f97316;
}

.match-badge-weak {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.match-badge-unmatched {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #9ca3af;
}

/* Transaction Type Badges */
.txn-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

.txn-badge-spot {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.txn-badge-forward {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.txn-badge-swap {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

/* Trade Grid Hover */
.broker-recon-container .data-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s;
}

.broker-recon-container .data-table tbody tr:hover {
  background-color: #f8fafc;
}

/* Detail Modal */
.broker-recon-container .modal {
  max-width: 700px;
}

.broker-recon-container .modal-body .card {
  margin-bottom: 12px;
}

/* Dark Theme Support */
body.theme-dark .broker-recon-container .summary-card {
  background: #1e293b;
  border-color: #334155;
}

body.theme-dark .broker-recon-container .data-table tbody tr:hover {
  background-color: #334155;
}

body.theme-dark .match-badge-unmatched {
  background: #374151;
  color: #d1d5db;
  border-color: #6b7280;
}
