/* Furnio Valdymo Sistemos Dizaino Sistema - Baltic Forest Tema */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Spalvu palete */
  --primary: #123C35;          /* Gili miško žalia */
  --primary-dark: #0D2B26;     /* Tamsi miško žalia */
  --accent-moss: #79A38B;      /* Samanų žalia (sėkmei, teigiamam vykdymui) */
  --accent-amber: #D99A3D;     /* Gintaro akcentas (dėmesiui, vėlavimui) */
  --accent-oak: #B78358;       /* Šiltas ąžuolas (antriniams akcentams, medienos dvasiai) */
  --bg-linen: #F7F4EE;         /* Lino balta (sistemos fonas) */
  --text-dark: #26322F;        /* Grafitas (teksto spalva) */
  
  --bg-card: #ffffff;
  --border: #e8e4db;           /* Švelnus ąžuolo/lino rėmelis */
  --text-muted: #6e7a76;
  --text-on-primary: #f7f4ee;
  
  /* Šešėliai ir apvalinimai */
  --shadow-sm: 0 2px 4px rgba(13, 43, 38, 0.03);
  --shadow-md: 0 4px 12px rgba(13, 43, 38, 0.05);
  --shadow-lg: 0 10px 25px rgba(13, 43, 38, 0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  
  /* Šriftai */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Tranzicijos */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Sidebar plotis */
  --sidebar-width: 260px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-linen);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* --- MAKETAS (LAYOUT) --- */

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

/* Šoninis Meniu (Sidebar) */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--primary-dark);
  color: var(--text-on-primary);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  border-right: 1px solid rgba(247, 244, 238, 0.08);
  transition: var(--transition);
}

.sidebar-logo {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(247, 244, 238, 0.05);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-moss), var(--accent-oak));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 1.2rem;
  font-family: var(--font-title);
  box-shadow: 0 4px 10px rgba(121, 163, 139, 0.3);
}

.logo-text {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  color: var(--text-on-primary);
}

.sidebar-menu {
  list-style: none;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background-color: rgba(247, 244, 238, 0.1);
  border-radius: 2px;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(247, 244, 238, 0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.menu-item svg {
  width: 20px;
  height: 20px;
  stroke: rgba(247, 244, 238, 0.5);
  transition: var(--transition);
}

.menu-item:hover a,
.menu-item.active a {
  color: var(--text-on-primary);
  background-color: rgba(247, 244, 238, 0.08);
}

.menu-item:hover svg,
.menu-item.active svg {
  stroke: var(--accent-moss);
}

.menu-item.active a {
  background-color: var(--primary);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--accent-oak);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Naudotojo profilis meniu apacioje */
.sidebar-profile {
  padding: 20px;
  border-top: 1px solid rgba(247, 244, 238, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.1);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-moss);
}

.profile-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-role {
  font-size: 0.75rem;
  color: var(--accent-moss);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pagrindinis turinys (Main Content) */
.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* Viršutinė juosta (Topbar) */
.topbar {
  background-color: var(--bg-card);
  height: 80px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  flex-direction: column;
}

.topbar-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--primary);
  line-height: 1.2;
}

.topbar-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Paieškos laukelis */
.search-wrapper {
  position: relative;
  width: 280px;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--border);
  background-color: var(--bg-linen);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-moss);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(121, 163, 139, 0.15);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  pointer-events: none;
}

/* Pranešimai */
.notification-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.notification-btn:hover {
  background-color: var(--bg-linen);
}

.notification-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-dark);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--accent-amber);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

/* Mygtukai */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 10px rgba(18, 60, 53, 0.15);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(18, 60, 53, 0.22);
}

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

/* --- DARBO LENTOS TURINYS (DASHBOARD GRID) --- */

.dashboard-wrapper {
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* KPI kortelės (Viršutinis blokas) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-moss);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.kpi-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-card:nth-child(1) .kpi-icon-wrapper { background-color: rgba(18, 60, 53, 0.08); color: var(--primary); }
.kpi-card:nth-child(2) .kpi-icon-wrapper { background-color: rgba(183, 131, 88, 0.08); color: var(--accent-oak); }
.kpi-card:nth-child(3) .kpi-icon-wrapper { background-color: rgba(121, 163, 139, 0.08); color: var(--accent-moss); }
.kpi-card:nth-child(4) .kpi-icon-wrapper { background-color: rgba(217, 154, 61, 0.08); color: var(--accent-amber); }
.kpi-card:nth-child(5) .kpi-icon-wrapper { background-color: rgba(38, 50, 47, 0.08); color: var(--text-dark); }

