/**
 * 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);
}

/* User Management Table Spacing */
.users-table th,
.users-table td {
  padding: 16px 30px;
}

.users-table th:first-child,
.users-table td:first-child {
  min-width: 140px; /* Username */
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
  min-width: 200px; /* Email */
}

.users-table th:nth-child(3),
.users-table td:nth-child(3) {
  min-width: 100px; /* Status */
}

.users-table th:nth-child(4),
.users-table td:nth-child(4) {
  min-width: 100px; /* Role */
}

.users-table th:nth-child(5),
.users-table td:nth-child(5) {
  min-width: 140px; /* Created */
}

.users-table th:nth-child(6),
.users-table td:nth-child(6) {
  min-width: 180px; /* Actions */
}

/* Users Status Filter Dropdown Styling */
.users-status-filter {
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

.users-status-filter:focus {
  background-color: var(--bg-secondary) !important;
  border-color: var(--primary-color) !important;
}

/* Dark theme specific styling for users dropdown */
[data-theme="dark"] .users-status-filter {
  background-color: #2a2a2a !important;
  border-color: #404040 !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"] .users-status-filter:focus {
  background-color: #353535 !important;
  border-color: var(--primary-color) !important;
}

/* User Status Badge Styling */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  border: 1px solid;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
  border-color: #ffeaa7;
}

.status-inactive {
  background-color: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

.status-deleted {
  background-color: #343a40;
  color: #ffffff;
  border-color: #495057;
}

/* Dark theme user status badges */
[data-theme="dark"] .status-active {
  background-color: #2d5a3d;
  color: #b8e6c1;
  border-color: #4a7c59;
}

[data-theme="dark"] .status-pending {
  background-color: #5a4a2d;
  color: #e6d4b8;
  border-color: #7c6a4a;
}

[data-theme="dark"] .status-inactive {
  background-color: #5a2d2d;
  color: #e6b8b8;
  border-color: #7c4a4a;
}

[data-theme="dark"] .status-deleted {
  background-color: #1a1a1a;
  color: #cccccc;
  border-color: #333333;
}

/* ==========================================================================
   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-container {
  width: 100%;
  height: calc(100% - 60px);
  min-height: 500px;
  position: relative;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.warranty-pdf-viewer {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
  border-radius: var(--radius-md);
}

.pdf-fallback {
  display: block;
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.pdf-fallback p {
  margin: 0;
}

.pdf-fallback a {
  color: #4fa8f7;
  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-container {
  background: var(--bg-primary);
  border-color: var(--border-dark);
}

[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, 500px));
  gap: 1.5rem;
  justify-content: start;
}

.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: 0.75rem;
}

.receipt-preview {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: white;
}

.receipt-pdf-container {
  width: 100%;
  height: auto;
  position: relative;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.receipt-pdf-preview {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-md);
  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.25rem;
  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-container {
  background: var(--bg-primary);
  border-color: var(--border-dark);
}

[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;
}

.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;
  margin-left: auto !important;
}

/* 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;
}

/* Owner panel styles */
.owner-container {
  position: relative;
}

.owner-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;
}

.owner-options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.owner-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;
}

.owner-option:hover {
  background: var(--bg-hover);
}

.owner-option.active {
  background: var(--primary-color);
  color: white;
}

.owner-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* 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"] .owner-panel {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .owner-option.active {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .search-input,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .price-input {
  background: var(--bg-secondary);
  border-color: #555555;
  color: var(--text-primary);
}

[data-theme="dark"] #collection-search.form-input,
[data-theme="dark"] #divested-search.form-input {
  background: #4a4a4a !important;
  border-color: #666666 !important;
  color: var(--text-primary);
}

[data-theme="dark"] .btn-outline:hover:not(:disabled) {
  color: var(--bg-primary) !important;
}

