/**
 * HeadsUp — Design System
 * Bold, graphic, black/yellow/white with offset shadows and uppercase headings
 * Matches levelheads.net brand identity
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
  --brand-yellow: #FCC953;
  --brand-black: #000000;
  --white: #FFFFFF;
  --gray-light: #F5F5F5;
  --gray-mid: #666666;
  --gray-dark: #333333;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Montserrat', 'Inter', sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --radius-sm: 3px;
  --radius-md: 6px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s var(--ease-out);
  --transition-base: 0.25s var(--ease-out);
  --shadow-card: 8px 8px 0 var(--brand-yellow);
  --shadow-btn: 4px 4px 0;

  /* Status colors */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--gray-light);
  color: var(--brand-black);
  line-height: 1.6;
  font-size: 16px;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  font-weight: 800;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* ============================================
   App Layout
   ============================================ */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.main-area {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

.main-content {
  flex: 1;
  padding: var(--space-lg);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
  background: var(--gray-light);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: var(--space-sm);
}

.login-card {
  background: var(--white);
  border: 4px solid var(--brand-black);
  border-radius: var(--radius-sm);
  padding: 40px;
}

.login-brand {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.login-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.login-subtitle {
  color: var(--gray-mid);
  font-size: 0.9rem;
}

.login-form {
  margin-bottom: var(--space-md);
}

.login-message {
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-top: var(--space-sm);
  text-align: center;
}

.login-message--success {
  background: #f0fdf4;
  color: #166534;
  border: 2px solid var(--color-success);
}

.login-message--error {
  background: #fef2f2;
  color: #991b1b;
  border: 2px solid var(--color-danger);
}

.login-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-mid);
  margin-top: var(--space-lg);
}

.login-footer a {
  color: var(--brand-black);
  font-weight: 600;
  text-decoration: underline;
}

.login-footer a:hover {
  color: var(--gray-mid);
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  background: var(--brand-black);
  color: var(--white);
  width: 240px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--transition-base);
  overflow: hidden;
}

.sidebar-brand {
  padding: var(--space-md) var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brand-yellow);
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-sm) 0;
  overflow-y: auto;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--space-md);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.sidebar-nav-item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav-item.active {
  color: var(--brand-yellow);
  background: rgba(252, 201, 83, 0.1);
  border-right: 3px solid var(--brand-yellow);
  font-weight: 600;
}

.sidebar-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

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

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* Collapsed sidebar */
.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed ~ .main-area {
  margin-left: 60px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .sidebar-nav-item span {
  display: none;
}

.sidebar.collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: var(--space-md) var(--space-xs);
}

/* ============================================
   Header
   ============================================ */
.header {
  background: var(--white);
  border-bottom: 3px solid var(--brand-black);
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--brand-black);
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--white);
  border: 4px solid var(--brand-black);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-2px) translateX(-2px);
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-bottom: 2px solid var(--gray-light);
}

.card-body {
  padding: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
  border-top: 2px solid var(--gray-light);
}

/* Stat cards */
.stat-card {
  background: var(--white);
  border: 4px solid var(--brand-black);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-mid);
}

.stat-trend {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: var(--space-xs);
}

.stat-trend.up {
  color: var(--color-success);
}

.stat-trend.down {
  color: var(--color-danger);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 3px solid var(--brand-black);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

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

.btn-primary:hover {
  background: var(--brand-yellow);
  color: var(--brand-black);
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn) var(--brand-black);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--brand-black);
  border-color: var(--brand-black);
}

.btn-secondary:hover {
  background: var(--gray-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn) var(--brand-black);
}

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

.btn-danger:hover {
  background: var(--color-danger);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn) var(--color-danger);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.75rem;
}

.btn-icon {
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--brand-black);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  color: var(--gray-mid);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
  color: var(--gray-dark);
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 3px solid var(--brand-black);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--brand-black);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 3px rgba(252, 201, 83, 0.3);
}

.form-input::placeholder {
  color: #999;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-row {
  display: flex;
  gap: var(--space-sm);
}

.form-row .form-group {
  flex: 1;
}

.form-error {
  font-size: 0.8rem;
  color: var(--color-danger);
  margin-top: 4px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--gray-mid);
  margin-top: 4px;
}

/* ============================================
   Badges
   ============================================ */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid;
  border-radius: var(--radius-sm);
  line-height: 1.3;
  white-space: nowrap;
}

