/* ==========================================================================
   Remontas.lt V2 - Enterprise Design System (Matching Figma/Mockup Design)
   ========================================================================== */

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

:root {
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Primary Branding Colors */
  --primary: #0d6efd;
  --primary-hover: #0b5ed7;
  --primary-light: #e8f0fe;
  --primary-focus: rgba(13, 110, 253, 0.25);

  /* Light Theme Palette */
  --bg-app: #f4f6fb;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Typography Colors */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Status Colors & Badges */
  --success: #16a34a;
  --success-bg: #dcfce7;
  --success-text: #15803d;

  --warning: #ea580c;
  --warning-bg: #ffedd5;
  --warning-text: #c2410c;

  --info: #0284c7;
  --info-bg: #e0f2fe;
  --info-text: #0369a1;

  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --danger-text: #b91c1c;

  /* Shadows & Transitions */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 24px rgba(13, 110, 253, 0.12);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --sidebar-width: 250px;
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Navigation Header (Public Landing & Portal Header)
   ========================================================================== */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.85rem 2rem;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.brand-logo svg, .brand-logo img, .brand-logo-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.brand-logo span {
  color: var(--primary);
}

.public-nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.public-nav-menu a {
  text-decoration: none;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.public-nav-menu a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   Buttons System (Pills & Modern Shapes)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.25;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.35);
  transform: translateY(-1px);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: #334155;
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: #15803d;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

/* ==========================================================================
   Hero Section (Landing Page Top)
   ========================================================================== */
.hero-wrapper {
  background: #ffffff;
  padding: 3.5rem 1.5rem 4rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #e8f0fe;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
  letter-spacing: -0.8px;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.hero-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.hero-feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f0fe;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.hero-feature-text h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.hero-feature-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.15rem;
}

/* Hero Right Visual & Overlay Card */
.hero-visual-box {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.hero-building-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.hero-floating-card {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  width: 290px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.hero-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.hero-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-card-location {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   "Kaip tai veikia?" & Benefits Section
   ========================================================================== */
.section-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.section-title-box {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
}

.how-it-works-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: center;
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  height: 100%;

}

.step-card-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.step-arrow {
  color: #cbd5e1;
  font-size: 1.5rem;
  text-align: center;
}

.benefits-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.benefits-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.benefits-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: #334155;
  font-weight: 500;
}

.benefits-list li svg, .benefits-list li span.check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8f0fe;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Admin CRM App Layout (admin.php)
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
}

/* Dark Left Sidebar for Admin */
.admin-sidebar {
  width: var(--sidebar-width);
  background: #0f172a;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.sidebar-brand span {
  color: var(--primary);
}

.sidebar-brand small {
  font-size: 0.65rem;
  background: #1e293b;
  color: #94a3b8;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.sidebar-menu {
  list-style: none;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
}

.menu-category {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.75rem 0.75rem 0.25rem 0.75rem;
  letter-spacing: 0.8px;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.menu-item a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.menu-item.active a {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.sidebar-user-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #334155;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-info-text h5 {
  font-size: 0.84rem;
  font-weight: 600;
  color: #ffffff;
}

.user-info-text p {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Main CRM Workspace Area */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-app);
}

.admin-topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 900;
}

.topbar-title-box h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.topbar-title-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-body {
  padding: 1.75rem;
  flex: 1;
}

/* ==========================================================================
   Chairman Portal Layout (dashboard.php)
   ========================================================================== */
.portal-layout {
  display: flex;
  min-height: calc(100vh - 64px);
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.portal-sidebar {
  width: 240px;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 0.5rem 0.5rem 0.5rem;
  letter-spacing: 0.6px;
}

.portal-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  color: #475569;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.portal-menu-item:hover {
  background: var(--bg-subtle);
  color: #0f172a;
}

.portal-menu-item.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.portal-menu-item.active .badge-count {
  background: #ffffff;
  color: var(--primary);
}

.badge-count {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
}

.portal-main {
  flex: 1;
  padding: 1.75rem 2rem;
  min-width: 0;
}

/* ==========================================================================
   KPI Summary Cards Grid (4 Columns)
   ========================================================================== */
.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.kpi-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.6px;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 0.35rem;
  line-height: 1;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.kpi-trend.up-green {
  background: var(--success-bg);
  color: var(--success-text);
}

.kpi-trend.up-orange {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.kpi-trend.up-blue {
  background: var(--primary-light);
  color: var(--primary);
}

/* ==========================================================================
   Badges System
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.badge-orange, .badge-pasiulymas {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.badge-blue, .badge-vykdoma {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-amber, .badge-laukia {
  background: #fef3c7;
  color: #d97706;
}

.badge-green, .badge-atlikta {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-red {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.badge-gray {
  background: #f1f5f9;
  color: #64748b;
}

/* ==========================================================================
   Filter Tabs System
   ========================================================================== */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.25rem;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: #0f172a;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ==========================================================================
   Cards List (Job Cards Layout matching Mockup)
   ========================================================================== */
.jobs-cards-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.job-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.job-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.job-card-title-box h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 0.35rem;
}

.job-card-location {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.job-card-right {
  text-align: right;
}

.job-card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.job-card-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Data Tables (Admin CRM)
   ========================================================================== */
.card-table-wrap {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

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

.data-table th {
  background: #f8fafc;
  padding: 0.85rem 1.25rem;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: #334155;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

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

/* Mini Actions Menu */
.action-dropdown {
  position: relative;
  display: inline-block;
}

.btn-action-trigger {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.15s ease;
}

.btn-action-trigger:hover {
  background: var(--bg-subtle);
  color: #0f172a;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 110%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 2000;
  display: none;
  padding: 0.4rem 0;
}

.action-dropdown.active .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  font-size: 0.84rem;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

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

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .steps-row { grid-template-columns: 1fr; }
  .how-it-works-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .grid-cols-4 { grid-template-columns: 1fr; }
  .portal-layout { flex-direction: column; }
  .portal-sidebar { width: 100%; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
}
