/* ==========================================================================
   NTEK Dashboard — Styles
   ==========================================================================
   BEM Convention: block__element--modifier
   Variables inherited from main styles.css where applicable
   ========================================================================== */

/* ---------- CSS Variables (Dashboard-specific) ---------- */
:root {
  --dash-bg: #ffffff;
  --dash-surface: #ffffff;
  --dash-surface-2: #f8f9fa;
  --dash-surface-3: #f1f3f5;
  --dash-border: #e0e0e0;
  --dash-border-light: #f0f0f0;
  --dash-text: #1a1a1a;
  --dash-text-secondary: #666666;
  --dash-text-muted: #999999;
  --dash-primary: #2E7D32;
  --dash-primary-dark: #1B5E20;
  --dash-primary-light: #388E3C;
  --dash-primary-glow: rgba(46, 125, 50, 0.15);
  --dash-success: #66bb6a;
  --dash-warning: #E65100;
  --dash-danger: #ef4444;
  --dash-info: #3b82f6;
  --dash-sidebar-width: 260px;
  --dash-sidebar-collapsed: 72px;
  --dash-topbar-height: 64px;
  --dash-radius: 10px;
  --dash-radius-sm: 6px;
  --dash-radius-lg: 14px;
  --dash-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --dash-shadow: 0 1px 3px rgba(0,0,0,0.08);
  --dash-shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --dash-shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dash-bg);
  color: var(--dash-text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; }

.dashboard-container {
  width: 100%;
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--dash-sidebar-width);
  height: calc(var(--app-vh, 1vh) * 100);
  background: var(--dash-surface);
  border-right: 1px solid var(--dash-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--dash-transition), transform var(--dash-transition);
  overflow: hidden;
}

.sidebar.collapsed {
  width: var(--dash-sidebar-collapsed);
}

.sidebar.collapsed .sidebar__section-label,
.sidebar.collapsed .sidebar__link span,
.sidebar.collapsed .sidebar__badge,
.sidebar.collapsed .sidebar__user-info,
.sidebar.collapsed .sidebar__user-menu {
  opacity: 0;
  visibility: hidden;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .sidebar__logo-img {
  width: 32px;
}

.sidebar.collapsed .sidebar__collapse i {
  transform: rotate(180deg);
}

/* Sidebar Header */
.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--dash-border);
  min-height: 64px;
}

.sidebar__logo {
  display: flex;
  align-items: center;
}

.sidebar__logo-img {
  height: 28px;
  width: auto;
  transition: var(--dash-transition);
}

.sidebar__collapse {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text-secondary);
  transition: var(--dash-transition);
}

.sidebar__collapse:hover {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}

.sidebar__collapse i {
  width: 18px;
  height: 18px;
  transition: transform var(--dash-transition);
}

/* Sidebar Nav */
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.sidebar__nav::-webkit-scrollbar { width: 4px; }
.sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.sidebar__nav::-webkit-scrollbar-thumb { background: var(--dash-border); border-radius: 4px; }

.sidebar__section {
  margin-bottom: 8px;
  padding: 0 12px;
}

.sidebar__section-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dash-text-muted);
  padding: 8px 12px 4px;
  white-space: nowrap;
  transition: opacity var(--dash-transition);
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--dash-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dash-text-secondary);
  white-space: nowrap;
  transition: var(--dash-transition);
  position: relative;
}

.sidebar__link i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar__warning-icon {
  width: 16px;
  height: 16px;
  color: var(--dash-warning);
  margin-left: auto;
  opacity: 0.85;
}

.sidebar__link:hover .sidebar__warning-icon {
  opacity: 1;
}

.sidebar__link:hover {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}

.sidebar__link.active {
  background: var(--dash-primary-glow);
  color: var(--dash-primary-light);
}

.sidebar__link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--dash-primary);
  border-radius: 0 3px 3px 0;
}

.sidebar__badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--dash-primary);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  transition: opacity var(--dash-transition);
}

.sidebar__badge--warning {
  background: var(--dash-warning);
}

.sidebar__badge--accent {
  background: var(--dash-info);
}

/* Sidebar Footer */
/* Sidebar collapsible group */
.sidebar__group {
  margin-bottom: 2px;
}

.sidebar__group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--dash-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dash-text-secondary);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: var(--dash-transition);
  background: transparent;
  white-space: nowrap;
}

.sidebar__group-header:hover {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}

.sidebar__group-header > i:first-child {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar__group-chevron {
  width: 14px !important;
  height: 14px !important;
  margin-left: auto;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar__group--collapsed .sidebar__group-chevron {
  transform: rotate(-90deg);
}

.sidebar__group-links {
  overflow: hidden;
  transition: all 0.2s ease;
}

.sidebar__group--collapsed .sidebar__group-links {
  display: none;
}

.sidebar__link--sub {
  padding-left: 38px;
  font-size: 0.84rem;
}

/* Auto-highlight group header when a child is active */
.sidebar__group:has(.sidebar__link.active) .sidebar__group-header {
  color: var(--dash-primary-light);
}

.sidebar.collapsed .sidebar__group-header span,
.sidebar.collapsed .sidebar__group-chevron {
  display: none;
}

.sidebar__footer {
  border-top: 1px solid var(--dash-border);
  padding: 12px;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--dash-radius-sm);
  cursor: pointer;
  transition: var(--dash-transition);
}

.sidebar__user:hover {
  background: var(--dash-surface-2);
}

.sidebar__user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dash-primary-glow);
  border: 2px solid var(--dash-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar__user-avatar i {
  width: 18px;
  height: 18px;
  color: var(--dash-primary-light);
}

.sidebar__user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar__user-info {
  flex: 1;
  min-width: 0;
  transition: opacity var(--dash-transition);
}

.sidebar__user-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-role {
  display: block;
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  white-space: nowrap;
}

.sidebar__user-menu {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dash-text-muted);
}

.sidebar__user-menu i {
  width: 14px;
  height: 14px;
}

/* User dropdown */
.sidebar__user-dropdown {
  position: absolute;
  right: 16px;
  bottom: 64px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  box-shadow: var(--dash-shadow-md);
  border-radius: 8px;
  min-width: 180px;
  z-index: 210;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar__user-dropdown a {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--dash-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.sidebar__user-dropdown a:last-child { border-bottom: none; }
.sidebar__user-dropdown a:hover {
  background: var(--dash-surface-2);
}
.sidebar__user-dropdown.show { display: flex; }

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.dash-main {
  flex: 1;
  margin-left: var(--dash-sidebar-width);
  min-height: 100vh;
  transition: margin-left var(--dash-transition);
}

/* ---------- Modal subtasks list styling ---------- */
.modal-subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-subtask {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: 8px;
}
.modal-subtask__left input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.modal-subtask__body {
  min-width: 0;
}
.modal-subtask__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dash-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-subtask__meta {
  font-size: 0.8rem;
  color: var(--dash-text-secondary);
  margin-top: 4px;
}

/* ---------- Modal entity search picker ---------- */
.entity-picker {
  position: relative;
}

.entity-picker__control {
  position: relative;
}

.entity-picker__input {
  padding-right: 40px;
}

.entity-picker__clear {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dash-text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.entity-picker__clear:hover {
  color: var(--dash-text);
  background: var(--dash-surface-2);
}

.entity-picker__results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 15;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-surface);
  box-shadow: var(--dash-shadow-lg);
}

.entity-picker__result {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--dash-border);
  background: transparent;
  color: var(--dash-text);
  text-align: left;
  cursor: pointer;
}

.entity-picker__result:last-child {
  border-bottom: 0;
}

.entity-picker__result:hover {
  background: var(--dash-surface-2);
}

.entity-picker__result strong {
  font-size: 0.92rem;
}

.entity-picker__result span {
  font-size: 0.78rem;
  color: var(--dash-text-secondary);
}

.entity-picker__empty {
  padding: 10px 12px;
  color: var(--dash-text-secondary);
  font-size: 0.85rem;
}

.entity-picker__helper {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--dash-text-secondary);
}


.sidebar.collapsed ~ .dash-main {
  margin-left: var(--dash-sidebar-collapsed);
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  height: var(--dash-topbar-height);
  background: var(--dash-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dash-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 90;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text-secondary);
}

.topbar__menu-btn:hover {
  background: var(--dash-surface-2);
}

.topbar__menu-btn i {
  width: 20px;
  height: 20px;
}

.topbar__breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--dash-text-muted);
}

.topbar__breadcrumb-item.active {
  color: var(--dash-text);
  font-weight: 500;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__search {
  position: relative;
}

.topbar__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--dash-text-muted);
}

.topbar__search-input {
  width: 220px;
  padding: 8px 12px 8px 34px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text);
  font-size: 0.8rem;
  outline: none;
  transition: var(--dash-transition);
}

.topbar__search-input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-glow);
}

.topbar__search-input::placeholder {
  color: var(--dash-text-muted);
}

.topbar__icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text-secondary);
  transition: var(--dash-transition);
}

.topbar__icon-btn:hover {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}

.topbar__icon-btn i {
  width: 18px;
  height: 18px;
}

.topbar__icon-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--dash-danger);
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* ==========================================================================
   NOTIFICATIONS DROPDOWN
   ========================================================================== */
.notifications-dropdown {
  position: fixed;
  top: var(--dash-topbar-height);
  right: 24px;
  width: 380px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  box-shadow: var(--dash-shadow-lg);
  z-index: 200;
  display: none;
  animation: slideDown 0.2s ease;
}