[data-theme="dark"] .sort-option.active {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .btn-back {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: #555555 !important;
}

[data-theme="dark"] .btn-back:hover:not(:disabled) {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .return-to-collection-btn {
  background: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border-color: #555555 !important;
}

[data-theme="dark"] .return-to-collection-btn:hover:not(:disabled) {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .nav-btn.active {
  background: var(--secondary-color) !important;
  color: var(--bg-primary) !important;
}

[data-theme="dark"] .watch-detail-mobile-nav-item.active {
  background: #404040 !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .watch-detail-menu-btn.active {
  background: #404040 !important;
  color: var(--text-primary) !important;
}

[data-theme="dark"] .convert-btn,
[data-theme="dark"] .convert-wishitem-btn,
[data-theme="dark"] .convert-from-edit-btn {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #5a6268 100%) !important;
  color: white !important;
  border: 1px solid var(--secondary-color) !important;
}

[data-theme="dark"] .highlight-header h4 {
  color: #333333 !important;
}

[data-theme="dark"] .stat-title {
  color: white !important;
}

[data-theme="dark"] .collection-summary .label,
[data-theme="dark"] .collection-summary .value {
  color: var(--text-secondary) !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .collection-controls {
    flex-direction: column;
    gap: 1rem;
  }
  
  .search-container {
    min-width: auto;
    max-width: 100%;
  }

  /* Ensure all buttons and containers fit on mobile */
  .owner-container,
  .sort-container,
  .filter-container {
    max-width: 100%;
    min-width: auto;
  }

  .owner-toggle-btn,
  .sort-toggle-btn,
  .filter-toggle-btn {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .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;
}

/* Owner badge in wear entries */
.wear-entry .owner-badge {
  font-size: 0.6rem;
  padding: 0.125rem 0.375rem;
  background: var(--accent-color);
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  position: absolute;
  top: 0.125rem;
  right: 0.125rem;
  opacity: 0.9;
}

.wear-entry {
  position: relative;
}

.wear-entry:hover .owner-badge {
  opacity: 1;
}

/* 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: 1400px) {
  .calendar-days {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media (max-width: 1200px) {
  .calendar-day {
    min-height: 140px;
  }
}

@media (max-width: 768px) {
  .calendar-days {
    grid-template-columns: repeat(7, 1fr);
  }
  
  .calendar-day {
    min-height: 80px;
    padding: 0.25rem;
    font-size: 0.75rem;
  }
  
  .day-number {
    font-size: 0.7rem;
  }
  
  .add-wear-btn {
    width: 24px;
    height: 24px;
    font-size: 16px;
    top: 6px;
    right: 6px;
  }
  
  .wear-thumbnail {
    width: 28px;
    height: 28px;
  }
  
  .duration-badge {
    display: none;
  }
  
  .calendar-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .calendar-days {
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    padding: 1px;
  }
  
  .calendar-day {
    min-height: 70px;
    padding: 0.1rem;
    font-size: 0.65rem;
  }
  
  .weekday {
    padding: 0.5rem 0.2rem;
    font-size: 0.6rem;
  }
  
  .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);
}

/* Mobile Statistics Optimizations */
@media (max-width: 768px) {
  /* Stats Page General */
  .stats-dashboard {
    padding: 1rem;
  }

  .stats-content {
    padding: 1rem;
  }

  .chart-container {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  /* Pie Chart Mobile Optimizations */
  .pie-chart-container {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .pie-chart-wrapper {
    flex: none;
    width: 100%;
    max-width: 320px;
  }

  .pie-chart {
    max-width: 100%;
    max-height: 320px;
    width: 100%;
    height: auto;
  }

  .pie-legend {
    width: 100%;
    max-width: 100%;
    order: 2;
  }

  .legend-item {
    padding: 0.75rem 0;
    gap: 1rem;
  }

  .legend-color {
    width: 20px;
    height: 20px;
  }

  .legend-label {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  /* Beneficiary Watch List Mobile */
  .beneficiary-watch-list {
    margin-top: 1rem;
    padding: 1rem;
  }

  .beneficiary-watch-list .watch-list-content {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .beneficiary-watch-list .watch-info {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .beneficiary-watch-list .watch-image {
    width: 50px !important;
    height: 50px !important;
  }

  .beneficiary-watch-list .watch-name {
    font-size: 0.8rem !important;
  }

  .beneficiary-watch-list .watch-meta {
    gap: 0.5rem;
    font-size: 0.7rem;
  }

  /* Collection Highlights Mobile */
  .highlights-dashboard {
    padding: 1rem;
    gap: 1.5rem;
  }

  .summary-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Collection Highlights Summary Cards - Single Column on Mobile */
  .highlights-summary-cards {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Enhanced Collection Highlights Summary Cards for Mobile */
  .highlights-summary .summary-card {
    padding: 1.5rem 1.25rem;
    min-height: 90px;
    width: 100%;
  }

  .highlights-summary .card-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    line-height: 1.2;
    word-wrap: break-word;
  }

  .highlights-summary .card-label {
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
    word-wrap: break-word;
  }

  /* Regular summary cards (non-highlights) keep smaller size */
  .summary-card {
    padding: 0.75rem;
  }

  .card-value {
    font-size: 1rem;
  }

  .card-label {
    font-size: 0.8rem;
  }

  .highlights-showcase {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .highlight-header {
    padding: 0.75rem 1rem;
  }

  .highlight-header h4 {
    font-size: 1rem;
  }

  .highlight-watch {
    padding: 1rem;
  }

  .watch-title {
    font-size: 1.1rem;
  }

  /* Chart Tooltip Mobile Optimizations */
  .chart-tooltip {
    padding: 0.6rem;
    font-size: 0.9rem;
    max-width: 240px;
    transform: translateX(-50%) translateY(-105%);
  }

  .tooltip-brand {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  .tooltip-value {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
  }

  .tooltip-count {
    font-size: 0.75rem;
  }

  /* Disable hover effects on mobile for better touch experience */
  .pie-slice:hover,
  .horizontal-bar:hover {
    opacity: 1;
    filter: none;
    transform: none;
    box-shadow: none;
  }

  /* Wear Frequency Charts Mobile Optimization */
  .bar-chart:not(.horizontal-bar-chart) {
    padding: 1rem;
    margin: 0;
    overflow-x: hidden;
  }

  .bar-chart:not(.horizontal-bar-chart) .chart-bar-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .bar-chart:not(.horizontal-bar-chart) .bar-label {
    min-width: auto !important;
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
  }

  .bar-chart:not(.horizontal-bar-chart) .watch-name {
    font-size: 0.9rem;
    white-space: normal;
    text-overflow: unset;
    overflow: visible;
    margin-bottom: 0.5rem;
  }

  .watch-stats {
    font-size: 0.8rem;
    margin-top: 0.25rem;
  }

  .bar-chart:not(.horizontal-bar-chart) .bar-container {
    height: 32px;
    margin-top: 0.5rem;
  }

  /* Brand Chart Section Mobile */
  .brand-chart-section {
    margin-bottom: 1.5rem;
  }

  .brand-watches-list {
    margin-top: 0.5rem;
    padding-left: 0.75rem;
  }

  .watch-breakdown {
    padding: 0.75rem;
  }

  .watch-breakdown-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .watch-breakdown-label {
    min-width: auto;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
  }

  .watch-breakdown .watch-model {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  .watch-breakdown-stats {
    font-size: 0.75rem;
  }
}

/* Extra Small Mobile Optimizations */
@media (max-width: 480px) {
  .stats-dashboard {
    padding: 0.75rem;
  }

  .stats-content {
    padding: 0.75rem;
  }

  .chart-container {
    padding: 0.75rem;
  }

  /* Pie Charts Extra Small */
  .pie-chart-container {
    gap: 1rem;
  }

  .pie-chart-wrapper {
    max-width: 280px;
  }

  .pie-chart {
    max-height: 280px;
  }

  .legend-item {
    padding: 0.5rem 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .legend-color {
    width: 16px;
    height: 16px;
  }

  .legend-label {
    font-size: 0.85rem;
  }

  /* Summary Cards Stack - Extra Small Mobile */
  .summary-cards,
  .highlights-summary-cards {
    grid-template-columns: 1fr !important;
  }

  /* Enhanced Collection Highlights Summary Cards for Extra Small Mobile */
  .highlights-summary .summary-card {
    padding: 1.25rem 1rem;
    min-height: 80px;
    width: 100%;
  }

  .highlights-summary .card-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    word-wrap: break-word;
  }

  .highlights-summary .card-label {
    font-size: 0.85rem;
    line-height: 1.3;
    font-weight: 500;
    word-wrap: break-word;
  }

  /* Regular summary cards */
  .summary-card {
    padding: 0.5rem;
  }

  .card-value {
    font-size: 0.9rem;
  }

  .card-label {
    font-size: 0.75rem;
  }

  /* Chart Tooltip Mobile Optimizations */
  .chart-tooltip {
    padding: 0.5rem;
    font-size: 0.85rem;
    max-width: 200px;
    transform: translateX(-50%) translateY(-110%);
  }

  .tooltip-brand {
    font-size: 0.8rem;
    margin-bottom: 0.125rem;
  }

  .tooltip-value {
    font-size: 1rem;
    margin-bottom: 0.125rem;
  }

  .tooltip-count {
    font-size: 0.7rem;
  }

  /* Wear Frequency Charts Extra Small Mobile */
  .bar-chart:not(.horizontal-bar-chart) {
    padding: 0.75rem;
  }

  .bar-chart:not(.horizontal-bar-chart) .chart-bar-row {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .bar-chart:not(.horizontal-bar-chart) .bar-label {
    padding: 0.5rem;
  }

  .bar-chart:not(.horizontal-bar-chart) .watch-name {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  .watch-stats {
    font-size: 0.75rem;
  }

  .bar-chart:not(.horizontal-bar-chart) .bar-container {
    height: 28px;
  }

  /* Brand Chart Extra Small Mobile */
  .brand-chart-section {
    margin-bottom: 1rem;
  }

  .watch-breakdown {
    padding: 0.5rem;
  }

  .watch-breakdown-row {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .watch-breakdown-label {
    padding: 0.4rem;
  }

  .watch-breakdown .watch-model {
    font-size: 0.8rem;
  }

  .watch-breakdown-stats {
    font-size: 0.7rem;
  }
}

.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%;
}

/* Report Builder Actions */
.report-builder-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.generate-custom-report-btn {
  flex: 1;
  max-width: 250px;
}

.save-favorite-btn {
  flex: 0 0 auto;
  min-width: 250px;
  max-width: 250px;
  width: 250px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 0.75rem;
}

/* Enhanced Custom Report Builder Dropdown Styling */
.custom-report-builder #custom-report-type,
.custom-report-builder .filter-options select {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1.5 4.5h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 0.75rem) center;
  cursor: pointer;
}

.custom-report-builder #custom-report-type:focus,
.custom-report-builder .filter-options select:focus {
  background-color: var(--bg-primary);
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.custom-report-builder #custom-report-type:hover,
.custom-report-builder .filter-options select:hover {
  border-color: var(--secondary-color);
}

/* Dark theme support for Custom Report Builder dropdowns */
[data-theme="dark"] .custom-report-builder #custom-report-type,
[data-theme="dark"] .custom-report-builder .filter-options select {
  background-color: var(--bg-tertiary);
  border-color: var(--bg-tertiary);
  color: var(--text-primary);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ccc' d='M6 9L1.5 4.5h9z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .custom-report-builder #custom-report-type:focus,
[data-theme="dark"] .custom-report-builder .filter-options select:focus {
  background-color: var(--bg-secondary);
  border-color: var(--secondary-light);
  box-shadow: 0 0 0 2px rgba(116, 185, 255, 0.2);
}

[data-theme="dark"] .custom-report-builder #custom-report-type:hover,
[data-theme="dark"] .custom-report-builder .filter-options select:hover {
  border-color: var(--secondary-light);
}

/* 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;
  }
}

/* ===== DELETE WATCH MODAL STYLES ===== */

.delete-watch-modal {
  text-align: center;
}

.delete-watch-modal .watch-summary {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 0.5rem;
}

.delete-watch-modal .watch-summary h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.delete-watch-modal .watch-reference {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.delete-watch-modal .watch-modal-photo {
  max-width: 120px;
  max-height: 120px;
  margin-top: 0.75rem;
  border-radius: 0.25rem;
  object-fit: cover;
}

.delete-watch-modal .warning-message {
  text-align: left;
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.5rem;
}

.delete-watch-modal .warning-message p {
  margin: 0 0 0.75rem 0;
}

.delete-watch-modal .warning-message ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.delete-watch-modal .warning-message li {
  margin: 0.25rem 0;
  color: var(--text-secondary);
}

.delete-watch-modal .delete-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.delete-watch-modal .delete-actions .btn {
  min-width: 120px;
}

/* Dark theme adjustments */
[data-theme="dark"] .delete-watch-modal .warning-message {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ===== 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 {
  background: #f0f9ff;
  border: 2px solid #28a745;
  border-radius: var(--radius-lg);
}

.stat-card.incomplete {
  background: #fef2f2;
  border: 2px solid #dc3545;
  border-radius: var(--radius-lg);
}

.stat-card.total {
  background: #eff6ff;
  border: 2px solid #007bff;
  border-radius: var(--radius-lg);
}

/* Active state for clicked stat cards */
.stat-card.active-filter {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.stat-card.complete.active-filter {
  background: #dcf4dc;
  border-color: #1e7e34;
}

.stat-card.incomplete.active-filter {
  background: #f8d7da;
  border-color: #bd2130;
}

.stat-card.total.active-filter {
  background: #cce7ff;
  border-color: #0056b3;
}

/* Active state for Watch Data Audit page (uses .active class) */
.stat-card.active {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

.stat-card.complete.active {
  background: #dcf4dc !important;
  border-color: #1e7e34 !important;
}

.stat-card.incomplete.active {
  background: #f8d7da !important;
  border-color: #bd2130 !important;
}

.stat-card.total.active {
  background: #cce7ff !important;
  border-color: #0056b3 !important;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  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);
}

/* Watch Data Audit Specific Styles */
.data-checklist {
  margin: 1rem 0;
}

.complete-message {
  color: var(--success);
  font-weight: 600;
  text-align: center;
  padding: 1rem;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.missing-fields {
  padding: 0.5rem 0;
}

.missing-label {
  font-weight: 600;
  color: var(--warning);
  margin-bottom: 0.5rem;
}

.missing-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.missing-list li {
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
  color: var(--text-secondary);
}

.missing-list li::before {
  content: "•";
  color: var(--warning);
  position: absolute;
  left: 0;
}

.audit-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

/* Dark theme adjustments for data audit */
[data-theme="dark"] .complete-message {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.3);
}

[data-theme="dark"] .audit-actions {
  border-color: var(--bg-tertiary);
}

/* Percentage Complete Styling */
.status-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.percentage-complete {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 12px;
  min-width: 2.5rem;
  text-align: center;
}

.percentage-complete.complete {
  background: rgba(76, 175, 80, 0.15);
  color: var(--success);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.percentage-complete.incomplete {
  background: rgba(255, 193, 7, 0.15);
  color: var(--warning);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Dark theme adjustments for percentage */
[data-theme="dark"] .percentage-complete.complete {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.4);
}

[data-theme="dark"] .percentage-complete.incomplete {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.4);
}

/* Reference Number Styling */
.reference-number {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0.25rem 0 0 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-weight: 500;
}

/* Clickable Stats Cards */
.stat-card.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.stat-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

.stat-card.clickable.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.2);
  background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(44, 90, 160, 0.05) 100%);
}

.stat-card.clickable.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 8px 8px 0 0;
}

/* Dark theme adjustments for clickable cards */
[data-theme="dark"] .stat-card.clickable:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: var(--primary);
}

[data-theme="dark"] .stat-card.clickable.active {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(44, 90, 160, 0.1) 100%);
  box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.3);
}

/* Active filter styling for document audit */
.stat-card.active-filter {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.2);
  background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(44, 90, 160, 0.05) 100%);
  position: relative;
}

.stat-card.active-filter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 8px 8px 0 0;
}

[data-theme="dark"] .stat-card.active-filter {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(44, 90, 160, 0.1) 100%);
  box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.3);
}

[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;
  }
}

/* ==========================================================================
   List Management Page Styles
   ========================================================================== */

.list-management-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 0;
}

.list-categories-section h2 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.list-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 100px;
}

.category-btn:hover {
  border-color: var(--primary);
  background: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.category-btn:hover span {
  color: white;
}

.category-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: white;
}

.category-btn.active span {
  color: white;
}

.category-btn.active small {
  color: rgba(255, 255, 255, 0.9);
}

.category-btn span {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.category-btn small {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.list-category-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  min-height: 400px;
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.placeholder-content i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.placeholder-content h3 {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.category-management {
  padding: 2rem;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.category-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
}

.category-header p {
  margin: 0.25rem 0 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.values-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.value-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.value-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.value-text {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.value-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-small i {
  margin-right: 0.25rem;
}

.no-values {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.no-values p {
  margin: 0;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .list-categories-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .category-btn {
    padding: 1.25rem;
    min-height: 80px;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .value-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .value-actions {
    align-self: flex-end;
  }

  .category-management {
    padding: 1rem;
  }
}

/* ==========================================================================
   Backup Management Styles
   ========================================================================== */

.backup-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.backup-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(--radius-md);
  transition: all 0.2s ease;
}

.backup-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.backup-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.backup-filename {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.backup-details {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.backup-actions {
  display: flex;
  gap: 0.5rem;
}

.backup-options {
  margin-bottom: 2rem;
}

.backup-options h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.backup-options .btn {
  display: block;
  width: 100%;
  margin-bottom: 0.75rem;
  text-align: center;
}

.backup-history h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .backup-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .backup-actions {
    align-self: flex-end;
  }

  .backup-options .btn {
    font-size: 0.9rem;
    padding: 0.75rem;
  }
}

/* ==========================================================================
   Site Backup Page Styles
   ========================================================================== */

.backup-management-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.backup-options-section,
.backup-history-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.backup-options-section h2,
.backup-history-section h2 {
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
}

.backup-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.backup-option-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.backup-option-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.backup-option-icon {
  font-size: 2rem;
  line-height: 1;
  margin-top: 0.25rem;
}

.backup-option-content {
  flex: 1;
}

.backup-option-content h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.backup-option-content p {
  margin: 0 0 1rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

.backup-option-content .btn {
  width: 100%;
}

.backup-history-content {
  min-height: 200px;
}

.no-backups-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.no-backups-message h3 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
}

.no-backups-message p {
  margin: 0;
  font-size: 0.9rem;
}

.backup-type-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 0.5rem;
}

.backup-type-badge.database {
  background: #e3f2fd;
  color: #1976d2;
}

.backup-type-badge.files {
  background: #f3e5f5;
  color: #7b1fa2;
}

/* Dark theme adjustments */
body.dark-theme .backup-type-badge.database {
  background: rgba(25, 118, 210, 0.2);
  color: #90caf9;
}

body.dark-theme .backup-type-badge.files {
  background: rgba(123, 31, 162, 0.2);
  color: #ce93d8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .backup-options-grid {
    grid-template-columns: 1fr;
  }

  .backup-option-card {
    padding: 1rem;
  }

  .backup-management-container {
    gap: 1.5rem;
  }

  .backup-options-section,
  .backup-history-section {
    padding: 1rem;
  }
}

/* ===== TIER LIST EMPTY STATE STYLES ===== */
.tier-list-container .empty-state {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 600px;
  margin: 2rem auto;
}

.tier-list-container .empty-state h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.tier-list-container .empty-state p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.tier-list-container .empty-state ol {
  text-align: left;
  max-width: 400px;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tier-list-container .empty-state ol li {
  margin-bottom: 0.5rem;
}

.tier-list-container .empty-state ol li strong {
  color: var(--text-primary);
}

.tier-list-container .empty-state-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .tier-list-container .empty-state {
    padding: 2rem 1rem;
    margin: 1rem;
  }

  .tier-list-container .empty-state-actions {
    flex-direction: column;
    align-items: center;
  }

  .tier-list-container .empty-state-actions .btn {
    width: 100%;
    max-width: 200px;
  }
}

/* ===== TIER MANAGEMENT DRAG-AND-DROP STYLES ===== */
.tier-sortable {
  min-height: 100px;
}

.tier-draggable {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: move;
  transition: all 0.2s ease;
  user-select: none;
}

.tier-draggable:hover {
  border-color: var(--accent-color-50);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tier-draggable.dragging {
  opacity: 0.5;
  transform: rotate(3deg) scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.tier-draggable .drag-handle {
  color: var(--text-muted);
  cursor: grab;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.tier-draggable .drag-handle:hover {
  color: var(--accent-color);
  background: var(--accent-color-10);
}

.tier-draggable .drag-handle:active {
  cursor: grabbing;
}

.tier-draggable .value-text {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.tier-draggable .value-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

/* Drag feedback styles */
.tier-sortable.drag-over {
  background: var(--accent-color-10);
  border-color: var(--accent-color);
}

/* Dark theme adjustments */
body.dark-theme .tier-draggable {
  background: var(--surface-color);
  border-color: var(--border-color);
}

body.dark-theme .tier-draggable:hover {
  border-color: var(--accent-color-50);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

body.dark-theme .tier-draggable.dragging {
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .tier-draggable {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .tier-draggable .drag-handle {
    font-size: 0.9rem;
  }

  .tier-draggable .value-actions {
    gap: 0.25rem;
  }

  .tier-draggable .value-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   STORAGE PAGE MOBILE OPTIMIZATIONS
   ========================================================================== */

/* Mobile Storage Layout - Portrait */
@media (max-width: 768px) {
  /* Stack sidebar and main content vertically on mobile */
  .storage-content {
    flex-direction: column;
    gap: 1rem;
    min-height: auto;
  }

  /* Sidebar adjustments */
  .storage-sidebar {
    width: 100%;
    order: 1; /* Move sidebar to top on mobile */
  }

  .storage-config {
    margin-bottom: 1rem;
  }

  .storage-stats {
    margin-top: 1rem;
  }

  /* Main content adjustments */
  .storage-main {
    width: 100%;
    order: 2;
  }

  /* Form optimizations */
  .config-form .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .config-form .form-group input {
    font-size: 16px; /* Prevent iOS zoom */
  }

  /* Storage grid container adjustments */
  .storage-grid-container {
    margin-bottom: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
  }

  .storage-grid-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color-light);
  }

  .storage-grid-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
  }

  /* Storage type sections */
  .storage-type-section {
    margin-bottom: 2.5rem;
  }

  .storage-type-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .grid-actions {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }

  .grid-actions .btn {
    flex: 1;
    min-height: 44px; /* Touch-friendly height */
    font-size: 0.9rem;
  }

  /* Grid table optimizations */
  .grid-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Grid cells - make them larger and more touch-friendly */
  .grid-cell {
    min-width: 60px;
    min-height: 60px;
    position: relative;
  }

  /* Touch-friendly buttons */
  .add-watch-btn {
    width: 100%;
    height: 100%;
    min-height: 44px;
    font-size: 1.2rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    touch-action: manipulation;
  }

  .add-watch-btn:hover {
    border-color: var(--accent-color);
    background: var(--accent-color-10);
    color: var(--accent-color);
  }

  /* Watch slot optimizations */
  .watch-slot {
    width: 100%;
    height: 100%;
    min-height: 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--success-light);
    border: 2px solid var(--success-color);
    border-radius: 8px;
    padding: 0.25rem;
  }

  .watch-thumb {
    width: 100%;
    height: auto;
    max-height: 40px;
    object-fit: cover;
    border-radius: 4px;
  }

  .watch-placeholder {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
  }

  /* Watch actions - make them more accessible */
  .watch-actions {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    gap: 2px;
    opacity: 1; /* Always visible on mobile */
  }

  .unassign-watch-btn,
  .remove-watch-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    touch-action: manipulation;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  }

  .unassign-watch-btn {
    background: var(--warning-color);
    color: white;
  }

  .remove-watch-btn {
    background: var(--danger-color);
    color: white;
  }

  /* Storage-specific mobile fixes - only affects Storage page */
  .storage-grid-container .watch-slot {
    cursor: pointer;
  }

  .storage-grid-container .watch-slot:active {
    transform: scale(0.98);
  }

  /* Storage watch selection modal mobile fixes */
  #watch-selection-modal .modal-dialog {
    margin: 1rem;
    max-width: calc(100% - 2rem);
    width: calc(100% - 2rem);
    height: auto;
    max-height: calc(100vh - 2rem);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }

  #watch-selection-modal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  #watch-selection-modal .modal-header {
    padding: 1rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
  }

  #watch-selection-modal .modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
  }

  #watch-selection-modal .modal-body {
    padding: 1rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }

  #watch-selection-modal .modal-body .form-group {
    margin-bottom: 0;
  }

  #watch-selection-modal .modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
  }

  #watch-selection-modal .modal-body select {
    width: 100%;
    padding: 0.75rem;
    font-size: 16px; /* Prevent iOS zoom */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    min-height: 44px; /* Touch-friendly */
  }

  #watch-selection-modal .modal-footer {
    padding: 1rem;
    flex-shrink: 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
  }

  #watch-selection-modal .modal-footer .btn {
    flex: 1;
    min-height: 44px; /* Touch-friendly */
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }

  /* Storage edit modal mobile fixes */
  #edit-storage-modal .modal-dialog {
    margin: 1rem;
    max-width: calc(100% - 2rem);
    width: calc(100% - 2rem);
    height: auto;
    max-height: calc(100vh - 2rem);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }

  #edit-storage-modal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  #edit-storage-modal .modal-header {
    padding: 1rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
  }

  #edit-storage-modal .modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
  }

  #edit-storage-modal .modal-body {
    padding: 1rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }

  #edit-storage-modal .modal-body .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
  }

  #edit-storage-modal .modal-body .form-group {
    flex: 1;
    margin-bottom: 0;
  }

  #edit-storage-modal .modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
  }

  #edit-storage-modal .modal-body input {
    width: 100%;
    padding: 0.75rem;
    font-size: 16px; /* Prevent iOS zoom */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    min-height: 44px; /* Touch-friendly */
  }

  #edit-storage-modal .modal-footer {
    padding: 1rem;
    flex-shrink: 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
  }

  #edit-storage-modal .modal-footer .btn {
    flex: 1;
    min-height: 44px; /* Touch-friendly */
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }

  /* Slot labels */
  .slot-label {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--bg-color);
    padding: 1px 4px;
    border-radius: 2px;
    border: 1px solid var(--border-color-light);
  }

  /* Grid headers - improved spacing and alignment for mobile */
  .grid-header-row,
  .grid-data-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
    min-height: 70px;
  }

  .grid-header-row {
    margin-bottom: 12px;
  }

  .grid-corner,
  .grid-header-cell,
  .grid-row-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.25rem;
  }

  .grid-corner {
    width: 50px;
    min-width: 50px;
    flex-shrink: 0;
  }

  .grid-header-cell {
    background: var(--accent-color-10);
    color: var(--accent-color);
    font-weight: 700;
    flex: 1;
    min-width: 70px;
  }

  .grid-row-header {
    background: var(--accent-color-10);
    color: var(--accent-color);
    font-weight: 700;
    width: 50px;
    min-width: 50px;
    flex-shrink: 0;
  }

  /* Improved grid container layout */
  .grid-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 12px var(--shadow-color);
    margin-bottom: 1rem;
  }

  /* Enhanced grid cells for better visibility */
  .grid-cell {
    flex: 1;
    min-width: 70px;
    min-height: 70px;
    position: relative;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .grid-cell.empty {
    border-style: dashed;
    border-color: var(--border-color-light);
  }

  .grid-cell.occupied {
    border-color: var(--success-color);
    background: var(--success-light);
  }
}

