/* UPPCL EstimaPro 2026 v2.0 - Premium Stylesheet */
/* Features elegant typography, glassmorphism, responsive grids, custom theme toggle, and dedicated print styles */

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

:root {
  /* HSL Color System */
  --bg-primary: #080c14;
  --bg-secondary: rgba(19, 27, 46, 0.65); /* Glassmorphism */
  backdrop-filter: blur(12px);
  --bg-tertiary: rgba(27, 38, 64, 0.7); /* Glassmorphism */
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(6, 182, 212, 0.15);
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.25);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  --bg-tertiary: #f1f5f9;
  --accent-cyan: #0891b2;
  --accent-blue: #2563eb;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: rgba(15, 23, 42, 0.08);
  --border-glow: rgba(8, 145, 178, 0.15);
  --shadow-glow: 0 0 15px rgba(8, 145, 178, 0.12);
}

/* Light-theme Push Button Overrides */
body.light-theme .btn {
  background: linear-gradient(180deg, #ffffff 0%, #e8eef5 100%);
  border: 1px solid #c8d8e8;
  border-top-color: #e8f0f8;
  border-bottom-color: #9ab0c4;
  color: #1e3a5f;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 3px 0 0 #8fa8bf,
    0 4px 6px rgba(0,0,0,0.12);
}
body.light-theme .btn:hover {
  background: linear-gradient(180deg, #f0f8ff 0%, #d8eaf6 100%);
  border-color: rgba(8,145,178,0.5);
  border-top-color: rgba(8,145,178,0.7);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 3px 0 0 #7090a8,
    0 4px 10px rgba(8,145,178,0.15);
}
body.light-theme .btn:active {
  background: linear-gradient(180deg, #dde8f0 0%, #c8d8e8 100%);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.08) inset,
    0 0px 0 0 #8fa8bf,
    0 1px 3px rgba(0,0,0,0.1) !important;
}
body.light-theme .btn.primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%),
              linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: 1px solid rgba(8,145,178,0.6);
  border-top-color: rgba(255,255,255,0.5);
  border-bottom-color: rgba(0,60,100,0.45);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.35) inset,
    0 3px 0 0 rgba(0,70,110,0.5),
    0 4px 12px rgba(8,145,178,0.3);
}
body.light-theme .btn.danger {
  border-color: rgba(225,29,72,0.3);
  border-bottom-color: rgba(160,0,40,0.4);
  box-shadow:
    0 1px 0 rgba(255,180,190,0.3) inset,
    0 3px 0 0 rgba(160,0,40,0.28),
    0 4px 6px rgba(225,29,72,0.12);
}
body.light-theme .header-tabs .tab-btn {
  border: 1px solid #c8d8e8;
  border-top-color: #e8f0f8;
  border-bottom-color: #9ab0c4;
  color: #475569;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 2px 0 0 #8fa8bf,
    0 3px 5px rgba(0,0,0,0.1);
}
body.light-theme .header-tabs .tab-btn.active {
  background: linear-gradient(180deg, rgba(8,145,178,0.18) 0%, rgba(8,145,178,0.06) 100%);
  border-color: rgba(8,145,178,0.5);
  border-top-color: rgba(8,145,178,0.7);
  border-bottom-color: rgba(0,70,100,0.4);
  box-shadow:
    0 1px 0 rgba(8,145,178,0.2) inset,
    0 2px 0 0 rgba(0,70,100,0.35),
    0 4px 10px rgba(8,145,178,0.15);
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* App Header */
header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.brand-icon {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow);
}

.brand h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, var(--text-primary), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-select-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
}

.project-select-container select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 1.5rem 0.25rem 0.25rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 12px;
}

/* Primary layouts */
.main-wrapper {
  display: grid;
  grid-template-columns: 340px 1fr;
  flex: 1;
  height: calc(100vh - 54px);
  overflow: hidden;
}

/* Sidebar Styling */
aside {
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.sidebar-section h3 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.35rem;
  margin-bottom: 0.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.form-group input, .form-group select {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--border-glow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* Switch styling */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
}
.switch-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  transition: .3s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-cyan);
}
input:checked + .slider:before {
  transform: translateX(20px);
  background-color: #fff;
}