.notifications-dropdown.show {
  display: block;
}

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

.notifications-dropdown__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--dash-border);
}

.notifications-dropdown__header h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.notifications-dropdown__mark-all {
  font-size: 0.75rem;
  color: var(--dash-primary-light);
  font-weight: 500;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--dash-border);
  transition: var(--dash-transition);
}

.notification-item--urgent {
  border-left: 3px solid var(--dash-danger);
}

.notification-item:hover {
  background: var(--dash-surface-2);
}

.notification-item--unread {
  background: rgba(46, 125, 50, 0.05);
}

.notification-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-item__icon--success { background: rgba(102, 187, 106, 0.15); color: var(--dash-success); }
.notification-item__icon--warning { background: rgba(230, 81, 0, 0.15); color: var(--dash-warning); }
.notification-item__icon--info { background: rgba(59, 130, 246, 0.15); color: var(--dash-info); }
.notification-item__icon--danger { background: rgba(239, 68, 68, 0.15); color: var(--dash-danger); }

.notification-item__content {
  flex: 1;
  min-width: 0;
}

.notification-item__text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--dash-text-secondary);
}

.notification-item__text strong {
  color: var(--dash-text);
}

.notification-item__badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 600;
  background: var(--dash-surface-3);
  color: var(--dash-text-secondary);
  vertical-align: middle;
}

.notification-item__detail {
  margin-top: 2px;
  font-size: 0.73rem;
  line-height: 1.35;
  color: var(--dash-text-secondary);
}

.notification-item__time {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   PAGES
   ========================================================================== */
.dash-page {
  display: none;
  padding: 24px;
  width: 100%;
}

.dash-page.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dash-page__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-page__title {
  font-size: 1.5rem;
  font-weight: 700;
}

.dash-page__subtitle {
  font-size: 0.875rem;
  color: var(--dash-text-secondary);
  margin-top: 4px;
}

.dash-page__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-page__actions--tight {
  gap: 6px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-dash {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--dash-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--dash-transition);
}

.btn-dash i {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-dash--primary {
  background: var(--dash-primary);
  color: #fff;
}

.btn-dash--primary:hover {
  background: var(--dash-primary-light);
  box-shadow: 0 0 20px var(--dash-primary-glow);
}

.btn-dash--secondary {
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  color: var(--dash-text-secondary);
}

.btn-dash--secondary:hover {
  background: var(--dash-surface-3);
  color: var(--dash-text);
  border-color: var(--dash-border-light);
}

.btn-dash--danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--dash-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-dash--danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.btn-dash--sm {
  padding: 6px 10px;
  font-size: 0.75rem;
}

.btn-dash--sm i {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   KPI CARDS
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

#page-mercado .kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.kpi-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.kpi-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--dash-transition);
  min-width: 0;
}

#page-mercado .kpi-card {
  min-width: 0;
}

.kpi-card__content {
  flex: 1;
  min-width: 0;
}

.kpi-card__label,
.kpi-card__value {
  white-space: normal;
  word-break: break-word;
}

.kpi-card:hover {
  border-color: var(--dash-border-light);
  box-shadow: var(--dash-shadow);
}

.analytics-kpi-card {
  transition: transform .2s ease, box-shadow .2s ease;
}

.analytics-kpi-card:hover,
.analytics-kpi-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  outline: none;
}

.kpi-card--compact {
  padding: 16px 20px;
}

.kpi-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--dash-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-card__icon i {
  width: 22px;
  height: 22px;
}

.kpi-card__icon--primary { background: var(--dash-primary-glow); color: var(--dash-primary-light); }
.kpi-card__icon--success { background: rgba(102, 187, 106, 0.15); color: var(--dash-success); }
.kpi-card__icon--warning { background: rgba(230, 81, 0, 0.15); color: var(--dash-warning); }
.kpi-card__icon--info { background: rgba(59, 130, 246, 0.15); color: var(--dash-info); }

.kpi-card__content {
  flex: 1;
}

.kpi-card__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--dash-text-secondary);
  margin-bottom: 4px;
}

.kpi-card__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.kpi-card__change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 4px;
}

.kpi-card__change--up { color: var(--dash-success); }
.kpi-card__change--down { color: var(--dash-danger); }

/* ==========================================================================
   CARDS
   ========================================================================== */
.dash-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  margin-bottom: 24px;
  overflow: hidden;
}

.dash-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--dash-border);
}

.dash-card__title {
  font-size: 0.9rem;
  font-weight: 600;
}

.dash-card__link {
  font-size: 0.8rem;
  color: var(--dash-primary-light);
  font-weight: 500;
  transition: var(--dash-transition);
}

.dash-card__link:hover {
  text-decoration: underline;
}

.dash-card__body {
  padding: 20px;
}

.dash-card__body--no-padding {
  padding: 0;
}

/* ==========================================================================
   GRIDS
   ========================================================================== */
.dash-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}

.dash-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.dash-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   SELECT
   ========================================================================== */
.dash-select {
  padding: 7px 30px 7px 12px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text-secondary);
  font-size: 0.8rem;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: var(--dash-transition);
}

.dash-select:hover {
  border-color: var(--dash-border-light);
}

.dash-select:focus {
  border-color: var(--dash-primary);
}

/* ==========================================================================
   CHART
   ========================================================================== */
.chart-container {
  height: 220px;
  display: flex;
  align-items: flex-end;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  width: 100%;
  height: 100%;
  padding-top: 20px;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-double {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  justify-content: center;
}

.chart-bar--ing {
  background: linear-gradient(180deg, #66bb6a 0%, #2e7d32 100%);
}

.chart-bar--gas {
  background: linear-gradient(180deg, #ef5350 0%, #c62828 100%);
}

.chart-bar-group::after {
  content: attr(data-label);
  font-size: 0.7rem;
  color: var(--dash-text-muted);
}

.chart-bar {
  width: 100%;
  max-width: 48px;
  min-height: 4px;
  background: linear-gradient(180deg, var(--dash-primary) 0%, var(--dash-primary-dark) 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.chart-bar--ing {
  background: #66bb6a !important;
}

.chart-bar--gas {
  background: #ef5350 !important;
}

.chart-bar:hover {
  filter: brightness(1.2);
}

.chart-bar::after {
  content: attr(data-value);
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--dash-text-secondary);
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.chart-bar:hover::after {
  opacity: 1;
}

.chart-bar--current {
  background: linear-gradient(180deg, var(--dash-primary-light) 0%, var(--dash-primary) 100%);
  box-shadow: 0 0 20px var(--dash-primary-glow);
}

/* Donut Chart */
.donut-chart {
  display: flex;
  align-items: center;
  gap: 32px;
}

.donut-chart__visual {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-chart__center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-chart__total {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.donut-chart__label {
  display: block;
  font-size: 0.7rem;
  color: var(--dash-text-muted);
}

.donut-chart__legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--dash-text-secondary);
}

.donut-legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-legend-item strong {
  margin-left: auto;
  color: var(--dash-text);
}

/* ==========================================================================
   ACTIVITY LIST
   ========================================================================== */
.activity-list {
  padding: 4px 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--dash-border);
  transition: var(--dash-transition);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background: var(--dash-surface-2);
}

.activity-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(59, 130, 246, 0.12);
  color: var(--dash-info);
}
.activity-item__icon--project { background: rgba(102, 187, 106, 0.15); color: var(--dash-success); }
.activity-item__icon--task    { background: rgba(102, 187, 106, 0.15); color: var(--dash-success); }
.activity-item__icon--deploy  { background: rgba(102, 187, 106, 0.15); color: var(--dash-success); }
.activity-item__icon--invoice { background: rgba(230, 81, 0, 0.15); color: var(--dash-warning); }
.activity-item__icon--order   { background: rgba(230, 81, 0, 0.15); color: var(--dash-warning); }
.activity-item__icon--client  { background: rgba(59, 130, 246, 0.12); color: var(--dash-info); }
.activity-item__icon--document{ background: rgba(59, 130, 246, 0.12); color: var(--dash-info); }
.activity-item__icon--team    { background: rgba(59, 130, 246, 0.12); color: var(--dash-info); }
.activity-item__icon--general { background: rgba(59, 130, 246, 0.12); color: var(--dash-info); }

.activity-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-item__dot--success { background: var(--dash-success); }
.activity-item__dot--primary { background: var(--dash-primary); }
.activity-item__dot--warning { background: var(--dash-warning); }
.activity-item__dot--info { background: var(--dash-info); }

.activity-item__content p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--dash-text-secondary);
}

.activity-item__content strong {
  color: var(--dash-text);
}

.activity-item__time {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  margin-top: 2px;
  display: block;
}

/* ==========================================================================
   UPCOMING LIST
   ========================================================================== */
.upcoming-list {
  padding: 4px 0;
}

.upcoming-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--dash-border);
  transition: var(--dash-transition);
}

.upcoming-item:last-child {
  border-bottom: none;
}

.upcoming-item:hover {
  background: var(--dash-surface-2);
}

.upcoming-item--urgent {
  border-left: 3px solid var(--dash-danger);
}

.upcoming-item__date {
  text-align: center;
  flex-shrink: 0;
  width: 44px;
}

.upcoming-item__day {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
}

.upcoming-item__month {
  display: block;
  font-size: 0.65rem;
  color: var(--dash-text-muted);
  text-transform: uppercase;
}

.upcoming-item__content {
  flex: 1;
  min-width: 0;
}

