/* ============================================
   TaxCoin - Components
   ============================================ */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  transition: all 0.15s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-text-muted);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}
.btn-ghost:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.btn-sm {
  padding: 0.3125rem 0.625rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

.action-btns {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-btns .btn {
  min-width: 7rem;
}

@media (min-width: 640px) {
  .action-btns {
    gap: 0.5rem;
  }
}

.btn-lg {
  padding: 0.6875rem 1.5rem;
  font-size: 0.9375rem;
  border-radius: 10px;
}

.btn-icon {
  padding: 0.5rem;
  min-width: 36px;
  min-height: 36px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-group {
  display: inline-flex;
  gap: 0.375rem;
}

/* Stack action buttons full-width on mobile */
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
@media (max-width: 480px) {
  .admin-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--color-text-muted);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.card-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Stat Card */
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.15s ease;
}

.stat-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.stat-card .stat-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.375rem;
}

.stat-card .stat-change svg {
  width: 14px;
  height: 14px;
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  border-radius: 0;
  border: none;
  background: var(--color-surface);
}

.card .table-wrapper {
  margin: 0;
}

.table-wrapper table {
  min-width: 100%;
}

.table-wrapper th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 0.75rem 1rem;
  text-align: left;
  background: var(--color-surface-hover);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
}

.table-wrapper td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.table-wrapper tr:last-child td {
  border-bottom: none;
}

.table-wrapper tr:hover td {
  background: var(--color-surface-hover);
}

.table-wrapper .td-mono {
  /* inherits Outfit like everything else */
  font-size: 0.8125rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.5625rem 0.75rem;
  background: var(--color-input-bg);
  border: 1px solid var(--color-input-border);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

/* Prevent iOS auto-zoom on input focus (font-size must be >= 16px) */
@media (max-width: 768px) {
  .form-input,
  .form-select,
  .form-textarea,
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-hint {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.75rem;
  color: var(--color-danger);
  margin-top: 0.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.form-check .form-check-label {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  cursor: pointer;
}

/* --- Modals --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.modal-header .modal-close {
  padding: 0.25rem;
  border-radius: 6px;
  color: var(--color-text-muted);
  transition: all 0.15s ease;
}

.modal-header .modal-close:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.modal-header .modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-lg {
  max-width: 720px;
}

.modal-xl {
  max-width: 960px;
}

/* --- Toasts --- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.toast-exit {
  animation: toastOut 0.2s ease forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(16px); }
}

.toast .toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast .toast-content {
  flex: 1;
  min-width: 0;
}

.toast .toast-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

.toast .toast-message {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-top: 0.125rem;
}

.toast .toast-close {
  flex-shrink: 0;
  padding: 0.125rem;
  color: var(--color-text-muted);
  border-radius: 4px;
}

.toast .toast-close:hover {
  color: var(--color-text);
}

.toast .toast-close svg {
  width: 14px;
  height: 14px;
}

.toast-success { border-left: 3px solid var(--color-success); }
.toast-success .toast-icon { color: var(--color-success); }
.toast-danger { border-left: 3px solid var(--color-danger); }
.toast-danger .toast-icon { color: var(--color-danger); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-warning .toast-icon { color: var(--color-warning); }
.toast-info { border-left: 3px solid var(--color-primary); }
.toast-info .toast-icon { color: var(--color-primary); }

/* --- Tabs --- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  gap: 0;
  overflow-x: auto;
}

.tab {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}

.tab:hover {
  color: var(--color-text-secondary);
}

.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
  padding-top: 1.25rem;
}

.tab-content.active {
  display: block;
}

/* --- Drop Zone --- */
.drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--color-surface);
}

.drop-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
}

.drop-zone.dragover {
  border-color: var(--color-primary);
  background: rgba(59, 130, 246, 0.05);
}

.drop-zone .drop-icon {
  width: 48px;
  height: 48px;
  color: var(--color-text-muted);
  margin: 0 auto 1rem;
}

.drop-zone .drop-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.drop-zone .drop-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.drop-zone .drop-browse {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-primary {
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-primary);
}

.badge-success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--color-danger);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}

.badge-muted {
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-text-muted);
}

.empty-state .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.375rem;
}

.empty-state p {
  font-size: 0.8125rem;
  margin-bottom: 1.25rem;
}

/* --- Loading Spinner --- */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

/* --- Chart Container --- */
.chart-container {
  position: relative;
  width: 100%;
}

.evolution-ranges {
  display: flex;
  gap: 0.25rem;
}

