/**
 * WatchVault Enhanced - UI Components Styles
 * Styles for reusable UI components
 */

/* ==========================================================================
   Modal Components
   ========================================================================== */

/* Modal overlay styles for edit beneficiary modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  animation: modalShow 0.3s ease-out;
}

@keyframes modalShow {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius);
  transition: var(--transition);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 0 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: 24px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-dialog {
  transform: translateY(0);
}

.modal-small .modal-dialog { max-width: 400px; width: 100%; }
.modal-medium .modal-dialog { max-width: 600px; width: 100%; }
.modal-large .modal-dialog { max-width: 900px; width: 100%; }

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: between;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 0 24px 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: 24px;
  padding-top: 24px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  margin-left: auto;
}

.close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Document viewer specific styles */
.document-viewer-body {
  max-height: none;
  padding: 0 24px;
}

.document-viewer-body iframe {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  z-index: 1050;
  max-width: 350px;
  pointer-events: none;
}

.toast-container.toast-top-right {
  top: 20px;
  right: 20px;
}

.toast-container.toast-top-left {
  top: 20px;
  left: 20px;
}

.toast-container.toast-bottom-right {
  bottom: 20px;
  right: 20px;
}

.toast-container.toast-bottom-left {
  bottom: 20px;
  left: 20px;
}

.toast {
  display: flex;
  align-items: flex-start;
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
  padding: 16px;
  pointer-events: auto;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid var(--primary-color);
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left-color: var(--success-color);
}

.toast-error {
  border-left-color: var(--danger-color);
}

.toast-warning {
  border-left-color: var(--warning-color);
}

.toast-info {
  border-left-color: var(--info-color);
}

.toast-icon {
  margin-right: 12px;
  font-size: 1.25rem;
  margin-top: 2px;
}

.toast-success .toast-icon {
  color: var(--success-color);
}

.toast-error .toast-icon {
  color: var(--danger-color);
}

.toast-warning .toast-icon {
  color: var(--warning-color);
}

.toast-info .toast-icon {
  color: var(--info-color);
}

.toast-content {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  margin-left: 8px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.toast-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ==========================================================================
   Loading Spinners
   ========================================================================== */

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.spinner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 100;
}

.dark-theme .spinner-overlay {
  background: rgba(0, 0, 0, 0.9);
}