.kpi-icon-wrapper svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.kpi-value {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 2rem;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 8px;
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.trend-up {
  color: var(--accent-moss);
}

.trend-down {
  color: #c54f4f;
}

.trend-neutral {
  color: var(--text-muted);
}

.kpi-footer-text {
  color: var(--text-muted);
  font-weight: 400;
}

/* Pagrindinės sekcijos išdėstymas */
.dashboard-grid-main {
  display: grid;
  grid-template-columns: 2fr 1.1fr;
  gap: 30px;
}

/* Bendras kortelių stilius */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

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

.card-title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-body {
  padding: 30px;
  flex-grow: 1;
}

/* Select filtras kortelese */
.card-select {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--bg-linen);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.card-select:focus {
  outline: none;
  border-color: var(--accent-moss);
}

.view-all-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-oak);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Diagrama - Linijinė (Project Overview) */
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
  margin-top: 10px;
}

.chart-svg {
  width: 100%;
  height: 100%;
}

.chart-grid-line {
  stroke: var(--border);
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-active {
  stroke: var(--accent-moss);
}

.chart-line-estimate {
  stroke: var(--accent-oak);
}

.chart-line-delayed {
  stroke: var(--accent-amber);
}

.chart-area {
  opacity: 0.05;
}

.chart-area-active {
  fill: var(--accent-moss);
}

.chart-point {
  stroke-width: 2.5;
  r: 4.5;
  transition: r 0.15s ease;
  cursor: pointer;
}

.chart-point-active { fill: var(--bg-card); stroke: var(--accent-moss); }
.chart-point-estimate { fill: var(--bg-card); stroke: var(--accent-oak); }
.chart-point-delayed { fill: var(--bg-card); stroke: var(--accent-amber); }

.chart-point:hover {
  r: 7;
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  justify-content: center;
  list-style: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--text-muted);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-color.active { background-color: var(--accent-moss); }
.legend-color.estimate { background-color: var(--accent-oak); }
.legend-color.delayed { background-color: var(--accent-amber); }

/* --- PROJEKTŲ BŪSENOS SĄRAŠAS (TABLES) --- */

.project-status-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
  background-color: #ffffff;
}

.project-status-item:hover {
  border-color: var(--accent-moss);
  background-color: var(--bg-linen);
  transform: translateX(4px);
}

.project-info-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-grow: 1;
}

.project-avatar-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(18, 60, 53, 0.05);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.project-name-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 250px;
}

.proj-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-title:hover {
  color: var(--accent-oak);
}

.proj-client {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-progress-col {
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-right: 30px;
}

.progress-bar-container {
  height: 6px;
  width: 100%;
  background-color: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease-out;
}

.progress-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* Žymos / Badges */
.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
  min-width: 90px;
}

.badge-success {
  background-color: rgba(121, 163, 139, 0.15);
  color: #123C35;
  border: 1px solid rgba(121, 163, 139, 0.3);
}

.badge-warning {
  background-color: rgba(217, 154, 61, 0.15);
  color: #a46d1b;
  border: 1px solid rgba(217, 154, 61, 0.3);
}

.badge-danger {
  background-color: rgba(197, 79, 79, 0.15);
  color: #923232;
  border: 1px solid rgba(197, 79, 79, 0.3);
}

/* Antrasis grid blokas */
.dashboard-grid-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
}

/* Donut diagramos vizualas */
.donut-chart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 240px;
}

.donut-svg {
  width: 200px;
  height: 200px;
  transform: rotate(-90deg);
}

.donut-segment {
  fill: none;
  stroke-width: 18;
}

.donut-segment-1 { stroke: var(--accent-moss); }
.donut-segment-2 { stroke: var(--accent-oak); }
.donut-segment-3 { stroke: var(--accent-amber); }
.donut-segment-4 { stroke: var(--text-dark); }

.donut-hole {
  fill: #ffffff;
}

.donut-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.donut-number {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--text-dark);
}

.donut-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 500;
}