.upcoming-item__title {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-item__amount {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  margin-top: 2px;
  display: block;
}

.upcoming-item__status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  white-space: nowrap;
}

.upcoming-item__status--urgent {
  background: rgba(239, 68, 68, 0.15);
  color: var(--dash-danger);
}

.upcoming-item__status--pending {
  background: rgba(230, 81, 0, 0.15);
  color: var(--dash-warning);
}

.upcoming-item__status--scheduled {
  background: var(--dash-primary-glow);
  color: var(--dash-primary-light);
}

/* ==========================================================================
   TOOLBAR
   ========================================================================== */
.dash-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dash-toolbar__search {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.dash-toolbar__input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text);
  font-size: 0.8rem;
  outline: none;
  transition: var(--dash-transition);
}

.dash-toolbar__input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-glow);
}

.dash-toolbar__input::placeholder {
  color: var(--dash-text-muted);
}

.dash-toolbar__filters {
  display: flex;
  gap: 8px;
}

.dash-toolbar--relations .dash-toolbar__search {
  max-width: 360px;
}

.dash-table--relations {
  min-width: 1040px;
}

.dash-table--sii {
  min-width: 1260px;
}

.dash-page__actions--tight .btn-dash {
  padding-left: 14px;
  padding-right: 14px;
}

.sii-badge,
.sii-fiscal-cell,
.sii-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
}

.sii-badge {
  padding: 4px 10px;
  min-height: 26px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.sii-badge--sale { background: rgba(37, 99, 235, 0.12); color: #2563eb; border-color: rgba(37, 99, 235, 0.15); }
.sii-badge--purchase { background: rgba(217, 119, 6, 0.12); color: #d97706; border-color: rgba(217, 119, 6, 0.15); }
.sii-badge--honorarios { background: rgba(124, 58, 237, 0.12); color: #7c3aed; border-color: rgba(124, 58, 237, 0.15); }
.sii-badge--expense { background: rgba(220, 38, 38, 0.12); color: #dc2626; border-color: rgba(220, 38, 38, 0.15); }
.sii-badge--income { background: rgba(22, 163, 74, 0.12); color: #16a34a; border-color: rgba(22, 163, 74, 0.15); }

.sii-table-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: normal;
  min-width: 0;
}

.sii-table-cell--detail { min-width: 220px; }
.sii-table-cell--counterparty { min-width: 200px; }

.sii-table-cell__main {
  font-weight: 600;
  color: var(--dash-text);
  line-height: 1.25;
}

.sii-table-cell__sub {
  font-size: 0.74rem;
  color: var(--dash-text-secondary);
  line-height: 1.2;
}

.sii-fiscal-cell {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 108px;
  padding: 4px 10px;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface-2);
}

.sii-fiscal-cell__label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-text-muted);
}

.sii-fiscal-cell__value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dash-text);
}

.sii-fiscal-cell--tax .sii-fiscal-cell__value { color: #1d4ed8; }
.sii-fiscal-cell--retention .sii-fiscal-cell__value { color: #7c3aed; }
.sii-fiscal-cell--empty .sii-fiscal-cell__value { color: var(--dash-text-muted); }

.sii-status-badge {
  font-weight: 700;
  font-size: 0.72rem;
  padding: 4px 10px;
}

/* ==========================================================================
   TABLE
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

#page-mercado .table-responsive {
  overflow-x: hidden;
}

#page-mercado .dash-table {
  min-width: auto;
  table-layout: fixed;
  width: 100%;
}

#page-mercado .dash-table thead th:nth-child(2),
#page-mercado .dash-table tbody td:nth-child(2) {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-mercado .dash-table thead th:nth-child(1),
#page-mercado .dash-table tbody td:nth-child(1) {
  width: 18%;
}

#page-mercado .dash-table thead th:nth-child(2),
#page-mercado .dash-table tbody td:nth-child(2) {
  width: 44%;
}

#page-mercado .dash-table thead th:nth-child(3),
#page-mercado .dash-table tbody td:nth-child(3) {
  width: 18%;
}

#page-mercado .dash-table thead th:nth-child(4),
#page-mercado .dash-table tbody td:nth-child(4) {
  width: 20%;
}

@media (max-width: 768px) {
  #page-mercado .table-responsive {
    overflow-x: auto;
  }
  #page-mercado .dash-table {
    min-width: 620px;
    table-layout: auto;
  }
  #page-mercado .dash-table thead th,
  #page-mercado .dash-table tbody td {
    white-space: normal;
    word-break: break-word;
  }
  #page-mercado .dash-table thead th:nth-child(2),
  #page-mercado .dash-table tbody td:nth-child(2) {
    max-width: 260px;
  }
}

.dash-table thead th {
  padding: 12px 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-text-muted);
  text-align: left;
  border-bottom: 1px solid var(--dash-border);
  white-space: nowrap;
}

.dash-table tbody tr {
  border-bottom: 1px solid var(--dash-border);
  transition: var(--dash-transition);
}

.dash-table tbody tr:last-child {
  border-bottom: none;
}

.dash-table tbody tr:hover {
  background: var(--dash-surface-2);
}

.dash-table tbody td {
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--dash-text-secondary);
  white-space: nowrap;
}

/* Table Elements */
.table-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--dash-surface-3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-user__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.table-user span {
  font-weight: 500;
  color: var(--dash-text);
}

.relation-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.relation-type-badge--client {
  background: rgba(59, 130, 246, 0.12);
  color: var(--dash-info);
}

.relation-type-badge--provider {
  background: rgba(245, 158, 11, 0.14);
  color: #c2410c;
}

.relation-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
  white-space: normal;
}

.relation-detail__primary {
  font-weight: 600;
  color: var(--dash-text);
}

.relation-detail__secondary {
  font-size: 0.74rem;
  color: var(--dash-text-secondary);
}

.relation-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: normal;
  min-width: 160px;
}

.relation-contact__muted {
  font-size: 0.74rem;
  color: var(--dash-text-muted);
}

.table-count {
  background: var(--dash-surface-3);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.table-action-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text-muted);
  box-shadow: var(--dash-shadow);
  transition: var(--dash-transition);
}

.table-action-btn:hover {
  background: var(--dash-surface-3);
  color: var(--dash-text);
}

.table-action-btn i {
  width: 15px;
  height: 15px;
}

.table-action-btn--danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--dash-danger);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.status-badge--active { background: rgba(102, 187, 106, 0.15); color: var(--dash-success); }
.status-badge--inactive { background: rgba(100, 100, 100, 0.15); color: var(--dash-text-muted); }
.status-badge--pending { background: rgba(230, 81, 0, 0.15); color: var(--dash-warning); }
.status-badge--paid { background: var(--dash-primary-glow); color: var(--dash-primary-light); }
.status-badge--overdue { background: rgba(239, 68, 68, 0.15); color: var(--dash-danger); }
.status-badge--review { background: rgba(230, 81, 0, 0.15); color: var(--dash-warning); }
.status-badge--completed { background: rgba(102, 187, 106, 0.15); color: var(--dash-success); }
.status-badge--proposal { background: rgba(59, 130, 246, 0.15); color: var(--dash-info); }
.status-badge--draft { background: var(--dash-surface-3); color: var(--dash-text-muted); }

/* ==========================================================================
   FILE NAME
   ========================================================================== */
.file-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-name span {
  color: var(--dash-text);
  font-weight: 500;
}

/* ==========================================================================
   TAG
   ========================================================================== */
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--dash-surface-3);
  color: var(--dash-text-secondary);
}

/* ==========================================================================
   PROJECT CARDS
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 20px;
  transition: var(--dash-transition);
}

.project-card:hover {
  border-color: var(--dash-border-light);
  box-shadow: var(--dash-shadow);
  transform: translateY(-2px);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.project-card__logo {
  width: 36px;
  height: 36px;
  border-radius: var(--dash-radius-sm);
  overflow: hidden;
  background: var(--dash-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.project-card__client {
  font-size: 0.75rem;
  color: var(--dash-text-muted);
  margin-bottom: 14px;
}

.project-card__progress {
  margin-bottom: 14px;
}

.project-card__progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  margin-bottom: 6px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--dash-surface-3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--dash-primary);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar__fill--review {
  background: var(--dash-warning);
}

.progress-bar__fill--completed {
  background: var(--dash-success);
}

.project-card__meta {
  display: flex;
  gap: 16px;
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  margin-bottom: 10px;
}

.project-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--dash-border);
}

/* ==========================================================================
   UPLOAD ZONE
   ========================================================================== */
.upload-zone {
  border: 2px dashed var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 24px;
  cursor: pointer;
  transition: var(--dash-transition);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--dash-primary);
  background: var(--dash-primary-glow);
}

.upload-zone__icon {
  width: 48px;
  height: 48px;
  color: var(--dash-text-muted);
  margin: 0 auto 12px;
}

.upload-zone__text {
  font-size: 0.9rem;
  color: var(--dash-text-secondary);
  margin-bottom: 4px;
}

.upload-zone__text strong {
  color: var(--dash-primary-light);
}

.upload-zone__hint {
  font-size: 0.75rem;
  color: var(--dash-text-muted);
}

.upload-zone__input {
  display: none;
}

/* Upload progress */
.upload-progress-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.upload-progress-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
}

.upload-progress-item__name {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 500;
}