.range-btn {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.range-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.range-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* --- Grid Helpers --- */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.dash-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.ex-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-right: 0.375rem;
}

.ex-btn {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ex-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.ex-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* --- Auth Tabs --- */
.auth-tabs {
  display: flex;
  background: var(--color-surface-hover);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-submit {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Email suggestions */
.email-input-wrapper {
  position: relative;
}
.email-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 0 10px 10px;
  border-top: none;
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.email-suggestions.hidden { display: none; }
.email-suggestions:empty { display: none; }
.email-suggestion {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background 0.1s;
  color: var(--color-text-secondary);
}
.email-suggestion:hover,
.email-suggestion.active {
  background: var(--color-bg);
}
.email-suggestion-typed {
  font-weight: 600;
  color: var(--color-text);
}
.email-suggestion-domain {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Password strength */
.pw-strength {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.pw-strength.hidden { display: none; }
.pw-rule {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pw-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  font-size: 0.5rem;
  flex-shrink: 0;
  transition: all 0.2s;
}
.pw-rule.met .pw-icon {
  border-color: var(--color-success, #22c55e);
  background: var(--color-success, #22c55e);
  color: white;
}
.pw-rule.met .pw-icon::after {
  content: '✓';
}
.pw-rule.met {
  color: var(--color-success, #22c55e);
}

/* --- Password toggle eye --- */
.password-wrapper {
  position: relative;
}
.password-wrapper .form-input {
  padding-right: 2.5rem;
}
.pw-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.pw-toggle:hover { opacity: 1; }
.pw-toggle-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
}
.pw-toggle-icon::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.pw-toggle.showing .pw-toggle-icon::before {
  background-color: var(--color-primary, #6366f1);
}

/* --- Misc --- */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-surface-hover);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.chip svg {
  width: 14px;
  height: 14px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-surface-hover);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

/* --- Analysis View --- */
.analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.analysis-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.analysis-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.analysis-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.chart-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 260px;
}

.chart-card {
  overflow: hidden;
}

.empty-cell {
  text-align: center;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .analysis-charts {
    grid-template-columns: 1fr;
  }
}

/* --- Report View --- */
.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.report-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.report-header-left .report-subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0.25rem 0 0;
}

.report-header-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.report-content {
  min-height: 200px;
}

.report-empty,
.report-loading,
.report-error {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--color-text-muted);
}

.report-loading .spinner {
  margin: 0 auto;
}

.report-loading p,
.report-error p {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.report-error .btn {
  margin-top: 1rem;
}

.report-section {
  margin-bottom: 1.5rem;
}

.report-section .card-header h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.report-col-concept {
  width: 60%;
}

.report-col-amount {
  width: 20%;
  text-align: right !important;
}

.report-indent-1 {
  padding-left: 2rem !important;
}

.report-indent-2 {
  padding-left: 4rem !important;
}

.report-row-muted {
  color: var(--color-text-muted) !important;
}

.report-cell-emphasis {
  font-weight: 500;
}

.report-cell-total {
  text-align: right;
  font-weight: 700;
} 

.report-table th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 0.75rem 0.75rem;
  text-align: left;
  background: var(--color-surface-hover);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.report-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.report-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.report-table .section-title-row td {
  padding-top: 1rem;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
}

.report-table .subtotal-row td {
  border-top: 2px solid var(--color-border);
  background: var(--color-surface-hover);
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.report-table .total-row td {
  border-top: 2px solid var(--color-border);
  background: var(--color-surface-hover);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.report-table .td-gain {
  color: var(--color-success);
}

.report-table .td-loss {
  color: var(--color-danger);
}

.report-detail-subsection {
  margin-bottom: 2rem;
}

.report-detail-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.report-detail-empty {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding: 0.75rem 0;
}

.badge-long {
  background: rgba(34, 197, 94, 0.12);
  color: var(--color-success);
}

.badge-short {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
}

@media (max-width: 768px) {
  .report-header {
    flex-direction: column;
  }
  .report-header-right {
    width: 100%;
  }
  .report-header-right select {
    width: 100%;
  }
}

/* --- Transactions View --- */
.transactions-view {
  position: relative;
}

.tx-toolbar {
  margin-bottom: 1rem;
}

.tx-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tx-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.tx-search-wrap .form-input {
  padding-left: 2.25rem;
}

.tx-search-icon {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
}

.tx-toolbar .form-select,
.tx-toolbar .form-input[type="date"] {
  min-width: 130px;
  max-width: 180px;
}

.tx-toolbar .btn-sm {
  white-space: nowrap;
}

/* Table columns */
.tx-col-check {
  width: 36px;
  text-align: center !important;
}

.tx-col-num {
  text-align: right;
}

.tx-col-actions {
  width: 80px;
  text-align: center !important;
}

.tx-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.tx-sortable:hover {
  color: var(--color-text);
}

.tx-sort-icon {
  opacity: 0.4;
  margin-left: 2px;
  vertical-align: middle;
}

.tx-sort-active {
  opacity: 1;
  color: var(--color-primary);
}

.tx-row.tx-selected td {
  background: rgba(59, 130, 246, 0.08);
}

.tx-row:hover .tx-col-actions .btn {
  opacity: 1;
}

.tx-col-actions .btn {
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.tx-row:hover .tx-col-actions .btn:hover {
  opacity: 1;
}

.tx-notes {
  max-width: 160px;
}

.tx-loading,
.tx-empty,
.tx-error {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.tx-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.tx-error {
  color: var(--color-danger);
}

/* Pagination */
.tx-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0 0.25rem;
}

.tx-pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tx-page-info {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.tx-page-size {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.tx-page-size .form-select {
  width: auto;
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
  font-size: 0.8125rem;
  min-height: unset;
  height: auto;
}

/* Selection bar */
.tx-selection-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  border: 1px solid var(--color-primary);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 100;
  animation: slideUp 0.25s ease;
}

.tx-selection-bar.hidden {
  display: none;
}

.tx-selection-count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Batch Edit Panel */
.batch-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 210;
  align-items: flex-end;
  justify-content: flex-end;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.batch-panel-overlay.active {
  display: flex;
}

.batch-panel {
  width: 380px;
  max-width: 100%;
  max-height: 100vh;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.batch-panel.active {
  transform: translateX(0);
}

.batch-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.batch-panel-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.batch-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.batch-preview {
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.25rem;
}

.batch-panel-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Edit form in modal */
.tx-edit-form .form-row {
  grid-template-columns: 1fr 1fr;
}

/* Responsive */
@media (max-width: 768px) {
  .tx-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tx-search-wrap {
    min-width: 100%;
  }

  .tx-toolbar .form-select,
  .tx-toolbar .form-input[type="date"] {
    min-width: 100%;
    max-width: 100%;
  }

  .batch-panel {
    width: 100%;
  }

  .tx-selection-bar {
    left: 1rem;
    right: 1rem;
    transform: none;
  }
}
/* 24h trend indicator */
.stat-card .stat-value-trend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stat-card .stat-value.gain {
  color: var(--color-gain);
}

.stat-card .stat-value.loss {
  color: var(--color-loss);
}

.stat-card .stat-value.neutral {
  color: var(--color-text);
}

.stat-card .trend-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  background: color-mix(in srgb, currentColor 14%, transparent);
}

/* Mobile overflow hardening for dynamic dashboard content */
.grid-stats,
.grid-2,
.grid-3,
.card,
.stat-card,
.chart-container,
.table-wrapper {
  min-width: 0;
}

.chart-container canvas {
  display: block;
  max-width: 100% !important;
}

.card-header {
  min-width: 0;
  gap: 0.75rem;
}

.card-header h3,
.stat-card .stat-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .grid-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-header[style] {
    flex-wrap: wrap;
    align-items: flex-start !important;
  }

  .evolution-ranges {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.125rem;
  }

  .range-btn {
    flex: 0 0 auto;
  }
}

/* Mobile transaction table fit */
#tx-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#tx-table {
  width: max-content;
  min-width: 100%;
}

#tx-table th,
#tx-table td {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tx-table .td-mono,
#tx-table .tx-col-num {
  font-size: 0.75rem;
}

#tx-table .tx-notes {
  max-width: 10rem;
}

@media (max-width: 768px) {
  #tx-table th,
  #tx-table td {
    padding: 0.625rem 0.65rem;
    max-width: 8.5rem;
  }

  #tx-table .tx-col-check {
    min-width: 2.5rem;
    max-width: 2.5rem;
  }

  #tx-table .tx-col-actions {
    min-width: 4.5rem;
    max-width: 4.5rem;
  }

  #tx-table .tx-col-num {
    max-width: 7.5rem;
  }

  #tx-table .tx-asset {
    max-width: 5.5rem;
  }

  #tx-table .tx-notes {
    max-width: 7rem;
  }

  .tx-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .tx-pagination,
  .tx-page-size {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* Mobile edit transaction modal */
@media (max-width: 480px) {
  .modal-overlay {
    padding: 0.75rem;
    align-items: flex-start;
  }

  .modal {
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100vh - 1.5rem);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tx-edit-form,
  .tx-edit-form .form-group,
  .tx-edit-form .form-input,
  .tx-edit-form .form-select,
  .tx-edit-form .form-textarea {
    min-width: 0;
    max-width: 100%;
  }

  .tx-edit-form .form-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.75rem;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-footer .btn {
    flex: 1 1 auto;
  }
}

/* Mobile transaction filters must not overflow */
.transactions-view,
.tx-toolbar,
.tx-toolbar-row {
  max-width: 100%;
  min-width: 0;
}

.tx-toolbar-row > * {
  min-width: 0;
}

@media (max-width: 768px) {
  .tx-toolbar-row {
    width: 100%;
  }

  .tx-toolbar-row > *,
  .tx-search-wrap,
  .tx-search-wrap .form-input,
  .tx-toolbar .form-select,
  .tx-toolbar .form-input,
  .tx-toolbar .form-input[type="date"],
  .tx-toolbar .btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .tx-toolbar .btn {
    justify-content: center;
  }

  .tx-toolbar .btn-sm {
    padding: 0.5625rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 8px;
  }

  .tx-toolbar .form-input[type="date"] {
    height: auto;
    min-height: calc(0.5625rem * 2 + 0.8125rem * 1.4 + 2px);
  }
}

/* iOS/Safari date inputs keep an intrinsic width unless forced explicitly */
@media (max-width: 768px) {
  #tx-filter-from,
  #tx-filter-to {
    display: block;
    flex: 1 1 100%;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    inline-size: 100% !important;
    min-inline-size: 0 !important;
    max-inline-size: 100% !important;
    -webkit-appearance: none;
    appearance: none;
  }
}

