码桶

发现社区成员的开源项目

main
index.css28.2 KB
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import './mobile.css';

:root {
  --primary: #f38020;
  /* Cloudflare Orange */
  --primary-hover: #d96d10;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --border-light: #f7fafc;
  --text: #1a202c;
  --text-muted: #718096;
  --error: #e53e3e;
  --success: #38a169;
  --hover-bg: #f9fafb;
  --select-active-bg: #fff7ed;
  --table-header-bg: #f8fafc;
  --table-hover-bg: #f8fafc;
  --input-bg: #ffffff;
  --modal-overlay: rgba(0, 0, 0, 0.5);
  --badge-blue-bg: #ebf8ff;
  --badge-blue-text: #2b6cb0;
  --badge-blue-border: #bee3f8;
  --badge-green-bg: #f0fff4;
  --badge-green-text: #2f855a;
  --badge-green-border: #c6f6d5;
  --badge-orange-bg: #fffaf0;
  --badge-orange-text: #c05621;
  --badge-orange-border: #feebc8;
  --diff-added-bg: #dcfce7;
  --diff-added-text: #166534;
  --diff-added-row-bg: #f0fdf4;
  --diff-added-border: #bbf7d0;
  --diff-removed-bg: #fee2e2;
  --diff-removed-text: #991b1b;
  --diff-removed-row-bg: #fef2f2;
  --diff-removed-border: #fecaca;
  --diff-modified-bg: #fef9c3;
  --diff-modified-text: #854d0e;
  --diff-modified-row-bg: #fefce8;
  --diff-modified-border: #fde68a;
  --error-bg: #fff5f5;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --success-text: #16a34a;
  --subtle-bg: #f8fafc;
  --code-bg: #ffffff;
  --hover-btn-bg: rgba(0, 0, 0, 0.05);
  --tab-bg: #f3f4f6;
  --toggle-off-bg: #d1d5db;
  --toggle-knob: #ffffff;
  --sidebar-width: 240px;
  --sidebar-bg: var(--card-bg);
}

/* ============================================
   Sidebar Layout
   ============================================ */
.app-layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 52px);
}

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow: hidden;
  z-index: 40;
}

.sidebar-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-header-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.sidebar-zone-selector {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

/* Custom zone dropdown trigger */
.zone-dropdown {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.zone-dropdown:hover {
  border-color: var(--primary);
}

.zone-dropdown.open {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(243, 128, 32, 0.1);
}

.zone-dropdown-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.zone-dropdown-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-dropdown-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--text-muted);
}

.zone-dropdown.open .zone-dropdown-chevron {
  transform: rotate(180deg);
}

/* Dropdown menu panel */
.zone-dropdown-menu {
  position: absolute;
  top: calc(100% - 4px);
  left: 0.75rem;
  right: 0.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  animation: zoneDropIn 0.15s ease-out;
  padding: 4px;
}

@keyframes zoneDropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.zone-dropdown-search {
  padding: 6px;
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 1;
}

.zone-dropdown-search input {
  width: 100%;
  padding: 6px 10px 6px 30px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
}

.zone-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 0.8125rem;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  color: var(--text);
}

.zone-dropdown-item:hover {
  background: var(--hover-bg);
}

.zone-dropdown-item.selected {
  background: var(--select-active-bg);
  font-weight: 600;
}

.zone-dropdown-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-dropdown-item-badge {
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 9999px;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  min-height: 38px;
  transition: background 0.15s, color 0.15s;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  user-select: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
  background: var(--hover-bg);
  color: var(--text);
}

.sidebar-nav-item.active {
  background: var(--select-active-bg);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}

.sidebar-separator {
  height: 1px;
  background: var(--border);
  margin: 0.375rem 0.75rem;
}

.sidebar-section-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.15rem 1rem 0.15rem 1rem;
  opacity: 0.7;
}

.sidebar-footer {
  padding: 0.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-footer-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s;
  border: none;
  background: transparent;
  color: var(--primary);
  width: 100%;
  text-align: left;
}

.sidebar-footer-btn:hover {
  background: var(--select-active-bg);
}

.sidebar-footer-btn.muted {
  color: var(--text-muted);
}

.sidebar-footer-btn.muted:hover {
  background: var(--hover-bg);
}

.app-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-content > main {
  flex: 1;
}

.app-content .container {
  max-width: 960px;
}

/* Mobile: sidebar overlays, doesn't take layout space */
@media (max-width: 768px) {
  .app-layout {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    min-width: 280px;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    border-right: none;
  }

  .sidebar.sidebar--open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

  .app-content {
    width: 100%;
    min-width: 0;
    min-height: calc(100vh - 52px);
  }

  /* Header: hide search on mobile */
  .header-search-box {
    display: none !important;
  }

  /* Reduce padding on mobile */
  .error-state {
    padding: 2rem 1rem;
  }

  .content-loader {
    padding: 2rem 1rem;
  }

  .skeleton-row {
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }
}

.sidebar-hamburger {
  display: none;
  border: none;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s;
  margin-right: 0.5rem;
}