/* Workspace Main Container */
.workspace-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

/* Tabs Bar */
.tabs-bar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  padding: 0 1rem;
  gap: 0.5rem;
}

.tab-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0) 100%),
              transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.12s ease;
  user-select: none;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0) 100%),
              rgba(255,255,255,0.04);
}

.tab-btn:active {
  transform: translateY(2px);
  color: var(--accent-cyan);
  transition: all 0.05s ease;
}

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

.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: none;
}

.tab-content.active {
  display: block;
}

/* SVG Designer Canvas */
#designer-tab {
  padding: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.canvas-toolbar {
  background-color: rgba(19, 27, 46, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 100%),
              var(--bg-tertiary);
  border: 1px solid rgba(255,255,255,0.1);
  border-top-color: rgba(255,255,255,0.2);
  border-bottom-color: rgba(0,0,0,0.35);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.12s ease;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 3px 0 0 rgba(0,0,0,0.35),
    0 4px 6px rgba(0,0,0,0.25);
  transform: translateY(0);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn:hover {
  border-color: rgba(6,182,212,0.45);
  border-top-color: rgba(6,182,212,0.6);
  background: linear-gradient(180deg, rgba(6,182,212,0.12) 0%, rgba(6,182,212,0.02) 100%),
              var(--bg-tertiary);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.15) inset,
    0 3px 0 0 rgba(0,0,0,0.3),
    0 4px 8px rgba(6,182,212,0.12);
}

.btn:active {
  transform: translateY(3px) !important;
  box-shadow:
    0 0 0 rgba(255,255,255,0.06) inset,
    0 0px 0 0 rgba(0,0,0,0.4),
    0 1px 2px rgba(0,0,0,0.2) !important;
  border-top-color: rgba(0,0,0,0.2);
  border-bottom-color: rgba(0,0,0,0.1);
  transition: all 0.05s ease !important;
}

.btn.primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%),
              linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: 1px solid rgba(255,255,255,0.2);
  border-top-color: rgba(255,255,255,0.35);
  border-bottom-color: rgba(0,0,10,0.4);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 3px 0 0 rgba(0,80,120,0.55),
    0 4px 10px rgba(6,182,212,0.3);
}
.btn.primary:hover {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.3) inset,
    0 3px 0 0 rgba(0,80,120,0.5),
    0 6px 16px rgba(6,182,212,0.4);
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.btn.primary:active {
  box-shadow:
    0 0 0 rgba(255,255,255,0.1) inset,
    0 0px 0 0 rgba(0,80,120,0.6),
    0 1px 4px rgba(6,182,212,0.2) !important;
}

.btn.active {
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 100%),
              var(--accent-cyan);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
  border-top-color: rgba(255,255,255,0.3);
  border-bottom-color: rgba(0,100,120,0.5);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 3px 0 0 rgba(0,100,120,0.5),
    0 4px 8px rgba(6,182,212,0.3);
}

.btn.danger {
  color: var(--accent-rose);
  border-color: rgba(244,63,94,0.25);
  border-top-color: rgba(255,100,120,0.3);
  border-bottom-color: rgba(180,0,30,0.4);
  box-shadow:
    0 1px 0 rgba(255,100,120,0.12) inset,
    0 3px 0 0 rgba(180,0,30,0.3),
    0 4px 6px rgba(244,63,94,0.15);
}
.btn.danger:hover {
  background: linear-gradient(180deg, rgba(244,63,94,0.12) 0%, rgba(244,63,94,0.02) 100%),
              var(--bg-tertiary);
  border-color: rgba(244,63,94,0.5);
  box-shadow:
    0 1px 0 rgba(255,100,120,0.15) inset,
    0 3px 0 0 rgba(180,0,30,0.35),
    0 6px 14px rgba(244,63,94,0.25);
}

.canvas-container {
  flex: 1;
  position: relative;
  background-color: #080c14;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  overflow: auto;
  cursor: grab;
}

