:root {
  /* Modern Palette - Inter/Tailwind inspired */
  --primary-bg: #F3F4F6;
  --secondary-bg: #FFFFFF;
  --sidebar-bg: #0F172A;
  /* Deep Slate */

  --accent-color: #3B82F6;
  /* Modern Blue */
  --accent-hover: #2563EB;

  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;

  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Dimensions & Spacing */
  --sidebar-width: 240px;
  --header-height: 64px;
  --card-radius: 12px;

  /* 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), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  /* Fixed Footer */
  --footer-height: 48px;
}

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

.site-footer {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-top: 1px solid #E5E7EB;
  font-size: 0.75rem;
  color: var(--text-secondary);
  z-index: 40;
  padding: 0 20px;
}

.site-footer strong {
  color: var(--accent-color);
  font-weight: 600;
}

.footer-logo {
  height: 24px;
  /* Slightly larger than the 0.75rem text */
  width: auto;
  vertical-align: middle;
  margin: 0 4px;
}

.login-footer {
  left: 0 !important;
  background: transparent !important;
  border-top: none !important;
}

@media (max-width: 768px) {
  .site-footer {
    left: 0;
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 13px;
  /* Smaller base size */
  min-height: 100vh;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.25rem;
}

h3 {
  font-size: 1.125rem;
}

h4 {
  font-size: 1rem;
}

a {
  text-decoration: none;
  color: var(--accent-color);
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* Layout */
.app-container {
  display: flex;
  width: 100%;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  z-index: 50;
  color: #E2E8F0;
}

.sidebar-header {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 32px;
  padding-left: 8px;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #94A3B8;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-link.active {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.nav-link .material-icons-round {
  font-size: 18px;
  /* Smaller icons */
}

/* Main Content Header Styles */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.page-title {
  font-size: 1.75rem;
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #E5E7EB;
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.user-name {
  font-weight: 500;
  font-size: 0.85rem;
}

/* Mobile Top Bar */
.mobile-top-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--sidebar-bg);
  color: white;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 40;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px 32px 80px;
  /* Extra bottom padding for footer */
  min-height: 100vh;
  max-width: 1600px;
}

/* Glass / Cards */
.glass-panel {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.kpi-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 4px;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

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

th {
  background: #F9FAFB;
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #E5E7EB;
}

td {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-bottom: 1px solid #E5E7EB;
  vertical-align: middle;
}

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

tbody tr:hover {
  background: #F9FAFB;
}

/* Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-new {
  background: #E0F2FE;
  color: #0369A1;
}

.status-assigned {
  background: #FEF3C7;
  color: #B45309;
}

.status-progress {
  background: #EEF2FF;
  color: #4338CA;
}

.status-resolved {
  background: #D1FAE5;
  color: #065F46;
}

.status-verified {
  background: #ECFDF5;
  color: #047857;
  text-decoration: line-through;
  opacity: 0.8;
}

/* Buttons */
.glass-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #E5E7EB;
  background: white;
  color: var(--text-primary);
  transition: var(--transition);
}

.glass-btn:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.glass-btn.primary {
  background: var(--accent-color);
  border-color: transparent;
  color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.glass-btn.primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.glass-btn .material-icons-round {
  font-size: 16px;
}

/* Inputs */
.glass-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.glass-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* Kanban */
.kanban-board {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 24px;
  align-items: flex-start;
  /* Ensure columns don't stretch weirdly */
}

.kanban-column {
  flex: 1;
  min-width: 300px;
  background: #F8FAFC;
  /* Light slate distinct from body */
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  /* Highly rounded */
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  /* Subtle lift */
  height: 100%;
}

.kanban-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 4px;
}

.ticket-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #E5E7EB;
  transition: var(--transition);
}

.ticket-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.ticket-card h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

/* Login Page Specifics */
/* Assuming Login page uses inline styles or generic classes, adding override helper */
.login-container {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
}

/* Responsive Table Pattern (Table to Cards) */
@media screen and (max-width: 768px) {
  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    margin-bottom: 20px;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 0;
    background: white;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  }

  .responsive-table td {
    padding: 12px 16px;
    border: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #F3F4F6;
  }

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

  /* Header Simulation for the first cell */
  .responsive-table td:first-child {
    background: #F9FAFB;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 2px solid #F3F4F6;
    color: var(--accent-color);
  }

  .responsive-table td:first-child::before {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: 12px;
  }

  /* Value alignment */
  .responsive-table td>div,
  .responsive-table td>span {
    text-align: right;
  }

  /* Stacking for heavy content (like Issue/Description) */
  .responsive-table td.stack-mobile {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .responsive-table td.stack-mobile::before {
    align-self: flex-start;
    margin-bottom: 4px;
  }
}

/* Kanban Mobile */
@media screen and (max-width: 768px) {
  .kanban-board {
    flex-direction: column;
    gap: 16px;
  }

  .kanban-column {
    width: 100%;
    min-width: unset;
  }
}

/* Action Menu Pattern */
.action-menu {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media screen and (max-width: 640px) {
  .action-menu {
    width: 100%;
    margin-top: 16px;
  }

  .action-menu .glass-btn {
    flex: 1;
    justify-content: center;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-top-bar {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
  }

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

  .sidebar-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 80px 16px 24px;
    /* Space for mobile header */
  }

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

  .user-profile-badge {
    display: none;
    /* Hide in header on mobile to save space */
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

/* Login Page Responsive */
@media (max-width: 480px) {
  .login-container {
    padding: 24px 16px;
  }
}