.sidebar-hamburger:hover {
  background: var(--hover-btn-bg);
  color: var(--primary);
}

.sidebar-close {
  display: none;
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
  transition: all 0.2s;
}

.sidebar-close:hover {
  background: var(--hover-btn-bg);
  color: var(--primary);
}

.sidebar-backdrop {
  display: none;
}

:root[data-theme="dark"] {
  --primary: #f38020;
  --primary-hover: #ff9940;
  --bg: #0f1117;
  --card-bg: #1a1d2e;
  --border: #2d3348;
  --border-light: #252a3a;
  --text: #e2e8f0;
  --text-muted: #8892a8;
  --error: #fc8181;
  --success: #68d391;
  --hover-bg: #252a3a;
  --select-active-bg: #2a2520;
  --table-header-bg: #1e2235;
  --table-hover-bg: #1e2235;
  --input-bg: #1e2235;
  --modal-overlay: rgba(0, 0, 0, 0.7);
  --badge-blue-bg: #1a2744;
  --badge-blue-text: #63b3ed;
  --badge-blue-border: #2a4a7f;
  --badge-green-bg: #1a3a2a;
  --badge-green-text: #68d391;
  --badge-green-border: #276749;
  --badge-orange-bg: #2a2015;
  --badge-orange-text: #f6ad55;
  --badge-orange-border: #744210;
  --diff-added-bg: #1a3a2a;
  --diff-added-text: #68d391;
  --diff-added-row-bg: #1a2e24;
  --diff-added-border: #276749;
  --diff-removed-bg: #3a1a1a;
  --diff-removed-text: #fc8181;
  --diff-removed-row-bg: #2e1a1a;
  --diff-removed-border: #9b2c2c;
  --diff-modified-bg: #3a3520;
  --diff-modified-text: #f6e05e;
  --diff-modified-row-bg: #2e2a1a;
  --diff-modified-border: #744210;
  --error-bg: #2e1a1a;
  --success-bg: #1a3a2a;
  --success-border: #276749;
  --success-text: #68d391;
  --subtle-bg: #1e2235;
  --code-bg: #1e2235;
  --hover-btn-bg: rgba(255, 255, 255, 0.06);
  --tab-bg: #252a3a;
  --toggle-off-bg: #4a5568;
  --toggle-knob: #e2e8f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }
}

/* Card Style */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}


.login-card {
  padding: 2.5rem;
  max-width: 420px;
  width: 100%;
  position: relative;
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem;
  }
}

/* Typography */
h1 {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

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

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(243, 128, 32, 0.2);
}

.btn-outline {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--select-active-bg);
}

.btn-danger {
  background: var(--badge-orange-bg);
  color: var(--error);
  border: 1px solid var(--error);
}

.btn-danger:hover {
  opacity: 0.85;
}

/* Inputs */
.input-group {
  margin-bottom: 1.25rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

input,
select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.2s;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(243, 128, 32, 0.1);
}

.input-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.input-row label:not(.toggle-switch) {
  width: 60px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  text-align: right;
}



@media (max-width: 480px) {
  .input-row label {
    width: 50px;
    font-size: 0.8125rem;
    text-align: left;
  }
}


.input-row input,
.input-row select,
.input-row textarea {
  flex: 1;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--table-header-bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: var(--table-hover-bg);
}

/* Compact table rows */
.compact-row td {
  padding: 0.5rem 0.5rem !important;
}

