/* === DASHBOARD DARK THEME (Matches Landing Page) === */

/* Main layout background */
.dashboard-layout {
  background: var(--theme-bg-main);
  min-height: 100vh;
}

/* Sidebar styling */
.dashboard-layout .sidebar {
  background: var(--theme-bg-sidebar);
  border-right: 1px solid var(--theme-border-subtle);
  backdrop-filter: blur(10px);
}

.dashboard-layout .sidebar-header .brand-name {
  color: var(--theme-text-primary);
}

.dashboard-layout .nav-section-title {
  color: var(--theme-text-muted);
}

.dashboard-layout .nav-item {
  color: var(--theme-text-secondary);
}

.dashboard-layout .nav-item:hover {
  background: var(--theme-bg-input);
  color: var(--theme-text-primary);
}

.dashboard-layout .nav-item.active {
  background: var(--theme-bg-sidebar-active);
  color: var(--color-accent);
}

.dashboard-layout .nav-item.active i {
  color: var(--color-accent);
}

.dashboard-layout .sidebar-footer {
  border-top: 1px solid var(--theme-border-subtle);
}

.dashboard-layout .user-avatar {
  background: rgba(228, 168, 75, 0.15);
  color: var(--color-accent);
}

.dashboard-layout .user-name {
  color: var(--theme-text-primary);
}

.dashboard-layout .user-email {
  color: var(--theme-text-muted);
}

/* Header styling */
.dashboard-layout .dashboard-header {
  background: var(--theme-bg-header);
  border-bottom: 1px solid var(--theme-border-subtle);
  backdrop-filter: blur(10px);
}

.dashboard-layout .search-bar {
  background: var(--theme-bg-input);
  border: 1px solid var(--theme-border-medium);
}

.dashboard-layout .search-bar i {
  color: var(--theme-text-muted);
}

.dashboard-layout .search-bar input {
  color: var(--theme-text-primary);
}

.dashboard-layout .search-bar input::placeholder {
  color: var(--theme-text-muted);
}

.dashboard-layout .icon-btn {
  color: var(--theme-text-secondary);
}

.dashboard-layout .icon-btn:hover {
  background: var(--theme-border-medium);
  color: var(--theme-text-primary);
}

.dashboard-layout .notification-count {
  background: #ff6b7a;
  color: #130f1f;
}

.dashboard-layout .header-notifications-panel {
  background: var(--theme-bg-panel);
  border-color: var(--theme-border-medium);
  box-shadow: var(--shadow-md);
}

.dashboard-layout .header-notifications-title {
  color: var(--theme-text-muted);
}

.dashboard-layout .header-notifications-mark-all {
  color: var(--color-accent);
}

.dashboard-layout .header-notifications-empty {
  color: var(--theme-text-muted);
}

.dashboard-layout .header-notification-item {
  border-color: var(--theme-border-subtle);
  color: var(--theme-text-primary);
}

.dashboard-layout .header-notification-item--read {
  opacity: 0.5;
}

.dashboard-layout .header-notification-time {
  color: var(--theme-text-muted);
}

.dashboard-layout .header-notification-message {
  color: var(--theme-text-secondary);
}

.dashboard-layout .header-notification-mark-read {
  color: var(--theme-text-muted);
}

.dashboard-layout .header-notification-mark-read:hover {
  color: var(--theme-status-success);
  background: var(--theme-status-success-bg);
}

.dashboard-layout .header-notification-item--info {
  background: var(--theme-status-info-bg);
}

.dashboard-layout .header-notification-item--info .header-notification-label {
  color: var(--theme-status-info);
}

.dashboard-layout .header-notification-item--warning {
  background: var(--theme-status-warning-bg);
}

.dashboard-layout .header-notification-item--warning .header-notification-label {
  color: var(--theme-status-warning);
}

.dashboard-layout .header-notification-item--error {
  background: var(--theme-status-danger-bg);
}

