/* Custom Styles for Mail Management System */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container-fluid {
  flex: 1;
}

/* Dark theme application surfaces */
.dark-theme {
  background: #111827;
  color: #e5e7eb;
}

.dark-theme .page,
.dark-theme .main-content,
.dark-theme .main-container,
.dark-theme .container-fluid {
  background-color: #111827;
  color: #e5e7eb;
}

.dark-theme .main-header,
.dark-theme .main-sidebar-header,
.dark-theme .app-sidebar,
.dark-theme .main-footer {
  background: #1c273c;
  border-color: #2f3b52;
  color: #e5e7eb;
}

.dark-theme .main-header .nav-link,
.dark-theme .main-sidebar-header a,
.dark-theme .app-sidebar a,
.dark-theme .breadcrumb-item,
.dark-theme .breadcrumb-item a {
  color: #dbe4f3;
}

.dark-theme .main-header .nav-link:hover,
.dark-theme .app-sidebar a:hover {
  color: #ffffff;
}

.dark-theme .card,
.dark-theme .modal-content,
.dark-theme .dropdown-menu,
.dark-theme .list-group-item,
.dark-theme .table {
  background-color: #1c273c;
  border-color: #2f3b52;
  color: #e5e7eb;
}

.dark-theme .card-header,
.dark-theme .card-footer,
.dark-theme .modal-header,
.dark-theme .modal-footer,
.dark-theme .dropdown-header,
.dark-theme .bg-light {
  background-color: #253149 !important;
  border-color: #33425c !important;
  color: #e5e7eb !important;
}

.dark-theme .dropdown-item {
  color: #dbe4f3;
}

.dark-theme .dropdown-item:hover,
.dark-theme .dropdown-item:focus {
  background-color: #253149;
  color: #ffffff;
}

.dark-theme .table th,
.dark-theme .table td,
.dark-theme .table thead th,
.dark-theme .table tbody td {
  border-color: #33425c;
  color: #e5e7eb;
}

.dark-theme .table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: rgba(255, 255, 255, 0.025);
  color: #e5e7eb;
}

.dark-theme .table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: #253149;
  color: #f8fafc;
}

.dark-theme .form-control,
.dark-theme .form-select,
.dark-theme .input-group-text,
.dark-theme textarea.form-control {
  background-color: #111827;
  border-color: #33425c;
  color: #f8fafc;
}

.dark-theme .form-control:focus,
.dark-theme .form-select:focus {
  background-color: #111827;
  border-color: #5c9dff;
  color: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(92, 157, 255, 0.18);
}

.dark-theme .form-control::placeholder {
  color: #8796ad;
}

.dark-theme .form-label,
.dark-theme .form-check-label,
.dark-theme label {
  color: #dbe4f3;
}

.dark-theme .text-muted,
.dark-theme .form-text,
.dark-theme small {
  color: #aab6c9 !important;
}

.dark-theme .border,
.dark-theme .border-top,
.dark-theme .border-end,
.dark-theme .border-bottom,
.dark-theme .border-start {
  border-color: #33425c !important;
}

.dark-theme .alert-light,
.dark-theme .empty-state,
.dark-theme .readonly-mode-banner {
  background-color: #253149;
  border-color: #33425c;
  color: #e5e7eb;
}

.dark-theme .alert-info {
  background-color: rgba(13, 202, 240, 0.14);
  border-color: rgba(13, 202, 240, 0.34);
  color: #b8f3ff;
}

.dark-theme .alert-warning {
  background-color: rgba(255, 193, 7, 0.14);
  border-color: rgba(255, 193, 7, 0.34);
  color: #ffe8a3;
}

.dark-theme .alert-danger {
  background-color: rgba(220, 53, 69, 0.14);
  border-color: rgba(220, 53, 69, 0.34);
  color: #ffc2c8;
}

.dark-theme .badge.bg-light {
  background-color: #33425c !important;
  color: #f8fafc !important;
}

.dark-theme .btn-outline-secondary {
  border-color: #52627d;
  color: #dbe4f3;
}

.dark-theme .btn-outline-secondary:hover {
  background-color: #33425c;
  color: #ffffff;
}