/* Project status */
.badge-planning {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.badge-active {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.badge-on-hold {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}

.badge-completed {
  background: var(--gray-light);
  color: var(--gray-mid);
  border-color: #d1d5db;
}

.badge-cancelled {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* Task status */
.badge-todo {
  background: var(--gray-light);
  color: var(--gray-dark);
  border-color: #d1d5db;
}

.badge-in_progress,
.badge-in-progress {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.badge-review {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #c4b5fd;
}

.badge-done {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.badge-blocked {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* Priority */
.badge-low {
  background: var(--gray-light);
  color: var(--gray-mid);
  border-color: #d1d5db;
}

.badge-medium {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.badge-high {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}

.badge-urgent {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* Deliverable status */
.badge-draft {
  background: var(--gray-light);
  color: var(--gray-dark);
  border-color: #d1d5db;
}

.badge-pending_review,
.badge-pending-review {
  background: #fffbeb;
  color: #92400e;
  border-color: var(--brand-yellow);
}

.badge-client_review,
.badge-client-review {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}

.badge-approved {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.badge-rejected {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* Service type badges */
.badge-strategy {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #c4b5fd;
}

.badge-branding {
  background: #fffbeb;
  color: #92400e;
  border-color: var(--brand-yellow);
}

.badge-digital {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.badge-content {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.badge-analytics {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

/* ============================================
   Tables
   ============================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-mid);
  padding: 12px 16px;
  border-bottom: 3px solid var(--brand-black);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-light);
  font-size: 0.9rem;
}

.table tr:hover {
  background: var(--gray-light);
}

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

/* ============================================
   Tabs
   ============================================ */
.tab-nav {
  display: flex;
  border-bottom: 3px solid var(--brand-black);
  gap: 0;
}

.tab-item {
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--gray-mid);
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-item:hover {
  color: var(--brand-black);
}

.tab-item.active {
  color: var(--brand-black);
  border-bottom-color: var(--brand-yellow);
  font-weight: 700;
}

.tab-content {
  padding-top: var(--space-md);
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--white);
  border: 4px solid var(--brand-black);
  border-radius: var(--radius-sm);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s var(--ease-out);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 3px solid var(--gray-light);
}

.modal-header h2,
.modal-header h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 3px solid var(--gray-light);
}

/* ============================================
   Kanban Board
   ============================================ */
.kanban-board {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding: var(--space-xs) 0 var(--space-md);
  min-height: 400px;
}

.kanban-column {
  min-width: 280px;
  flex: 1;
  background: var(--gray-light);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-xs);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-header .count {
  background: var(--white);
  border: 2px solid var(--brand-black);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.kanban-cards {
  flex: 1;
  min-height: 100px;
}

.kanban-card {
  background: var(--white);
  border: 3px solid var(--brand-black);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
  cursor: grab;
  transition: all var(--transition-fast);
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--brand-yellow);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.kanban-column.drag-over {
  background: rgba(252, 201, 83, 0.1);
  outline: 2px dashed var(--brand-yellow);
}

.kanban-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  color: var(--gray-mid);
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
  background: var(--gray-light);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  background: var(--brand-yellow);
  height: 100%;
  border-radius: 4px;
  transition: width var(--transition-base);
}

.progress-fill.success {
  background: var(--color-success);
}

/* ============================================
   Dropdown
   ============================================ */
.dropdown-menu {
  position: absolute;
  background: var(--white);
  border: 3px solid var(--brand-black);
  border-radius: var(--radius-sm);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.1);
  z-index: 200;
  min-width: 200px;
  overflow: hidden;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  background: none;
  text-align: left;
  font-family: var(--font-body);
  color: var(--brand-black);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--gray-light);
}

.dropdown-item + .dropdown-item {
  border-top: 1px solid var(--gray-light);
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 2px solid var(--gray-light);
  font-weight: 700;
  font-size: 0.85rem;
}

.dropdown-body {
  max-height: 320px;
  overflow-y: auto;
}

/* ============================================
   Notifications
   ============================================ */
.notification-wrapper {
  position: relative;
}

.notification-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brand-black);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.notification-btn:hover {
  background: var(--gray-light);
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--color-danger);
  color: var(--white);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notification-dropdown {
  right: 0;
  width: 360px;
  max-height: 400px;
}

.notification-item {
  display: flex;
  gap: var(--space-sm);
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: var(--gray-light);
}

.notification-item.unread {
  background: rgba(252, 201, 83, 0.05);
  font-weight: 500;
}

.notification-item-content {
  flex: 1;
  font-size: 0.85rem;
}

.notification-item-time {
  font-size: 0.75rem;
  color: var(--gray-mid);
  margin-top: 4px;
}

/* ============================================
   Avatar
   ============================================ */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--brand-black);
  flex-shrink: 0;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

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

/* ============================================
   Activity Feed
   ============================================ */
.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--gray-light);
}

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

.activity-avatar {
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.5;
}

.activity-content strong {
  font-weight: 600;
}

.activity-time {
  font-size: 0.8rem;
  color: var(--gray-mid);
  margin-top: 4px;
}

.comment-form {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.comment-form .form-input {
  flex: 1;
}

/* ============================================
   File List
   ============================================ */
.file-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-bottom: 1px solid var(--gray-light);
  transition: background var(--transition-fast);
}

.file-item:hover {
  background: var(--gray-light);
}

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

.file-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.9rem;
}

.file-size {
  font-size: 0.8rem;
  color: var(--gray-mid);
}

.file-actions {
  display: flex;
  gap: var(--space-xs);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  padding: var(--space-sm) var(--space-md);
  border: 3px solid var(--brand-black);
  border-radius: var(--radius-sm);
  background: var(--white);
  max-width: 360px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideIn 0.3s var(--ease-out);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.toast-success {
  border-color: var(--color-success);
  border-left-width: 6px;
}

.toast-error {
  border-color: var(--color-danger);
  border-left-width: 6px;
}

.toast-info {
  border-color: var(--color-info);
  border-left-width: 6px;
}

.toast-warning {
  border-color: var(--color-warning);
  border-left-width: 6px;
}

.toast.removing {
  animation: slideOut 0.3s var(--ease-out) forwards;
}

/* ============================================
   Loading / Spinner
   ============================================ */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-light);
  border-top-color: var(--brand-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-xl);
  color: var(--gray-mid);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

/* ============================================
   Filter Bar
   ============================================ */
.filter-bar {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
  align-items: center;
}

.filter-bar .form-select,
.filter-bar .form-input {
  width: auto;
  min-width: 160px;
}

.filter-bar .form-input[type="search"] {
  min-width: 200px;
}

/* ============================================
   Grid Layouts
   ============================================ */
.grid {
  display: grid;
  gap: var(--space-md);
}

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

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

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

/* ============================================
   Timesheet
   ============================================ */
.timesheet {
  width: 100%;
  border-collapse: collapse;
}

.timesheet th,
.timesheet td {
  padding: 8px 12px;
  text-align: center;
  border: 1px solid var(--gray-light);
  font-size: 0.85rem;
}

.timesheet th {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--gray-light);
}

.timesheet td:first-child {
  text-align: left;
  font-weight: 500;
}

.timesheet-input {
  width: 60px;
  padding: 6px 4px;
  text-align: center;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: border-color var(--transition-fast);
}

.timesheet-input:focus {
  border-color: var(--brand-yellow);
  outline: none;
  box-shadow: 0 0 0 2px rgba(252, 201, 83, 0.3);
}

.timesheet-total {
  font-weight: 700;
  background: var(--gray-light);
}

/* ============================================
   User Menu
   ============================================ */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.user-menu-btn:hover {
  background: var(--gray-light);
}

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

.user-dropdown {
  right: 0;
  top: calc(100% + 8px);
}

/* ============================================
   Animations / Keyframes
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

/* ============================================
   Responsive — Tablet
   ============================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
  }

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

  .app-layout {
    grid-template-columns: 1fr;
  }

  .mobile-menu-btn {
    display: block;
  }

  .main-content {
    padding: var(--space-sm);
  }

  .header {
    padding: var(--space-sm) var(--space-sm);
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .kanban-board {
    flex-direction: column;
  }

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

  .modal {
    width: 95%;
  }

  .notification-dropdown {
    width: 300px;
    right: -60px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .form-select,
  .filter-bar .form-input {
    width: 100%;
    min-width: 100%;
  }

  .form-row {
    flex-direction: column;
  }

  .table {
    font-size: 0.8rem;
  }

  .table th,
  .table td {
    padding: 8px;
  }

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

/* ============================================
   Responsive — Mobile
   ============================================ */
@media (max-width: 480px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

  .stat-value {
    font-size: 1.5rem;
  }

  .tab-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .tab-item {
    padding: 10px 14px;
    font-size: 0.75rem;
  }

  .btn {
    padding: 10px 16px;
    font-size: 0.8rem;
  }

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

  .login-card {
    padding: var(--space-lg);
  }

  .toast-container {
    right: var(--space-sm);
    left: var(--space-sm);
    bottom: var(--space-sm);
  }

  .toast {
    max-width: 100%;
  }

  .notification-dropdown {
    position: fixed;
    top: 60px;
    left: var(--space-sm);
    right: var(--space-sm);
    width: auto;
  }

  .user-name {
    display: none;
  }
}

/* ============================================
   Print
   ============================================ */
@media print {
  .sidebar,
  .header,
  .toast-container,
  .modal-overlay,
  .no-print {
    display: none !important;
  }

  .app-layout {
    display: block;
  }

  .main-content {
    padding: 0;
    max-width: 100%;
  }

  .card {
    border-width: 1px;
    box-shadow: none;
    break-inside: avoid;
  }

  .card:hover {
    transform: none;
    box-shadow: none;
  }

  body {
    background: var(--white);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-mid); }
.text-sm { font-size: 0.85rem; }
.text-lg { font-size: 1.15rem; }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }

.hidden { display: none !important; }
.no-print { /* handled by print media query */ }
.w-100 { width: 100%; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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