.dashboard-layout .header-notification-item--error .header-notification-label {
  color: var(--theme-status-danger);
}

.dashboard-layout .header-notification-item--success {
  background: var(--theme-status-success-bg);
}

.dashboard-layout .header-notification-item--success .header-notification-label {
  color: var(--theme-status-success);
}

.dashboard-layout .header-notification-link {
  color: var(--theme-text-primary);
}

/* Content area */
.dashboard-layout .dashboard-content {
  color: var(--theme-text-primary);
}

.dashboard-layout h1,
.dashboard-layout h2,
.dashboard-layout h3,
.dashboard-layout h4 {
  color: var(--theme-text-primary);
}

/* Cards */
.dashboard-layout .card {
  background: var(--theme-bg-card);
  border: 1px solid var(--theme-border-subtle);
  color: var(--theme-text-primary);
}

.dashboard-layout .card-hover:hover {
  background: var(--theme-bg-card-hover);
  border-color: var(--theme-border-medium);
  box-shadow: var(--shadow-sm);
}

/* Stat cards */
.dashboard-layout .stat-card .stat-value {
  color: var(--theme-text-primary);
}

.dashboard-layout .stat-card .stat-label {
  color: var(--theme-text-secondary);
}

.dashboard-layout .stat-card .icon {
  color: var(--color-accent);
  opacity: 0.2;
}

.dashboard-layout .stat-card-accent {
  background: var(--theme-status-warning-bg);
  color: var(--theme-text-primary);
  border: 1px solid var(--theme-border-subtle);
}

.dashboard-layout .stat-card-accent .stat-value {
  color: var(--color-accent);
}

.dashboard-layout .stat-card-accent .stat-label {
  color: var(--theme-text-secondary);
}

.dashboard-layout .stat-card-accent .icon {
  color: var(--color-accent);
  opacity: 0.3;
}

.dashboard-layout .stat-card-danger {
  border-left: 4px solid var(--color-danger);
}

.dashboard-layout .stat-card-danger .stat-value {
  color: var(--color-danger);
}

.dashboard-layout .stat-card-danger .icon {
  color: var(--color-danger);
  opacity: 0.3;
}

.dashboard-layout .stat-card-warning {
  border-left: 4px solid var(--color-warning);
}

.dashboard-layout .stat-card-warning .stat-value {
  color: var(--color-warning);
}

.dashboard-layout .stat-card-warning .icon {
  color: var(--color-warning);
  opacity: 0.3;
}

/* Tables */
.dashboard-layout table th {
  color: var(--theme-text-muted);
  border-bottom: 1px solid var(--theme-border-medium);
}

.dashboard-layout table td {
  color: var(--theme-text-primary);
  border-bottom: 1px solid var(--theme-bg-input);
}

.dashboard-layout .table-processes th {
  background: var(--theme-bg-input);
  color: var(--theme-text-muted);
}

.dashboard-layout .table-processes tbody tr:hover {
  background: var(--theme-bg-input);
}

/* Forms */
.dashboard-layout .form-control {
  background: var(--theme-bg-input);
  border-color: var(--theme-border-strong);
  color: var(--theme-text-primary);
}

.dashboard-layout .form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-primary-focus-ring);
}

.dashboard-layout .form-control::placeholder {
  color: var(--theme-text-muted);
}

.dashboard-layout select.form-control {
  background-color: var(--theme-bg-input);
  color: var(--theme-text-primary);
}

.dashboard-layout select.form-control option,
.dashboard-layout select.form-control optgroup {
  background: var(--theme-bg-panel);
  color: var(--theme-text-primary);
}

.dashboard-layout select.form-control option[value=""] {
  color: var(--theme-text-muted);
}

/* Buttons */
.dashboard-layout .btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

:root[data-theme="light"] .dashboard-layout .btn-primary {
  color: #ffffff;
}

.dashboard-layout .btn-primary:hover {
  background: var(--color-accent-soft);
  box-shadow: var(--shadow-md);
}