.canvas-container:active {
  cursor: grabbing;
}

#svg-canvas {
  width: 2500px;
  height: 800px;
  display: block;
}

/* SVG Elements styles */
.grid-line {
  stroke: rgba(255, 255, 255, 0.02);
  stroke-width: 1;
}

/* Core link pathways */
.network-link {
  fill: none;
  transition: all var(--transition-fast);
}

/* 1. OH Bare: Glowing cyan dashed */
.network-link.overhead-bare {
  stroke: var(--accent-cyan);
  stroke-width: 3;
  stroke-dasharray: 6, 4;
  animation: dash 30s linear infinite;
}
body.light-theme .network-link.overhead-bare {
  stroke: var(--accent-blue);
}

/* 2. OH AB Cable: Heavy dark solid blue */
.network-link.overhead-cable {
  stroke: #2563eb;
  stroke-width: 5.5;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
body.light-theme .network-link.overhead-cable {
  stroke: #1d4ed8;
}

/* 3. UG Trench XLPE — Orange-red heavy dashed (underground warning) */
.network-link.underground-cable {
  stroke: var(--accent-rose);
  stroke-width: 5;
  stroke-linecap: square;
  stroke-dasharray: 8, 4;
}

/* 4. OH Armoured XLPE — Thick purple glow (pole-mounted armoured weatherproof) */
.network-link.overhead-armoured {
  stroke: #a855f7;
  stroke-width: 6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.5));
}
body.light-theme .network-link.overhead-armoured {
  stroke: #7c3aed;
  filter: drop-shadow(0 0 3px rgba(124, 58, 237, 0.4));
}

/* Selected links */
.network-link-click-overlay {
  cursor: pointer;
  pointer-events: stroke;
}

.network-link-click-overlay:hover + .network-link {
  stroke: var(--accent-amber) !important;
  stroke-width: 6 !important;
}

.network-link.selected {
  stroke: var(--accent-amber) !important;
  stroke-width: 6.5 !important;
  filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.6)) !important;
}

@keyframes dash {
  to {
    stroke-dashoffset: -1000;
  }
}

.pole-node {
  cursor: pointer;
}

.pole-circle {
  fill: var(--bg-tertiary);
  stroke: var(--text-muted);
  stroke-width: 2;
  transition: all var(--transition-fast);
}

.pole-node:hover .pole-circle {
  stroke: var(--accent-cyan);
  fill: rgba(6, 182, 212, 0.1);
  r: 10px;
}

.pole-node.selected .pole-circle {
  stroke: var(--accent-amber);
  fill: rgba(245, 158, 11, 0.1);
  stroke-width: 3;
  r: 10px;
}

/* Rocky Node visual indicator */
.pole-node.rocky .pole-circle {
  stroke: #94a3b8;
  fill: #334155;
  stroke-width: 3;
  stroke-dasharray: 4, 2;
}

/* Marshy Node visual collar concrete muff */
.marshy-collar {
  fill: none;
  stroke: var(--accent-emerald);
  stroke-width: 3;
  stroke-opacity: 0.6;
  filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.4));
}

.pole-text {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  fill: var(--text-primary);
  text-anchor: middle;
  pointer-events: none;
}

body.light-theme .pole-text {
  fill: #fff;
}

.pole-label {
  font-size: 10px;
  fill: var(--text-muted);
  text-anchor: middle;
}

.stay-symbol {
  stroke: var(--accent-rose);
  stroke-width: 2.5;
  fill: none;
}

.transformer-symbol {
  fill: var(--accent-amber);
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5));
}

/* Tables design system */
.data-table-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

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

.table-header-bar h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.table-search {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  outline: none;
  min-width: 200px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.85rem 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-primary);
}

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

tr:hover td {
  background-color: rgba(255, 255, 255, 0.01);
}

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

.text-center {
  text-align: center;
}

.currency-cell {
  font-family: var(--font-display);
  font-weight: 600;
}

.currency-cell::before {
  content: "₹ ";
  color: var(--text-muted);
  font-size: 0.8em;
}