/* Mobile Storage Layout - Landscape */
@media (max-width: 768px) and (orientation: landscape) {
  /* In landscape, we can afford horizontal layout with smaller sidebar */
  .storage-content {
    flex-direction: row;
    gap: 1rem;
  }

  .storage-sidebar {
    width: 280px;
    order: 1;
  }

  .storage-main {
    flex: 1;
    order: 2;
  }

  /* Smaller grid cells for landscape */
  .grid-cell {
    min-width: 50px;
    min-height: 50px;
  }

  .grid-header-row,
  .grid-data-row {
    gap: 6px;
    min-height: 60px;
  }

  .grid-corner,
  .grid-header-cell,
  .grid-row-header {
    min-height: 30px;
    font-size: 0.8rem;
  }

  .grid-corner,
  .grid-row-header {
    width: 40px;
    min-width: 40px;
  }

  .grid-header-cell {
    min-width: 60px;
  }

  .watch-thumb {
    max-height: 35px;
  }

  .unassign-watch-btn,
  .remove-watch-btn {
    width: 20px;
    height: 20px;
    font-size: 0.6rem;
  }

  /* Storage watch selection modal landscape adjustments */
  #watch-selection-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
  }

  #watch-selection-modal .modal-header,
  #watch-selection-modal .modal-body,
  #watch-selection-modal .modal-footer {
    padding: 0.75rem;
  }

  /* Storage edit modal landscape adjustments */
  #edit-storage-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
  }

  #edit-storage-modal .modal-header,
  #edit-storage-modal .modal-body,
  #edit-storage-modal .modal-footer {
    padding: 0.75rem;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .storage-grid-container {
    margin-bottom: 1rem;
  }

  /* Even more compact form */
  .config-form .form-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  /* Ensure grid doesn't overflow */
  .grid-table {
    max-width: 100%;
  }

  .grid-header-row,
  .grid-data-row {
    gap: 4px;
    min-height: 55px;
  }

  .grid-cell {
    min-width: 60px;
    min-height: 60px;
  }

  .grid-corner,
  .grid-row-header {
    width: 35px;
    min-width: 35px;
    font-size: 0.75rem;
  }

  .grid-header-cell {
    min-width: 60px;
    font-size: 0.75rem;
  }

  .slot-label {
    font-size: 0.55rem;
  }

  /* Storage watch selection modal extra small screen adjustments */
  #watch-selection-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
    width: calc(100% - 1rem);
  }

  #watch-selection-modal .modal-header h3 {
    font-size: 1rem;
  }

  #watch-selection-modal .modal-body label {
    font-size: 0.85rem;
  }

  #watch-selection-modal .modal-footer .btn {
    font-size: 0.85rem;
    padding: 0.625rem 0.75rem;
  }

  /* Storage edit modal extra small screen adjustments */
  #edit-storage-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
    width: calc(100% - 1rem);
  }

  #edit-storage-modal .modal-header h3 {
    font-size: 1rem;
  }

  #edit-storage-modal .modal-body label {
    font-size: 0.85rem;
  }

  #edit-storage-modal .modal-body .form-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  #edit-storage-modal .modal-footer .btn {
    font-size: 0.85rem;
    padding: 0.625rem 0.75rem;
  }
}

