/*
 * NeoBoard Corporate & Kanban Design System
 * NeomanTech Labs
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'JetBrains Mono', monospace;

  --brand-primary: #1B5559;
  --brand-primary-hover: #144245;
  --brand-primary-light: rgba(27, 85, 89, 0.08);
  --brand-accent: #4FB5AA;

  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --bg-sidebar: #1B5559;

  --text-heading: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;

  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

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

.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.06);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.logo-wrapper {
  background: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 215px;
  margin: 0 auto;
}

.logo-wrapper img {
  max-height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--brand-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1B5559;
  font-size: 1.25rem;
}

.brand-text h1 { font-size: 1.25rem; font-weight: 800; color: #ffffff; }
.brand-text span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--brand-accent); font-weight: 700; display: block; }

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  font-size: 0.92rem;
  transition: var(--transition);
}

.nav-link i {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
}

.nav-link:hover { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.nav-link.active { color: #1B5559; background: var(--brand-accent); font-weight: 700; }
.nav-link.active i { color: #1B5559; }

.user-profile {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.user-info h4 { font-size: 0.86rem; font-weight: 700; color: #ffffff; }
.user-info p { font-size: 0.72rem; color: rgba(255, 255, 255, 0.7); word-break: break-all; }

.main-wrapper {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-bar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.top-bar-actions { display: flex; align-items: center; gap: 0.75rem; }
.page-title { font-size: 1.2rem; font-weight: 700; color: var(--text-heading); }
.content-area { padding: 1.75rem 2rem; flex: 1; }

/* Cards & Stats */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.25rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.card-title i { color: var(--brand-primary); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--brand-primary); }
.stat-card.stat-warning::before { background: #d97706; }
.stat-card.stat-info::before { background: #0284c7; }
.stat-card.stat-success::before { background: #0d9488; }

.stat-info p { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-info h3 { font-size: 1.6rem; font-weight: 800; color: var(--text-heading); margin-top: 0.2rem; }

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--brand-primary);
}

/* Search & Filters */
.search-box-inline {
  position: relative;
  min-width: 240px;
  flex: 1;
  max-width: 360px;
}
.search-box-inline i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-box-inline .form-control { padding-left: 2.35rem; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.filter-pill {
  padding: 0.38rem 0.8rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-body);
}
.filter-pill.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.project-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.project-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; margin-top: 0.25rem; }
.project-code { font-family: var(--font-code); font-size: 0.78rem; font-weight: 700; color: var(--brand-primary); margin-right: 0.35rem; }
.project-title { font-size: 1.12rem; font-weight: 800; color: var(--text-heading); margin-bottom: 0.25rem; }
.project-client { font-size: 0.82rem; color: var(--brand-primary); font-weight: 600; margin-bottom: 0.65rem; }
.project-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; flex: 1; }

.project-progress-block { margin-bottom: 0.85rem; }
.project-progress-meta { display: flex; justify-content: space-between; font-size: 0.78rem; margin-bottom: 0.35rem; color: var(--text-muted); }
.progress-track { height: 7px; background: var(--bg-subtle); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand-primary); border-radius: 99px; transition: width 0.25s ease; }

.project-footer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-color);
}

/* Kanban Board */
.kanban-header-card { padding: 1.15rem 1.35rem; }
.kanban-header-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.board-progress-inline { display: flex; align-items: center; gap: 0.65rem; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.35rem; }
.kanban-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; padding-top: 0.85rem; border-top: 1px solid var(--border-color); }

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(265px, 1fr));
  gap: 1rem;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.kanban-column {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 260px);
  min-height: 420px;
}

.kanban-column-header {
  padding: 0.85rem 1rem;
  background: #ffffff;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-heading);
}

.kanban-col-count {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.74rem;
  padding: 0.1rem 0.5rem;
  border-radius: 99px;
  font-weight: 700;
}