/* Category Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge.supports { background-color: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.badge.conductors { background-color: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.badge.transformers { background-color: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.badge.accessories { background-color: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.badge.safety { background-color: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }
.badge.civil { background-color: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }
.badge.general { background-color: rgba(148, 163, 184, 0.15); color: var(--text-secondary); }

/* Pricing Abstract Breakdown Cards */
.abstract-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.pricing-summary-card {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.85rem;
}

.summary-row.total {
  border-bottom: none;
  padding-bottom: 0;
  padding-top: 0.5rem;
}

.summary-row.total .val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-emerald);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.summary-row.total .val::before {
  content: "₹ ";
  font-size: 0.7em;
}

.summary-row .label {
  color: var(--text-secondary);
  font-weight: 500;
}

.summary-row .val {
  font-family: var(--font-display);
  font-weight: 700;
}

/* Rate Manager inputs */
.rate-input {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  width: 90px;
  text-align: right;
  outline: none;
}
.rate-input:focus {
  border-color: var(--accent-cyan);
}

/* Notification banner */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-cyan);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  text-align: center;
  gap: 1rem;
}

.empty-state svg {
  stroke: var(--text-muted);
  width: 4rem;
  height: 4rem;
}

.empty-state h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
}

/* Print Layout styles */
#print-section {
  display: none;
}

@media print {
  body {
    display: block !important;
    width: 100% !important;
    background-color: #fff !important;
    color: #000 !important;
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  body > *:not(#print-section) {
    display: none !important;
  }

  #print-section {
    display: block !important;
    padding: 0.5in 0.5in 0.5in 0.5in !important;
    width: 100% !important;
  }

  .print-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
  }

  .print-header h1 {
    font-size: 18pt;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
  }

  .print-header h2 {
    font-size: 14pt;
    font-weight: normal;
    margin-bottom: 0.5rem;
  }

  .print-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 11pt;
  }

  .print-meta-item {
    display: flex;
    gap: 0.5rem;
  }

  .print-meta-item strong {
    min-width: 130px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 10pt;
  }

  .print-table th, .print-table td {
    border: 1px solid #000 !important;
    padding: 6px 8px !important;
    background: transparent !important;
    color: #000 !important;
  }

  .print-table th {
    text-transform: none;
    font-weight: bold;
    font-size: 10pt;
    background-color: #f2f2f2 !important;
  }

  .print-abstract {
    width: 60%;
    margin-left: auto;
    border-collapse: collapse;
    margin-bottom: 3rem;
  }

  .print-abstract td {
    border: 1px solid #000 !important;
    padding: 6px 8px !important;
    font-size: 11pt;
  }

  .print-abstract tr.grand-total td {
    font-weight: bold;
    font-size: 12pt;
    border-top: 2px solid #000 !important;
    border-bottom: 2px double #000 !important;
  }

  .print-signatures {
}

.page-boundary { fill: none; stroke: rgba(0, 0, 0, 0.2); stroke-width: 5; stroke-dasharray: 20, 20; }


/* Header Tabs */
.header-tabs {
  margin-left: 2rem;
  margin-right: auto;
  gap: 0.5rem;
  align-items: center;
}
.header-tabs .tab-btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
  border-top-color: rgba(255,255,255,0.16);
  border-bottom-color: rgba(0,0,0,0.28);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.09) inset,
    0 2px 0 0 rgba(0,0,0,0.28),
    0 3px 5px rgba(0,0,0,0.18);
  transition: all 0.12s ease;
  transform: translateY(0);
}
.header-tabs .tab-btn:hover:not(.active) {
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%),
              rgba(255,255,255,0.05);
  border-color: rgba(6,182,212,0.3);
  color: var(--text-primary);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.12) inset,
    0 2px 0 0 rgba(0,0,0,0.25),
    0 3px 8px rgba(6,182,212,0.1);
}
.header-tabs .tab-btn:active {
  transform: translateY(2px) !important;
  box-shadow:
    0 0 0 rgba(255,255,255,0.05) inset,
    0 0px 0 0 rgba(0,0,0,0.35),
    0 1px 2px rgba(0,0,0,0.15) !important;
  transition: all 0.05s ease !important;
}
.header-tabs .tab-btn.active {
  background: linear-gradient(180deg, rgba(6,182,212,0.22) 0%, rgba(6,182,212,0.06) 100%);
  border: 1px solid rgba(6,182,212,0.45);
  border-top-color: rgba(6,182,212,0.6);
  border-bottom-color: rgba(0,80,100,0.5);
  color: var(--accent-cyan);
  box-shadow:
    0 1px 0 rgba(6,182,212,0.2) inset,
    0 2px 0 0 rgba(0,80,100,0.45),
    0 4px 10px rgba(6,182,212,0.18);
  text-shadow: 0 0 12px rgba(6,182,212,0.5);
}