.upload-progress-item__bar {
  width: 120px;
  height: 4px;
  background: var(--dash-surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.upload-progress-item__fill {
  height: 100%;
  background: var(--dash-primary);
  border-radius: 2px;
  transition: width 0.3s;
}

.upload-progress-item__pct {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  width: 30px;
  text-align: right;
}

/* ==========================================================================
   DOCUMENTS FOLDERS
   ========================================================================== */
.docs-folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.docs-folder {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--dash-transition);
}

.docs-folder:hover {
  border-color: var(--dash-primary);
  background: var(--dash-primary-glow);
}

.docs-folder--active {
  background: var(--dash-primary-bg);
  border-color: var(--dash-primary);
}

.docs-folder--active .docs-folder__icon {
  color: var(--dash-primary);
}

.docs-folder--active .docs-folder__name {
  color: var(--dash-primary);
  font-weight: 600;
}

.docs-folder__icon {
  width: 32px;
  height: 32px;
  color: var(--dash-primary-light);
  margin: 0 auto 8px;
}

.docs-folder__name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.docs-folder__count {
  display: block;
  font-size: 0.65rem;
  color: var(--dash-text-muted);
}

/* ==========================================================================
   KANBAN
   ========================================================================== */
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban__column {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  min-width: 260px;
  overflow: visible;
}

.kanban__column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--dash-border);
}

.kanban__column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.kanban__column-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
}

.kanban__column-count {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--dash-surface-3);
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--dash-text-muted);
}

.kanban__cards {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100px;
}

.kanban__card {
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  padding: 14px;
  cursor: grab;
  transition: var(--dash-transition);
}

.kanban__card:hover {
  border-color: var(--dash-border-light);
  box-shadow: var(--dash-shadow);
}

.kanban__card:active {
  cursor: grabbing;
}

.kanban__card--done {
  opacity: 0.6;
}

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

.kanban__card-priority {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.kanban__card-priority--high { background: rgba(239, 68, 68, 0.15); color: var(--dash-danger); }
.kanban__card-priority--medium { background: rgba(230, 81, 0, 0.15); color: var(--dash-warning); }
.kanban__card-priority--low { background: rgba(59, 130, 246, 0.15); color: var(--dash-info); }

.kanban__card-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.kanban__card-desc {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  line-height: 1.3;
  margin-bottom: 10px;
}

.kanban__card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban__card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.kanban__card-date {
  font-size: 0.65rem;
  color: var(--dash-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Kanban action menu */
.kanban-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 12px;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--dash-text);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  text-align: left;
}
.kanban-action-btn:hover {
  background: var(--dash-bg-secondary);
}
.kanban-action-btn--danger {
  color: var(--dash-danger);
}
.kanban-action-btn--danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   TASKS
   ========================================================================== */
.task-list {
  display: flex;
  flex-direction: column;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--dash-border);
}

.task-item:last-child {
  border-bottom: none;
}

.task-item__check {
  width: 18px;
  height: 18px;
  accent-color: var(--dash-primary);
  cursor: pointer;
}

.task-item__content {
  flex: 1;
}

.task-item__content--done {
  opacity: 0.5;
}

.task-item__content--done .task-item__title {
  text-decoration: line-through;
}

.task-item__title {
  font-size: 0.85rem;
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
}

.task-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-item__due {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-item__actions {
  display: flex;
  gap: 4px;
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */
.messages-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  overflow: hidden;
  height: calc(100vh - 160px);
  min-height: 500px;
}

/* Messages Sidebar */
.messages-sidebar {
  background: var(--dash-surface);
  border-right: 1px solid var(--dash-border);
  display: flex;
  flex-direction: column;
}

.messages-sidebar__search {
  position: relative;
  padding: 12px;
  border-bottom: 1px solid var(--dash-border);
}

.messages-sidebar__input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text);
  font-size: 0.8rem;
  outline: none;
}

.messages-sidebar__input:focus {
  border-color: var(--dash-primary);
}

.messages-sidebar__input::placeholder {
  color: var(--dash-text-muted);
}

.messages-sidebar__list {
  flex: 1;
  overflow-y: auto;
}

.message-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--dash-border);
  cursor: pointer;
  transition: var(--dash-transition);
}

.message-preview:hover {
  background: var(--dash-surface-2);
}

.message-preview--active {
  background: var(--dash-primary-glow);
  border-left: 3px solid var(--dash-primary);
}

.message-preview__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.message-preview__avatar--group {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dash-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dash-text-muted);
}

.message-preview__content {
  flex: 1;
  min-width: 0;
}

.message-preview__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.message-preview__name {
  font-size: 0.8rem;
  font-weight: 600;
}

.message-preview__time {
  font-size: 0.65rem;
  color: var(--dash-text-muted);
}

.message-preview__text {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-preview__badge {
  width: 18px;
  height: 18px;
  background: var(--dash-primary);
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

/* Chat */
.messages-chat {
  display: flex;
  flex-direction: column;
  background: var(--dash-bg);
}

.messages-chat__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--dash-border);
  background: var(--dash-surface);
}

.messages-chat__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.messages-chat__name {
  font-size: 0.9rem;
  font-weight: 600;
}

.messages-chat__status {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
}

.messages-chat__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-date {
  text-align: center;
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  margin: 8px 0;
}

.chat-msg {
  display: flex;
  max-width: 70%;
}

.chat-msg--sent {
  align-self: flex-end;
}

.chat-msg--received {
  align-self: flex-start;
}

.chat-msg__bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.5;
  position: relative;
}

.chat-msg--sent .chat-msg__bubble {
  background: var(--dash-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg--received .chat-msg__bubble {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-bottom-left-radius: 4px;
}

.chat-msg__time {
  display: block;
  font-size: 0.6rem;
  opacity: 0.6;
  margin-top: 4px;
  text-align: right;
}

.messages-chat__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--dash-border);
  background: var(--dash-surface);
}

.messages-chat__attach {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dash-text-muted);
  border-radius: var(--dash-radius-sm);
}

.messages-chat__attach:hover {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}

.messages-chat__attach i {
  width: 18px;
  height: 18px;
}

.messages-chat__input {
  flex: 1;
  padding: 9px 14px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: 20px;
  color: var(--dash-text);
  font-size: 0.8rem;
  outline: none;
}

.messages-chat__input:focus {
  border-color: var(--dash-primary);
}

.messages-chat__input::placeholder {
  color: var(--dash-text-muted);
}

.messages-chat__send {
  width: 36px;
  height: 36px;
  background: var(--dash-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--dash-transition);
}

.messages-chat__send:hover {
  background: var(--dash-primary-light);
}

.messages-chat__send i {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   CALENDAR
   ========================================================================== */
.calendar-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

.calendar-widget {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 20px;
}

.calendar-widget__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-widget__month {
  font-size: 0.95rem;
  font-weight: 600;
}

.calendar-widget__nav {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text-secondary);
  transition: var(--dash-transition);
}

.calendar-widget__nav:hover {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}

.calendar-widget__nav i {
  width: 16px;
  height: 16px;
}

.calendar-widget__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 8px;
}

.calendar-widget__days span {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--dash-text-muted);
  padding: 6px 0;
}

.calendar-widget__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border-radius: var(--dash-radius-sm);
  cursor: pointer;
  transition: var(--dash-transition);
  color: var(--dash-text-secondary);
}

.cal-day:hover {
  background: var(--dash-surface-2);
}

.cal-day--today:hover {
  background: var(--dash-primary-dark);
}

.cal-day--other {
  color: var(--dash-text-muted);
  opacity: 0.4;
}

.cal-day--today {
  background: var(--dash-primary);
  color: #fff;
  font-weight: 700;
}

.cal-day--event {
  position: relative;
}

.cal-day--event::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  background: var(--dash-primary-light);
  border-radius: 50%;
}

.cal-day--today.cal-day--event::after {
  background: #fff;
}

/* Calendar Events */
.calendar-events {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 20px;
}

.calendar-events__title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.calendar-events__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cal-event {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--dash-radius-sm);
  border-left: 3px solid var(--dash-primary);
  background: var(--dash-surface-2);
  position: relative;
}

.cal-event--deadline {
  border-left-color: var(--dash-warning);
}

.cal-event__time {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--dash-text-muted);
  white-space: nowrap;
  min-width: 70px;
}

.cal-event__content {
  flex: 1;
}

.cal-event__content h4 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.cal-event__content p {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
}

.cal-event__actions {
  display: flex;
  gap: 4px;
}

/* ==========================================================================
   HORIZONTAL BARS (Analytics)
   ========================================================================== */
.horizontal-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.h-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.h-bar__label {
  font-size: 0.8rem;
  color: var(--dash-text-secondary);
  width: 110px;
  flex-shrink: 0;
}

.h-bar__track {
  flex: 1;
  height: 8px;
  background: var(--dash-surface-3);
  border-radius: 4px;
  overflow: hidden;
}

.h-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dash-primary-dark), var(--dash-primary-light));
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.h-bar__value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dash-text);
  min-width: 52px;
  width: auto;
  text-align: right;
  white-space: nowrap;
}

/* ==========================================================================
   REPORTS
   ========================================================================== */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.report-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 24px;
  text-align: center;
  transition: var(--dash-transition);
}

.report-card:hover {
  border-color: var(--dash-border-light);
  box-shadow: var(--dash-shadow);
}

.report-card__icon {
  width: 48px;
  height: 48px;
  background: var(--dash-primary-glow);
  border-radius: var(--dash-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--dash-primary-light);
}

.report-card__icon i {
  width: 24px;
  height: 24px;
}