/* ==========================================================================
   Daily Picks Modal Styles
   ========================================================================== */

/* Daily Picks Modal */
.modal-content.daily-picks-modal {
  max-width: 800px !important;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.daily-picks-modal .modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.daily-picks-modal .modal-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
}

.daily-picks-modal .modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.daily-picks-intro {
  margin-bottom: 1.5rem;
  text-align: center;
}

.daily-picks-intro p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

/* Daily Picks Content */
.daily-picks-content {
  min-height: 200px;
}

.daily-picks-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.daily-pick-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.daily-pick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.daily-pick-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

.daily-pick-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-image {
  font-size: 2rem;
  color: var(--text-tertiary);
}

.daily-pick-info {
  flex: 1;
  min-width: 0;
}

.daily-pick-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.daily-pick-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ref-number {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--light-gray);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.daily-pick-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.wear-stat,
.last-worn {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.owner-badge {
  font-size: 0.75rem;
  background: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.pick-reason {
  font-size: 0.875rem;
  color: var(--accent-color);
  font-style: italic;
  margin-top: 0.25rem;
}

.daily-pick-actions {
  flex-shrink: 0;
}

.view-watch-btn {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

/* Daily Picks Footer */
.daily-picks-footer {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--light-gray);
  border-radius: var(--radius-md);
  text-align: center;
}

.picks-summary {
  margin: 0 0 0.5rem 0;
  font-weight: 500;
  color: var(--text-primary);
}

.algorithm-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Loading and Error States */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.loading-spinner .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.loading-spinner p {
  color: var(--text-secondary);
  margin: 0;
}

.error-state,
.no-picks-state {
  text-align: center;
  padding: 3rem 1rem;
}

.error-state p,
.no-picks-state p {
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
}

.error-state p:last-child,
.no-picks-state p:last-child {
  margin-bottom: 0;
}

/* Dark Theme Support */
[data-theme="dark"] .daily-pick-card {
  background: var(--bg-tertiary);
  border-color: var(--bg-quaternary);
}

[data-theme="dark"] .daily-picks-footer {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .ref-number {
  background: var(--bg-quaternary);
  color: var(--text-tertiary);
}

[data-theme="dark"] .placeholder-image {
  color: var(--text-quaternary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #daily-picks-modal {
    z-index: 9999 !important;
  }

  .daily-picks-modal {
    width: 95%;
    max-height: 95vh;
    margin: 2.5vh auto;
    display: flex !important;
    flex-direction: column !important;
    position: relative;
    z-index: 9999 !important;
  }

  .daily-picks-modal .modal-header {
    padding: 1rem;
    flex-shrink: 0 !important;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
  }

  .daily-picks-modal .modal-header h3 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    color: var(--primary-color) !important;
  }

  .daily-picks-modal .modal-body,
  .daily-picks-modal .modal-footer {
    padding: 1rem;
  }

  .daily-pick-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .daily-pick-image {
    width: 100%;
    height: 120px;
    align-self: center;
  }

  .daily-pick-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .daily-pick-header h4 {
    white-space: normal;
  }

  .daily-pick-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .daily-pick-actions {
    width: 100%;
  }

  .view-watch-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .daily-picks-modal {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .daily-picks-modal .modal-header h3 {
    font-size: 1.25rem;
  }
}

/* Daily Picks dropdown item styling */
#daily-picks-btn {
  font-weight: 600 !important;
  background: linear-gradient(135deg, var(--primary-color), #1e4a8c) !important;
  color: white !important;
  border-radius: 6px !important;
  margin: 2px 4px !important;
}

/* ==========================================================================
   Profile Modal Styles
   ========================================================================== */

/* Profile Modal */
.modal-content.profile-modal {
  max-width: 500px !important;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.profile-modal .modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.profile-modal .modal-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
}

.profile-modal .modal-body {
  padding: 2rem 1.5rem;
  flex: 1;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-field label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-field span {
  font-size: 1.1rem;
  color: var(--text-primary);
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-weight: 500;
}

/* Wrist size input styling to match profile span fields */
.profile-field .wrist-size-input input,
.profile-field .wrist-size-input select {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.75rem !important;
  font-size: 1.1rem !important;
  color: var(--text-primary) !important;
  font-weight: 500 !important;
}

.profile-field .wrist-size-input {
  display: flex;
  gap: 0.5rem;
}

/* Fix profile modal close button hover state to keep text visible */
.profile-modal .btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #6c757d 0%, #545b62 100%) !important;
  color: white !important;
}

.profile-modal .modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #profile-modal {
    z-index: 9999 !important;
  }

  .profile-modal {
    width: 95%;
    max-height: 95vh;
    margin: 2.5vh auto;
    display: flex !important;
    flex-direction: column !important;
    position: relative;
    z-index: 9999 !important;
  }

  .profile-modal .modal-header {
    padding: 1rem;
    flex-shrink: 0 !important;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
  }

  .profile-modal .modal-header h3 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    color: var(--primary-color) !important;
  }

  .profile-modal .modal-body,
  .profile-modal .modal-footer {
    padding: 1rem;
  }

  .profile-info {
    gap: 1rem;
  }
}