.donut-legend {
  list-style: none;
  padding: 10px 0 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.donut-color-box {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.donut-legend-name {
  color: var(--text-muted);
  flex-grow: 1;
}

.donut-legend-val {
  font-weight: 600;
  color: var(--text-dark);
}

/* Paskutinė veikla */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.activity-list::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border);
}

.activity-item {
  display: flex;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.activity-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-linen);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.activity-item:hover .activity-marker {
  border-color: var(--accent-moss);
  background-color: var(--primary);
  color: var(--text-on-primary);
}

.activity-marker svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.activity-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-desc {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-dark);
}

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

.activity-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
}

.activity-time {
  color: var(--text-muted);
}

.activity-project {
  color: var(--accent-oak);
  font-weight: 500;
  text-decoration: none;
}

.activity-project:hover {
  text-decoration: underline;
}

/* Artėjantys terminai */
.deadline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.deadline-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  transition: var(--transition);
}

.deadline-item:hover {
  border-color: var(--accent-amber);
  transform: translateX(3px);
}

.deadline-date-box {
  width: 50px;
  height: 52px;
  border-radius: var(--radius-md);
  background-color: var(--bg-linen);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.deadline-month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-oak);
  line-height: 1;
  margin-bottom: 2px;
}

.deadline-day {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
}

.deadline-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow: hidden;
}

.deadline-task {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deadline-project {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.deadline-time-left {
  font-size: 0.75rem;
  font-weight: 600;
  color: #c54f4f;
  white-space: nowrap;
  background-color: rgba(197, 79, 79, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
}

.deadline-time-left.safe {
  color: var(--text-muted);
  background-color: var(--bg-linen);
}

/* ==================== ETAPAS 2 & 3: PAPILDOMI STILIAI ==================== */

/* Duonos trupiniai */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

.breadcrumbs a:hover {
  text-decoration: underline;
  color: var(--primary);
}

.breadcrumbs-separator {
  color: var(--border);
}

.breadcrumbs-current {
  color: var(--text-dark);
  font-weight: 600;
}

/* Lentelės ir Filtrai */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-select {
  min-width: 150px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.data-table th {
  background-color: var(--bg-linen);
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 600;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table td a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed transparent;
  transition: var(--transition);
}

.data-table td a:hover {
  color: var(--accent-oak);
  border-bottom: 1px solid var(--accent-oak);
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background-color: rgba(247, 244, 238, 0.4);
}

.table-client-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: rgba(18, 60, 53, 0.08);
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.client-meta-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-meta-names strong {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.client-meta-names span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-contact-info strong {
  font-weight: 500;
  color: var(--text-dark);
  font-size: 0.85rem;
}

.table-contact-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.project-count-link {
  color: var(--accent-oak);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  transition: var(--transition);
}

.project-count-link:hover {
  color: var(--primary);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-active {
  color: var(--primary);
}

.status-active::before {
  background-color: var(--accent-moss);
}

.status-inactive {
  color: var(--text-muted);
}

.status-inactive::before {
  background-color: var(--border);
}

.action-dots {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.action-dots:hover {
  background-color: var(--bg-linen);
  color: var(--text-dark);
}

/* Žymės */
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tag-blue { background-color: rgba(59, 102, 151, 0.08); color: #3b6697; }
.tag-premium { background-color: rgba(12, 37, 33, 0.06); color: var(--primary); border: 1px solid rgba(18, 60, 53, 0.15); }
.tag-standard { background-color: rgba(183, 131, 88, 0.08); color: var(--accent-oak); }
.tag-basic { background-color: var(--bg-linen); color: var(--text-muted); }
.tag-orange { background-color: rgba(217, 154, 61, 0.08); color: #a46d1b; }

/* Puslapiavimas */
.table-pagination {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.pagination-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Projekto skirtukai */
.project-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 8px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.project-tabs::-webkit-scrollbar {
  height: 4px;
}
.project-tabs::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 2px;
}

.tab-item {
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}

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

.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--accent-moss);
}

.tab-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Projekto informacijos tinklelis */
.project-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.detail-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Gamybos etapai */
.steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 30px;
}

.steps-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background-color: var(--border);
}

.step-node {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding-bottom: 24px;
}

.step-node:last-child {
  padding-bottom: 0;
}

.step-check {
  position: absolute;
  left: -30px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  z-index: 2;
  border: 2px solid var(--border);
  background-color: #ffffff;
}

.step-node.completed .step-check {
  background-color: var(--accent-moss);
  border-color: var(--accent-moss);
  color: #ffffff;
}

.step-node.active .step-check {
  background-color: #ffffff;
  border-color: var(--accent-oak);
  color: var(--accent-oak);
  font-size: 0.9rem;
  animation: pulse 2s infinite;
}

.step-node.pending .step-check {
  color: var(--text-muted);
  background-color: #ffffff;
}

.step-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.step-details strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.step-details span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(183, 131, 88, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(183, 131, 88, 0); }
  100% { box-shadow: 0 0 0 0 rgba(183, 131, 88, 0); }
}

/* Biudžeto eilutės */
.budget-comparison-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.budget-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.budget-row-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dark);
  font-weight: 550;
}

.budget-row-meta strong {
  font-weight: 600;
}

/* Failų sąrašas */
.files-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.file-item:hover {
  border-color: var(--accent-moss);
  background-color: var(--bg-linen);
}

.file-icon-doc {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background-color: #c54f4f;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- MODALINIAI LANGAI (MODALS) --- */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 43, 38, 0.45); /* Žalsvas miško šešėlis */
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none; /* Valdoma per active klase */
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: var(--transition);
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 540px;
  width: 100%;
  overflow: hidden;
  animation: modalEnter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-linen);
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: #c54f4f;
}

.modal-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dark);
  outline: none;
  background-color: #ffffff;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent-moss);
  box-shadow: 0 0 0 3px rgba(121, 163, 139, 0.15);
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-footer {
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  background-color: var(--bg-linen);
}