.report-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.report-card p {
  font-size: 0.75rem;
  color: var(--dash-text-muted);
  margin-bottom: 12px;
}

.report-card__stats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  justify-content: center;
}

.report-stat {
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1;
  text-align: center;
  min-width: 0;
}

.report-stat__label {
  display: block;
  font-size: 0.68rem;
  color: var(--dash-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-stat__value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dash-text-primary);
}

/* ==========================================================================
   TEAM
   ========================================================================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.team-member-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 24px;
  text-align: center;
  transition: var(--dash-transition);
}

.team-member-card:hover {
  border-color: var(--dash-border-light);
  box-shadow: var(--dash-shadow);
  transform: translateY(-2px);
}

.team-member-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 3px solid var(--dash-primary);
}

.team-member-card__name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.team-member-card__role {
  font-size: 0.75rem;
  color: var(--dash-text-muted);
  margin-bottom: 16px;
}

.team-member-card__stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 14px;
}

.team-member-card__stats div {
  text-align: center;
}

.team-member-card__stats strong {
  display: block;
  font-size: 1.1rem;
}

.team-member-card__stats span {
  font-size: 0.6rem;
  color: var(--dash-text-muted);
}

.team-member-card__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--dash-border);
}

/* ==========================================================================
   SETTINGS
   ========================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.settings-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-field__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dash-text-secondary);
  margin-bottom: 6px;
}

.settings-input {
  width: 100%;
  padding: 9px 14px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text);
  font-size: 0.8rem;
  outline: none;
  transition: var(--dash-transition);
}

.settings-input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-glow);
}

.settings-toggle-list {
  display: flex;
  flex-direction: column;
}

.settings-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--dash-border);
}

.settings-toggle:last-child {
  border-bottom: none;
}

.settings-toggle strong {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 2px;
}

.settings-toggle p {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch__slider {
  position: relative;
  cursor: pointer;
  width: 44px;
  height: 24px;
  background-color: var(--dash-surface-3);
  border-radius: 24px;
  transition: var(--dash-transition);
  flex-shrink: 0;
}

.toggle-switch__slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: var(--dash-transition);
}

.toggle-switch input:checked + .toggle-switch__slider {
  background-color: var(--dash-primary);
}

.toggle-switch input:checked + .toggle-switch__slider::before {
  transform: translateX(20px);
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.dash-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  overscroll-behavior: none;
  touch-action: none;
}

.dash-modal__content {
  touch-action: pan-y;
}

.dash-modal.show {
  display: flex;
}

.dash-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.dash-modal__content {
  position: relative;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-lg);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
  box-shadow: var(--dash-shadow-lg);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.dash-modal__content--fullscreen {
  width: 95%;
  max-width: 1200px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.dash-modal__body--iframe {
  padding: 0;
  flex: 1;
  min-height: 0;
}

.dash-modal__body--iframe iframe {
  width: 100%;
  height: 100%;
  min-height: 75vh;
  border: none;
  border-radius: 0 0 var(--dash-radius-lg) var(--dash-radius-lg);
}

.dash-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--dash-border);
}

.dash-modal__title {
  font-size: 1rem;
  font-weight: 600;
}

.dash-modal__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text-muted);
  transition: var(--dash-transition);
}

.dash-modal__close:hover {
  background: var(--dash-surface-2);
  color: var(--dash-text);
}

.dash-modal__close i {
  width: 18px;
  height: 18px;
}

.dash-modal__body {
  padding: 24px;
}

.dash-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--dash-border);
}

/* Multiselect (project members) - duplicated from styles.css for dashboard */
.multiselect {
  position: relative;
  width: 100%;
  font-size: 0.95rem;
}
.multiselect__toggle {
  display:flex;align-items:center;justify-content:space-between;width:100%;padding:8px 10px;border-radius:6px;border:1px solid var(--dash-border);background:var(--dash-surface);gap:8px;
}
.multiselect__labels { flex:1; text-align:left; color:var(--dash-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.multiselect__count { margin-left:8px;color:var(--dash-text-muted);font-size:0.85rem; }
.multiselect__dropdown {
  position: absolute; z-index: var(--dash-z-dropdown, 600); left:0; right:0; background:var(--dash-surface); border:1px solid var(--dash-border); border-radius:6px; margin-top:6px; box-shadow:var(--dash-shadow); max-height:320px; overflow:auto;
}
.multiselect__search { width:100%; box-sizing:border-box; padding:8px 10px; border:none; border-bottom:1px solid var(--dash-border); }
.multiselect__list { padding:8px; display:block; }
.multiselect__item { display:flex;align-items:center;gap:10px;padding:8px;border-radius:6px;cursor:pointer;border-bottom:1px solid var(--dash-border); }
.multiselect__item input { width:16px;height:16px;margin:0;flex:0 0 16px; }
.multiselect__item:hover { background:var(--dash-surface-2); }
.multiselect__chip { display:inline-block;padding:4px 8px;border-radius:999px;background:var(--dash-surface-2);color:var(--dash-text);font-size:0.85rem;border:1px solid var(--dash-border); }

/* Responsive: on small screens show dropdown as fixed bottom sheet */
@media (max-width: 600px) {
  .multiselect__dropdown { position: fixed; left:12px; right:12px; bottom:12px; top:auto; max-height:60vh; border-radius:10px; }
  .multiselect__search { border-radius:8px 8px 0 0; }
}

/* Modal form */
.modal-form__group {
  margin-bottom: 16px;
}

.modal-form__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dash-text-secondary);
  margin-bottom: 6px;
}

.modal-form__input,
.modal-form__select,
.modal-form__textarea {
  width: 100%;
  padding: 9px 14px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text);
  font-size: 0.8rem;
  outline: none;
  transition: var(--dash-transition);
}

.modal-form__input:focus,
.modal-form__select:focus,
.modal-form__textarea:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-glow);
}

.modal-form__textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Client view modal enhancements */
.dash-modal__title {
  font-size: 1.125rem;
  letter-spacing: 0.2px;
}
.dash-modal__body .client-meta {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.client-avatar {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,0,0,0.03), rgba(0,0,0,0.02));
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:var(--dash-text-secondary);
  flex-shrink:0;
}
.client-details { flex:1; }
.client-stats {
  display:flex;
  gap:12px;
  margin-top:12px;
}
.client-stat {
  flex:1;
  background:var(--dash-bg-secondary);
  padding:10px 12px;
  border-radius:8px;
  text-align:left;
}
.client-stat .label { font-size:0.75rem; color:var(--dash-text-secondary); }
.client-stat .value { font-weight:700; margin-top:6px; font-size:1rem; }
.client-list {
  border-radius:8px;
  background:var(--dash-surface-2);
  padding:8px;
  max-height:200px;
  overflow:auto;
}
.client-list .item { padding:8px 10px; border-bottom:1px solid var(--dash-border); display:flex; justify-content:space-between; }
.client-list .item:last-child { border-bottom: none; }

/* Document access card used in contract/anexo/finiquito modals */
.document-access-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--dash-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.52));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.document-access-card__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-access-card__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dash-text-secondary);
}

.document-access-card__row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.document-access-card__input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-bg);
  color: var(--dash-text);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-access-card__input--mono {
  font-family: monospace;
  letter-spacing: 0.03em;
}

.document-access-card__action {
  flex-shrink: 0;
}

.document-access-card__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.document-access-card__note {
  font-size: 0.82rem;
  color: var(--dash-text-muted);
}

.document-access-card__empty {
  padding: 10px 12px;
  border: 1px dashed var(--dash-border);
  border-radius: 10px;
  background: var(--dash-surface-2);
  color: var(--dash-text-muted);
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .document-access-card__row {
    flex-direction: column;
    align-items: stretch;
  }

  .document-access-card__action,
  .document-access-card__actions .btn {
    width: 100%;
  }

  .document-access-card__actions {
    align-items: stretch;
  }
}

/* Modal action buttons in header */
.modal-actions { display:flex; gap:8px; align-items:center; }
.btn-icon { width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; background:var(--dash-surface-2); color:var(--dash-text-muted); border:1px solid var(--dash-border); cursor:pointer; }
.btn-icon:hover { background:var(--dash-surface); color:var(--dash-text); }
.btn-icon.small { width:30px; height:30px; }

/* Slightly larger modal title */
.dash-modal__title { font-size:1.125rem; }

/* Tighter footer buttons */
.dash-modal__footer .btn-dash { padding:8px 12px; font-size:0.9rem; }

/* Nice scrollbar for modal lists */
.dash-modal__body .client-list::-webkit-scrollbar { width:8px; }
.dash-modal__body .client-list::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.08); border-radius:6px; }

/* ==========================================================================
   TOAST
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 600;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  box-shadow: var(--dash-shadow-lg);
  min-width: 300px;
  animation: toastIn 0.3s ease;
}

.toast--success { border-left: 3px solid var(--dash-success); }
.toast--error { border-left: 3px solid var(--dash-danger); }
.toast--warning { border-left: 3px solid var(--dash-warning); }
.toast--info { border-left: 3px solid var(--dash-info); }

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

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast--success .toast__icon { color: var(--dash-success); }
.toast--error .toast__icon { color: var(--dash-danger); }
.toast--warning .toast__icon { color: var(--dash-warning); }
.toast--info .toast__icon { color: var(--dash-info); }

.toast__text {
  flex: 1;
  font-size: 0.8rem;
}

.toast__close {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dash-text-muted);
  cursor: pointer;
}


/* ==========================================================================
   VIEW TOGGLE
   ========================================================================== */