.dashboard-layout .btn-secondary {
  background: var(--theme-bg-input);
  border-color: var(--theme-border-medium);
  color: var(--theme-text-primary);
}

.dashboard-layout .btn-secondary:hover {
  background: var(--theme-border-medium);
  border-color: var(--theme-border-strong);
}

/* Progress bars */
.dashboard-layout .progress-bar-small {
  background: var(--theme-border-medium);
}

.dashboard-layout .progress-fill {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-soft));
}

/* Client cards */
.dashboard-layout .client-card {
  background: var(--theme-bg-card);
  border: 1px solid var(--theme-border-subtle);
}

.dashboard-layout .client-card:hover {
  background: var(--theme-bg-card-hover);
  border-color: var(--theme-border-medium);
}

.dashboard-layout .client-card-header {
  background: var(--theme-bg-input);
  border-bottom: 1px solid var(--theme-border-subtle);
}

.dashboard-layout .client-card-header-link:hover .client-card-header {
  background: var(--theme-bg-sidebar-active);
}

.dashboard-layout .client-name {
  color: var(--theme-text-primary);
}

.dashboard-layout .client-count {
  color: var(--theme-text-muted);
}

.dashboard-layout .client-quick-actions {
  background: var(--theme-bg-input);
  border-bottom: 1px solid var(--theme-border-subtle);
}

.dashboard-layout .client-file-item:hover {
  background: var(--theme-bg-input);
}

.dashboard-layout .file-icon {
  background: var(--theme-bg-input);
  border-color: var(--theme-border-medium);
}

.dashboard-layout .file-name {
  color: var(--theme-text-primary);
}

.dashboard-layout .file-meta {
  color: var(--theme-text-muted);
}

.dashboard-layout .client-files-more {
  color: var(--theme-text-muted);
  border-top: 1px dashed var(--theme-border-strong);
}

/* Client selector */
.dashboard-layout .client-selector .form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(128,128,128,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.dashboard-layout .client-selector .form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-primary-focus-ring);
}

.dashboard-layout .client-selector .form-control.has-selection {
  background-color: var(--theme-bg-sidebar-active);
  border-color: var(--color-accent);
}

.dashboard-layout .client-selector .form-control.is-new-client {
  background-color: var(--theme-status-success-bg);
  border-color: var(--theme-status-success);
  color: var(--theme-status-success);
}

.dashboard-layout .client-selector.active .form-control {
  border-bottom-color: transparent;
}

.dashboard-layout .client-dropdown {
  background: var(--theme-bg-panel);
  border: 1px solid var(--theme-border-strong);
  box-shadow: var(--shadow-md);
}

.dashboard-layout .client-dropdown-label {
  color: var(--theme-text-muted);
}

.dashboard-layout .client-option {
  color: var(--theme-text-primary);
}

.dashboard-layout .client-option:hover {
  background: var(--theme-bg-input);
}

.dashboard-layout .client-option.selected {
  background: var(--theme-bg-sidebar-active);
  color: var(--color-accent);
}

.dashboard-layout .client-dropdown-divider {
  background: var(--theme-border-medium);
}

.dashboard-layout .client-create-option {
  background: var(--theme-bg-sidebar-active);
  color: var(--color-accent);
}

.dashboard-layout .client-create-option:hover {
  background: var(--theme-bg-input);
}

.dashboard-layout .client-empty {
  color: var(--theme-text-muted);
}

.dashboard-layout .reference-treatment-selector.is-empty .form-control {
  border-color: var(--theme-border-subtle);
  color: var(--theme-text-muted);
}

.dashboard-layout .reference-treatment-helper {
  color: var(--theme-text-muted);
}

.dashboard-layout .odoo-config-mode-note {
  background: var(--theme-bg-input);
  border-color: var(--theme-border-medium);
  color: var(--theme-text-secondary);
}

/* Transform type switch */
.dashboard-layout .transform-type-switch {
  background: var(--theme-bg-input);
  border-color: var(--theme-border-medium);
}