/* ==========================================================================
   Bug Report Modal Styles
   ========================================================================== */

/* Bug Report Modal */
.modal-content.bug-report-modal {
  max-width: 600px !important;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bug-report-modal .modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.bug-report-modal .modal-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 600;
}

.bug-report-modal .modal-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.bug-report-intro {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-color);
}

.bug-report-intro p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

.bug-report-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bug-report-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bug-report-form label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bug-report-form input,
.bug-report-form select,
.bug-report-form textarea {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.bug-report-form input:focus,
.bug-report-form select:focus,
.bug-report-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.bug-report-form textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.bug-report-form select {
  cursor: pointer;
}

.bug-report-modal .modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #bug-report-modal {
    z-index: 9999 !important;
  }

  .bug-report-modal {
    width: 95%;
    max-height: 95vh;
    margin: 2.5vh auto;
    display: flex !important;
    flex-direction: column !important;
    position: relative;
    z-index: 9999 !important;
  }

  .bug-report-modal .modal-header {
    padding: 1rem;
    flex-shrink: 0 !important;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
  }

  .bug-report-modal .modal-header h3 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    color: var(--primary-color) !important;
  }

  .bug-report-modal .modal-body,
  .bug-report-modal .modal-footer {
    padding: 1rem;
  }

  .bug-report-form {
    gap: 1rem;
  }

  .bug-report-modal .modal-footer {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .bug-report-modal .modal-footer .btn {
    width: 100%;
    margin: 0;
  }
}

