/* Manage Admin Dashboard Styles */

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
}

#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.manage-header {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.manage-header h1 {
  margin: 0;
  font-size: 24px;
  color: #1a1a1a;
}

.auth-status {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
}

.auth-status.success {
  background: #d4edda;
  color: #155724;
}

.auth-status.error {
  background: #f8d7da;
  color: #721c24;
}

/* Auth Required */
.auth-required {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-required p {
  margin-bottom: 20px;
  font-size: 18px;
  color: #666;
}

.manage-auth-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
}

.manage-auth-form input {
  width: min(320px, 100%);
  padding: 12px;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  font-size: 14px;
}

.manage-auth-message {
  min-height: 20px;
  color: #555;
  font-size: 14px;
}

#sign-in-btn {
  padding: 12px 24px;
  font-size: 16px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#sign-in-btn:hover {
  background: #0056b3;
}

/* Sections */
.section {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.section h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  color: #1a1a1a;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

/* Map */
.reports-map {
  height: 400px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

/* Category toolbar */
.categories-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.categories-save-status {
  font-size: 13px;
  color: #666;
  min-height: 20px;
}

.categories-save-status.saving {
  color: #666;
}

.categories-save-status.success {
  color: #155724;
}

.categories-save-status.error {
  color: #721c24;
}

.categories-apply-btn {
  padding: 8px 16px;
  font-size: 14px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.categories-apply-btn:hover {
  background: #0056b3;
}

.categories-apply-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

/* Tables */
.data-table,
.categories-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td,
.categories-table th,
.categories-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.data-table th,
.categories-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.data-table tr:hover,
.categories-table tr:hover {
  background: #f8f9fa;
}

.category-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Reports table */
.accounts-reports-container {
  overflow-x: auto;
}

.sortable-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.sortable-table th.sortable:hover {
  background: #e9ecef;
}

/* Account Cards */
.accounts-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.account-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px;
  background: #fafafa;
}

.account-card h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
}

.account-card h4 {
  margin: 15px 0 10px 0;
  font-size: 14px;
  color: #666;
}

.account-card ul {
  margin: 0;
  padding-left: 20px;
}

.account-card li {
  margin-bottom: 5px;
  font-size: 13px;
}

/* Popup */
.report-popup {
  font-size: 13px;
}

.report-popup p {
  margin: 5px 0;
}

.report-popup a {
  color: #007bff;
  text-decoration: none;
}

.report-popup a:hover {
  text-decoration: underline;
}

/* Buttons */
button {
  padding: 6px 12px;
  font-size: 13px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background: #218838;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .manage-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .accounts-container {
    grid-template-columns: 1fr;
  }

  .data-table,
  .categories-table {
    font-size: 12px;
  }

  .data-table th,
  .data-table td,
  .categories-table th,
  .categories-table td {
    padding: 8px;
  }
}