.btn-icon-tiny {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--brand-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.btn-icon-tiny:hover { background: var(--brand-primary); color: #ffffff; }

.kanban-column-list {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow-y: auto;
  flex: 1;
  min-height: 180px;
  transition: background 0.15s ease;
}

.kanban-column-list.drag-over {
  background: rgba(79, 181, 170, 0.14);
  outline: 2px dashed var(--brand-accent);
  outline-offset: -4px;
  border-radius: var(--radius-sm);
}

.kanban-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: var(--transition);
}
.kanban-card:hover { box-shadow: var(--shadow-lg); border-color: var(--brand-accent); }
.kanban-card.dragging { opacity: 0.45; transform: rotate(1deg); }

.kanban-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.assignee-chip { font-size: 0.72rem; font-weight: 600; color: var(--brand-primary); background: var(--brand-primary-light); padding: 0.15rem 0.5rem; border-radius: 99px; }
.kanban-card-title { font-size: 0.9rem; font-weight: 700; color: var(--text-heading); margin-bottom: 0.45rem; line-height: 1.35; }

.kanban-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.55rem; }
.kanban-tag { font-size: 0.7rem; background: var(--bg-subtle); color: var(--text-muted); padding: 0.12rem 0.45rem; border-radius: 4px; font-weight: 600; }

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}
.kanban-card-stats { display: flex; gap: 0.65rem; }
.due-badge { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.due-badge.overdue { color: #dc2626; font-weight: 700; }

/* Task Detail Modal */
.task-detail-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5rem; }
.detail-sub-box { background: var(--bg-subtle); padding: 1rem; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.checklist-items { display: flex; flex-direction: column; gap: 0.45rem; max-height: 180px; overflow-y: auto; }
.check-item-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; background: #ffffff; padding: 0.45rem 0.65rem; border-radius: var(--radius-sm); border: 1px solid var(--border-color); font-size: 0.84rem; }
.check-item-row.done span { text-decoration: line-through; color: var(--text-muted); }
.comments-list { display: flex; flex-direction: column; gap: 0.55rem; max-height: 200px; overflow-y: auto; }
.comment-row { background: #ffffff; padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); border: 1px solid var(--border-color); font-size: 0.82rem; }
.comment-meta { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.2rem; }

/* Badges, Forms, Buttons, Tables, Alerts, Modals */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.24rem 0.6rem; border-radius: 6px; font-size: 0.72rem; font-weight: 600; }
.badge-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.badge-info { background: #f0f9ff; color: #075985; border: 1px solid #bae6fd; }
.badge-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge-gray { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text-heading); }
.form-control { width: 100%; padding: 0.65rem 0.85rem; background: var(--bg-input); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-heading); font-family: var(--font-main); font-size: 0.88rem; }
.form-control:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(27, 85, 89, 0.14); }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1.05rem; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: var(--transition); }
.btn-sm { padding: 0.38rem 0.72rem; font-size: 0.78rem; }
.btn-primary { background: var(--brand-primary); color: #ffffff; }
.btn-primary:hover { background: var(--brand-primary-hover); color: #ffffff; }
.btn-secondary { background: #ffffff; color: var(--text-body); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg-subtle); }

.table-responsive { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th { padding: 0.8rem 1rem; background: #f8fafc; color: var(--text-muted); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; border-bottom: 1px solid var(--border-color); }
.table td { padding: 0.9rem 1rem; border-bottom: 1px solid var(--border-color); font-size: 0.86rem; }

.alert { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: linear-gradient(135deg, #1B5559 0%, #144245 55%, #0f2f32 100%); }
.login-card { width: 100%; max-width: 440px; background: #ffffff; border-radius: var(--radius-lg); padding: 2.25rem; box-shadow: var(--shadow-lg); }
.login-header { text-align: center; margin-bottom: 1.75rem; }
.login-header h2 { font-size: 1.65rem; font-weight: 800; color: var(--brand-primary); }

.board-modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(4px); z-index: 9999; align-items: center; justify-content: center; padding: 1.25rem; }
.board-modal-card { width: 100%; max-height: 92vh; overflow-y: auto; margin-bottom: 0; }

@media (max-width: 960px) {
  .sidebar { position: static; width: 100%; height: auto; }
  .app-container { flex-direction: column; }
  .main-wrapper { margin-left: 0; }
  .content-area { padding: 1.15rem; }
  .task-detail-grid { grid-template-columns: 1fr; }
}