/* Hamburgerio mygtukas mobiliesiems */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-dark);
  fill: none;
}

/* Sąmatos redaktoriaus stiliai */
.table-input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-dark);
  outline: none;
  background-color: #ffffff;
  transition: var(--transition);
}

.table-input:focus {
  border-color: var(--accent-moss);
  box-shadow: 0 0 0 2px rgba(121, 163, 139, 0.1);
}

.inline-add-row select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dark);
  background-color: #ffffff;
  outline: none;
  transition: var(--transition);
}

.inline-add-row select:focus {
  border-color: var(--accent-moss);
}

.inline-add-row input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dark);
  background-color: #ffffff;
  outline: none;
  transition: var(--transition);
}

.inline-add-row input:focus {
  border-color: var(--accent-moss);
}

/* RESPONSIVE - Mobilieji */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-grid-main {
    grid-template-columns: 1fr;
  }
  .dashboard-grid-secondary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 850px) {
  :root {
    --sidebar-width: 0px;
  }
  .sidebar {
    left: -260px;
    width: 260px;
  }
  .sidebar.active {
    left: 0;
    box-shadow: var(--shadow-lg);
  }
  .main-content {
    margin-left: 0;
  }
  .topbar {
    padding: 0 20px;
  }
  .topbar-left {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .dashboard-wrapper {
    padding: 20px;
  }
  .mobile-nav-toggle {
    display: flex;
  }
  .search-wrapper {
    display: none;
  }
}

@media (max-width: 650px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .topbar-subtitle {
    display: none;
  }
  .topbar-title {
    font-size: 1.35rem;
  }
  .project-status-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .project-progress-col {
    width: 100%;
    margin-right: 0;
  }
  .badge {
    align-self: flex-end;
  }
  .project-details-grid {
    grid-template-columns: 1fr;
  }
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==================== ETAPAS 5: KANBAN LENTA IR TOAST ==================== */

.kanban-board-wrapper {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-top: 10px;
}

.kanban-board-wrapper::-webkit-scrollbar {
  height: 8px;
}
.kanban-board-wrapper::-webkit-scrollbar-track {
  background: var(--bg-linen);
  border-radius: 4px;
}
.kanban-board-wrapper::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.kanban-board-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.kanban-board {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  min-height: 600px;
  padding: 4px 4px 10px 4px;
}

.kanban-column {
  flex: 1;
  min-width: 290px;
  max-width: 320px;
  background-color: var(--bg-linen);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-style 0.1s ease;
}

.kanban-column.dragover {
  background-color: rgba(121, 163, 139, 0.08);
  border-color: var(--accent-moss);
  border-style: dashed;
}

.kanban-column-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(247, 244, 238, 0.85);
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
}

.kanban-column-header h3 {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kanban-card-count {
  background-color: var(--border);
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  line-height: 1;
}

.kanban-cards-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex-grow: 1;
  min-height: 200px;
}

.kanban-cards-container::-webkit-scrollbar {
  width: 5px;
}
.kanban-cards-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.kanban-card {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  position: relative;
  user-select: none;
}

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

.kanban-card.dragging {
  opacity: 0.45;
  transform: scale(0.96);
  box-shadow: none;
  border-style: dashed;
  background-color: var(--bg-linen);
}

.kanban-card:hover:not(.dragging) {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(18, 60, 53, 0.2);
}

.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.kanban-card-due {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 550;
}

.kanban-card-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.kanban-card-project {
  font-size: 0.75rem;
  color: var(--accent-oak);
  margin-bottom: 10px;
  font-weight: 550;
}

.kanban-card-project a {
  color: var(--accent-oak);
  text-decoration: none;
  transition: var(--transition);
}

.kanban-card-project a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding-top: 8px;
  margin-top: 4px;
}