.dashboard-layout .process-center-advanced-filters {
  background: var(--theme-bg-input);
  border-color: var(--theme-border-medium);
}

.dashboard-layout .process-center-filters-toggle.is-active {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Modal */
.dashboard-layout .modal {
  background: var(--theme-bg-panel);
  border: 1px solid var(--theme-border-medium);
}

.dashboard-layout .modal-header {
  border-bottom: 1px solid var(--theme-border-medium);
}

.dashboard-layout .modal-footer {
  background: var(--theme-bg-input);
  border-top: 1px solid var(--theme-border-medium);
}

.dashboard-layout .modal-close {
  color: var(--theme-text-muted);
}

.dashboard-layout .modal-close:hover {
  background: var(--theme-border-medium);
}

.dashboard-layout .share-modal-section {
  border-color: var(--theme-border-medium);
}

.dashboard-layout .shared-user-row {
  background: var(--theme-bg-input);
  border-color: var(--theme-border-subtle);
}

.dashboard-layout .share-modal-section-title {
  color: var(--theme-text-muted);
}

/* Treatment modal */
.dashboard-layout .treatment-modal-body {
  background: var(--theme-bg-panel);
  border: 1px solid var(--theme-border-medium);
}

.dashboard-layout .treatment-modal-name {
  color: var(--theme-text-muted);
}

/* Team card */
.dashboard-layout .team-card {
  background: var(--theme-bg-card);
  border: 1px solid var(--theme-border-subtle);
}

/* Invite URL code */
.dashboard-layout .invite-url-code {
  background: var(--theme-bg-input);
  border-color: var(--theme-border-medium);
  color: var(--theme-text-primary);
}

/* View all wrapper */
.dashboard-layout .view-all-wrapper {
  border-top: 1px solid var(--theme-border-subtle);
}

/* Flash cards */
.dashboard-layout .card-flash--success {
  background: var(--theme-status-success-bg);
  border-color: var(--theme-status-success);
  color: var(--theme-status-success);
}

.dashboard-layout .card-flash--danger,
.dashboard-layout .card-flash--error {
  background: var(--theme-status-danger-bg);
  border-color: var(--theme-status-danger);
  color: var(--theme-status-danger);
}

.dashboard-layout .card-flash--warning {
  background: var(--theme-status-warning-bg);
  border-color: var(--theme-status-warning);
  color: var(--theme-status-warning);
}

.dashboard-layout .card-flash--info {
  background: var(--theme-status-info-bg);
  border-color: var(--theme-status-info);
  color: var(--theme-status-info);
}

/* Alert */
.dashboard-layout .alert-success {
  background: var(--theme-status-success-bg);
  border-color: var(--theme-status-success);
  color: var(--theme-status-success);
}

.dashboard-layout .alert-danger {
  background: var(--theme-status-danger-bg);
  border-color: var(--theme-status-danger);
  color: var(--theme-status-danger);
}

/* Card variants */
.dashboard-layout .card-error {
  border-left-color: var(--theme-status-danger);
}

.dashboard-layout .card-warning {
  border-left-color: var(--theme-status-warning);
}

.dashboard-layout .card-info {
  border-left-color: var(--theme-status-info);
}

.dashboard-layout .card-info--mise_en_avant {
  background: var(--theme-status-info-bg);
}

.dashboard-layout .card-accent-left {
  border-left-color: var(--color-accent);
}

/* Process log details */
.dashboard-layout .process-log-details summary {
  color: var(--color-accent);
}

/* Shared user chip */
.dashboard-layout .shared-user-chip {
  background: var(--theme-status-info-bg);
  color: var(--theme-status-info);
}

/* Progress pill */
.dashboard-layout .progress-pill {
  background: var(--theme-status-info-bg);
  color: var(--theme-status-info);
}

.dashboard-layout .progress-pill-fill {
  background: var(--theme-status-info);
}

/* Status dots */
.dashboard-layout .status-dot {
  box-shadow: 0 0 8px currentColor;
}

/* File path */
.dashboard-layout .file-path {
  color: var(--theme-text-muted);
}

/* Button icons */
.dashboard-layout .btn-icon {
  background: var(--theme-bg-input);
  border-color: var(--theme-border-medium);
  color: var(--theme-text-secondary);
}

.dashboard-layout .btn-icon:hover {
  background: var(--theme-border-strong);
  color: var(--theme-text-primary);
}

.dashboard-layout .btn-icon-primary {
  color: var(--color-accent);
  border-color: var(--theme-border-medium);
}

.dashboard-layout .btn-icon-primary:hover {
  background: var(--theme-bg-sidebar-active);
  color: var(--color-accent);
}

.dashboard-layout .btn-icon-danger {
  color: var(--theme-status-danger);
  border-color: var(--theme-border-medium);
}

.dashboard-layout .btn-icon-danger:hover {
  background: var(--theme-status-danger-bg);
  color: var(--theme-status-danger);
}

/* Text colors in dashboard */
.dashboard-layout .text-primary {
  color: var(--color-accent);
}

.dashboard-layout .text-muted {
  color: var(--theme-text-muted);
}

.dashboard-layout .text-danger {
  color: var(--theme-status-danger);
}

.dashboard-layout .text-success {
  color: var(--theme-status-success);
}

/* Badge overrides */
.dashboard-layout .badge-done {
  background: var(--theme-status-success-bg);
  color: var(--theme-status-success);
}

.dashboard-layout .badge-pending,
.dashboard-layout .badge-queued {
  background: var(--theme-status-warning-bg);
  color: var(--theme-status-warning);
}

.dashboard-layout .badge-processing {
  background: var(--theme-status-info-bg);
  color: var(--theme-status-info);
}

.dashboard-layout .badge-error {
  background: var(--theme-status-danger-bg);
  color: var(--theme-status-danger);
}

.dashboard-layout .badge-default,
.dashboard-layout .badge-secondary {
  background: var(--theme-border-medium);
  color: var(--theme-text-secondary);
}

/* Input group */
.dashboard-layout .input-icon {
  color: var(--theme-text-muted);
}

/* Trends */
.dashboard-layout .trend-up {
  color: var(--theme-status-success);
}

/* Section titles */
.dashboard-layout .section-title {
  color: var(--theme-text-primary);
}

/* Table compact */
.dashboard-layout .table-compact th {
  color: var(--theme-text-muted);
}

.dashboard-layout .table-compact td {
  color: var(--theme-text-primary);
}

/* Empty icon */
.dashboard-layout .empty-icon {
  color: var(--theme-text-muted);
  opacity: 0.3;
}

/* Card header component */
.dashboard-layout .card-header {
  border-bottom: 1px solid var(--theme-border-subtle);
}

/* Form labels */
.dashboard-layout .form-label {
  color: var(--theme-text-secondary);
}

/* Client avatar in lists */
.dashboard-layout .client-avatar {
  background: var(--color-accent);
  color: var(--color-primary);
}

/* Toast notifications */
.dashboard-layout .app-toast {
  background: var(--theme-bg-panel);
  border: 1px solid var(--theme-border-medium);
  color: var(--theme-text-primary);
}

.dashboard-layout .app-toast--success {
  background: var(--theme-status-success-bg);
  border-color: var(--theme-status-success);
  color: var(--theme-status-success);
}

.dashboard-layout .app-toast--error {
  background: var(--theme-status-danger-bg);
  border-color: var(--theme-status-danger);
  color: var(--theme-status-danger);
}

.dashboard-layout .app-toast--warning {
  background: var(--theme-status-warning-bg);
  border-color: var(--theme-status-warning);
  color: var(--theme-status-warning);
}

.dashboard-layout .app-toast--info {
  background: var(--theme-status-info-bg);
  border-color: var(--theme-status-info);
  color: var(--theme-status-info);
}

/* Nav item button (logout) */
.dashboard-layout .nav-item-button {
  color: var(--theme-text-secondary);
}

.dashboard-layout .nav-item-button:hover {
  background: var(--theme-status-danger-bg);
  color: var(--theme-status-danger);
}

/* Card link - remove default link styling */
.dashboard-layout .card-link {
  text-decoration: none;
}

.dashboard-layout .card-link:hover {
  text-decoration: none;
}

/* Stats cards wrapper */
.dashboard-layout .stats-section {
  
}

/* Process table header background */
.dashboard-layout .table-processes thead th {
  background: var(--theme-bg-input);
}

/* Focus states for accessibility */
.dashboard-layout .nav-item:focus-visible,
.dashboard-layout .btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Scrollbar styling for webkit browsers */
.dashboard-layout ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.dashboard-layout ::-webkit-scrollbar-track {
  background: var(--theme-bg-card);
}

.dashboard-layout ::-webkit-scrollbar-thumb {
  background: var(--theme-border-strong);
  border-radius: 4px;
}

.dashboard-layout ::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
  opacity: 0.5;
}