.dark-theme .letter-reference-link,
.dark-theme .recipient-item {
  background-color: #18243a;
  border-color: #33425c;
  color: #dbeafe;
}

.dark-theme .letter-reference-link:hover {
  background-color: #203556;
  color: #ffffff;
}

.dark-theme .full-screen-link.active,
.dark-theme .full-screen.active {
  background-color: #253149;
  color: #5c9dff;
}

/* Header Logo and Title */
.responsive-logo .header-logo {
  display: flex !important;
  align-items: center !important;
  text-decoration: none;
  overflow: hidden;
}

.responsive-logo .header-logo span {
  display: inline-block !important;
  margin-left: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  color: inherit;
  transition: opacity 0.3s ease;
}

.responsive-logo .header-logo:hover span {
  opacity: 0.8;
}

/* Hide title on small screens */
@media (max-width: 991px) {
  .responsive-logo .header-logo span {
    display: none !important;
  }
}

/* Sidebar Logo and Title */
.main-sidebar-header {
  overflow: hidden;
  padding: 0.5;
}

.main-sidebar-header .desktop-logo {
  display: flex !important;
  align-items: center !important;
  padding: 0.4rem 0.4rem;
  text-decoration: none;
  overflow: hidden;
  max-width: 100%;
}

.main-sidebar-header .main-logo {
  flex-shrink: 0;
}

.main-sidebar-header .sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: inherit;
  transition: opacity 0.3s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 8px;
}

.main-sidebar-header .desktop-logo:hover .sidebar-title {
  opacity: 0.8;
}

/* Hide sidebar title when sidebar is closed/mini */
.sidebar-mini.sidenav-toggled .sidebar-title {
  display: none !important;
}

.app-sidebar.closed .sidebar-title {
  display: none !important;
}