/* Tax report column alignment */
.report-table th,
.report-table td {
  vertical-align: middle;
}

.report-table .td-mono {
  text-align: right;
}

.report-summary th:nth-child(n+2),
.report-summary td:nth-child(n+2) {
  text-align: right;
}

@media (max-width: 640px) {
  .report-section {
    min-width: 0;
  }

  .report-section .card-body {
    padding: 0.75rem;
    overflow: hidden;
  }

  .report-table.report-summary {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
    font-size: 0.75rem;
  }

  .report-summary th,
  .report-summary td {
    padding: 0.45rem 0.35rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: inherit;
  }

  .report-summary .report-col-concept {
    width: 50% !important;
  }

  .report-summary .report-col-amount {
    width: 25% !important;
  }

  .report-summary td:first-child,
  .report-summary .section-title-row td {
    padding-left: 0.35rem !important;
  }

  .report-summary .td-mono {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .report-summary .section-title-row td {
    font-size: 0.78rem;
  }

  .report-summary .report-indent-1,
  .report-summary .report-indent-2 {
    padding-left: 0.7rem !important;
  }

  .report-summary .report-row-muted,
  .report-summary .report-cell-emphasis,
  .report-summary .report-cell-total {
    font-size: inherit;
  }

  .report-detail-subsection .report-table {
    font-size: 0.75rem;
  }

  .report-detail-subsection .report-table th,
  .report-detail-subsection .report-table td {
    padding: 0.45rem 0.35rem;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: inherit;
  }

  .report-detail-title {
    font-size: 0.78rem;
  }
}

.report-detail-subsection .report-table th:nth-child(2),
.report-detail-subsection .report-table td:nth-child(2),
.report-detail-subsection .report-table th:nth-child(3),
.report-detail-subsection .report-table td:nth-child(3),
.report-detail-subsection .report-table th:nth-child(4),
.report-detail-subsection .report-table td:nth-child(4),
.report-detail-subsection .report-table th:nth-child(5),
.report-detail-subsection .report-table td:nth-child(5),
.report-detail-subsection .report-table th:nth-child(6),
.report-detail-subsection .report-table td:nth-child(6),
.report-detail-subsection .report-table th:nth-child(7),
.report-detail-subsection .report-table td:nth-child(7) {
  text-align: right;
}

/* 24h change indicators */
.change-positive { color: #22c55e; font-size: 0.7rem; margin-left: 0.25rem; font-weight: 500; }
.change-negative { color: #ef4444; font-size: 0.7rem; margin-left: 0.25rem; font-weight: 500; }
.change-neutral { color: var(--color-text-muted, #94a3b8); font-size: 0.7rem; margin-left: 0.25rem; }

/* Sparkline */
.sparkline-canvas { display: block; }

/* Holdings table columns */
.holdings-table th,
.holdings-table td { text-align: right; }
.holdings-table th:nth-child(1),
.holdings-table td:nth-child(1) { text-align: left; width: 120px; }
.holdings-table th:nth-child(2),
.holdings-table td:nth-child(2) { width: 120px; }
.holdings-table th:nth-child(3),
.holdings-table td:nth-child(3) { width: 170px; }
.holdings-table th:nth-child(4),
.holdings-table td:nth-child(4) { width: 120px; }
.holdings-table th:nth-child(5),
.holdings-table td:nth-child(5) { width: 130px; }
.holdings-table th:nth-child(6),
.holdings-table td:nth-child(6) { width: 100px; }

.token-icon {
  width: 20px; height: 20px; border-radius: 50%;
  vertical-align: middle; margin-right: 6px;
  object-fit: cover; display: inline-block;
}
.token-icon-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--color-bg-tertiary); color: var(--color-primary);
  font-size: 0.625rem; font-weight: 700; margin-right: 6px;
  vertical-align: middle;
}


/* --- Toggle Switch --- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* --- Legal Pages --- */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0.5rem 0;
}
.legal-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.legal-nav-item {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  transition: all 0.15s;
}
.legal-nav-item:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}
.legal-nav-item.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.legal-body {
  font-size: 0.875rem;
  line-height: 1.7;
}
.legal-body h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--color-text);
}
.legal-body h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 1.25rem 0 0.375rem;
  color: var(--color-text);
}
.legal-body p {
  margin: 0.5rem 0;
  color: var(--color-text-secondary);
}
.legal-body ul {
  margin: 0.5rem 0 0.5rem 1.25rem;
  color: var(--color-text-secondary);
}
.legal-body li {
  margin: 0.25rem 0;
}
.legal-body a {
  color: var(--color-primary);
  text-decoration: none;
}
.legal-body a:hover {
  text-decoration: underline;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.8125rem;
}
.legal-table th, .legal-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  text-align: left;
}
.legal-table th {
  background: var(--color-surface);
  font-weight: 600;
}

