/**
 * Clinked Dashboard - Main Stylesheet
 * Modern Minimalist Design with Soft Depth
 */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --success: #10B981;
  --warning: #F59E0B;
  --destructive: #EF4444;
  --background: #FFFFFF;
  --foreground: #1F2937;
  --muted: #E5E7EB;
  --border: #E5E7EB;
  --radius: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 32px;
  font-weight: 700;
}

h2 {
  font-size: 24px;
  font-weight: 600;
}

h3 {
  font-size: 18px;
  font-weight: 600;
}

/* Dashboard Wrapper */
.clinked-dashboard-wrap {
  margin: 0 -20px;
  padding: 20px;
  background: var(--background);
}

.clinked-shortcode-wrapper {
  background: var(--background);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 20px 0;
}

/* Dashboard Root */
#clinked-dashboard-root {
  width: 100%;
  min-height: 600px;
}

/* Cards */
.stat-card,
.project-card,
.team-member-card,
.activity-item,
.file-item {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: all 0.2s ease-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-card:hover,
.project-card:hover,
.team-member-card:hover,
.activity-item:hover,
.file-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Buttons */
button,
.button {
  font-family: 'Inter', sans-serif;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease-out;
  font-size: 14px;
}

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

button.primary:hover,
.button.primary:hover {
  background-color: var(--primary-dark);
}

button.secondary,
.button.secondary {
  background-color: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--border);
}

button.secondary:hover,
.button.secondary:hover {
  background-color: var(--border);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

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

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

.badge.primary {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--muted);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
  transition: width 0.3s ease-out;
}

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.avatar.sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 16px;
}

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

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

.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

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

  .clinked-dashboard-wrap {
    margin: 0;
    padding: 10px;
  }
}

/* Sidebar Navigation */
.clinked-sidebar {
  width: 260px;
  background: var(--background);
  border-right: 1px solid var(--border);
  padding: 20px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.clinked-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease-out;
  color: var(--foreground);
  text-decoration: none;
  margin-bottom: 8px;
  font-weight: 500;
}

.clinked-sidebar-item:hover {
  background-color: var(--muted);
}

.clinked-sidebar-item.active {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

/* Main Content */
.clinked-main {
  margin-left: 260px;
  padding: 20px;
}

@media (max-width: 768px) {
  .clinked-sidebar {
    display: none;
  }

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

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.empty-state-description {
  font-size: 14px;
  color: var(--muted);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

thead {
  background-color: var(--muted);
}

th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: var(--foreground);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

tr:hover {
  background-color: rgba(37, 99, 235, 0.02);
}

/* Forms */
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: all 0.2s ease-out;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.form-group {
  margin-bottom: 16px;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }
}

/* Print Styles */
@media print {
  .clinked-sidebar,
  button,
  .clinked-sidebar-item {
    display: none;
  }

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

/* Accessibility */
.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;
}

/* Focus Visible */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