/* Header - Notification & Profile Fixes */
.main-header-notification .nav-link,
.main-profile-menu .nav-link {
  position: relative;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Notification Icon Sizing */
.main-header-notification .notification-icon {
  width: 28px !important;
  height: 28px !important;
  stroke-width: 2;
}

/* Notification Badge Positioning */
.main-header-notification .notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  padding: 2px 5px;
  min-width: 18px;
  height: 18px;
  line-height: 14px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Profile Icon Styling */
.main-profile-menu .header-icon-svgs {
  width: 28px !important;
  height: 28px !important;
  stroke-width: 2;
}

.main-profile-menu .nav-link:hover,
.main-header-notification .nav-link:hover {
  background: rgba(98, 89, 202, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Dropdown Menus */
.main-header-notification .dropdown-menu,
.main-profile-menu .dropdown-menu {
  min-width: 360px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: none;
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
}

.main-header-notification .dropdown-menu {
  max-height: 500px;
}

.main-header-notification .notification-dropdown {
  width: min(380px, calc(100vw - 24px));
  padding: 0;
}

.main-header-notification .notification-header {
  background: linear-gradient(135deg, #364fc7 0%, #0f766e 100%);
  padding: 1rem 1.1rem;
}

.notification-count-text {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.main-notification-list {
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
}

.main-notification-list::-webkit-scrollbar {
  width: 6px;
}

.main-notification-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.main-notification-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.main-notification-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Notification Items */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #eef0f5;
  border-left: 3px solid transparent;
  position: relative;
}

.notification-item:hover {
  background-color: #f8f9fa !important;
  text-decoration: none;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.notification-item.unread {
  background-color: #f4f8ff;
  border-left-color: #0d6efd;
}

.notification-item.unread:hover {
  background-color: #edf4ff !important;
}

.notification-item.read {
  opacity: 0.85;
}

.notifyimg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

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

.notification-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.4;
  color: #212529;
  overflow-wrap: anywhere;
}

.notification-subtext {
  font-size: 12px;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notification-subtext i {
  font-size: 11px;
}

.notification-subtext-separator {
  color: #a3adbc;
}

.notification-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #0d6efd;
  flex: 0 0 auto;
  margin-top: 14px;
}

.notification-empty {
  text-align: center;
  color: #8a94a6;
  padding: 2rem 1rem;
}

.dark-theme .main-notification-list {
  background: #1c273c;
}

.dark-theme .notification-item {
  border-bottom-color: #2f3b52;
}

.dark-theme .notification-item:hover {
  background-color: #253149 !important;
}

.dark-theme .notification-item.unread {
  background-color: rgba(13, 110, 253, 0.14);
  border-left-color: #5c9dff;
}

.dark-theme .notification-item.unread:hover {
  background-color: rgba(13, 110, 253, 0.2) !important;
}

.dark-theme .notification-empty {
  color: #9aa8bd;
}

.main-header .nav-link.new,
.nav-item.full-screen .nav-link,
.main-layout .nav-link {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.main-header .nav-link.new:focus-visible,
.nav-item.full-screen .nav-link:focus-visible,
.main-layout .nav-link:focus-visible {
  outline: 2px solid rgba(54, 79, 199, 0.35);
  outline-offset: 2px;
}

.full-screen-link.active {
  background: rgba(54, 79, 199, 0.12);
  color: #364fc7;
}

@media (max-width: 480px) {
  .main-header-notification .notification-dropdown {
    width: calc(100vw - 16px);
  }

  .notification-item {
    padding: 12px;
  }
}

/* Mark All Read Button */
.mark-all-read-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: linear-gradient(135deg, #6259ca 0%, #867efc 100%);
  color: white;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(98, 89, 202, 0.25);
  white-space: nowrap;
}

.mark-all-read-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(98, 89, 202, 0.35);
  background: linear-gradient(135deg, #5349b8 0%, #7568ea 100%);
}

.mark-all-read-btn:active {
  transform: translateY(0);
}

.mark-all-read-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Pulse animation for unread indicator */
.pulse-animation {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

/* Profile Dropdown Items */
.main-profile-menu .dropdown-item {
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.main-profile-menu .dropdown-item:hover {
  background-color: rgba(98, 89, 202, 0.1);
  color: #6259ca;
  padding-left: 1.5rem;
}

.main-profile-menu .dropdown-item i {
  width: 20px;
  text-align: center;
}

/* Sidebar organization improvements */
.side-item-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 15px 20px 5px;
  color: #8e9ab6;
  margin-top: 10px;
}

.side-item-category:first-child {
  margin-top: 0;
}

.side-menu .slide .side-menu__item {
  transition: all 0.3s ease;
}

.side-menu .slide.active .side-menu__item {
  background: linear-gradient(
    90deg,
    rgba(98, 89, 202, 0.1) 0%,
    transparent 100%
  );
  border-left: 3px solid #6259ca;
  font-weight: 500;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  max-width: 450px;
  width: 100%;
}

/* Dashboard Cards */
.stat-card {
  border-left: 4px solid var(--primary-color);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
  font-size: 2.5rem;
  opacity: 0.8;
}

/* Persistent focus mode */
body.mail-focus-mode .main-footer {
  display: none;
}

body.mail-focus-mode .main-content.app-content {
  min-height: calc(100vh - 64px);
}

body.mail-focus-mode .main-container.container-fluid {
  max-width: none;
  padding-left: 20px;
  padding-right: 20px;
}

/* Work-focused dashboard */
.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dashboard-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-eyebrow {
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-title {
  color: #1f2937;
  font-size: 1.55rem;
  font-weight: 700;
}

.dashboard-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-stat-tile,
.dashboard-panel {
  background: #fff;
  border: 1px solid #e7eaf0;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(31, 41, 55, 0.06);
}

.dashboard-stat-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 82px;
  padding: 0.9rem;
  color: #1f2937;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-stat-tile:hover {
  color: #1f2937;
  border-color: #b9c2d3;
  box-shadow: 0 5px 18px rgba(31, 41, 55, 0.09);
  text-decoration: none;
}

.dashboard-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f4f6f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1.25rem;
}

.dashboard-stat-label {
  color: #6b7280;
  display: block;
  font-size: 0.78rem;
  line-height: 1.2;
}

.dashboard-stat-tile strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}

.dashboard-panel {
  padding: 1rem;
}

.dashboard-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.dashboard-panel-header h5 {
  color: #1f2937;
  font-size: 1rem;
  font-weight: 700;
}

.dashboard-alert {
  border-radius: 8px;
  margin-bottom: 0;
}

.dashboard-action-list,
.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dashboard-action-item,
.dashboard-list-item {
  border: 1px solid #edf0f5;
  border-radius: 8px;
  color: #1f2937;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dashboard-action-item {
  border-left: 4px solid #b9c2d3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem;
}

.dashboard-action-item:hover,
.dashboard-list-item:hover {
  background: #f8fafc;
  border-color: #cfd6e3;
  color: #1f2937;
  text-decoration: none;
}

.dashboard-action-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.dashboard-action-meta {
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.82rem;
}

.dashboard-action-status,
.dashboard-list-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.dashboard-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
}

.dashboard-list-item strong,
.dashboard-list-item small {
  display: block;
}

.dashboard-list-item small,
.dashboard-list-badges small {
  color: #6b7280;
}

.dashboard-empty-state {
  color: #6b7280;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 132px;
  padding: 1rem;
  text-align: center;
}

.dashboard-empty-state i {
  color: #8290a6;
  font-size: 2rem;
}

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-quick-action {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e7eaf0;
  border-radius: 8px;
  color: #1f2937;
  display: flex;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.75rem;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dashboard-quick-action:hover {
  background: #eef6f5;
  border-color: #b8d8d5;
  color: #0f766e;
  text-decoration: none;
}

.dashboard-quick-action i {
  font-size: 1.15rem;
}

.dashboard-action-item.priority-urgent {
  border-left-color: #dc3545;
}

.dashboard-action-item.priority-high {
  border-left-color: #fd7e14;
}

.dashboard-action-item.priority-medium,
.dashboard-action-item.priority-normal {
  border-left-color: #0dcaf0;
}

.dashboard-action-item.priority-low {
  border-left-color: #6c757d;
}

.dark-theme .dashboard-title,
.dark-theme .dashboard-panel-header h5,
.dark-theme .dashboard-stat-tile,
.dark-theme .dashboard-action-item,
.dark-theme .dashboard-list-item,
.dark-theme .dashboard-quick-action {
  color: #e5e7eb;
}

.dark-theme .dashboard-stat-tile,
.dark-theme .dashboard-panel {
  background: #1c273c;
  border-color: #2f3b52;
  box-shadow: none;
}

.dark-theme .dashboard-stat-tile:hover,
.dark-theme .dashboard-action-item:hover,
.dark-theme .dashboard-list-item:hover {
  background: #253149;
  border-color: #41516d;
}

.dark-theme .dashboard-stat-icon,
.dark-theme .dashboard-quick-action {
  background: #253149;
  border-color: #33425c;
}

.dark-theme .dashboard-action-item,
.dark-theme .dashboard-list-item {
  border-color: #33425c;
}

.dark-theme .dashboard-quick-action:hover {
  background: #203a3c;
  border-color: #2c6d68;
  color: #7dd3c7;
}

.dark-theme .dashboard-title,
.dark-theme .dashboard-action-title {
  color: #f8fafc;
}

.dark-theme .dashboard-stat-label,
.dark-theme .dashboard-action-meta,
.dark-theme .dashboard-list-item small,
.dark-theme .dashboard-list-badges small,
.dark-theme .dashboard-empty-state {
  color: #aab6c9;
}

/* Letter Card */
.letter-card {
  transition: all 0.3s ease;
  border-left: 4px solid #dee2e6;
}

.letter-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-color);
}

.letter-card.priority-urgent {
  border-left-color: var(--danger-color);
}

.letter-card.priority-high {
  border-left-color: var(--warning-color);
}

/* Status Badges */
.badge {
  padding: 0.4em 0.8em;
  font-weight: 500;
}

/* Minute Notes */
.minute-note {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-left: 4px solid var(--info-color);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.minute-note:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.minute-note.type-approval {
  border-left-color: var(--success-color);
  background: linear-gradient(
    to right,
    rgba(25, 135, 84, 0.02) 0%,
    #ffffff 15%
  );
}

.minute-note.type-rejection {
  border-left-color: var(--danger-color);
  background: linear-gradient(
    to right,
    rgba(220, 53, 69, 0.02) 0%,
    #ffffff 15%
  );
}

.minute-note.type-comment {
  border-left-color: var(--info-color);
}

.minute-note.type-request_changes {
  border-left-color: var(--warning-color);
  background: linear-gradient(
    to right,
    rgba(255, 193, 7, 0.02) 0%,
    #ffffff 15%
  );
}

.minute-note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.minute-note-author {
  font-weight: 600;
  color: #212529;
  font-size: 1.05rem;
  line-height: 1.5;
}

.minute-note-time {
  font-size: 0.85rem;
  color: #6c757d;
  white-space: nowrap;
  margin-left: 1rem;
  flex-shrink: 0;
}

.minute-note-content {
  color: #495057;
  line-height: 1.6;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.dark-theme .minute-note {
  background: #1c273c;
  border-color: #33425c;
  color: #e5e7eb;
  box-shadow: none;
}

.dark-theme .minute-note:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}

.dark-theme .minute-note.type-approval {
  background: linear-gradient(
    to right,
    rgba(25, 135, 84, 0.18) 0%,
    #1c273c 15%
  );
}

.dark-theme .minute-note.type-rejection {
  background: linear-gradient(
    to right,
    rgba(220, 53, 69, 0.18) 0%,
    #1c273c 15%
  );
}

.dark-theme .minute-note.type-request_changes {
  background: linear-gradient(
    to right,
    rgba(255, 193, 7, 0.2) 0%,
    #1c273c 15%
  );
}

.dark-theme .minute-note-header {
  border-bottom-color: #33425c;
}

.dark-theme .minute-note-author,
.dark-theme .minute-note-content,
.dark-theme .timeline-item {
  color: #e5e7eb;
}

.dark-theme .minute-note-time {
  color: #aab6c9;
}

.dark-theme .timeline-item::before {
  border-color: #1c273c;
}

/* Timeline for Audit Log */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  display: none;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item.timeline-success::before {
  background: var(--success-color);
  box-shadow: 0 0 0 2px var(--success-color);
}

.timeline-item.timeline-danger::before {
  background: var(--danger-color);
  box-shadow: 0 0 0 2px var(--danger-color);
}

/* File Upload Area */
.file-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.file-upload-area:hover {
  border-color: var(--primary-color);
  background: #f8f9fa;
}

.file-upload-area.dragover {
  border-color: var(--success-color);
  background: #d1e7dd;
}

/* Table Responsive */
.table-responsive {
  border-radius: 0.5rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Action Buttons */
.action-buttons .btn {
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

/* PDF Viewer */
.pdf-viewer {
  width: 100%;
  height: 600px;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
}

/* Distribution List */
.recipient-list {
  list-style: none;
  padding: 0;
}

.recipient-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.recipient-item .recipient-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.recipient-item .recipient-info {
  flex: 1;
}

.recipient-item .recipient-status {
  margin-left: auto;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Loading Spinner */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Letter Reference Links in Notes */
.letter-reference-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background-color: #e7f1ff;
  border: 1px solid #b6d4fe;
  border-radius: 0.25rem;
  color: #084298;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.letter-reference-link:hover {
  background-color: #cfe2ff;
  border-color: #9ec5fe;
  color: #052c65;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.letter-reference-link i {
  font-size: 0.85em;
}

/* Read-only mode indicator */
.readonly-mode-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.readonly-mode-banner i {
  font-size: 1.25rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: white;
}

/* Footer */
.footer {
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-toolbar,
  .dashboard-action-item,
  .dashboard-list-item {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-toolbar-actions,
  .dashboard-action-status,
  .dashboard-list-badges {
    justify-content: flex-start;
  }

  .dashboard-stat-strip,
  .dashboard-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    margin-bottom: 1rem;
  }

  .action-buttons {
    display: flex;
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .dashboard-stat-strip,
  .dashboard-quick-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-toolbar-actions .btn {
    width: 100%;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .action-buttons,
  .btn {
    display: none !important;
  }
}