.view-toggle {
  display: flex;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  padding: 3px;
  gap: 2px;
}

.view-toggle__btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: var(--dash-text-muted);
  transition: var(--dash-transition);
  background: transparent;
}

.view-toggle__btn:hover {
  color: var(--dash-text);
  background: var(--dash-surface-3);
}

.view-toggle__btn--active {
  background: var(--dash-surface) !important;
  color: var(--dash-primary-light) !important;
  box-shadow: var(--dash-shadow);
}

.view-toggle__btn i {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   PAGE TABS
   ========================================================================== */
.page-tabs {
  display: flex;
  gap: 4px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  padding: 4px;
  margin-bottom: 20px;
  width: fit-content;
}

.page-tab {
  padding: 8px 18px;
  border-radius: calc(var(--dash-radius-sm) - 2px);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--dash-text-secondary);
  transition: var(--dash-transition);
  cursor: pointer;
  white-space: nowrap;
}

.page-tab:hover {
  color: var(--dash-text);
  background: var(--dash-surface-3);
}

.page-tab--active {
  background: var(--dash-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--dash-primary-glow);
}

/* ==========================================================================
   ROI CALCULATOR
   ========================================================================== */
.roi-calc {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.roi-calc__inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.roi-calc__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roi-calc__label {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--dash-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.roi-calc__input {
  width: 100%;
  padding: 9px 14px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text);
  font-size: 0.85rem;
  outline: none;
  transition: var(--dash-transition);
}

.roi-calc__input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-glow);
}

.roi-calc__results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.roi-result-card {
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 16px;
  text-align: center;
  transition: var(--dash-transition);
}

.roi-result-card:hover {
  border-color: var(--dash-primary);
  box-shadow: var(--dash-shadow);
}

.roi-result-card__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dash-text-muted);
  margin-bottom: 8px;
}

.roi-result-card__value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dash-primary-light);
}

.roi-result-card__value--negative {
  color: var(--dash-danger);
}

.roi-calc__chart {
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 16px;
}

/* ==========================================================================
   PLAN COMPARATOR
   ========================================================================== */
.plan-comparator {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 28px;
  margin-bottom: 24px;
}

.plan-comparator__header {
  text-align: center;
  margin-bottom: 24px;
}

.plan-comparator__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.plan-comparator__subtitle {
  font-size: 0.85rem;
  color: var(--dash-text-secondary);
}

.plan-comparator__table-wrap {
  overflow-x: auto;
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.plan-table thead th {
  padding: 16px;
  text-align: center;
  border-bottom: 2px solid var(--dash-border);
  vertical-align: bottom;
}

.plan-table__feature-col {
  text-align: left !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dash-text-muted);
  width: 35%;
}

.plan-table__col {
  text-align: center;
  vertical-align: top;
}

.plan-table__col--featured {
  background: rgba(46, 125, 50, 0.04);
  border: 1px solid var(--dash-primary);
  border-bottom: none;
  border-radius: var(--dash-radius) var(--dash-radius) 0 0;
  position: relative;
}

.plan-table__badge {
  display: inline-block;
  background: var(--dash-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.plan-table__plan-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.plan-table__price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dash-primary-light);
}

.plan-table__price span {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--dash-text-muted);
}

.plan-table tbody tr {
  border-bottom: 1px solid var(--dash-border-light);
  transition: var(--dash-transition);
}

.plan-table tbody tr:hover {
  background: var(--dash-surface-2);
}

.plan-table__section-row td {
  padding: 12px 16px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dash-text-muted);
  background: var(--dash-surface-2) !important;
}

.plan-table tbody td {
  padding: 11px 16px;
  font-size: 0.82rem;
  color: var(--dash-text-secondary);
  text-align: center;
}

.plan-table tbody td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--dash-text);
}

.plan-table__col--featured tbody td,
.plan-table tbody td.plan-table__col--featured {
  background: rgba(46, 125, 50, 0.03);
}

.plan-table__cell--check {
  color: var(--dash-success) !important;
  font-weight: 700;
  font-size: 1rem !important;
}

.plan-table__cell--no {
  color: var(--dash-text-muted) !important;
  font-size: 0.9rem !important;
}

/* ==========================================================================
   TASK CALENDAR VIEW
   ========================================================================== */
.task-cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.task-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.task-cal-grid__header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.task-cal-grid__header span {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dash-text-muted);
  padding: 4px 0;
}

.task-cal-day {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  padding: 8px;
  min-height: 80px;
  transition: var(--dash-transition);
}

.task-cal-day:hover {
  border-color: var(--dash-primary);
  box-shadow: var(--dash-shadow);
}

.task-cal-day--today {
  border-color: var(--dash-primary);
  background: var(--dash-primary-glow);
}

.task-cal-day--other {
  opacity: 0.4;
  background: var(--dash-surface-2);
}

.task-cal-day__num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dash-text-secondary);
  margin-bottom: 4px;
}

.task-cal-day--today .task-cal-day__num {
  color: var(--dash-primary-light);
}

.task-cal-chip {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.task-cal-chip--high {
  background: rgba(239, 68, 68, 0.15);
  color: var(--dash-danger);
}

.task-cal-chip--medium {
  background: rgba(230, 81, 0, 0.15);
  color: var(--dash-warning);
}

.task-cal-chip--low {
  background: rgba(59, 130, 246, 0.15);
  color: var(--dash-info);
}

.task-cal-chip--done {
  background: rgba(102, 187, 106, 0.12);
  color: var(--dash-success);
  text-decoration: line-through;
  opacity: 0.7;
}

/* ==========================================================================
   TASK COMMENTS
   ========================================================================== */
.task-comments {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.task-comment {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--dash-border);
}

.task-comment:last-child {
  border-bottom: none;
}

.task-comment__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--dash-primary-glow);
  color: var(--dash-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.task-comment__body {
  flex: 1;
}

.task-comment__meta {
  font-size: 0.7rem;
  color: var(--dash-text-muted);
  margin-bottom: 3px;
}

.task-comment__meta strong {
  color: var(--dash-text-secondary);
}

.task-comment__text {
  font-size: 0.82rem;
  color: var(--dash-text);
  line-height: 1.5;
}

.task-comment-input-wrap {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--dash-border);
}

.task-comment-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  color: var(--dash-text);
  font-size: 0.82rem;
  outline: none;
  resize: none;
  min-height: 38px;
  font-family: inherit;
  transition: var(--dash-transition);
}

.task-comment-input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-glow);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
/* ==========================================================================
   RESPONSIVE - 1200px (tablets landscape, small desktops)
   ========================================================================== */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid--2 {
    grid-template-columns: 1fr;
  }

  .kanban {
    grid-template-columns: repeat(2, 1fr);
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .topbar__search-input {
    width: 180px;
  }
}

/* ==========================================================================
   RESPONSIVE - 1024px (tablets, sidebar becomes off-canvas)
   ========================================================================== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    height: calc(var(--app-vh, 1vh) * 100);
    overflow: hidden;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }

  .sidebar__nav {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 16px;
    overscroll-behavior: contain;
  }

  .sidebar__footer {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    z-index: 2;
    background: var(--dash-surface);
    border-top: 1px solid var(--dash-border);
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .sidebar__user-dropdown {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: auto;
    min-width: 180px;
    width: auto;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    z-index: 310;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
    backdrop-filter: blur(2px);
  }

  .sidebar-backdrop.show {
    display: block;
  }

  .dash-main {
    margin-left: 0;
  }

  .topbar__menu-btn {
    display: flex;
  }

  .messages-layout {
    grid-template-columns: 1fr;
  }

  .messages-sidebar {
    display: none;
  }

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

  .project-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* ==========================================================================
   RESPONSIVE - 768px (mobile landscape, small tablets)
   ========================================================================== */
@media (max-width: 768px) {
  .dash-page {
    padding: 16px;
  }

  .dash-page__header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .dash-page__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .dash-page__actions .btn-dash {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

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

  .kpi-grid--3 {
    grid-template-columns: 1fr;
  }

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

  .donut-chart {
    flex-direction: column;
  }

  .topbar__search {
    display: none;
  }

  .topbar__right {
    gap: 4px;
  }

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

  .settings-form__row {
    grid-template-columns: 1fr;
  }

  .modal-form__row {
    grid-template-columns: 1fr;
  }

  .dash-modal__content {
    width: 95%;
    max-height: 90vh;
  }

  .dash-modal__content--fullscreen {
    width: 98%;
    max-height: 95vh;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dash-table {
    min-width: 600px;
  }

  .docs-folders {
    grid-template-columns: repeat(3, 1fr);
  }

  .upload-zone {
    padding: 24px 16px;
  }

  .cal-grid {
    gap: 2px;
  }

  .cal-day {
    padding: 6px 2px;
    font-size: 0.75rem;
  }

  .chart-bars {
    gap: 4px;
  }

  .topbar {
    padding: 0 12px;
    height: 52px;
  }

  .topbar__icon-btn {
    width: 32px;
    height: 32px;
  }
}

/* ==========================================================================
   RESPONSIVE - 480px (mobile portrait)
   ========================================================================== */
@media (max-width: 480px) {
  .topbar {
    padding: 0 10px;
  }

  .dash-page {
    padding: 12px;
  }

  .dash-page__title {
    font-size: 1.1rem;
  }

  .dash-page__subtitle {
    font-size: 0.75rem;
  }

  .dash-page__actions {
    flex-direction: column;
  }

  .dash-page__actions .btn-dash {
    width: 100%;
  }

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

  .kpi-card {
    padding: 14px;
  }

  .kpi-card__value {
    font-size: 1.3rem;
  }

  .docs-folders {
    grid-template-columns: repeat(2, 1fr);
  }

  .docs-folder {
    padding: 12px 8px;
  }

  .docs-folder__name {
    font-size: 0.7rem;
  }

  .dash-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .task-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .task-item__actions {
    margin-left: auto;
  }

  .cal-event {
    flex-direction: column;
    gap: 6px;
  }

  .cal-event__actions {
    position: absolute;
    top: 8px;
    right: 8px;
  }

  .modal-form__row {
    grid-template-columns: 1fr;
  }

  .dash-modal__content {
    width: 98%;
    margin: 8px;
    max-height: 92vh;
  }

  .dash-modal__header {
    padding: 14px 16px;
  }

  .dash-modal__body {
    padding: 16px;
  }

  .dash-modal__footer {
    padding: 12px 16px;
  }

  .sidebar {
    width: 260px;
  }

  .sidebar__link span {
    font-size: 0.8rem;
  }

  .project-card {
    padding: 14px;
  }

  .btn-dash {
    font-size: 0.8rem;
    padding: 8px 14px;
  }

  .topbar__breadcrumb {
    display: none;
  }
}

/* ==========================================================================
   LOGIN PAGE STYLES
   ========================================================================== */

.login-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--dash-bg);
}

