/* ============================================
   New Cloud Project — Design System & Styles
   Style: minimal-light / editorial-minimal
   ============================================ */

/* ========== Fonts ========== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

/* ========== CSS Variables (Design Tokens) ========== */
:root {
  /* Colors */
  --color-primary: #0d9488;
  --color-primary-hover: #0f766e;
  --color-primary-light: #ccfbf1;
  --color-primary-50: #f0fdfa;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-text: #0f172a;
  --color-text-sub: #64748b;
  --color-text-muted: #94a3b8;
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #ef4444;
  --color-danger-light: #fee2e2;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;

  /* Typography */
  --font-display: 'Outfit', 'PingFang SC', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 32px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);

  /* Layout */
  --sidebar-w: 240px;
  --content-max: 1200px;
  --header-h: 64px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

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

html {
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  /* Subtle background texture */
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(13, 148, 136, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%);
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
}

/* ========== App Shell ========== */
.app-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: #0f172a;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.app-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: var(--space-8);
}

.app-content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ========== Sidebar Nav ========== */
.nav-brand {
  padding: var(--space-6) var(--space-6) var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.nav-brand-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.nav-section {
  padding: 0 var(--space-3);
}

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-4) var(--space-3) var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  height: 40px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration) var(--ease);
  position: relative;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
  background: rgba(13, 148, 136, 0.15);
  color: #5eead4;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 0 3px 3px 0;
}

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

.nav-footer {
  margin-top: auto;
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}

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

.nav-user-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

/* ========== Page Header ========== */
.page-header {
  margin-bottom: var(--space-8);
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.page-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-sub);
  margin-top: var(--space-1);
}

/* ========== Stat Cards ========== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: box-shadow var(--duration) var(--ease);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.stat-card-label {
  font-size: var(--text-sm);
  color: var(--color-text-sub);
  font-weight: 500;
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-icon svg {
  width: 18px;
  height: 18px;
}

.stat-card-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.stat-card-change {
  font-size: var(--text-xs);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-card-change.up { color: var(--color-success); }
.stat-card-change.down { color: var(--color-danger); }

/* ========== Cards ========== */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: box-shadow var(--duration) var(--ease);
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border-light);
}

.card-title {
  font-size: var(--text-base);
  font-weight: 600;
}

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

/* ========== Project Cards ========== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}

.project-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

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

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.project-card-color {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 5px;
}

.project-card-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  flex: 1;
}

.project-card-desc {
  font-size: var(--text-sm);
  color: var(--color-text-sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-progress {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card-members {
  display: flex;
  align-items: center;
}

.project-card-members .avatar {
  margin-left: -6px;
  border: 2px solid var(--color-surface);
}

.project-card-members .avatar:first-child {
  margin-left: 0;
}

.project-card-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ========== Progress Bar ========== */
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 600ms var(--ease);
}

.progress-text {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-sub);
  min-width: 32px;
  text-align: right;
}

/* ========== Tags ========== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}

.tag-success { background: var(--color-success-light); color: #065f46; }
.tag-warning { background: var(--color-warning-light); color: #92400e; }
.tag-danger { background: var(--color-danger-light); color: #991b1b; }
.tag-info { background: var(--color-info-light); color: #1e40af; }
.tag-neutral { background: #f1f5f9; color: #475569; }

/* ========== Avatar ========== */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--text-sm);
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: var(--text-lg); }
.avatar-xl { width: 64px; height: 64px; font-size: var(--text-xl); }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn svg { width: 16px; height: 16px; }

.btn-sm { height: 28px; padding: 0 var(--space-3); font-size: var(--text-xs); }
.btn-md { height: 36px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.btn-lg { height: 44px; padding: 0 var(--space-6); font-size: var(--text-base); }

.btn-primary {
  background: var(--color-primary);
  color: white;
}
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }

