@import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Geist", sans-serif;
}

:root {
  /* Colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f9fafb;
  --color-bg-card: #ffffff;
  --color-bg-hover: #f3f4f6;
  --color-border: #e5e7eb;
  --color-border-hover: #d1d5db;

  --color-text-primary: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;

  /* Sidebar Colors */
  --color-sidebar-bg: #1f2937;
  --color-sidebar-text: #d1d5db;
  --color-sidebar-text-muted: #9ca3af;
  --color-sidebar-hover: #374151;
  --color-sidebar-active: #3b82f6;

  /* Priority Colors */
  --color-priority-high-bg: #fef2f2;
  --color-priority-high-text: #991b1b;
  --color-priority-high-border: #fecaca;

  --color-priority-medium-bg: #fffbeb;
  --color-priority-medium-text: #92400e;
  --color-priority-medium-border: #fde68a;

  --color-priority-low-bg: #f0fdf4;
  --color-priority-low-text: #166534;
  --color-priority-low-border: #bbf7d0;

  /* Status Colors */
  --color-status-open-bg: #eff6ff;
  --color-status-open-text: #1e40af;

  --color-status-progress-bg: #fef3c7;
  --color-status-progress-text: #92400e;

  --color-status-resolved-bg: #dcfce7;
  --color-status-resolved-text: #166534;

  --color-status-closed-bg: #f3f4f6;
  --color-status-closed-text: #4b5563;

  /* Button Colors */
  --color-btn-primary-bg: #2563eb;
  --color-btn-primary-text: #ffffff;
  --color-btn-primary-hover: #1d4ed8;

  --color-btn-outline-bg: transparent;
  --color-btn-outline-text: #374151;
  --color-btn-outline-border: #d1d5db;
  --color-btn-outline-hover: #f9fafb;

  /* Typography */
  --font-family: "Geist", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Padding */
  --padding-xs: var(--space-2);
  --padding-sm: var(--space-3);
  --padding-md: var(--space-4);
  --padding-lg: var(--space-6);
  --padding-xl: var(--space-8);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

  /* Sidebar Width */
  --sidebar-width: 280px;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-layout {
  display: flex;
  height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--color-sidebar-bg);
  color: var(--color-sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  overflow-y: auto;
}

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

.sidebar-logo {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  color: var(--color-bg-primary);
}

.sidebar-nav {
  flex: 1;
  padding: var(--padding-md) 0;
}

.nav-section {
  margin-bottom: var(--space-6);
}

.nav-section-title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-sidebar-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 var(--padding-lg);
  margin-bottom: var(--space-3);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--padding-sm) var(--padding-lg);
  color: var(--color-sidebar-text);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: var(--font-size-sm);
  border-left: 3px solid transparent;
}

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

.nav-item.active {
  background-color: var(--color-sidebar-hover);
  border-left-color: var(--color-sidebar-active);
  color: var(--color-bg-primary);
}

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

.nav-badge {
  margin-left: auto;
  background-color: var(--color-sidebar-active);
  color: var(--color-bg-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-1) var(--padding-xs);
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

/* Profile Section */
.sidebar-profile {
  padding: var(--padding-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--padding-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.profile-card:hover {
  background-color: var(--color-sidebar-hover);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-image: url(./images/chris.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-bg-primary);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-bg-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-role {
  font-size: var(--font-size-xs);
  color: var(--color-sidebar-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-status {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: #10b981;
  flex-shrink: 0;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: var(--padding-xl) var(--padding-lg);
}

.header {
  margin-bottom: var(--space-8);
}

.header h1 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.header p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.filters {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  padding: var(--padding-sm) var(--padding-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-btn-outline-border);
  background-color: var(--color-btn-outline-bg);
  color: var(--color-btn-outline-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background-color: var(--color-btn-outline-hover);
  border-color: var(--color-border-hover);
}

.filter-btn.active {
  background-color: var(--color-btn-primary-bg);
  color: var(--color-btn-primary-text);
  border-color: var(--color-btn-primary-bg);
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ticket-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--padding-lg);
  transition: all 0.2s ease;
  cursor: pointer;
}

.ticket-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-3);
  gap: var(--space-4);
}

.ticket-title-section {
  flex: 1;
  min-width: 0;
}

.ticket-id {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-1);
}

.ticket-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.ticket-badges {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--padding-sm);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
  white-space: nowrap;
}

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

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

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

.badge-status-open {
  background-color: var(--color-status-open-bg);
  color: var(--color-status-open-text);
}

.badge-status-progress {
  background-color: var(--color-status-progress-bg);
  color: var(--color-status-progress-text);
}

.badge-status-resolved {
  background-color: var(--color-status-resolved-bg);
  color: var(--color-status-resolved-text);
}

.badge-status-closed {
  background-color: var(--color-status-closed-bg);
  color: var(--color-status-closed-text);
}

.ticket-preview {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: var(--padding-md);
  left: var(--padding-md);
  z-index: 1000;
  background-color: var(--color-sidebar-bg);
  color: var(--color-bg-primary);
  border: none;
  padding: var(--padding-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

/* Tablet - max-width: 1140px */
@media (max-width: 1140px) {
  :root {
    --sidebar-width: 240px;
  }

  .sidebar {
    height: 100vh;
  }

  .container {
    padding: var(--padding-lg) var(--padding-md);
  }

  .ticket-header {
    gap: var(--space-3);
  }

  .ticket-card {
    padding: var(--padding-md);
  }
}

/* Mobile - max-width: 480px */
@media (max-width: 480px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    height: 100vh;
    padding-top: var(--space-10);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }


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

  .mobile-menu-toggle {
    display: flex;
  }

  .container {
    padding: var(--padding-md) var(--padding-sm);
    /* padding-top: calc(var(--padding-md) + 56px); */
    padding-top: 5rem;
  }

  .header h1 {
    font-size: var(--font-size-lg);
  }

  .filters {
    flex-direction: column;
    gap: var(--space-2);
  }

  .filter-btn {
    width: 100%;
    justify-content: center;
  }

  .ticket-header {
    flex-direction: column;
    gap: var(--space-3);
  }

  .ticket-badges {
    width: 100%;
    justify-content: flex-start;
  }

  .ticket-title {
    white-space: normal;
  }

  .ticket-meta {
    flex-wrap: wrap;
  }

  .ticket-card {
    padding: var(--padding-sm);
  }
}
