/* Madmin Dashboard Styles - Scoped to Madmin pages only */
.madmin {
  .dashboard-container {
    margin: 0;
    padding: 0;
  }

  .dashboard-spacing {
    margin-bottom: 1.5rem;
  }

  .dashboard-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .dashboard-title {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.5;
    color: #111827;
    margin: 0 0 0.5rem 0;
  }

  .dashboard-subtitle {
    margin-top: 0.5rem;
    max-width: 56rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0;
  }

  /* Statistics Cards */
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;

    @media (min-width: 640px) {
      grid-template-columns: repeat(2, 1fr);
    }

    @media (min-width: 1024px) {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  .stat-card {
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: white;
    padding: 1.25rem 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  }

  .stat-card-content {
    display: flex;
    align-items: center;
  }

  .stat-icon {
    flex-shrink: 0;
    margin-right: 1.25rem;

    svg {
      height: 1.5rem;
      width: 1.5rem;
      color: #9ca3af;
    }
  }

  .stat-info {
    min-width: 0;
    flex: 1;
  }

  .stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 0.25rem 0;
  }

  .stat-value {
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    margin: 0;
  }

  /* Quick Actions */
  .quick-actions {
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .quick-actions-content {
    padding: 1.25rem 1rem;

    @media (min-width: 640px) {
      padding: 1.5rem;
    }
  }

  .quick-actions-title {
    font-size: 1.125rem;
    line-height: 1.5;
    font-weight: 500;
    color: #111827;
    margin: 0 0 1.25rem 0;
  }

  .quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;

    @media (min-width: 640px) {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    color: white;
    background-color: #4f46e5;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;

    &:hover {
      background-color: #4338ca;
      color: white;
      text-decoration: none;
    }

    &:focus {
      outline: 2px solid transparent;
      outline-offset: 2px;
      box-shadow: 0 0 0 2px #4f46e5;
    }
  }

  .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    color: #374151;
    background-color: white;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;

    &:hover {
      background-color: #f9fafb;
      color: #374151;
      text-decoration: none;
    }

    &:focus {
      outline: 2px solid transparent;
      outline-offset: 2px;
      box-shadow: 0 0 0 2px #4f46e5;
    }
  }

  /* Recent Activity */
  .activity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;

    @media (min-width: 1024px) {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  .activity-card {
    background-color: white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
  }

  .activity-header {
    padding: 1.25rem 1rem;

    @media (min-width: 640px) {
      padding: 1.25rem 1.5rem;
    }
  }

  .activity-title {
    font-size: 1.125rem;
    line-height: 1.5;
    font-weight: 500;
    color: #111827;
    margin: 0 0 0.25rem 0;
  }

  .activity-subtitle {
    margin-top: 0.25rem;
    max-width: 32rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0;
  }

  .activity-content {
    border-top: 1px solid #e5e7eb;
  }

  .activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .activity-item {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;

    &:last-child {
      border-bottom: none;
    }

    @media (min-width: 640px) {
      padding: 1rem 1.5rem;
    }
  }

  .contact-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
  }

  .contact-item-info {
    display: flex;
    align-items: center;
  }

  .contact-status-dot {
    flex-shrink: 0;
    height: 0.5rem;
    width: 0.5rem;
    margin-right: 1rem;
  }

  .status-dot {
    height: 0.5rem;
    width: 0.5rem;
    border-radius: 50%;
    background-color: #10b981;
  }

  .contact-details {
    min-width: 0;
    flex: 1;
  }

  .contact-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 0.25rem 0;
  }

  .contact-email {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }

  .contact-time {
    margin-left: 0.5rem;
    flex-shrink: 0;
    font-size: 0.875rem;
    color: #9ca3af;
  }

  .contact-message {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
  }

  .art-item {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .art-thumbnail {
    flex-shrink: 0;
  }

  .art-image {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 0.25rem;
    object-fit: cover;
  }

  .art-placeholder {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 0.25rem;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;

    svg {
      height: 1.25rem;
      width: 1.25rem;
      color: #9ca3af;
    }
  }

  .art-info {
    flex: 1;
    min-width: 0;
  }

  .art-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 0.25rem 0;
  }

  .art-time {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
  }

  .art-action {
    flex-shrink: 0;
  }

  .link-primary {
    color: #4f46e5;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;

    &:hover {
      color: #3730a3;
      text-decoration: none;
    }
  }

  .activity-footer {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;

    @media (min-width: 640px) {
      padding: 0.75rem 1.5rem;
    }
  }

  .empty-state {
    padding: 1.25rem 1rem;

    @media (min-width: 640px) {
      padding: 1.25rem 1.5rem;
    }
  }

  .empty-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
  }
}