@font-face {
  font-family: 'Digitaled';
  src: url('fonts/Digitaled.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --primary-color: #000000;
  --primary-dark: #000000;
  --secondary-color: #000000;
  --bg-color: #f2f0ec;
  --sidebar-bg: #000000;
  --sidebar-hover: #1a1a1a;
  --text-primary: #000000;
  --text-secondary: #666666;
  --text-light: #999999;
  --border-color: #d4d4d4;
  --card-bg: #ffffff;
  --success-color: #000000;
  --warning-color: #666666;
  --danger-color: #000000;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  background: var(--sidebar-bg);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 30px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 5px;
  color: #ffffff;
}

.veridex-brand {
  font-family: 'Digitaled', 'Courier New', monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: #ffffff;
}

.sidebar-subtitle {
  font-size: 0.9em;
  color: var(--text-light);
  opacity: 0.8;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.nav-tab {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-light);
  padding: 15px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
  font-size: 1em;
  border-left: 3px solid transparent;
}

.nav-tab:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}

.nav-tab.active {
  background: var(--sidebar-hover);
  color: #ffffff;
  border-left-color: #ffffff;
  font-weight: 600;
}

.nav-icon {
  font-size: 1.3em;
  width: 24px;
  text-align: center;
}

.nav-text {
  flex: 1;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 15px;
  background: #ffffff;
  color: #000000;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 15px;
  border: 1px solid #000000;
}

.download-btn:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.last-updated {
  font-size: 0.85em;
  color: var(--text-light);
  opacity: 0.7;
}

.last-updated p {
  margin: 0;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 0;
  background: var(--bg-color);
}

.content-header {
  background: var(--card-bg);
  padding: 25px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.content-header h2 {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--text-primary);
}

.refresh-btn {
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-btn:hover {
  background: #ffffff;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.refresh-btn:active {
  transform: translateY(0);
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 40px;
  animation: fadeIn 0.3s;
}

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

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

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
  border: 1px solid var(--border-color);
}

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

.stat-icon {
  font-size: 2.5em;
  line-height: 1;
}

.stat-content {
  flex: 1;
}

.stat-content h3 {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat-value {
  font-size: 2.2em;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.85em;
  color: var(--text-secondary);
}

.stat-value-small {
  font-size: 1.3em;
  font-weight: 700;
  color: #000000;
}

/* Section Styles */
.section-header {
  margin-bottom: 25px;
}

.section-header h3 {
  font-size: 1.5em;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.section-description {
  color: var(--text-secondary);
  font-size: 0.95em;
}

.analytics-table-section {
  margin-top: 30px;
}

.analytics-table-section h3 {
  font-size: 1.3em;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

/* Table Styles */
.table-container {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #000000;
  color: #ffffff;
}

th {
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.5px;
}

td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

tbody tr:hover {
  background: var(--bg-color);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Copy Button */
.copy-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s;
  color: var(--text-secondary);
}

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

.copy-btn:active {
  transform: scale(0.95);
}

/* Activity Container */
.activity-container {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  max-height: 600px;
  overflow-y: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.activity-item {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

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

.activity-item:last-child {
  border-bottom: none;
}

.activity-time {
  color: var(--text-secondary);
  font-size: 0.9em;
  white-space: nowrap;
  margin-left: 20px;
}

.loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .main-content {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .content-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .tab-content {
    padding: 20px;
  }
}

/* Scrollbar Styling */
.activity-container::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.activity-container::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: var(--bg-color);
}

.activity-container::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.activity-container::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