/* Badges */
.badge {
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-blue {
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
  border: 1px solid var(--badge-blue-border);
}

.badge-green {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
  border: 1px solid var(--badge-green-border);
}

.badge-orange {
  background: var(--badge-orange-bg);
  color: var(--badge-orange-text);
  border: 1px solid var(--badge-orange-border);
}

/* Transitions */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
header {
  height: 52px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

@media (max-width: 768px) {
  header {
    padding: 0 1rem;
  }

  .hide-mobile {
    display: none !important;
  }

  .logo span {
    display: inline;
  }
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.logo span {
  color: var(--primary);
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Select wrapper for language */
.lang-select {
  padding: 4px 8px;
  font-size: 12px;
  width: auto;
  min-width: 80px;
}

/* Layout helpers */
.flex-stack {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

@media (max-width: 640px) {
  .flex-stack {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }
}

.truncate-mobile {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .truncate-mobile {
    max-width: 120px;
  }
}

/* Mobile specific helpers */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8125rem;
  }

  .badge {
    padding: 0.1rem 0.4rem;
    font-size: 0.6875rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* Toggle Switch - Cloudflare Cloud Style */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--toggle-off-bg);
  transition: all .3s ease;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  background-color: var(--toggle-knob);
  transition: all .3s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Cloud icon using SVG mask — consistent across devices */
.slider:after {
  content: "";
  position: absolute;
  width: 14px;
  height: 10px;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  background-color: #9ca3af;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M19.4 6.2A7 7 0 0 0 5.6 5.5 5.5 5.5 0 0 0 6 16h13a5 5 0 0 0 .4-9.8z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M19.4 6.2A7 7 0 0 0 5.6 5.5 5.5 5.5 0 0 0 6 16h13a5 5 0 0 0 .4-9.8z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: all .3s ease;
  pointer-events: none;
}

input:checked+.slider {
  background-color: #f38020;
}

input:checked+.slider:before {
  transform: translateX(16px);
}

input:checked+.slider:after {
  background-color: white;
  left: 4px;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Selection UI */
.record-checkbox {
  width: 18px !important;
  height: 18px !important;
  cursor: pointer;
  accent-color: var(--primary);
  border-radius: 4px;
  transition: none !important;
  -webkit-tap-highlight-color: transparent;
}

.dns-selection {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .btn-text {
    display: none;
  }

  .header-actions {
    justify-content: flex-end;
    width: 100%;
  }
}

/* Unstyled button - for interactive elements that need button semantics without default styling */
button.unstyled {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: inherit;
}

/* Dashboard Stats */
.dashboard-stats {
    margin-bottom: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

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

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dashboard-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-card-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dashboard-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-card-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
}

.dashboard-activity {
    padding: 1rem 1.25rem;
}

.dashboard-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dashboard-activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    transition: background 0.15s;
}

.dashboard-activity-item:hover {
    background: var(--hover-bg);
}

.dashboard-activity-time {
    color: var(--text-muted);
    font-size: 0.7rem;
    min-width: 40px;
    flex-shrink: 0;
}

.dashboard-activity-user {
    color: var(--primary);
    font-weight: 600;
    min-width: 60px;
    flex-shrink: 0;
}

.dashboard-activity-action {
    color: var(--text);
    font-weight: 500;
    min-width: 80px;
    flex-shrink: 0;
}

.dashboard-activity-detail {
    color: var(--text-muted);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Lazy-loading spinner for React.lazy + Suspense */
.lazy-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}
.lazy-loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: lazy-spin 0.8s linear infinite;
}
@keyframes lazy-spin { to { transform: rotate(360deg); } }

/* Toast Stack */
.toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    background: var(--card-bg);
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    min-width: 280px;
    max-width: 420px;
}

.toast-enter {
    animation: toastSlideIn 0.3s ease-out;
}

.toast-exit {
    animation: toastFadeOut 0.3s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 12px 12px;
    animation: toastProgressShrink linear forwards;
    width: 100%;
    opacity: 0.6;
}

@keyframes toastProgressShrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

@media (max-width: 640px) {
    .toast-stack {
        right: 12px;
        left: 12px;
        top: 12px;
    }
    .toast-item {
        min-width: unset;
        max-width: unset;
    }
}

/* Inline Edit */
.inline-edit-cell {
    position: relative;
    cursor: default;
}

.inline-edit-cell[title] {
    cursor: pointer;
}

.inline-edit-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inline-edit-wrapper input {
    width: 100%;
    min-width: 80px;
    padding: 0.3rem 0.5rem;
    font-size: 0.8125rem;
    border: 2px solid var(--primary);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text);
    outline: none;
    box-shadow: 0 0 0 3px rgba(243, 128, 32, 0.15);
    transition: box-shadow 0.15s;
}

.inline-edit-wrapper input:focus {
    box-shadow: 0 0 0 3px rgba(243, 128, 32, 0.25);
}

.inline-edit-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.inline-edit-actions button {
    padding: 2px 4px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.inline-edit-actions button:hover {
    background: var(--hover-bg);
}

.inline-edit-actions button.inline-save {
    color: var(--success);
}

.inline-edit-actions button.inline-cancel {
    color: var(--error);
}

/* Drag and Drop Reorder */
.drag-handle {
    cursor: grab;
    padding: 4px 2px;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
}

.drag-handle:hover {
    opacity: 1;
    color: var(--primary);
}

.drag-handle:active {
    cursor: grabbing;
}

tr.dragging {
    opacity: 0.4;
    background: var(--hover-bg);
}

tr.drag-over-top {
    border-top: 2px solid var(--primary) !important;
}

tr.drag-over-bottom {
    border-bottom: 2px solid var(--primary) !important;
}

tr.drag-over {
    background: rgba(243, 128, 32, 0.06);
}

tr[draggable="true"] {
    transition: opacity 0.15s, background 0.15s;
}

tr[draggable="true"]:hover .drag-handle {
    opacity: 0.8;
}

/* ============================================
   Content Loader / Skeleton
   ============================================ */
.content-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.content-loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.skeleton {
    background: linear-gradient(90deg, var(--hover-bg) 25%, var(--border-light) 50%, var(--hover-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.skeleton-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Page transition animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-enter {
    animation: fadeInUp 0.3s ease-out;
}

/* Tab content entrance animation */
.tab-enter {
    animation: tabEnter 0.35s ease-out;
}

@keyframes tabEnter {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Skeleton layout variants */
.skeleton-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.skeleton-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.skeleton-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.skeleton-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Error state card */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
    max-width: 420px;
    margin: 2rem auto;
}

.error-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.error-state h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.error-state p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.error-state-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   Accessibility
   ============================================ */

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 10000;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0 0 6px 0;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Focus-visible outlines for keyboard users */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .spin {
        animation: none !important;
    }
}