.spinner-circle {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-small .spinner-circle {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

.spinner-large .spinner-circle {
  width: 56px;
  height: 56px;
  border-width: 4px;
}

.spinner-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Card Components
   ========================================================================== */

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.card-body {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card-footer {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Form Components
   ========================================================================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-color-alpha);
}

.form-input:invalid {
  border-color: var(--danger-color);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

select.form-input {
  cursor: pointer;
}

/* Watch Form Specific Styles */
.watch-form {
  max-width: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 32px;
}

@media (max-width: 576px) {
  .form-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  .form-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Data Tables
   ========================================================================== */

.table-wrapper {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-controls {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.table-search {
  width: 100%;
  max-width: 300px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--input-bg);
  color: var(--text-primary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.data-table th.sortable:hover {
  background: var(--bg-hover);
}

.data-table td {
  color: var(--text-secondary);
}

.data-table tr:hover {
  background: var(--bg-hover);
}

/* ==========================================================================
   Progress Bars
   ========================================================================== */

.progress-bar {
  width: 100%;
}

.progress-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-primary {
  background: var(--primary-color);
}

.progress-success {
  background: var(--success-color);
}

.progress-warning {
  background: var(--warning-color);
}

.progress-danger {
  background: var(--danger-color);
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: right;
  margin-top: 4px;
}

.progress-bar.animated .progress-fill {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  0% {
    background-position: 1rem 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* ==========================================================================
   Confirmation Dialogs
   ========================================================================== */

.confirm-dialog {
  text-align: center;
  padding: 20px 0;
}

.confirm-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.confirm-warning .confirm-icon {
  color: var(--warning-color);
}

.confirm-danger .confirm-icon {
  color: var(--danger-color);
}

.confirm-info .confirm-icon {
  color: var(--info-color);
}

.confirm-message {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.modal-open {
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ==========================================================================
   Dark Theme Overrides
   ========================================================================== */

.dark-theme .modal-dialog {
  border: 1px solid var(--border-color);
}

.dark-theme .toast {
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .modal-dialog {
    margin: 0;
    max-width: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  
  .modal-header,
  .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .toast-container {
    left: 10px;
    right: 10px;
    max-width: none;
  }
  
  .confirm-actions {
    flex-direction: column;
  }
  
  .data-table {
    font-size: 0.875rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .card-actions {
    flex-direction: column;
  }
  
  .table-controls {
    padding: 16px;
  }
}

/* ==========================================================================
   Enhanced Button Components
   ========================================================================== */

/* Enhanced Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0.025em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn i {
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}

.btn:hover:not(:disabled) i {
  transform: scale(1.1);
}

/* Button Variants */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  color: white;
  border: 1px solid var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.25);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #5a6268 100%);
  color: white;
  border: 1px solid var(--secondary-color);
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--secondary-hover) 0%, #545b62 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 117, 125, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: inset 0 0 0 0 var(--primary-color);
  transition: all 0.3s ease-in-out;
}

.btn-outline:hover:not(:disabled) {
  color: white;
  box-shadow: inset 0 0 0 50px var(--primary-color);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: 1px solid #dc3545;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.25);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #1e7e34 100%);
  color: white;
  border: 1px solid var(--success-color);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #218838 0%, #1c7430 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.25);
}

/* Special Button Styles */
.btn-back {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: var(--text-color);
  border: 1px solid #dee2e6;
  font-weight: 500;
}

.btn-back:hover:not(:disabled) {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Button Sizes */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  border-radius: 0.5rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 1rem;
}

/* Icon-only buttons */
.btn-icon {
  padding: 0.75rem;
  aspect-ratio: 1;
  border-radius: 50%;
}

/* Button groups */
.btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-group .btn {
  flex: 1;
  min-width: max-content;
}

/* Watch card specific buttons */
.watch-actions {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.75rem;
  justify-content: center;
}

.watch-actions .btn {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

/* Add watch button specific styling */
.add-watch-btn {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: 1px solid #28a745;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.add-watch-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.add-watch-btn i {
  font-size: 1rem;
}

/* View and Edit button styling */
.view-watch-btn {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
  border: 1px solid #17a2b8;
}

.view-watch-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(23, 162, 184, 0.3);
}

.edit-watch-btn {
  background: linear-gradient(135deg, #fd7e14 0%, #e8650e 100%);
  color: white;
  border: 1px solid #fd7e14;
}

.edit-watch-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #e8650e 0%, #d45c0d 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(253, 126, 20, 0.3);
}

/* Ripple effect for buttons */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active:not(:disabled)::before {
  width: 300px;
  height: 300px;
}

/* Loading state for buttons */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: button-spin 1s linear infinite;
  color: white;
}

@keyframes button-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Page Layout Components
   ========================================================================== */

/* Add Watch Page */
.add-watch-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 700;
}

.page-header h1 i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.page-actions {
  display: flex;
  gap: 0.75rem;
}

.form-container {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.form-section h2 {
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section h2 i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

/* Watch Details Page */
.watch-details-page,
.edit-watch-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Watch Detail Menu */
.watch-detail-menu {
  display: flex;
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 0.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  gap: 0.25rem;
}

.watch-detail-menu-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.watch-detail-menu-btn:hover {
  background: var(--light-gray);
  color: var(--text-primary);
}

.watch-detail-menu-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* Document Indicators */
.doc-indicator {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
  min-width: 8px;
  display: inline-block;
}

.doc-indicator.has-document {
  color: var(--success-color);
}

.doc-indicator.no-document {
  color: transparent;
  opacity: 0;
}

.watch-detail-menu-btn:hover .doc-indicator.no-document {
  color: var(--text-tertiary);
  opacity: 1;
}

.watch-detail-menu-btn:hover .doc-indicator.no-document::before {
  content: '○';
}

/* Watch Warranty Section */
.warranty-section {
  padding: 1.5rem;
  width: 100%;
}

.warranty-header {
  margin-bottom: 2rem;
  text-align: center;
}

.warranty-header h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.warranty-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.warranty-cards-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 100%;
}

/* Remove single file class - always show both slots */

.warranty-card-slot {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 600px;
}

.warranty-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.warranty-card-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.warranty-actions {
  display: flex;
  gap: 0.5rem;
}

.warranty-actions .btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.warranty-actions .btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: scale(1.05);
}

.warranty-actions .delete-warranty-btn {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.warranty-actions .delete-warranty-btn:hover {
  background: var(--danger-color);
  color: white;
  transform: scale(1.1);
}

.warranty-file-viewer {
  display: flex;
  flex-direction: column;
  height: calc(100% - 60px);
}

.warranty-image-viewer {
  width: 100%;
  height: auto;
  max-height: calc(100% - 60px);
  object-fit: contain;
  background: white;
  border-radius: var(--radius-md);
}

.warranty-pdf-viewer {
  width: 100%;
  height: calc(100% - 60px);
  min-height: 500px;
  border: none;
  background: white;
}

.pdf-fallback {
  display: none;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.pdf-fallback a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.pdf-fallback a:hover {
  text-decoration: underline;
}

.warranty-file-info {
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.warranty-file-info .filename {
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.warranty-file-info .filesize {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.warranty-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100% - 60px);
  min-height: 300px;
  border: 2px dashed var(--border-color);
  margin: 1rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-primary);
}

.warranty-upload-zone:hover,
.warranty-upload-zone.drag-over {
  border-color: var(--primary-color);
  background: var(--primary-color-light);
  transform: scale(1.02);
}

.warranty-upload-zone i {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.warranty-upload-zone:hover i,
.warranty-upload-zone.drag-over i {
  color: var(--primary-color);
}

.warranty-upload-zone p {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.warranty-upload-zone small {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Mobile responsiveness for warranty */
@media (max-width: 768px) {
  .warranty-cards-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .warranty-section {
    padding: 1rem;
  }
  
  .warranty-card-header {
    padding: 1rem;
  }
  
  .warranty-actions {
    flex-wrap: wrap;
  }
  
  .warranty-upload-zone {
    min-height: 250px;
  }
  
  .warranty-upload-zone i {
    font-size: 2.5rem;
  }
  
  .warranty-file-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .warranty-file-info .filename {
    max-width: 100%;
  }
}

/* Dark theme adjustments for warranty */
[data-theme="dark"] .warranty-card-slot {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .warranty-upload-zone {
  background: var(--bg-secondary);
}

[data-theme="dark"] .warranty-image-viewer {
  background: var(--bg-primary);
}

[data-theme="dark"] .warranty-pdf-viewer {
  background: var(--bg-primary);
}

/* Watch Receipts Section */
.receipts-section {
  padding: 1.5rem;
  width: 100%;
}

.receipts-header {
  margin-bottom: 2rem;
  text-align: center;
}

.receipts-header h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.receipts-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.receipts-upload-area {
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.receipts-upload-area:hover,
.receipts-upload-area.drag-over {
  border-color: var(--primary-color);
  background: var(--primary-color-light);
  transform: scale(1.01);
}

.receipts-upload-area i {
  font-size: 3rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.receipts-upload-area:hover i,
.receipts-upload-area.drag-over i {
  color: var(--primary-color);
}

.receipts-upload-area p {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.5rem 0;
}

.receipts-upload-area small {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.receipts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.receipt-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.receipt-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.receipt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.receipt-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.receipt-actions {
  display: flex;
  gap: 0.5rem;
}

.receipt-actions .btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.receipt-actions .btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: scale(1.05);
}

.receipt-actions .delete-receipt-btn {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.receipt-actions .delete-receipt-btn:hover {
  background: var(--danger-color);
  color: white;
  transform: scale(1.1);
}

.receipt-content {
  padding: 1rem;
}

.receipt-preview {
  width: 100%;
  height: 800px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: white;
}

.receipt-pdf-preview {
  width: 100%;
  height: 800px;
  border: none;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: white;
}

.receipt-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.receipt-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-style: italic;
}

/* Mobile responsiveness for receipts */
@media (max-width: 768px) {
  .receipts-section {
    padding: 1rem;
  }
  
  .receipts-upload-area {
    padding: 1.5rem 1rem;
  }
  
  .receipts-upload-area i {
    font-size: 2.5rem;
  }
  
  .receipts-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .receipt-card-header {
    padding: 0.75rem;
  }
  
  .receipt-actions {
    flex-wrap: wrap;
  }
  
  .receipt-title {
    max-width: 150px;
  }
}

/* Dark theme adjustments for receipts */
[data-theme="dark"] .receipts-upload-area {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .receipt-card {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .receipt-preview,
[data-theme="dark"] .receipt-pdf-preview {
  background: var(--bg-primary);
}

.watch-details-container.receipts-view {
  display: block;
}

.watch-details-container.service-view {
  display: block;
}

/* Service Section */
.service-section {
  padding: 1.5rem;
  max-width: none;
  width: 100%;
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.service-header h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin: 0;
}

.service-records-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-record-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.service-record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.service-date {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.service-actions {
  display: flex;
  gap: 0.5rem;
}

.service-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-info {
  color: var(--text-primary);
  line-height: 1.5;
}

.service-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

.service-receipt-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.service-receipt-link:hover {
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.error-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--danger-color);
  background: var(--card-bg);
  border: 1px solid var(--danger-color);
  border-radius: var(--radius-md);
}

/* Service Modal Styling */
#service-record-modal .modal-content {
  max-width: 600px;
}

#service-record-modal .form-group {
  margin-bottom: 1rem;
}

#service-record-modal label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

#service-record-modal input,
#service-record-modal textarea,
#service-record-modal select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--bg-primary);
  color: var(--text-primary);
}

#service-record-modal textarea {
  min-height: 100px;
  resize: vertical;
}

#service-record-modal .form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

#service-record-modal .current-receipt {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--light-blue);
  border-radius: var(--radius-sm);
}

#service-record-modal .current-receipt a {
  color: var(--primary-color);
  text-decoration: none;
}

#service-record-modal .current-receipt a:hover {
  text-decoration: underline;
}

/* Responsive design for service section */
@media (max-width: 768px) {
  .service-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .service-record-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .service-actions {
    justify-content: flex-start;
  }
  
  .service-date {
    font-size: 1rem;
  }
}

/* Watch Images Section */
.watch-images-section {
  padding: 1.5rem;
  max-width: none;
  width: 100%;
}

.images-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.images-header h2 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.images-header p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9rem;
}

.image-upload-area {
  margin-bottom: 1.5rem;
}

.upload-dropzone {
  border: 2px dashed var(--light-gray);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  text-align: center;
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.3s ease;
  max-width: 400px;
  margin: 0 auto;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--primary-color);
  background: var(--light-blue);
}

.upload-content i {
  font-size: 2rem;
  color: var(--light-gray);
  margin-bottom: 0.5rem;
  display: block;
}

.upload-content p {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.upload-hint {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.upload-progress {
  margin-top: 1rem;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--light-gray);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  width: 0%;
  transition: width 0.3s ease;
  animation: progress-pulse 1.5s infinite;
}

@keyframes progress-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.progress-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.image-tile {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--light-gray);
}

.image-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.image-container {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.watch-image-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: var(--radius-md);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-container:hover .image-overlay {
  opacity: 1;
}

.image-container:hover .watch-image-thumb {
  transform: scale(1.05);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.btn-icon:hover {
  background: white;
  transform: scale(1.1);
}

.delete-image-btn {
  background: var(--danger-color);
  color: white;
}

.delete-image-btn:hover {
  background: var(--danger-color);
  color: white;
  transform: scale(1.1);
}

.image-info {
  padding: 0.75rem;
  text-align: center;
  background: var(--bg-secondary);
}

.image-filename {
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-word;
  line-height: 1.2;
  max-height: 2.4em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.no-images-message {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem;
  font-style: italic;
}

.images-count {
  text-align: center;
  color: var(--text-secondary);
  font-weight: 500;
}

.images-count span {
  color: var(--primary-color);
  font-weight: 600;
}

.error-message {
  text-align: center;
  padding: 2rem;
  color: var(--danger-color);
}

.image-modal-content {
  text-align: center;
  padding: 1rem;
}

.image-modal-content img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.watch-details-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.watch-details-container.images-view {
  display: block;
}

.watch-details-container.warranty-view {
  display: block;
}

.watch-details-container.stats-view {
  display: block;
}

.watch-image-section {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.watch-detail-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
}

.no-image-placeholder {
  padding: 3rem 1rem;
  color: var(--text-secondary);
  text-align: center;
}

.no-image-placeholder i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--border-color);
}

.watch-info-section {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.info-group {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.info-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.info-group h2 {
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-group h2 i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-item label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-item span {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
}

.notes-content {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  font-style: italic;
  line-height: 1.6;
}

/* Responsive Design for New Components */
@media (max-width: 768px) {
  .add-watch-page,
  .watch-details-page,
  .edit-watch-page {
    padding: 1rem;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .page-actions {
    width: 100%;
  }
  
  .form-container,
  .watch-image-section,
  .watch-info-section {
    padding: 1.5rem;
  }
  
  .watch-details-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column-reverse;
  }
  
  /* Watch Images Section Mobile */
  .watch-images-section {
    padding: 1rem;
  }
  
  .upload-dropzone {
    padding: 1rem;
    max-width: none;
    margin: 0;
  }
  
  .upload-content i {
    font-size: 1.5rem;
  }
  
  .upload-content p {
    font-size: 0.9rem;
  }
  
  .images-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
  }
  
  .btn-icon {
    width: 35px;
    height: 35px;
  }
  
  .image-info {
    padding: 0.5rem;
  }
  
  .form-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Enhanced Dropdown Components
   ========================================================================== */

.dropdown-wrapper {
  position: relative;
  width: 100%;
}

.dropdown-wrapper .dropdown-select,
.dropdown-wrapper .dropdown-input {
  width: 100%;
  transition: all 0.3s ease;
}

.dropdown-wrapper .dropdown-input {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-color), 0.1);
}

.dropdown-wrapper .dropdown-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-color-alpha);
}

/* File upload styling */
input[type="file"].form-input {
  padding: 0.75rem;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="file"].form-input:hover {
  border-color: var(--primary-color);
  background: var(--bg-hover);
}

input[type="file"].form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-color-alpha);
}

/* Current file preview */
.current-files {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.current-file {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.current-file label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.current-file-preview {
  max-width: 200px;
  max-height: 150px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

/* Form help text */
.form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
}

.form-help a {
  color: var(--primary-color);
  text-decoration: none;
}

.form-help a:hover {
  text-decoration: underline;
}

/* Attachment links */
.attachment-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.attachment-link:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.attachment-link:before {
  content: '📎';
  font-size: 0.875rem;
}

/* ==========================================================================
   Search and Filter Components
   ========================================================================== */

.collection-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: space-between;
}

.search-container {
  flex: 1;
  min-width: 400px;
  max-width: 600px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background: var(--bg-primary);
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.1);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1rem;
  pointer-events: none;
}

.filter-container {
  position: relative;
}

.filter-toggle-btn {
  white-space: nowrap;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
}

.filter-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  width: 1000px;
  max-height: 70vh;
  overflow: auto;
  margin-top: 0.5rem;
}

.filter-section {
  margin-bottom: 1rem;
}

.filter-section:last-of-type {
  margin-bottom: 1.5rem;
}

.filter-section label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.filter-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  font-size: 0.875rem;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  font-size: 0.875rem;
}

.price-range span {
  color: var(--text-secondary);
  font-weight: 500;
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.collection-results {
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.results-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Controls group for Sort and Filter buttons */
.controls-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

/* Sort container styles */
.sort-container {
  position: relative;
}

.sort-toggle-btn {
  white-space: nowrap;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
}

.sort-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 200px;
  margin-top: 0.5rem;
}

.sort-options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.sort-option:hover {
  background: var(--bg-hover);
}

.sort-option.active {
  background: var(--primary-color);
  color: white;
}

.sort-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.sort-indicator {
  font-size: 1rem;
  font-weight: bold;
  opacity: 0.7;
}

.sort-option.active .sort-indicator {
  opacity: 1;
}

/* Search container sizing handled above */

/* Enhanced view header */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.view-header h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-header h1 i {
  color: var(--primary-color);
}

.view-actions {
  display: flex;
  gap: 0.75rem;
}

/* Dark theme adjustments */
[data-theme="dark"] .filter-panel {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .search-input,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .price-input {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* Responsive design */
@media (max-width: 768px) {
  .collection-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .search-container {
    min-width: auto;
  }
  
  .filter-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 90vw;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    margin-top: 0.5rem;
  }
  
  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .view-header h1 {
    font-size: 1.5rem;
  }
  
  .view-actions {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .filter-actions {
    flex-direction: column;
  }
  
  .price-range {
    flex-direction: column;
    align-items: stretch;
  }
  
  .price-range span {
    text-align: center;
    padding: 0.25rem 0;
  }
}

/* ==========================================================================
   Modal Dark Theme Support
   ========================================================================== */

[data-theme="dark"] .modal-dialog {
  background: var(--bg-secondary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .modal-header {
  border-bottom-color: var(--bg-tertiary);
}

/* Fix for undefined CSS variables */
.modal-header {
  border-bottom-color: var(--light-gray);
}

.modal-close {
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--light-gray);
  color: var(--text-primary);
}

[data-theme="dark"] .modal-close:hover {
  background: var(--bg-tertiary);
}

/* ==========================================================================
   Wear Calendar Styles
   ========================================================================== */

.wear-calendar-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.calendar-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.calendar-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.calendar-nav-btn:hover {
  background-color: var(--bg-secondary);
}

.calendar-grid {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.weekday {
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 3px;
  background: var(--border-color);
  padding: 3px;
  border-radius: var(--radius-md);
}

.calendar-day {
  min-height: 160px;
  padding: 1rem;
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.calendar-day:hover {
  background: var(--bg-secondary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.calendar-day.today {
  background: var(--secondary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--accent-color);
}

.calendar-day.today .day-number {
  color: white;
  font-weight: 700;
}

.calendar-day.today .add-wear-btn {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
}

.calendar-day.today .add-wear-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

.day-header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.day-number {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.add-wear-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  z-index: 10;
}

.add-wear-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: scale(1.1);
}

.wear-entries {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wear-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 32px;
}

.wear-entry:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.wear-thumbnail {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.wear-thumbnail:hover {
  transform: scale(4);
  z-index: 1000;
  border: 2px solid var(--accent-color);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
}

.duration-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: auto;
}

.wear-entry:hover .duration-badge {
  color: white;
}

/* Wear Entry Form Styles */
.wear-entry-form {
  width: 100%;
  max-width: 400px;
}

.selected-date {
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--text-primary);
}

.duration-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* WebKit browsers (Chrome, Safari, Edge) */
.duration-slider::-webkit-slider-track {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
}

.duration-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #3498db 0%, #3498db var(--slider-progress, 33%), var(--bg-secondary) var(--slider-progress, 33%), var(--bg-secondary) 100%);
}

.duration-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  margin-top: -6px;
}

.duration-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Firefox */
.duration-slider::-moz-range-track {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: none;
}

.duration-slider::-moz-range-progress {
  height: 8px;
  border-radius: 4px;
  background: #3498db;
  border: none;
}

.duration-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Dark theme adjustments */
[data-theme="dark"] .calendar-day {
  background: var(--bg-secondary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .calendar-day:hover {
  background: var(--bg-tertiary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .calendar-day.today {
  background: var(--secondary-dark);
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .add-wear-btn {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .wear-entry {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .selected-date {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .duration-slider {
  background: var(--bg-tertiary);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .calendar-days {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  
  .calendar-day {
    min-height: 140px;
  }
}

@media (max-width: 768px) {
  .calendar-days {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .calendar-day {
    min-height: 120px;
    padding: 0.75rem;
  }
  
  .day-number {
    font-size: 0.875rem;
  }
  
  .add-wear-btn {
    width: 24px;
    height: 24px;
    font-size: 16px;
    top: 6px;
    right: 6px;
  }
  
  .wear-thumbnail {
    width: 28px;
    height: 28px;
  }
  
  .duration-badge {
    font-size: 0.6875rem;
  }
  
  .calendar-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .calendar-days {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 2px;
    padding: 2px;
  }
  
  .calendar-day {
    min-height: 100px;
    padding: 0.5rem;
  }
  
  .weekday {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .add-wear-btn {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }
  
  .wear-thumbnail {
    width: 24px;
    height: 24px;
  }
}

/* ==========================================================================
   WATCH STATS SECTION
   ========================================================================== */

.watch-stats-section {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.watch-stats-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

.stats-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.stat-value {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.6875rem;
}

/* Dark theme adjustments */
[data-theme="dark"] .watch-stats-section {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

/* Responsive design */
@media (max-width: 768px) {
  .watch-stats-section {
    margin-top: 1rem;
    padding: 0.75rem;
  }
  
  .watch-stats-section h3 {
    font-size: 1rem;
  }
  
  .stat-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .stat-label,
  .stat-value {
    font-size: 0.8125rem;
  }
}

/* ==========================================================================
   STATISTICS DASHBOARD
   ========================================================================== */

.stats-dashboard {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.stats-menu {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
  border: 1px solid var(--border-color);
}

.stats-menu h3 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.stats-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.stat-option-btn:hover {
  border-color: var(--accent-color);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-option-btn.active {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: white !important;
}

.stat-option-btn.active .stat-title {
  color: white !important;
}

.stat-option-btn.active .stat-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.stat-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  color: inherit;
}

.stat-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.stats-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  min-height: 500px;
}

.stat-panel {
  display: none;
  padding: 1.5rem;
}

.stat-panel.active {
  display: block;
}

.stat-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.stat-panel-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
}

.stat-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.custom-date-range {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.custom-date-range input {
  min-width: 150px;
}

.chart-container {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  min-height: 400px;
}

.chart-area {
  padding: 1.5rem;
}

.chart-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.chart-header h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.chart-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Original chart styles for Wear Frequency and Brand Distribution */
.bar-chart:not(.horizontal-bar-chart) {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bar-chart:not(.horizontal-bar-chart) .chart-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bar-chart:not(.horizontal-bar-chart) .bar-label {
  min-width: 500px;
  flex-shrink: 0;
}

.bar-chart:not(.horizontal-bar-chart) .watch-name {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-stats {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.bar-chart:not(.horizontal-bar-chart) .bar-container {
  flex: 1;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.bar-chart:not(.horizontal-bar-chart) .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--success-color));
  border-radius: var(--radius-sm);
  transition: width 0.8s ease;
  min-width: 2px;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--text-secondary);
  font-style: italic;
}

.chart-error {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.chart-error p {
  margin-bottom: 1rem;
}

.no-data {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.no-data p {
  margin-bottom: 0.5rem;
}

.chart-summary {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
}

.chart-summary p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.chart-summary strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Pie Chart Styles */
.pie-chart-container {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.pie-chart-wrapper {
  flex: 0 0 500px;
  display: flex;
  justify-content: center;
}

.pie-chart {
  max-width: 500px;
  max-height: 500px;
}

.pie-slice {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.pie-slice:hover {
  opacity: 0.8;
  filter: brightness(1.1);
}

.pie-label {
  pointer-events: none;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.pie-legend {
  flex: 1;
  min-width: 200px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.legend-item:last-child {
  border-bottom: none;
}

.legend-color {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #333333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.legend-label {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Beneficiary Watch List */
.beneficiary-watch-list {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.watch-list-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.watch-list-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.watch-list-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.beneficiary-watch-list .beneficiary-watch-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
  position: relative;
}

.beneficiary-watch-list .beneficiary-watch-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

.beneficiary-watch-list .clickable-watch-item {
  cursor: pointer;
}

.beneficiary-watch-list .clickable-watch-item:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-color);
}

.beneficiary-watch-list .clickable-watch-item:hover .edit-indicator {
  opacity: 1;
}

.beneficiary-watch-list .edit-indicator {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.beneficiary-watch-list .watch-info {
  display: flex;
  align-items: center;
  padding: 1rem;
  gap: 1rem;
}

.beneficiary-watch-list .watch-image {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.beneficiary-watch-list .watch-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.beneficiary-watch-list .watch-placeholder {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

.beneficiary-watch-list .watch-details {
  flex: 1;
  min-width: 0;
}

.beneficiary-watch-list .watch-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.3;
}

.beneficiary-watch-list .watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.beneficiary-watch-list .ref-number {
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.beneficiary-watch-list .price {
  font-weight: 600;
  color: var(--success-color);
}

.beneficiary-watch-list .current-beneficiary {
  font-weight: 500;
  color: var(--primary-color);
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.watch-info-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.watch-info-header h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.125rem;
}

.watch-info-header .ref-number {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Responsive adjustments for pie chart */
@media (max-width: 768px) {
  .pie-chart-container {
    flex-direction: column;
    align-items: center;
  }
  
  .pie-chart-wrapper {
    flex: none;
  }
  
  .pie-legend {
    width: 100%;
    max-width: 400px;
  }
  
  .watch-list-content {
    grid-template-columns: 1fr;
  }
  
  .watch-info {
    padding: 0.75rem;
  }
}

.no-data p:last-child {
  margin-bottom: 0;
  font-style: italic;
}

/* Dark theme adjustments */
[data-theme="dark"] .stats-menu {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .stats-content {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .chart-container {
  background: var(--bg-secondary);
}

[data-theme="dark"] .stat-option-btn {
  background: var(--bg-secondary);
}

[data-theme="dark"] .stat-option-btn:hover {
  background: var(--bg-primary);
}

/* Collection Value Horizontal Bar Chart Styles */
.horizontal-bar-chart {
  width: 100%;
  padding: 1.5rem;
  position: relative;
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
}

.brand-section {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.horizontal-bar-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 40px;
}

.bar-label {
  flex-shrink: 0;
  width: 200px;
  text-align: left;
}

.brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.bar-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.horizontal-bar {
  height: 30px;
  min-width: 2px;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.horizontal-bar:hover {
  transform: scaleY(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  filter: brightness(1.1);
}

.horizontal-bar.expanded {
  box-shadow: 0 0 0 2px var(--primary-color);
  filter: brightness(1.05);
}

.clickable-bar {
  position: relative;
}

.clickable-bar::after {
  content: "▼";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 0.8rem;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.clickable-bar.expanded::after {
  transform: translateY(-50%) rotate(180deg);
}

.bar-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  min-width: 80px;
}

/* Brand Watch Details Expansion */
.brand-watches-details {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0;
  animation: slideDown 0.3s ease-out;
}

.watches-list {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.watch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.watch-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.watch-item:first-child {
  padding-top: 0;
}

.watch-model {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  flex: 1;
}

.watch-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  white-space: nowrap;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
  }
}

.chart-tooltip {
  position: absolute;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  pointer-events: none;
  transform: translateX(-50%) translateY(-100%);
}

.tooltip-content {
  text-align: center;
}

.tooltip-brand {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.tooltip-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.tooltip-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Dark theme adjustments for bar chart */
[data-theme="dark"] .chart-tooltip {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

[data-theme="dark"] .chart-bars {
  border-bottom-color: var(--border-color);
}

/* Responsive adjustments for horizontal bar chart */
@media (max-width: 768px) {
  .horizontal-bar-chart {
    padding: 1rem;
  }
  
  .bar-label {
    width: 150px;
  }
  
  .brand-name {
    font-size: 0.85rem;
  }
  
  
  .bar-value {
    font-size: 0.8rem;
    min-width: 70px;
  }
  
  .horizontal-bar {
    height: 25px;
  }
}

@media (max-width: 480px) {
  .horizontal-bar-chart {
    padding: 0.75rem;
  }
  
  .horizontal-bar-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    min-height: 60px;
  }
  
  .bar-label {
    width: 100%;
    text-align: center;
  }
  
  .bar-wrapper {
    gap: 0.5rem;
  }
  
  .brand-name {
    font-size: 0.8rem;
    white-space: normal;
    text-overflow: unset;
    overflow: visible;
  }
  
  
  .bar-value {
    font-size: 0.75rem;
    min-width: 60px;
  }
  
  .horizontal-bar {
    height: 20px;
  }
  
  .watch-item {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.25rem;
  }
  
  .watch-info {
    align-items: center;
  }
}

/* Collection Highlights Dashboard Styles */
.highlights-dashboard {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.highlights-summary {
  width: 100%;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

/* Specific styling for Collection Highlights summary cards */
.highlights-summary-cards {
  grid-template-columns: repeat(4, 1fr);
}

/* Specific styling for Wish List summary cards */
.wish-list-summary-cards {
  grid-template-columns: repeat(3, 1fr);
}

.summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
  min-width: 0;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-content {
  width: 100%;
}

.card-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.highlights-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.highlight-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s ease;
}

.highlight-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.highlight-header {
  background: var(--primary-color);
  color: white;
  padding: 1rem 1.5rem;
  text-align: center;
}

.highlight-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.highlight-watch {
  padding: 1.5rem;
}

.watch-details {
  text-align: center;
}

.watch-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.watch-reference {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.watch-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.watch-stats {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.watch-date {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Dark theme adjustments for highlights */
[data-theme="dark"] .summary-card {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .highlight-item {
  background: var(--bg-tertiary);
}

/* Responsive adjustments for highlights */
@media (max-width: 768px) {
  .highlights-dashboard {
    padding: 1rem;
    gap: 1.5rem;
  }
  
  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .summary-card {
    padding: 1rem;
  }
  
  .card-value {
    font-size: 1rem;
  }
  
  .highlights-showcase {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .highlight-header {
    padding: 0.75rem 1rem;
  }
  
  .highlight-watch {
    padding: 1rem;
  }
  
  .watch-title {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .summary-cards {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  
  .summary-card {
    padding: 0.75rem;
  }
  
  .card-value {
    font-size: 0.9rem;
  }
  
  .card-label {
    font-size: 0.8rem;
  }
}

/* Responsive design */
@media (max-width: 1024px) {
  .stats-dashboard {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stats-menu {
    order: 2;
  }
  
  .stats-content {
    order: 1;
  }
  
  .stats-options {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .stat-option-btn {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .stat-panel-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .stat-controls {
    justify-content: flex-start;
  }
  
  .bar-chart:not(.horizontal-bar-chart) .chart-bar-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .bar-chart:not(.horizontal-bar-chart) .bar-label {
    min-width: auto;
  }
  
  .custom-date-range {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .custom-date-range input {
    min-width: auto;
  }
}

/* Brand breakdown styles */
.brand-chart-section {
  margin-bottom: 1rem;
}

.brand-name-clickable {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-name-clickable:hover {
  color: var(--accent-color) !important;
  text-decoration: none !important;
}

.brand-watches-list {
  margin-top: 0.75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--border-color);
  background: var(--bg-tertiary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.watch-breakdown {
  padding: 0.75rem;
}

.watch-breakdown-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.watch-breakdown-row:last-child {
  margin-bottom: 0;
}

.watch-breakdown-label {
  min-width: 250px;
  flex-shrink: 0;
}

/* Watch model in charts only */
.watch-breakdown .watch-model {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.8125rem;
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-breakdown-stats {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.watch-breakdown-bar {
  flex: 1;
  height: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.watch-breakdown-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success-color), var(--accent-color));
  border-radius: var(--radius-sm);
  transition: width 0.6s ease;
  min-width: 1px;
}

/* Dark theme adjustments */
[data-theme="dark"] .brand-watches-list {
  background: var(--bg-primary);
  border-left-color: var(--border-color);
}

[data-theme="dark"] .watch-breakdown-bar {
  background: var(--bg-tertiary);
}

/* Responsive design */
@media (max-width: 768px) {
  .watch-breakdown-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .watch-breakdown-label {
    min-width: auto;
  }
  
  .brand-watches-list {
    padding-left: 0.5rem;
  }
  
  .watch-breakdown {
    padding: 0.5rem;
  }
}

/* ==========================================================================
   WARRANTY INDICATOR TOOLTIP - CACHE BUSTER
   ========================================================================== */

/* Warranty Indicator Tooltip - MOVED HERE TO BYPASS CACHE */
.warranty-indicator::after {
  content: attr(data-tooltip) !important;
  position: absolute !important;
  left: calc(50% + 75px) !important;
  top: -25px !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: white !important;
  padding: 3px 6px 5px 6px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  display: inline-block !important;
  vertical-align: top !important;
  height: auto !important;
  max-height: 22px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: all 0.2s ease !important;
  z-index: 9999 !important;
  pointer-events: none !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6) !important;
  text-align: center !important;
  transform: translateX(-50%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* WATCH STATS FONT SIZE FIX - CACHE BUSTER */
.stat-value {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}

.stat-label {
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
}

/* STATS BUTTON ACTIVE STATE FIX - CACHE BUSTER */
.stat-option-btn.active {
  border-color: #3498db !important;
  background-color: #3498db !important;
  background: #3498db !important;
  color: white !important;
}

.stat-option-btn.active * {
  color: white !important;
}

.stat-option-btn.active .stat-title {
  color: white !important;
  display: block !important;
  visibility: visible !important;
}

.stat-option-btn.active .stat-description {
  color: rgba(255, 255, 255, 0.9) !important;
  display: block !important;
  visibility: visible !important;
}

.stat-option-btn.active .stat-icon {
  color: white !important;
  display: block !important;
  visibility: visible !important;
}

.warranty-indicator:hover::after {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Reports Page Styles */
.reports-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.reports-section {
  margin-bottom: 3rem;
}

.reports-section h2 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Report Cards Grid */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.report-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.report-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.report-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.report-card h3 {
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.report-card p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.report-card .btn {
  width: 100%;
  margin-top: auto;
}

/* Custom Report Builder */
.custom-report-builder {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.report-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.checkbox-group input[type="checkbox"] {
  margin: 0;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-options select {
  width: 100%;
}

.generate-custom-report-btn {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  display: block;
}

/* Report History */
.report-history {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

.no-reports p {
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
}

/* Report Preview Modal */
.modal.large .modal-content {
  width: 90%;
  max-width: 1200px;
  height: 80vh;
  max-height: none;
}

.report-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.report-actions .btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.report-preview-container {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1rem;
  height: calc(60vh - 100px);
}

.report-preview-container iframe,
#report-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-sm);
  background: white;
}

.report-modal {
  width: 90vw;
  max-width: 1200px;
  height: 80vh;
  max-height: none;
}

.report-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.report-modal .modal-header .report-actions {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}

.report-modal .modal-body {
  padding: 0;
  height: calc(100% - 4rem);
}

.report-modal .close {
  position: relative;
  right: 0;
  top: 0;
  margin-left: 1rem;
}

/* Dark theme adjustments */
[data-theme="dark"] .report-card {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .custom-report-builder {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .report-history {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .report-actions {
  background: var(--bg-primary);
}

[data-theme="dark"] .report-preview-container {
  background: var(--bg-primary);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .reports-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .report-options {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .report-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .modal.large .modal-content {
    width: 95%;
    height: 90vh;
  }
  
  .report-preview-container {
    height: calc(70vh - 100px);
  }
}

@media (max-width: 480px) {
  .reports-content {
    padding: 0.5rem;
  }
  
  .reports-section {
    margin-bottom: 2rem;
  }
  
  .report-card {
    padding: 1rem;
  }
  
  .custom-report-builder {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   Other Documents & Notes Section
   ========================================================================== */

.other-section {
  padding: 1rem;
}

/* Tabs */
.other-tabs {
  display: flex;
  border-bottom: 2px solid var(--light-gray);
  margin-bottom: 1.5rem;
  gap: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--primary);
  background: var(--light-blue-bg);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--light-blue-bg);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Document Categories */
.document-categories {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 100%;
}

.category-section {
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--light-blue-bg);
  border-bottom: 1px solid var(--light-gray);
  gap: 2rem;
}

.category-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
}

.category-header i {
  color: var(--primary);
}

.document-list {
  padding: 1rem;
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

/* Document Cards */
.document-card {
  background: white;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.2s ease;
  min-width: 600px;
  width: 100%;
}

.document-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.document-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--light-gray);
  gap: 2rem;
}

.document-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.document-actions {
  display: flex;
  gap: 0.5rem;
}

.document-details {
  padding: 1rem 1.5rem;
}

.document-info {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.document-info:last-child {
  margin-bottom: 0;
}

.document-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Notes Section */
.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--light-gray);
}

.notes-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notes-header i {
  color: var(--primary);
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 100%;
}

/* Note Cards */
.note-card {
  background: white;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
  min-width: 600px;
  width: 100%;
}

.note-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--light-gray);
  gap: 2rem;
}

.note-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.note-category {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: capitalize;
}

.note-actions {
  display: flex;
  gap: 0.5rem;
}

.note-content {
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.note-meta {
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--light-gray);
  text-align: right;
}

.note-meta small {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Other Section Responsive */
@media (max-width: 768px) {
  .category-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .notes-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .document-header,
  .note-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .document-actions,
  .note-actions {
    justify-content: center;
  }
  
  .other-tabs {
    justify-content: center;
  }
  
  .tab-btn {
    flex: 1;
    text-align: center;
  }
}

/* ==========================================
   STORAGE MANAGEMENT INTERFACE
   ========================================== */

.storage-content {
  display: flex;
  gap: 2rem;
  min-height: calc(100vh - 120px);
}

.storage-config-panel {
  width: 300px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  height: fit-content;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.storage-config-panel h3 {
  margin: 0 0 1.5rem 0;
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
}

/* Storage Configuration Form Styling */
.config-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.config-form .form-label {
  display: block;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.config-form .form-input {
  border-radius: 8px;
  border: 2px solid var(--border-color);
  transition: all 0.2s ease;
  font-size: 0.95rem;
  background: var(--bg-tertiary);
}

.config-form .form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-color-alpha);
  transform: translateY(-1px);
}

.config-form .form-input:hover {
  border-color: var(--primary-light);
}

.config-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.config-form .btn {
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.config-form .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

/* Storage Stats Section */
.storage-stats {
  margin-top: 2.5rem;
}

.storage-stats h4 {
  margin: 0 0 1rem 0;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.storage-stats .stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color-light);
}

.storage-stats .stat-item:last-child {
  border-bottom: none;
}

.storage-stats .stat-item label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.storage-stats .stat-item span {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.storage-type-section {
  margin-bottom: 2rem;
}

.storage-type-section:last-child {
  margin-bottom: 0;
}

.storage-type-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

.storage-type-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-storage-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-storage-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.storage-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.storage-input-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  display: block;
}

.storage-input-group input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 0.9rem;
}

.storage-input-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-color-20);
}

.storage-grids-container {
  flex: 1;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  overflow-y: auto;
  max-height: calc(100vh - 160px);
}

.storage-grids-container h3 {
  margin: 0 0 1.5rem 0;
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
}

.storage-type-grids {
  margin-bottom: 3rem;
}

.storage-type-grids:last-child {
  margin-bottom: 0;
}

.storage-type-grids h4 {
  margin: 0 0 1.5rem 0;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

.storage-grid-wrapper {
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
}

.storage-grid-wrapper:last-child {
  margin-bottom: 0;
}

.storage-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.storage-grid-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.storage-grid-actions {
  display: flex;
  gap: 0.5rem;
}

.edit-storage-btn, .delete-storage-btn {
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.edit-storage-btn {
  background: var(--primary-color);
  color: white;
}

.edit-storage-btn:hover {
  background: var(--primary-dark);
}

.delete-storage-btn {
  background: var(--danger-color);
  color: white;
}

.delete-storage-btn:hover {
  background: #c0392b;
}

.storage-grid {
  display: grid;
  gap: 6px;
  max-width: 100%;
  margin: 0 auto;
}

.storage-slot {
  aspect-ratio: 1;
  min-width: 60px;
  min-height: 60px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--input-bg);
  position: relative;
}

.storage-slot.empty {
  border-style: dashed;
  color: var(--text-secondary);
  font-size: 1.5rem;
  font-weight: 300;
}

.storage-slot.empty:hover {
  border-color: var(--accent-color);
  background: var(--accent-color-10);
  color: var(--accent-color);
  transform: scale(1.05);
}

.storage-slot.occupied {
  border-color: var(--success-color);
  background: var(--success-light);
  padding: 4px;
}

.storage-slot.occupied:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.watch-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.storage-slot-position {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.9);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 500;
}

.storage-slot.occupied .storage-slot-position {
  background: rgba(0, 0, 0, 0.7);
  color: white;
}

/* Storage Watch Actions Container */
.watch-slot .watch-actions {
  position: absolute;
  top: -10px;
  right: -10px;
  display: none;
  gap: 2px;
  z-index: 10;
}

.watch-slot:hover .watch-actions {
  display: flex;
}

.unassign-watch-btn,
.remove-watch-btn {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.unassign-watch-btn {
  background: var(--accent-color);
  color: white;
}

.unassign-watch-btn:hover {
  background: var(--accent-color-dark);
  transform: scale(1.1);
}

.remove-watch-btn {
  background: var(--danger-color);
  color: white;
}

.remove-watch-btn:hover {
  background: #c0392b;
  transform: scale(1.1);
}

/* Drag and Drop Styles */
.watch-slot.draggable {
  cursor: grab;
}

.watch-slot.dragging {
  opacity: 0.5;
  cursor: grabbing;
  transform: rotate(5deg);
}

.drop-target {
  transition: all 0.2s ease;
}

.drop-target.drag-over {
  background: var(--accent-color-10);
  border: 2px dashed var(--accent-color);
  transform: scale(1.02);
}

.grid-cell.occupied.drag-over .watch-slot {
  border-color: var(--accent-color);
  background: var(--accent-color-10);
  transform: scale(1.05);
}

.no-storage-message {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  margin: 2rem 0;
}

/* Storage Grid Watch Styles */
.watch-slot {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-secondary) 100%);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.watch-slot:hover {
  border-color: var(--accent-color);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.watch-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--border-color-light);
  transition: all 0.2s ease;
  cursor: pointer;
}

.watch-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-color);
}

.watch-placeholder {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--border-color-light) 100%);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.watch-placeholder:hover {
  transform: scale(1.05);
  border-color: var(--accent-color);
  background: linear-gradient(135deg, var(--accent-color-10) 0%, var(--accent-color-20) 100%);
}


.slot-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Grid Cell Add Button Styles */
.grid-cell .add-watch-btn {
  width: 70px;
  height: 70px;
  border: 3px dashed var(--border-color);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--card-bg) 100%);
  color: var(--text-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.grid-cell .add-watch-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: linear-gradient(135deg, var(--accent-color-10) 0%, var(--accent-color-20) 100%);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Empty and Occupied Grid Cell States */
.grid-cell.empty {
  border: none;
  background: transparent;
}

.grid-cell.occupied {
  border: none;
  background: transparent;
}

.grid-cell.occupied .watch-slot {
  border-color: var(--success-color);
  background: linear-gradient(135deg, var(--success-light) 0%, var(--success-color-10) 100%);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.grid-cell.occupied .watch-slot:hover {
  border-color: var(--success-color);
  background: linear-gradient(135deg, var(--success-light) 0%, var(--success-color-20) 100%);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

/* Storage Grid Table Layout */
.storage-grid-container {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 2px 8px var(--shadow-color);
}

.storage-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-color);
}

.storage-grid-header h3 {
  margin: 0;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
}

.grid-actions {
  display: flex;
  gap: 0.5rem;
}

.grid-table {
  display: table;
  border-collapse: separate;
  border-spacing: 12px;
  margin: 0;
  width: 100%;
  table-layout: fixed;
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.grid-header-row,
.grid-data-row {
  display: table-row;
}

.grid-corner,
.grid-header-cell,
.grid-row-header,
.grid-cell {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}

.grid-corner {
  width: 60px;
  height: 60px;
  background: transparent;
  min-width: 60px;
  max-width: 60px;
}

.grid-header-cell,
.grid-row-header {
  height: 60px;
  background: linear-gradient(135deg, var(--accent-color-10) 0%, var(--accent-color-20) 100%);
  border: 2px solid var(--accent-color-30);
  border-radius: 12px;
  font-weight: 700;
  color: var(--accent-color);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.grid-row-header {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
}

.grid-header-cell {
  width: auto;
  min-width: 120px;
}


.grid-header-cell:hover,
.grid-row-header:hover {
  background: linear-gradient(135deg, var(--accent-color-20) 0%, var(--accent-color-30) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.grid-cell {
  width: auto;
  min-width: 100px;
  height: 100px;
  position: relative;
  padding: 6px;
}


/* Watch Selection Modal */
.watch-selection-modal .modal-content {
  width: 500px;
  max-width: 90vw;
}

.watch-selection-modal h3 {
  margin: 0 0 1.5rem 0;
  color: var(--text-color);
}

.location-info {
  background: var(--accent-color-10);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--accent-color-20);
}

.location-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--accent-color);
  font-size: 0.95rem;
}

.location-details {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.watch-select-group {
  margin-bottom: 1.5rem;
}

.watch-select-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.watch-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 0.95rem;
}

.watch-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-color-20);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.modal-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn.secondary {
  background: var(--border-color);
  color: var(--text-color);
}

.modal-btn.secondary:hover {
  background: var(--text-secondary);
}

.modal-btn.primary {
  background: var(--accent-color);
  color: white;
}

.modal-btn.primary:hover {
  background: var(--accent-hover);
}

/* Responsive adjustments for storage interface */
@media (max-width: 1200px) {
  .storage-content {
    flex-direction: column;
    height: auto;
  }
  
  .storage-config-panel {
    width: 100%;
    max-height: none;
  }
  
  .storage-grids-container {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .storage-slot {
    min-width: 50px;
    min-height: 50px;
  }
  
  .storage-grid {
    gap: 4px;
  }
  
  .storage-grid-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .storage-input-group {
    flex-direction: column;
  }

  /* Grid table responsive adjustments */
  .grid-table {
    border-spacing: 6px;
    max-width: 100%;
    padding: 1rem;
  }
  
  .grid-cell {
    min-width: 80px;
    height: 80px;
  }
  
  .grid-header-cell,
  .grid-row-header {
    min-width: 80px;
    height: 50px;
    font-size: 0.9rem;
  }
  
  .grid-corner {
    width: 50px;
    height: 50px;
  }
  
  .watch-thumb {
    width: 60px;
    height: 60px;
  }
  
  .watch-placeholder {
    width: 60px;
    height: 60px;
    font-size: 1rem;
  }
  
  .slot-label {
    font-size: 0.7rem;
  }
  
  .grid-cell .add-watch-btn {
    width: 55px;
    height: 55px;
    font-size: 1.2rem;
  }
}

/* ===== WATCH DETAIL STATS SECTION ===== */
.watch-details-container.stats-view .watch-stats-section {
  padding: 2rem;
  max-width: none;
  width: 100%;
  margin: 0;
}

.watch-stats-section .stats-header {
  text-align: center;
  margin-bottom: 2rem;
}

.watch-stats-section .stats-header h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.watch-stats-section .stats-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

.watch-stats-section .stats-category {
  background: var(--surface-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.watch-stats-section .stats-category h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.watch-stats-section .stats-category h4 i {
  font-size: 1.4rem;
  color: var(--accent-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
}

.stat-card {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.2s ease;
  overflow: hidden; /* Handle text overflow */
}

.stat-card:hover {
  border-color: var(--accent-color-50);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  word-wrap: break-word;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card .stat-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.2;
}

/* Monthly Wear Pattern Chart */
.wear-pattern-chart {
  margin-top: 1rem;
}

.line-chart-container {
  padding: 0;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  width: 100%;
}

.line-chart {
  width: 100%;
  height: 250px;
  display: block;
}

.line-chart circle:hover {
  r: 7;
  transition: r 0.2s ease;
}

/* Recent Wear History */
.recent-wears {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wear-record {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.wear-record .wear-date {
  font-weight: 600;
  color: var(--text-primary);
}

.wear-record .wear-details {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wear-record .occasion {
  background: var(--accent-color-20);
  color: var(--accent-color-dark);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.wear-record .notes {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.85rem;
}

.view-all-link {
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.view-all-link a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.view-all-link a:hover {
  text-decoration: underline;
}

/* No Data Message */
.no-data-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.no-data-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-color-50);
}

.no-data-message h4 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-secondary);
}

.no-data-message p {
  margin: 0 0 1.5rem 0;
  color: var(--text-muted);
}

/* Error Message */
.error-message {
  text-align: center;
  padding: 2rem;
  color: var(--danger-color);
}

.error-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.error-message h4 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
}

.error-message p {
  margin: 0;
  color: var(--text-muted);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .stat-card {
    padding: 1rem 0.75rem;
  }
  
  .stat-card .stat-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}
  
  .line-chart-container {
    padding: 0.75rem;
  }
  
  .line-chart {
    max-height: 250px;
  }
  
  .wear-record {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .watch-stats-section .stats-category {
    padding: 1rem;
  }
}

/* ===== TIER LIST STYLES ===== */
.tier-list-container {
  padding: 2rem;
}

.tier-list-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.tier-section {
  display: flex;
  align-items: stretch;
  background: var(--surface-color);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  min-height: 120px;
}

.tier-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  min-width: 120px;
  color: white;
  font-weight: 700;
  text-align: center;
  position: relative;
}

.tier-rank {
  font-size: 2.5rem;
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.tier-count {
  font-size: 0.9rem;
  margin-top: 0.25rem;
  opacity: 0.9;
}

.tier-watches {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  align-content: flex-start;
  min-height: 120px;
  transition: background-color 0.2s ease;
}

.tier-watches.drag-over {
  background-color: var(--accent-color-10);
  border: 2px dashed var(--accent-color);
}

.empty-tier {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  font-style: italic;
  background: var(--background-color);
}

.tier-watch-thumbnail {
  width: 80px;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: grab;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.tier-watch-thumbnail:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color-50);
}

.tier-watch-thumbnail.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
  cursor: grabbing;
}

.watch-thumbnail-image {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-color);
}

.watch-thumbnail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.watch-thumbnail-image .no-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-color-20);
  color: var(--accent-color);
  font-weight: 700;
  font-size: 1.2rem;
}

.watch-thumbnail-info {
  text-align: center;
  line-height: 1.2;
}

.watch-brand {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.tier-watch-thumbnail .watch-model {
  font-size: 0.65rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70px;
}

/* Mobile Responsiveness for Tier List */
@media (max-width: 768px) {
  .tier-section {
    flex-direction: column;
  }
  
  .tier-label {
    width: 100%;
    min-width: unset;
    height: 60px;
    flex-direction: row;
    gap: 1rem;
  }
  
  .tier-rank {
    font-size: 2rem;
  }
  
  .tier-watches {
    justify-content: center;
  }
  
  .tier-watch-thumbnail {
    width: 70px;
  }
  
  .watch-thumbnail-image {
    width: 50px;
    height: 50px;
  }
}

/* ===== TIER COUNTS LEGEND ===== */
.tier-counts-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: 1rem;
}

.total-count {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.tier-legend-boxes {
  display: flex;
  gap: 0.5rem;
}

.tier-legend-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  color: white;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tier-count {
  font-size: 0.75rem;
  line-height: 1;
  margin-bottom: 1px;
}

.tier-letter {
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 900;
}

/* Mobile Responsiveness for Tier Legend */
@media (max-width: 768px) {
  .tier-counts-legend {
    flex-direction: column;
    gap: 0.5rem;
    margin-right: 0.5rem;
  }
  
  .total-count {
    font-size: 0.8rem;
  }
  
  .tier-legend-box {
    width: 35px;
    height: 35px;
  }
  
  .tier-count {
    font-size: 0.7rem;
  }
  
  .tier-letter {
    font-size: 0.75rem;
  }
}

/* ===== COLLECTION PAGE VIEW/EDIT BUTTON COLORS ===== */
/* View button - same color as DIVESTED (btn-primary blue) */
.collection-grid .watch-card .view-watch-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%) !important;
  color: white !important;
  border: 1px solid var(--primary-color) !important;
}

.collection-grid .watch-card .view-watch-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3 0%, #004494 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.25);
}

.collection-grid .watch-card .view-watch-btn:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Edit button - same color as TIER LIST (btn-danger red) */
.collection-grid .watch-card .edit-watch-btn {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
  color: white !important;
  border: 1px solid #dc3545 !important;
}

.collection-grid .watch-card .edit-watch-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.25);
}

.collection-grid .watch-card .edit-watch-btn:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ===== STORAGE PAGE EDIT BUTTON COLOR ===== */
/* Edit button - same color as Create Storage button (btn-primary blue) */
.storage-management .storage-grid-container .grid-actions .btn-secondary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%) !important;
  color: white !important;
  border: 1px solid var(--primary-color) !important;
}

.storage-management .storage-grid-container .grid-actions .btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3 0%, #004494 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.25);
}

.storage-management .storage-grid-container .grid-actions .btn-secondary:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* ==========================================================================
   Professional Settings Page Styles
   ========================================================================== */

.view-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 0.5rem;
  font-weight: 400;
}

.settings-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Settings Category Styling */
.settings-category {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}

.settings-category:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Category Header */
.category-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.category-icon {
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  flex-shrink: 0;
}

.category-info h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.category-info p {
  margin: 0.25rem 0 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Settings Grid */
.settings-grid {
  padding: 1.5rem 2rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Individual Setting Item */
.setting-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.setting-item:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.setting-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.setting-item:hover::before {
  opacity: 1;
}

/* Setting Icon */
.setting-icon {
  font-size: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

/* Setting Content */
.setting-content {
  flex: 1;
  min-width: 0;
}

.setting-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.setting-content p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Setting Button */
.setting-btn {
  margin-top: 0.5rem;
  min-width: 120px;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.setting-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Dark Theme Adjustments */
[data-theme="dark"] .settings-category {
  background: var(--bg-secondary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .category-header {
  background: var(--bg-primary);
  border-bottom-color: var(--bg-tertiary);
}

[data-theme="dark"] .setting-item {
  background: var(--bg-secondary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .setting-item:hover {
  border-color: var(--primary-light);
  background: var(--bg-primary);
}

[data-theme="dark"] .setting-icon {
  background: var(--bg-primary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .category-icon {
  background: var(--primary-light);
}

/* Responsive Design */
@media (max-width: 768px) {
  .settings-container {
    padding: 1rem 0;
  }
  
  .category-header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .category-icon {
    font-size: 1.75rem;
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .category-info h2 {
    font-size: 1.3rem;
  }
  
  .settings-grid {
    padding: 1rem 1.5rem 1.5rem;
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .setting-item {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  
  .setting-content {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .category-header {
    padding: 1rem;
  }
  
  .settings-grid {
    padding: 1rem;
  }
  
  .setting-item {
    padding: 1rem 0.75rem;
  }
  
  .setting-btn {
    width: 100%;
    margin-top: 1rem;
  }
}

/* =====================================================
   DOCUMENT AUDIT STYLES
   ===================================================== */

.document-audit-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Audit Statistics */
.audit-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.complete {
  border-color: var(--success-color);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(40, 167, 69, 0.1) 100%);
}

.stat-card.incomplete {
  border-color: var(--warning-color);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 193, 7, 0.1) 100%);
}

.stat-card.total {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(44, 62, 80, 0.1) 100%);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Audit Legend */
.audit-legend {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 14px;
}

.status-icon.complete {
  background: var(--success-color);
  color: white;
}

.status-icon.incomplete {
  background: var(--warning-color);
  color: white;
}

/* Audit Grid */
.audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

.watch-audit-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.watch-audit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.watch-audit-card.complete {
  border-left: 4px solid var(--success-color);
}

.watch-audit-card.incomplete {
  border-left: 4px solid var(--warning-color);
}

.audit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.watch-audit-card .watch-info h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.watch-audit-card .watch-info p {
  margin: 0.25rem 0 0 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Document Checklist */
.document-checklist {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
}

.doc-item.has-doc {
  border-color: var(--success-color);
  background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(40, 167, 69, 0.05) 100%);
}

.doc-item.missing-doc {
  border-color: var(--error-color);
  background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(220, 53, 69, 0.05) 100%);
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.doc-icon {
  font-size: 1.2rem;
}

.doc-name {
  font-weight: 500;
  color: var(--text-primary);
}

.doc-status {
  margin-left: auto;
  font-weight: bold;
  font-size: 1.1rem;
}

.doc-status:not(.missing) {
  color: var(--success-color);
}

.doc-status.missing {
  color: var(--error-color);
}

.doc-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Missing Summary */
.missing-summary {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid var(--warning-color);
  border-radius: var(--border-radius);
  text-align: center;
}

.missing-label {
  font-weight: 600;
  color: var(--warning-color);
  margin-right: 0.5rem;
}

.missing-list {
  color: var(--text-primary);
}

/* Appraisal Documents Modal */
.appraisal-docs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.appraisal-doc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.appraisal-doc-item .doc-info h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.appraisal-doc-item .doc-info p {
  margin: 0 0 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.doc-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Upload Progress */
.upload-progress {
  margin-top: 1rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  display: block;
}

/* Dark Theme Adjustments */
[data-theme="dark"] .stat-card {
  background: var(--bg-secondary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .audit-legend {
  background: var(--bg-secondary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .watch-audit-card {
  background: var(--bg-secondary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .doc-item {
  background: var(--bg-primary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .doc-item.has-doc {
  background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(40, 167, 69, 0.1) 100%);
}

[data-theme="dark"] .doc-item.missing-doc {
  background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(220, 53, 69, 0.1) 100%);
}

[data-theme="dark"] .appraisal-doc-item {
  background: var(--bg-primary);
  border-color: var(--bg-tertiary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .document-audit-container {
    padding: 1rem;
  }
  
  .audit-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .audit-legend {
    flex-direction: column;
    gap: 1rem;
  }
  
  .audit-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .watch-audit-card {
    padding: 1rem;
  }
  
  .audit-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .doc-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .doc-actions {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .stat-value {
    font-size: 2rem;
  }
  
  .watch-audit-card .watch-info h3 {
    font-size: 1.1rem;
  }
  
  .doc-actions {
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
  }
  
  .doc-actions .btn {
    width: 100%;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* ===================================================================
   BENEFICIARY MANAGEMENT STYLES
   ================================================================== */

/* Beneficiary Management Container */
.beneficiary-management-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.management-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Beneficiary Sections */
.beneficiary-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.beneficiary-section.unassigned-section {
  border-left: 4px solid var(--warning-color);
}

.beneficiary-section:not(.unassigned-section) {
  border-left: 4px solid var(--primary-color);
}

.beneficiary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border-color);
}

.beneficiary-info h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.beneficiary-details {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.beneficiary-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.watch-count-badge {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  font-weight: 600;
}

.unassigned-section .watch-count-badge {
  background: var(--warning-color);
}

/* Watches Grid */
.watches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  padding: 2rem;
}

.watch-assignment-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.watch-assignment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.watch-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.watch-info p {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.watch-ref {
  display: inline-block;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-family: monospace;
}

.assignment-controls {
  margin-top: 1rem;
  display: flex;
  align-items: center;
}

.watch-reassign-select,
.watch-assign-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.watch-reassign-select:focus,
.watch-assign-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.no-watches-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Edit Beneficiary Button */
.edit-beneficiary-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.edit-beneficiary-btn i {
  font-size: 0.8rem;
}

/* Dark Theme Adjustments */
[data-theme="dark"] .beneficiary-section {
  background: var(--bg-secondary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .beneficiary-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .watch-assignment-card {
  background: var(--bg-primary);
  border-color: var(--bg-tertiary);
}

[data-theme="dark"] .watch-reassign-select,
[data-theme="dark"] .watch-assign-select {
  background: var(--bg-primary);
  border-color: var(--bg-tertiary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .beneficiary-management-container {
    padding: 1rem;
  }
  
  .management-sections {
    gap: 1.5rem;
  }
  
  .beneficiary-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.5rem;
  }
  
  .beneficiary-actions {
    align-self: flex-end;
  }
  
  .watches-grid {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .watch-assignment-card {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .beneficiary-header {
    padding: 1rem;
  }
  
  .beneficiary-info h3 {
    font-size: 1.2rem;
  }
  
  .watches-grid {
    padding: 1rem;
  }
  
  .edit-beneficiary-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .watch-count-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}