/* Animations */
.tab-content {
  animation: fadeIn 0.3s ease-out forwards;
}

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

/* Fix properties panel to side */
#element-properties-panel, #span-properties-panel {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid;
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

/* ─────────────────────────────────────────────────────────────────────────────
   PREMIUM ANIMATIONS & ENHANCED UI — 2026 Update
───────────────────────────────────────────────────────────────────────────── */

/* ── Ripple click effect on all buttons ── */
.btn {
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.18) 0%, transparent 65%);
  opacity: 0;
  transform: scale(0.3);
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1), opacity 0.4s ease;
  pointer-events: none;
  border-radius: inherit;
}
.btn:active::after {
  transform: scale(2.5);
  opacity: 1;
  transition: none;
}

/* ── Push-button compatible active state (translateY not scale) ── */
/* .btn:active is already handled in push-button section above */

/* ── Shimmer sweep on primary button hover ── */
.btn.primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  pointer-events: none;
  z-index: 1;
}
.btn.primary:hover::before {
  animation: shimmer-sweep 0.7s ease forwards;
}
@keyframes shimmer-sweep {
  from { left: -60%; }
  to   { left: 130%; }
}

/* ── Primary hover — push-button compatible ── */
.btn.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* ── Danger button glow-on-hover ── */
.btn.danger:hover {
  transform: translateY(-1px);
}

/* ── SVG icon micro-animations ── */
button svg {
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), filter 0.2s ease;
  flex-shrink: 0;
}
button:hover svg { transform: scale(1.18); }

/* Specific per-button icon animations */
#new-project-btn:hover svg    { transform: scale(1.2) rotate(90deg); }
#save-project-btn:hover svg   { transform: scale(1.18) translateY(-2px); }
#delete-project-btn:hover svg { transform: rotate(-12deg) scale(1.1); filter: drop-shadow(0 0 5px rgba(244,63,94,0.7)); }
#csv-btn:hover svg            { transform: scale(1.18) translateY(2px); }
#print-btn:hover svg          { transform: scale(1.1) translateY(-2px); }
#theme-toggle-btn:hover svg   { transform: scale(1.2) rotate(22deg); }

/* Tab SVG icons */
.tab-btn svg {
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), filter 0.2s ease;
}
.tab-btn:hover svg        { transform: scale(1.2) rotate(-6deg); }
.tab-btn.active svg       { transform: scale(1.1); filter: drop-shadow(0 0 5px var(--accent-cyan)); }
.tab-btn.active:hover svg { transform: scale(1.15); }