/* ===== YEARLY SPENDING CHART ===== */
.yearly-spending-summary {
  margin-bottom: 2rem;
  text-align: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.yearly-spending-summary h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.yearly-spending-chart-container {
  display: flex;
  gap: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 80px;
  height: 300px;
  padding-right: 0.5rem;
}

.y-axis-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
}

.chart-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chart-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chart-bars-area {
  display: flex;
  align-items: flex-end;
  height: 300px;
  border-left: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 0.5rem 0 0.5rem;
  background: var(--bg-primary);
  gap: 4px;
}

.month-bar-column {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.yearly-spending-chart .bar-wrapper {
  width: 80%;
  height: 280px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.yearly-spending-chart .chart-bars-area .bar-wrapper .bar-fill {
  width: 100% !important;
  min-height: 3px; /* Show 3px for $0 months */
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.8s ease;
  background: var(--accent-color); /* Fallback color */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Fallback for any .bar-fill not in yearly spending chart */
.chart-bars-area .bar-wrapper .bar-fill {
  width: 100% !important;
  min-height: 3px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.8s ease;
  background: var(--accent-color); /* Fallback color */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-x-axis {
  display: flex;
  margin-top: 0.5rem;
  padding: 0 0.5rem;
}

.month-label {
  flex: 1;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  padding: 0.25rem 0;
}

/* Dark theme adjustments */
[data-theme="dark"] .yearly-spending-summary {
  background: var(--bg-tertiary);
}

[data-theme="dark"] .yearly-spending-chart-container {
  background: var(--bg-secondary);
}

[data-theme="dark"] .yearly-spending-chart .bar-fill {
  background: linear-gradient(180deg, var(--accent-color), #4ade80);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .yearly-spending-chart-container {
    gap: 0.25rem;
    padding: 0.25rem;
    max-width: calc(100vw - 2rem);
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
  }

  .y-axis {
    min-width: 40px;
    max-width: 40px;
    height: 160px;
    padding-right: 0.125rem;
    flex-shrink: 0;
  }

  .y-axis-label {
    font-size: 0.625rem;
    text-align: right;
  }

  .chart-content {
    min-width: 0;
    flex: 1;
    max-width: calc(100% - 40px);
  }

  .chart-bars-area {
    height: 160px;
    gap: 0;
    padding: 0.25rem 0.125rem 0 0.125rem;
    min-width: 0;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  .month-bar-column {
    flex: 1;
    min-width: 0;
    max-width: none;
    align-items: flex-end;
  }

  .yearly-spending-chart .bar-wrapper {
    width: 90%;
    height: 140px;
  }

  .month-label {
    font-size: 0.55rem;
    padding: 0.0625rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .chart-x-axis {
    padding: 0 0.125rem;
    margin-top: 0.25rem;
  }

  .yearly-spending-summary {
    padding: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .yearly-spending-summary h3 {
    font-size: 0.9rem;
    line-height: 1.3;
  }
}

/* ======================================
   PREFERENCES PAGE STYLING (ISOLATED)
   ====================================== */

/* Preferences loading state - only affects preferences page */
.preferences-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
}

.preferences-loading .loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preferences-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-secondary);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.preferences-loading p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
}

/* Preferences container - only affects preferences page */
.preferences-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Preferences grid layout - only affects preferences page */
.preferences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

/* Individual preference cards - only affects preferences page */
.preference-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.preference-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

/* Preference card icon styling - only affects preferences page */
.preference-card .preference-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
  text-align: center;
  line-height: 1;
  opacity: 0.9;
}

/* Preference card content - only affects preferences page */
.preference-card .preference-content {
  text-align: center;
}

.preference-card .preference-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  line-height: 1.3;
}

/* Preference details section - only affects preferences page */
.preference-card .preference-detail {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.preference-card .preference-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-color);
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
  word-break: break-word;
}

.preference-card .preference-insight {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
  font-style: italic;
}

.preference-card .preference-methodology {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.3;
  opacity: 0.8;
  font-weight: 400;
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

/* Dark theme support for preferences page */
[data-theme="dark"] .preference-card {
  background: var(--bg-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .preference-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .preference-card .preference-value {
  color: var(--accent-color);
}

/* Mobile responsive design for preferences page */
@media (max-width: 768px) {
  .preferences-container {
    padding: 1rem;
  }

  .preferences-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .preference-card {
    padding: 1.5rem;
  }

  .preference-card .preference-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .preference-card .preference-content h3 {
    font-size: 1.1rem;
  }

  .preference-card .preference-value {
    font-size: 1.2rem;
  }

  .preference-card .preference-insight {
    font-size: 0.9rem;
  }

  .preference-card .preference-methodology {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .preferences-container {
    padding: 0.5rem;
  }

  .preferences-grid {
    gap: 1rem;
  }

  .preference-card {
    padding: 1rem;
  }

  .preference-card .preference-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .preference-card .preference-detail {
    padding-top: 1rem;
    margin-top: 1rem;
  }

  .preference-card .preference-content h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .preference-card .preference-value {
    font-size: 1.1rem;
  }

  .preference-card .preference-insight {
    font-size: 0.85rem;
  }

  .preference-card .preference-methodology {
    font-size: 0.7rem;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
  }
}

/* ===== UPDATE NOTIFICATION MODAL ===== */
.update-notification-modal {
  max-width: 600px;
  width: 90%;
}

.update-notification-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.update-notification-modal .modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.update-notification-modal .modal-header .close {
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.update-notification-modal .modal-header .close:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.update-notification-modal .form-group {
  margin-bottom: 1.25rem;
}

.update-notification-modal .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.update-notification-modal .form-group .required {
  color: #dc2626;
  font-size: 0.8rem;
}

.update-notification-modal .form-group input,
.update-notification-modal .form-group textarea,
.update-notification-modal .form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.update-notification-modal .form-group input:focus,
.update-notification-modal .form-group textarea:focus,
.update-notification-modal .form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.update-notification-modal .form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.update-notification-modal .form-group small.form-help {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
}

.update-notification-modal .user-count-preview {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.update-notification-modal .user-count-preview.success {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #059669;
}

.update-notification-modal .user-count-preview.error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

.update-notification-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.update-notification-modal .modal-footer .btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.update-notification-modal .modal-footer .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.update-notification-modal .modal-footer .btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.update-notification-modal .modal-footer .btn-secondary:hover:not(:disabled) {
  background-color: var(--hover-bg);
}

.update-notification-modal .modal-footer .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.update-notification-modal .modal-footer .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.update-notification-modal .modal-footer .btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.update-notification-modal .modal-footer .btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.update-notification-modal .modal-footer .btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.update-notification-modal .modal-footer .btn-warning:hover:not(:disabled) {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .update-notification-modal {
    width: 95%;
    margin: 1rem;
  }

  .update-notification-modal .modal-footer {
    flex-direction: column-reverse;
  }

  .update-notification-modal .modal-footer .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .update-notification-modal .form-group input,
  .update-notification-modal .form-group textarea,
  .update-notification-modal .form-group select {
    font-size: 16px; /* Prevent zoom on iOS */
  }
}

/* ==========================================================================
   Privacy Toggle Switch Styles
   ========================================================================== */

.hide-values-toggle {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  cursor: default;
}

.hide-values-toggle span {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.toggle-switch label:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.toggle-switch input:checked + label {
  background-color: var(--color-accent, #3b82f6);
}

.toggle-switch input:checked + label:before {
  transform: translateX(20px);
}

.toggle-switch label:hover {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Dark theme support for toggle switch */
[data-theme="dark"] .toggle-switch label {
  background-color: #555;
}

[data-theme="dark"] .toggle-switch label:before {
  background-color: #e5e5e5;
}

/* ==========================================================================
   Privacy-Disabled Stats Buttons
   ========================================================================== */

.stat-option-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.stat-option-btn.disabled .stat-title {
  text-decoration: line-through;
}

.stat-option-btn.disabled .stat-description {
  color: #999;
  font-style: italic;
}

/* Dark theme support for disabled stats */
[data-theme="dark"] .stat-option-btn.disabled .stat-description {
  color: #666;
}

/* ==========================================================================
   Privacy-Hidden Form Fields
   ========================================================================== */

.privacy-hidden-field input[type="text"][disabled] {
  background-color: #f5f5f5;
  color: #666;
  font-style: italic;
  border-color: #ddd;
  cursor: not-allowed;
}

.privacy-hidden-field label {
  color: #999;
}

/* Dark theme support for hidden form fields */
[data-theme="dark"] .privacy-hidden-field input[type="text"][disabled] {
  background-color: #333;
  color: #aaa;
  border-color: #555;
}

[data-theme="dark"] .privacy-hidden-field label {
  color: #666;
}

/* ==========================================================================
   Favorite Reports System
   ========================================================================== */

/* Report Builder Actions */
.report-builder-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.save-favorite-btn {
  background: linear-gradient(45deg, #28a745, #20c997);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.save-favorite-btn:hover {
  background: linear-gradient(45deg, #218838, #1ba085);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Save Favorite Modal */
.save-favorite-modal .modal-content {
  max-width: 500px;
  width: 100%;
}

.save-favorite-form .form-group {
  margin-bottom: 1.5rem;
}

.save-favorite-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.save-favorite-form input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.save-favorite-form input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.settings-preview {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.settings-preview h4 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.settings-preview-content {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Favorite Reports List */
.favorite-reports-list {
  margin-top: 1rem;
}

.favorite-report-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.favorite-report-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.favorite-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.favorite-report-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.favorite-report-actions {
  display: flex;
  gap: 0.5rem;
}

.favorite-report-actions .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 4px;
}

.favorite-report-details {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.favorite-report-details .detail-item {
  display: inline-block;
  margin-right: 1rem;
  margin-bottom: 0.25rem;
}

.favorite-report-details .detail-label {
  font-weight: 500;
}

/* No Favorites Message */
.no-favorites-message {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 2rem;
  background: var(--bg-tertiary);
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  margin-top: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .report-builder-actions {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .save-favorite-btn {
    width: 100%;
    justify-content: center;
  }

  .favorite-report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .favorite-report-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .favorite-report-details .detail-item {
    display: block;
    margin-right: 0;
  }
}

/* Dark Theme Support */
[data-theme="dark"] .save-favorite-btn {
  background: linear-gradient(45deg, #1e7e34, #17a2b8);
}

[data-theme="dark"] .save-favorite-btn:hover {
  background: linear-gradient(45deg, #155724, #138496);
}