/* File input styling */
.dashboard-layout input[type="file"].form-control {
  padding: 0.5rem;
  font-size: 0.9rem;
}

.dashboard-layout input[type="file"].form-control::file-selector-button {
  background: var(--theme-border-strong);
  border: 1px solid var(--theme-border-medium);
  border-radius: var(--radius-sm);
  color: var(--theme-text-primary);
  padding: 0.4rem 0.75rem;
  margin-right: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dashboard-layout input[type="file"].form-control::file-selector-button:hover {
  background: var(--theme-bg-sidebar-active);
  border-color: var(--color-accent);
}

/* Form control small variant */
.dashboard-layout .form-control-sm {
  font-size: 0.875rem;
}

/* Transform card specific */
.dashboard-layout .transform-card-title {
  color: var(--theme-text-primary);
}

/* Icon colors in dashboard */
.dashboard-layout .icon-success {
  color: var(--theme-status-success);
}

.dashboard-layout .icon-primary {
  color: var(--theme-status-info);
}

.dashboard-layout .icon-danger {
  color: var(--theme-status-danger);
}

.dashboard-layout .text-accent {
  color: var(--color-accent);
}

.dashboard-layout .text-link-muted {
  color: var(--theme-status-info);
}





/* === ERROR PAGE DARK THEME === */

body.error-page {
  background: var(--theme-bg-main);
  color: var(--theme-text-primary);
}

body.error-page main.page-wrapper {
  background: var(--theme-bg-main);
  min-height: 100vh;
}

body.error-page .card {
  background: var(--theme-bg-card);
  border: 1px solid var(--theme-border-subtle);
  color: var(--theme-text-primary);
}

body.error-page h1 {
  color: var(--theme-text-primary);
}

body.error-page .text-muted {
  color: var(--theme-text-muted);
}

body.error-page .alert-danger {
  background: var(--theme-status-danger-bg);
  border: 1px solid var(--theme-status-danger);
  color: var(--theme-status-danger);
}

body.error-page .btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
}

:root[data-theme="light"] body.error-page .btn-primary {
  color: #ffffff;
}

body.error-page .btn-primary:hover {
  background: var(--color-accent-soft);
}

body.error-page .btn-secondary {
  background: var(--theme-bg-input);
  border: 1px solid var(--theme-border-medium);
  color: var(--theme-text-primary);
}

body.error-page .btn-secondary:hover {
  background: var(--theme-border-medium);
}

/* Error icon background */
body.error-page .card > div:first-child > div:first-child {
  background: var(--theme-status-danger-bg) !important;
}

/* Details box */
body.error-page div[style*="background: var(--color-bg-light)"] {
  background: var(--theme-bg-input) !important;
}

/* Error page content - add top padding since no navbar */
body.error-page main.page-wrapper {
  padding-top: 4rem;
}