/* ── Tab active underline animation ── */
.tab-btn {
  position: relative;
}
.header-tabs .tab-btn.active {
  background-color: rgba(6,182,212,0.15);
  border: 1px solid rgba(6,182,212,0.3);
  color: var(--accent-cyan);
  animation: tab-pop-in 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes tab-pop-in {
  from { transform: scale(0.93); opacity: 0.5; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Brand icon pulse glow ── */
.brand-icon {
  animation: brand-glow 3.5s ease-in-out infinite;
}
@keyframes brand-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(6,182,212,0.25); }
  50%       { box-shadow: 0 0 22px rgba(6,182,212,0.6), 0 0 40px rgba(59,130,246,0.2); }
}

/* ── Header slide-down on load ── */
header {
  animation: header-slide-down 0.5s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes header-slide-down {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Toast bounce-in animation ── */
.toast.show {
  animation: toast-bounce 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes toast-bounce {
  from { opacity: 0; transform: translateY(30px) scale(0.88); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Transformer symbol pulse ── */
.transformer-symbol {
  animation: dtr-glow 2.2s ease-in-out infinite;
}
@keyframes dtr-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(245,158,11,0.5)); }
  50%       { filter: drop-shadow(0 0 11px rgba(245,158,11,0.9)); }
}

/* ── Stay symbol subtle blink ── */
.stay-symbol {
  animation: stay-flash 3.5s ease-in-out infinite;
}
@keyframes stay-flash {
  0%, 75%, 100% { opacity: 1; }
  85%            { opacity: 0.4; }
}

/* ── Selected pole animated ring ── */
.pole-node.selected .pole-circle {
  animation: pole-selected-glow 1s ease-in-out infinite alternate;
}
@keyframes pole-selected-glow {
  from { filter: drop-shadow(0 0 4px rgba(245,158,11,0.5)); }
  to   { filter: drop-shadow(0 0 12px rgba(245,158,11,0.95)); }
}

/* ── Sidebar section hover lift ── */
.sidebar-section {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.sidebar-section:hover {
  border-color: rgba(6,182,212,0.22);
  box-shadow: 0 4px 18px rgba(6,182,212,0.07);
}
.sidebar-section:hover h3 { color: var(--accent-cyan); transition: color 0.2s ease; }

/* ── Form input focus lift ── */
.form-group input, .form-group select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--border-glow), 0 0 14px rgba(6,182,212,0.13);
  transform: translateY(-1px);
}

/* ── BoQ table hover row ── */
tr:hover td {
  background-color: rgba(6,182,212,0.04) !important;
  transition: background-color 0.18s ease;
}
tr:hover .currency-cell { color: var(--accent-cyan); transition: color 0.2s ease; }

/* ── Badge hover ── */
.badge {
  transition: transform 0.15s ease;
}
tr:hover .badge { transform: scale(1.06); }

/* ── Project select container hover ── */
.project-select-container {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.project-select-container:hover {
  border-color: rgba(6,182,212,0.3);
  box-shadow: 0 0 10px rgba(6,182,212,0.08);
}

/* ── Stat bar items ── */
.stat-item {
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease;
}
.stat-item:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(6,182,212,0.14);
}

/* ── Abstract total value entry ── */
.summary-row.total .val {
  animation: val-slide-in 0.6s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes val-slide-in {
  from { opacity: 0; transform: translateX(15px); filter: blur(3px); }
  to   { opacity: 1; transform: translateX(0); filter: none; }
}

/* ── Canvas background ── */
.canvas-container {
  background-image:
    radial-gradient(rgba(6,182,212,0.045) 1px, transparent 1px),
    radial-gradient(rgba(6,182,212,0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
}
body.light-theme .canvas-container {
  background-image:
    radial-gradient(rgba(8,145,178,0.06) 1px, transparent 1px),
    radial-gradient(rgba(8,145,178,0.03) 1px, transparent 1px);
}

/* ── Scrollbar thumb glow ── */
::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-cyan);
  box-shadow: 0 0 6px rgba(6,182,212,0.45);
}

/* ── Print button extra glow ── */
#print-btn:hover {
  box-shadow: 0 0 22px rgba(6,182,212,0.5), 0 4px 14px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

/* ── Annexure panel slide up ── */
#annexure-overlay-panel {
  animation: overlay-slide-up 0.35s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes overlay-slide-up {
  from { opacity: 0; transform: translateY(50px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Wizard section cards fade-in stagger ── */
.wizard-section {
  animation: card-stagger 0.4s ease-out backwards;
}
.wizard-section:nth-child(1) { animation-delay: 0.04s; }
.wizard-section:nth-child(2) { animation-delay: 0.09s; }
.wizard-section:nth-child(3) { animation-delay: 0.14s; }
.wizard-section:nth-child(4) { animation-delay: 0.19s; }
@keyframes card-stagger {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