.btn-ghost {
  color: var(--color-text-sub);
}
.btn-ghost:hover { background: #f1f5f9; color: var(--color-text); }

.btn-danger {
  background: var(--color-danger);
  color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========== Inputs ========== */
.input {
  height: 36px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface);
  transition: all var(--duration) var(--ease);
  outline: none;
  width: 100%;
}

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.input::placeholder {
  color: var(--color-text-muted);
}

.input-with-icon {
  position: relative;
}

.input-with-icon svg {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.input-with-icon .input {
  padding-left: 36px;
}

.select {
  height: 36px;
  padding: 0 var(--space-8) 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: all var(--duration) var(--ease);
}

.select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* ========== Table ========== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-surface);
}

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

.table th {
  background: #f8fafc;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}

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

.table tr:hover td {
  background: #f8fafc;
}

.table-link {
  color: var(--color-primary);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--duration) var(--ease);
}

.table-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* ========== Toolbar / Filter Bar ========== */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.toolbar-search {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}

.filter-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.filter-tab {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-sub);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--color-text);
}

.filter-tab.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* ========== Activity Feed ========== */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-light);
}

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

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 6px;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.5;
}

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

.activity-text .highlight {
  color: var(--color-primary);
  font-weight: 500;
}

.activity-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ========== Task List ========== */
.task-list {
  display: flex;
  flex-direction: column;
}

.task-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--duration) var(--ease);
}

.task-item:last-child { border-bottom: none; }
.task-item:hover { background: #fafbfc; }

.task-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration) var(--ease);
}

.task-checkbox:hover {
  border-color: var(--color-primary);
}

.task-checkbox.checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.task-checkbox.checked svg {
  display: block;
}

.task-checkbox svg {
  display: none;
  width: 12px;
  height: 12px;
  color: white;
}

.task-title {
  flex: 1;
  font-size: var(--text-sm);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-title.done {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.task-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ========== Team Cards ========== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.team-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: all var(--duration) var(--ease);
  text-align: center;
}

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

.team-card-avatar {
  margin: 0 auto var(--space-4);
}

.team-card-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
}

.team-card-role {
  font-size: var(--text-sm);
  color: var(--color-text-sub);
  margin-top: 2px;
}

.team-card-email {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.team-card-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-light);
}

.team-card-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.team-card-stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ========== Project Detail ========== */
.detail-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.detail-color {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 4px;
}

.detail-info {
  flex: 1;
}

.detail-title {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.detail-desc {
  font-size: var(--text-sm);
  color: var(--color-text-sub);
  margin-top: var(--space-2);
  line-height: 1.6;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-sub);
}

.detail-meta-item svg {
  width: 16px;
  height: 16px;
}

.detail-progress-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  margin-bottom: var(--space-6);
}

.detail-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.detail-progress-bar {
  height: 10px;
}

.detail-progress-bar .progress-fill {
  height: 100%;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-6);
}

.detail-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border-light);
}

.detail-section-title {
  font-size: var(--text-sm);
  font-weight: 600;
}

.detail-member-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--color-border-light);
}

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

.detail-member-info {
  flex: 1;
}

.detail-member-name {
  font-size: var(--text-sm);
  font-weight: 500;
}

.detail-member-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 250ms var(--ease);
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 250ms var(--ease);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border-light);
}

.modal-title {
  font-size: var(--text-base);
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-sub);
  transition: all var(--duration) var(--ease);
}

.modal-close:hover {
  background: #f1f5f9;
  color: var(--color-text);
}

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

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border-light);
}

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

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface);
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: all var(--duration) var(--ease);
  font-family: var(--font-body);
}

.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* ========== Toast ========== */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  transform: translateX(120%);
  transition: transform 300ms var(--ease);
  border-left: 3px solid var(--color-info);
}

.toast.show { transform: translateX(0); }
.toast-success { border-left-color: var(--color-success); }
.toast-error { border-left-color: var(--color-danger); }
.toast-info { border-left-color: var(--color-info); }

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--color-text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-sub);
}

.empty-state-desc {
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

/* ========== Animation ========== */
.animate-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-sub);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--color-text-sub);
  transition: color var(--duration) var(--ease);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-nav {
    transform: translateX(-100%);
    transition: transform 300ms var(--ease);
  }
  .app-nav.open {
    transform: translateX(0);
  }
  .app-content {
    margin-left: 0;
    padding: var(--space-4);
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .page-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Utility ========== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-sub { color: var(--color-text-sub); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