/* Animated background */
.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  display: none; /* Hide animated background */
}

.login-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: orbFloat 20s ease-in-out infinite;
}

.login-bg__orb--1 {
  width: 600px; height: 600px;
  background: var(--dash-primary);
  top: -200px; left: -200px;
  animation-delay: 0s;
}

.login-bg__orb--2 {
  width: 400px; height: 400px;
  background: var(--dash-primary-light);
  bottom: -150px; right: -100px;
  animation-delay: -7s;
}

.login-bg__orb--3 {
  width: 300px; height: 300px;
  background: var(--dash-primary-dark);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Login container */
.login {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

.login__card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: 16px;
  padding: 40px 36px;
  backdrop-filter: blur(20px);
}

.login__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login__logo img {
  height: 40px;
  object-fit: contain;
}

.login__title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--dash-text);
}

.login__subtitle {
  text-align: center;
  font-size: 0.875rem;
  color: var(--dash-text-secondary);
  margin-bottom: 32px;
}

/* Tabs */
.login__tabs {
  display: flex;
  background: var(--dash-surface-2);
  border-radius: var(--dash-radius);
  padding: 4px;
  margin-bottom: 28px;
}

.login__tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--dash-text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: calc(var(--dash-radius) - 2px);
  cursor: pointer;
  transition: all var(--dash-transition);
}

.login__tab.active {
  background: var(--dash-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

/* Forms */
.login__form {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.login__form.active {
  display: flex;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--dash-text-secondary);
}

.form-field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-field__icon {
  position: absolute;
  left: 14px;
  color: var(--dash-text-secondary);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.form-field__input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: var(--dash-surface-2);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  color: var(--dash-text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--dash-transition), box-shadow var(--dash-transition);
}

.form-field__input:focus {
  outline: none;
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.form-field__input::placeholder {
  color: #999;
}

.form-field__toggle-pass {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--dash-text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.form-field__error {
  font-size: 0.75rem;
  color: var(--dash-danger);
  display: none;
}

.form-field--error .form-field__input {
  border-color: var(--dash-danger);
}

.form-field--error .form-field__error {
  display: block;
}

/* Extras */
.login__extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -4px;
}

.login__remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--dash-text-secondary);
  cursor: pointer;
}

.login__remember input[type="checkbox"] {
  accent-color: var(--dash-primary);
  width: 16px;
  height: 16px;
}

.login__forgot {
  font-size: 0.8125rem;
  color: var(--dash-primary);
  text-decoration: none;
  font-weight: 500;
}

.login__forgot:hover {
  text-decoration: underline;
}

/* Submit */
.login__submit {
  width: 100%;
  padding: 14px;
  background: var(--dash-primary);
  color: white;
  border: none;
  border-radius: var(--dash-radius);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dash-transition), transform var(--dash-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login__submit:hover {
  background: var(--dash-primary-dark);
  transform: translateY(-1px);
}

.login__submit:active {
  transform: translateY(0);
}

.login__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Divider */
.login__divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0;
}

.login__divider::before,
.login__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--dash-border);
}

.login__divider span {
  font-size: 0.75rem;
  color: var(--dash-text-secondary);
}

/* Demo access */
.login__demo {
  text-align: center;
  padding: 14px;
  background: rgba(46, 125, 50, 0.08);
  border: 1px dashed rgba(46, 125, 50, 0.3);
  border-radius: var(--dash-radius);
  cursor: pointer;
  transition: all var(--dash-transition);
}

.login__demo:hover {
  background: rgba(46, 125, 50, 0.12);
  border-color: var(--dash-primary);
}

.login__demo-text {
  font-size: 0.8125rem;
  color: var(--dash-primary);
  font-weight: 500;
}

.login__demo-hint {
  font-size: 0.75rem;
  color: var(--dash-text-secondary);
  margin-top: 2px;
}

/* Back link */
.login__back {
  text-align: center;
  margin-top: 20px;
}

.login__back a {
  font-size: 0.8125rem;
  color: var(--dash-text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--dash-transition);
}

.login__back a:hover {
  color: var(--dash-primary);
}

/* Alert */
.login__alert {
  display: none;
  padding: 12px 16px;
  border-radius: var(--dash-radius);
  font-size: 0.8125rem;
  font-weight: 500;
  align-items: center;
  gap: 8px;
}

.login__alert--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.login__alert--success {
  background: rgba(46, 125, 50, 0.1);
  border: 1px solid rgba(46, 125, 50, 0.2);
  color: #66bb6a;
}

.login__alert.show {
  display: flex;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}

.login__submit.loading .spinner { display: block; }
.login__submit.loading .btn-text { display: none; }

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

/* Responsive */
@media (max-width: 480px) {
  .login__card { padding: 28px 20px; }
  .login__title { font-size: 1.25rem; }
}

/* ==========================================================================
   EMISOR DE DOCUMENTOS — Cotizaciones & Facturas Pre-SII
   ========================================================================== */

/* ----- Modal documento (formulario de emisión) ----- */
.doc-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.doc-modal-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.doc-modal-grid--full { grid-column: 1 / -1; }

.doc-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dash-text-muted);
  font-weight: 700;
  margin: 16px 0 8px;
  border-bottom: 1px solid var(--dash-border);
  padding-bottom: 4px;
}
.doc-section-title:first-child { margin-top: 0; }

/* ----- Items table dentro del modal ----- */
.doc-items-wrap {
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  overflow: hidden;
  margin-top: 4px;
}

.doc-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.doc-items-table th {
  background: var(--dash-surface-2);
  padding: 6px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--dash-text-secondary);
  white-space: nowrap;
}

.doc-items-table td {
  padding: 4px 6px;
  border-top: 1px solid var(--dash-border-light);
  vertical-align: middle;
}

.doc-items-table input,
.doc-items-table select {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 6px;
  font-size: 0.82rem;
  color: var(--dash-text);
  border-radius: 4px;
  transition: 0.15s;
}
.doc-items-table input:focus,
.doc-items-table select:focus {
  outline: none;
  border-color: var(--dash-primary);
  background: var(--dash-surface);
}

.doc-items-table .td-num input { text-align: right; }

.doc-items__btn-remove {
  color: var(--dash-danger);
  opacity: 0.6;
  padding: 4px;
  border-radius: 4px;
  transition: 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-items__btn-remove:hover { opacity: 1; background: rgba(239,68,68,0.08); }

.doc-items-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--dash-surface-2);
}

.btn-add-item {
  font-size: 0.78rem;
  color: var(--dash-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--dash-radius-sm);
  transition: 0.15s;
}
.btn-add-item:hover { background: var(--dash-primary-glow); }

/* ----- Totales ----- */
.doc-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-top: 12px;
}

.doc-totals__row {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 0.85rem;
}
.doc-totals__row .lbl {
  color: var(--dash-text-secondary);
  min-width: 80px;
  text-align: right;
}
.doc-totals__row .val {
  font-weight: 600;
  min-width: 100px;
  text-align: right;
}
.doc-totals__row--total .lbl,
.doc-totals__row--total .val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dash-text);
}
.doc-totals__divider {
  width: 220px;
  height: 1px;
  background: var(--dash-border);
  margin: 2px 0;
}