/* --- Cookie Banner --- */
.tc-notice {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 10000;
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  max-height: 80vh;
  overflow-y: auto;
  width: 50vw;
  min-width: 320px;
  max-width: 600px;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.tc-notice.show {
  opacity: 1;
}
@media (max-width: 768px) {
  .tc-notice {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    left: 0;
    bottom: 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(0);
  }
}
.tc-notice.hidden { display: none; }
.tc-notice-text {
  flex: 1;
  min-width: 0;
}
.tc-notice-text p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.tc-notice-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}
.tc-prefs {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.tc-prefs-box {
  background: var(--color-surface);
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
}
.tc-prefs-box h3 {
  font-size: 1.125rem;
  margin: 0 0 1rem;
}
.tc-cat {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.tc-cat:last-child { border-bottom: none; }
.tc-cat-info { flex: 1; min-width: 0; }
.tc-cat-info h4 { font-size: 0.875rem; margin: 0; font-weight: 600; }
.tc-cat-info p { font-size: 0.75rem; color: var(--color-text-muted); margin: 0.25rem 0 0; }
.tc-prefs-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
}

/* ============================================================
   PDF Purchase - Paywall & Payment Modal
   ============================================================ */
.crypto-opt {
  transition: all 0.2s;
}
.crypto-opt:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.pdf-payment-modal {
  animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
  .pdf-payment-modal {
    padding: 1.25rem !important;
    margin: 0.5rem;
  }
}

/* Admin purchase actions */
.purchase-action {
  cursor: pointer;
  padding: .2rem;
  border-radius: 4px;
  transition: background .15s, transform .15s;
  display: inline-block;
}
.purchase-action:hover {
  background: var(--border, #e2e8f0);
  transform: scale(1.2);
}

/* Admin refresh icons */
.admin-refresh {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  transition: opacity .15s;
  opacity: .4;
  vertical-align: middle;
  margin-left: .3rem;
}
.admin-refresh:hover {
  opacity: .85;
}
.admin-refresh.spinning svg {
  animation: admin-spin .6s linear;
}
.admin-refresh svg {
  width: 100%;
  height: 100%;
}
@keyframes admin-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