.kanban-card-assignee {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kanban-card-blocked-msg {
  background-color: rgba(197, 79, 79, 0.08);
  border-left: 3px solid #c54f4f;
  color: #923232;
  font-size: 0.72rem;
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 8px;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

.kanban-column[data-status="Blokuota"] .kanban-card {
  border-left: 3px solid #c54f4f;
}

/* Toast pranešimai (Toast system) */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1100;
  pointer-events: none;
}

.toast {
  background-color: var(--primary-dark);
  color: var(--text-on-primary);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 280px;
  max-width: 360px;
  pointer-events: auto;
  animation: toastEnter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border-left: 4px solid var(--accent-moss);
}

.toast.toast-success {
  border-left-color: var(--accent-moss);
}

.toast.toast-error {
  border-left-color: #c54f4f;
  background-color: #2b1111;
}

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

.toast.toast-exit {
  opacity: 0;
  transform: translateY(-20px);
}

/* ==================== ETAPAS 6: FAKTINĖS IŠLAIDOS IR PELNINGUMAS ==================== */

.profitability-table th {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}

.profitability-table td {
  border-bottom: 1px solid var(--border);
}

.comparison-bar-fill {
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.comparison-bar-fill.safe-budget {
  background-color: var(--accent-moss);
}

.comparison-bar-fill.warning-budget {
  background-color: var(--accent-amber);
}

.comparison-bar-fill.over-budget {
  background-color: #c54f4f;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

.actual-cost-row {
  transition: background-color 0.15s ease;
  border-bottom: 1px solid var(--border);
}

.actual-cost-row:hover {
  background-color: rgba(247, 244, 238, 0.5);
}

/* ==================== SPAUSDINIMO STILIAI (PRINT STYLES) ==================== */
@media print {
  /* Paslepiame viską, ko nereikia spausdinti */
  .sidebar,
  #sidebar,
  .topbar,
  .project-tabs,
  .no-print,
  .btn,
  button,
  .card-header .btn,
  .card-header .badge,
  .version-bar,
  .estimate-editor-wrapper > div:first-child,
  .estimate-row td:last-child,
  #estimate-table th:last-child,
  #estimate-table td:last-child,
  .catalog-selector-card,
  #form-estimate-editor button,
  .card-header,
  .inline-add-row {
    display: none !important;
  }

  /* Pašaliname fonus, paraštes ir šešėlius */
  body, 
  html, 
  .main-content, 
  .dashboard-grid-main, 
  .card, 
  .card-body,
  .tab-content {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    position: static !important;
    overflow: visible !important;
  }

  .dashboard-grid-main {
    display: block !important;
  }

  .print-only-header {
    display: block !important;
  }

  /* Lentelės stiliai spausdinimui */
  .data-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 15px !important;
  }

  .data-table th, 
  .data-table td {
    border: 1px solid #cccccc !important;
    padding: 8px 10px !important;
    background: transparent !important;
    color: #000000 !important;
    font-size: 0.85rem !important;
  }

  .data-table th {
    background-color: #f5f5f5 !important;
    font-weight: 700 !important;
  }

  /* Paslepiame input elementų apvadus */
  input.table-input, 
  input[type="number"], 
  input[type="text"] {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 50px !important;
    font-size: 0.85rem !important;
    color: #000000 !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
  }
  
  input.table-input::-webkit-outer-spin-button,
  input.table-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
  }
}