/* ----- Badge estados ----- */
.badge-cot, .badge-presii {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge--vigente   { background: rgba(46,125,50,0.1);  color: #2E7D32; }
.badge--aceptada  { background: rgba(59,130,246,0.1); color: #3b82f6; }
.badge--rechazada { background: rgba(239,68,68,0.1);  color: #ef4444; }
.badge--vencida   { background: rgba(153,153,153,0.15); color: #888; }
.badge--borrador  { background: rgba(234,179,8,0.1);  color: #ca8a04; }
.badge--emitida   { background: rgba(59,130,246,0.1); color: #3b82f6; }
.badge--pagada    { background: rgba(46,125,50,0.1);  color: #2E7D32; }
.badge--anulada   { background: rgba(239,68,68,0.1);  color: #ef4444; }

/* ----- Preview PDF sello ----- */
.presii-stamp {
  border: 2px dashed var(--dash-border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.75rem;
  color: var(--dash-text-muted);
  text-align: center;
  margin-top: 8px;
  background: var(--dash-surface-2);
}
.presii-stamp strong { display: block; font-size: 0.8rem; color: var(--dash-text-secondary); margin-bottom: 2px; }

/* ==========================================================================
   EXPENSES (Gastos Operacionales)
   ========================================================================== */

/* ----- KPI Grid for Expenses ----- */
.kpi-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ----- Expense Card Styles ----- */
.expense-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  transition: all var(--dash-transition);
}

.expense-card:hover {
  box-shadow: var(--dash-shadow-md);
  border-color: var(--dash-primary);
}

.expense-card__content {
  flex: 1;
  min-width: 0;
}

.expense-card__title {
  font-weight: 600;
  color: var(--dash-text);
  margin-bottom: 4px;
  word-break: break-word;
}

.expense-card__meta {
  display: flex;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--dash-text-secondary);
}

.expense-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.expense-card__amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dash-primary);
  text-align: right;
  white-space: nowrap;
}

.expense-card__category {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(46, 125, 50, 0.1);
  color: var(--dash-primary);
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.expense-card__status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
}

.expense-card__status-badge--pending {
  background: rgba(217, 119, 6, 0.1);
  color: var(--dash-warning);
}

.expense-card__status-badge--paid {
  background: rgba(46, 125, 50, 0.1);
  color: var(--dash-primary);
}

.expense-card__status-badge--reconciled {
  background: rgba(59, 130, 246, 0.1);
  color: var(--dash-info);
}

/* ----- Expense Category Colors ----- */
.expense-category--salarios {
  border-left: 4px solid #ef4444;
}

.expense-category--materiales {
  border-left: 4px solid #3b82f6;
}

.expense-category--servicios {
  border-left: 4px solid #f97316;
}

.expense-category--transporte {
  border-left: 4px solid #06b6d4;
}

.expense-category--otros {
  border-left: 4px solid #8b5cf6;
}

/* ----- Expense Reconciliation Toggle ----- */
.expense-reconciliation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--dash-surface-2);
  border-radius: var(--dash-radius);
  margin-bottom: 16px;
}

.expense-reconciliation__label {
  font-size: 0.9rem;
  color: var(--dash-text);
  font-weight: 500;
}

/* ----- Charts for Expenses ----- */
.horizontal-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-item {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.bar-label {
  min-width: 120px;
  font-size: 0.82rem;
  color: var(--dash-text-secondary);
  font-weight: 500;
}

.bar-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar {
  flex: 1;
  height: 24px;
  background: var(--dash-primary-glow);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dash-primary), var(--dash-primary-light));
  border-radius: 4px;
  transition: width var(--dash-transition);
}

.bar-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dash-text);
  min-width: 60px;
  text-align: right;
}

/* ----- Expense Modal Form ----- */
.expense-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.expense-form--full {
  grid-template-columns: 1fr;
}

.expense-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.expense-form__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dash-text);
}

.expense-form__input,
.expense-form__select,
.expense-form__textarea {
  padding: 10px 12px;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--dash-text);
  background: var(--dash-surface);
  transition: border-color var(--dash-transition);
}

.expense-form__input:focus,
.expense-form__select:focus,
.expense-form__textarea:focus {
  outline: none;
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.expense-form__textarea {
  min-height: 80px;
  resize: vertical;
}

/* ----- Responsive Expenses ----- */
@media (max-width: 768px) {
  .kpi-grid--4 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

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

  .dash-toolbar__search {
    max-width: none;
    width: 100%;
  }

  .dash-toolbar__filters {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dash-toolbar__filters .dash-select {
    width: 100%;
    min-width: 0;
  }

  .expense-form {
    grid-template-columns: 1fr;
  }

  .expense-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .expense-card__amount {
    text-align: left;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .dash-toolbar__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expense-card__meta {
    flex-wrap: wrap;
  }

  .bar-label {
    min-width: 80px;
    font-size: 0.75rem;
  }

  .bar-value {
    min-width: 50px;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   RESPONSIVE - PRESII MODAL IMPROVEMENTS (Mobile optimization)
   ========================================================================== */

/* Para pantallas menores a 500px: optimizar modal Pre-SII */
@media (max-width: 500px) {
  /* Modal sin márgenes externos para máximo pegado */
  .dash-modal {
    padding: 0;
    left: 0;
    right: 0;
  }

  .dash-modal__content {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    max-height: 90vh;
    margin: 4px 4px 8px 4px;
    border-radius: 8px;
    overflow-x: hidden;
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Reducir paddings del modal */
  .dash-modal__header {
    padding: 10px 12px;
    gap: 8px;
  }

  .dash-modal__title {
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-word;
  }

  .dash-modal__close {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .dash-modal__body {
    padding: 10px 12px;
    overflow-x: hidden;
  }

  .dash-modal__footer {
    padding: 8px 10px;
    gap: 4px;
    flex-wrap: wrap;
  }

  .dash-modal__footer .btn-dash {
    flex: 1;
    min-width: 80px;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  /* Grids Pre-SII con una columna */
  .doc-modal-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .doc-modal-grid--3 {
    grid-template-columns: 1fr;
  }

  /* Títulos de sección más pequeños */
  .doc-section-title {
    font-size: 0.62rem;
    margin: 10px 0 4px;
    padding-bottom: 2px;
  }

  /* Form inputs compactos */
  .modal-form__input,
  .modal-form__select,
  .modal-form__textarea {
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 4px;
  }

  .form-field__label {
    font-size: 0.65rem;
    margin-bottom: 2px;
  }

  /* Tabla de items más compacta */
  .doc-items-wrap {
    margin-top: 6px;
    border-radius: 4px;
  }

  .doc-items-table {
    font-size: 0.7rem;
  }

  .doc-items-table th {
    padding: 3px 4px;
    font-size: 0.6rem;
    font-weight: 600;
  }

  .doc-items-table td {
    padding: 2px 3px;
    border-top: none;
    font-size: 0.7rem;
  }

  .doc-items-table input,
  .doc-items-table select {
    padding: 2px 3px;
    font-size: 0.7rem;
    height: 24px;
  }

  /* Items footer muy compacto */
  .doc-items-footer {
    padding: 4px 6px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .btn-add-item {
    font-size: 0.65rem;
    padding: 2px 4px;
  }

  .doc-items__btn-remove {
    padding: 1px;
  }

  .doc-items__btn-remove i {
    width: 11px;
    height: 11px;
  }

  /* Checkbox label compacto */
  .doc-items-footer label {
    font-size: 0.65rem;
    margin: 0;
  }

  /* Totales más compactos */
  .doc-totals {
    gap: 1px;
    margin-top: 8px;
    align-items: flex-end;
  }

  .doc-totals__row {
    gap: 8px;
    font-size: 0.75rem;
    min-width: 0;
  }

  .doc-totals__row .lbl {
    color: var(--dash-text-secondary);
    min-width: 50px;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .doc-totals__row .val {
    font-weight: 600;
    min-width: 70px;
    text-align: right;
    word-break: break-word;
  }

  .doc-totals__row--total {
    margin-top: 4px;
  }

  .doc-totals__row--total .lbl,
  .doc-totals__row--total .val {
    font-size: 0.85rem;
  }

  .doc-totals__divider {
    width: 100%;
    margin: 1px 0;
  }

  /* Presii stamp más pequeño */
  .presii-stamp {
    padding: 6px 8px;
    font-size: 0.65rem;
    margin-top: 4px;
    border-radius: 4px;
  }

  .presii-stamp strong {
    font-size: 0.7rem;
    margin-bottom: 0;
  }
}

/* Para pantallas menores a 380px: ultra-compact */
@media (max-width: 380px) {
  .dash-modal {
    padding: 4px;
  }

  .dash-modal__content {
    width: calc(100% - 8px);
    max-width: calc(100vw - 8px);
    max-height: 92vh;
  }

  .dash-modal__header {
    padding: 8px 10px;
    gap: 6px;
  }

  .dash-modal__title {
    font-size: 0.9rem;
  }

  .dash-modal__close {
    width: 24px;
    height: 24px;
  }

  .dash-modal__body {
    padding: 8px 10px;
  }

  .dash-modal__footer {
    padding: 6px 8px;
  }

  .modal-form__input,
  .modal-form__select,
  .modal-form__textarea {
    padding: 7px 8px;
    font-size: 13px;
  }

  .form-field__label {
    font-size: 0.6rem;
  }

  .doc-section-title {
    font-size: 0.58rem;
    margin: 8px 0 3px;
  }

  .doc-items-table {
    font-size: 0.65rem;
  }

  .doc-items-table th {
    padding: 2px 3px;
    font-size: 0.55rem;
  }

  .doc-items-table td {
    padding: 1px 2px;
    font-size: 0.65rem;
  }

  .doc-items-table input,
  .doc-items-table select {
    padding: 1px 2px;
    font-size: 0.65rem;
    height: 20px;
  }

  .doc-items-footer {
    padding: 3px 5px;
  }

  .btn-add-item {
    font-size: 0.6rem;
    padding: 1px 3px;
  }

  .doc-totals__row {
    font-size: 0.7rem;
    gap: 6px;
  }

  .doc-totals__row .lbl {
    min-width: 45px;
  }

  .doc-totals__row .val {
    min-width: 60px;
  }

  .presii-stamp {
    padding: 4px 6px;
    font-size: 0.6rem;
  }
}


