/* ===== TAIYABOS v27.7 - 'ULTIMATE CONTRAST BLUE GLASS' FIX ===== */
/* --- 0. Root Variables (Naya HUD Look) --- */
:root {
  --bg-main: #02040a; /* Deepest Blue/Black */
  --bg-grid: #0d1a3a;
  
  /* Glass Effect Colors (FIXED: Sections will use a lighter, distinct glass base) */
  --glass-bg: rgba(20, 30, 50, 0.85); /* Lighter Blue Glass Base for Sections */
  --glass-border: rgba(255, 187, 0, 0.4); 
  --glass-border-active: rgba(255, 230, 0, 0.6);
  
  --text-primary: #ffffff;
  --text-secondary: #b0d0ff;
  --text-muted: #7080b0;

  /* MODIFIED THEME (Deep Gold/Amber - DEFAULT FALLBACK) */
  --accent-primary: #ffbb00; 
  --accent-secondary: #ff8c00; 
  
  --header-bg: none; 
  --header-border: none;
  
  --header-height: 130px;
  --dock-width: 80px;
  --page-max: 1100px;
  
  --radius: 12px;
  
  
  /* QA/QC Button Colors */
  --qa-yes: #00ff7f;
  --qa-no: #ff4d4d;
  --qa-na: #6c757d;
  
  /* BBS Shape "Real Feel" Variables */
  --bar-thickness: 3px;
  --bar-radius: 1px;
  --bar-color: var(--text-primary);

  /* Unique Header Variables (Dark Blue/Red Gradient) */
  --plate-bg-color: linear-gradient(90deg, #000033 0%, #08003f 50%, #000033 100%); 
  --plate-border-color: var(--accent-primary);

  /* NAYA: CUSTOM COLOR VARIABLES (Script Controlled for theme-custom) */
  --custom-hue: 40; 
  --custom-sat: 100%;
  --custom-light-p: 50%; 
  --custom-light-s: 70%;
  
  /* NAYA: Animation Control Variable */
  --animation-speed: 8s; 
}

/* --- 1. Base & Naya Animated Background --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-main);
  background-image: 
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0;
  animation: bg-pan 120s linear infinite;
  margin: 0;
  padding-top: var(--header-height);
  padding-left: var(--dock-width);
  min-height: 100vh;
  overflow-x: hidden;
}

@keyframes bg-pan {
  0% { background-position: 0 0; }
  100% { background-position: 1000px 1000px; }
}

/* ======================================================= */
/* --- 2. Header / Brand Plate (UNCHANGED) --- */
/* Header Plate ka color Dark Blue Gradient hai, jo Sections se alag hai */
/* ======================================================= */
.header {
  position: fixed;
  top: 0;
  left: var(--dock-width);
  right: 0;
  height: var(--header-height);
  z-index: 9999;
  padding: 0; 
  background: none;
  border-bottom: none;
  pointer-events: none;
}
.brand {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  pointer-events: auto;
}
.plate {
  position: relative;
  width: 100%;
  max-width: 100%; 
  height: 100%;
  margin-left: 0;
  margin-right: 0;
  
  /* 1. SHAPE RETAINED */
  clip-path: polygon(1% 0, 99% 0, 100% 30%, 100% 70%, 99% 100%, 1% 100%, 0% 70%, 0% 30%); 
  
  background: var(--plate-bg-color); 
  backdrop-filter: blur(5px) saturate(100%); 
  -webkit-backdrop-filter: blur(5px) saturate(100%);
  
  /* 2. SHARP BORDER */
  border: 1px solid transparent; 
  box-shadow: 
    0 5px 15px rgba(0, 0, 0, 0.6),
    0 0 0 2px var(--plate-border-color), 
    inset 0 0 10px rgba(255, 187, 0, 0.1); 
    
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, clip-path 0.3s ease;
  animation: none;
}

/* 3. UNIQUE GLOW: Animated Pulse/Energy Field (MILDER) */
.plate::before {
  content: '';
  position: absolute;
  inset: -5px;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%, 
              #3333ff 0%, 
              #ff3333 15%, 
              transparent 60%);
  animation: energy-pulse var(--animation-speed) ease-in-out infinite alternate; 
  opacity: 0.08; 
  clip-path: inherit;
}
@keyframes energy-pulse {
  0% { transform: scale(1) rotate(0deg); opacity: 0.04; }
  100% { transform: scale(1.03) rotate(1deg); opacity: 0.1; }
}


/* Main Title (HYPER SHARP TEXT - GLOW REDUCED) */
.plate h1 {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Solid White Text Base */
  color: #fff;
  -webkit-text-fill-color: initial;
  background: none; 
  -webkit-background-clip: none;
  
  /* FIX: Minimal Shadow for Max Sharpness */
  filter: drop-shadow(0 0 0.5px #fff) 
          drop-shadow(0 0 1px var(--accent-primary)); 
}

/* Emoji Animation (SLOWED) */
.emoji-logo {
  font-size: 2.8rem;
  margin-right: 15px;
  filter: drop-shadow(0 0 4px var(--accent-secondary)) drop-shadow(0 0 1px #fff);
  animation: floatEmoji 6s ease-in-out infinite; 
  -webkit-text-fill-color: initial;
}
@keyframes floatEmoji {
  0% { transform: translateY(0) scale(1) rotate(0deg); }
  25% { transform: translateY(-5px) scale(1.02) rotate(1deg); }
  50% { transform: translateY(0) scale(1) rotate(0deg); }
  75% { transform: translateY(5px) scale(1.02) rotate(-1deg); }
  100% { transform: translateY(0) scale(1) rotate(0deg); }
}

/* Subtitle (Command Center Console Text - BOLDED) */
.plate h2 {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 5px;
  margin: 5px 0 0 0;
  text-transform: uppercase;
  color: var(--accent-secondary);
  opacity: 1;
  text-shadow: 0 0 3px var(--accent-secondary); 
}


/* Top Left Badge (FIXED Position) */
.badge {
  position: absolute;
  top: 15px;
  left: 35px;
  padding: 5px 10px;
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--accent-secondary);
  border: 1px solid var(--accent-secondary);
  background: rgba(0, 0, 0, 0.8); 
  border-radius: 4px;
  box-shadow: 0 0 6px var(--accent-secondary);
}

/* Clock Area (FIXED Position) */
#live-clock {
  position: absolute;
  top: 15px;
  right: 35px;
  text-align: right;
  background: rgba(0, 0, 0, 0.8);
  padding: 6px 15px;
  border-radius: 6px;
  border: 1px solid var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
}
#live-time {
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-primary);
  text-shadow: 0 0 4px var(--accent-primary);
  line-height: 1.2;
}
#live-date {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-secondary);
  line-height: 1.2;
}

/* NAYA: A-Class 3D Header Layout (FIXED) */
body.tpl-3d-header .header {
  perspective: 1000px;
}
body.tpl-3d-header .plate {
   box-shadow: 
        0 0 15px var(--accent-primary), 
        0 0 30px var(--accent-secondary),
        0 0 0 3px var(--accent-primary), 
        0 0 0 5px var(--accent-secondary), 
        inset 0 0 20px rgba(255, 255, 255, 0.2); 
   clip-path: none;
   border-radius: 16px;
}
/* ======================================================= */


/* --- 3. Left Dock --- */
.dock {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--dock-width);
  height: 100%;
  z-index: 10000;
  background: rgba(5, 10, 20, 0.9); 
  backdrop-filter: blur(8px); 
  border-right: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(var(--header-height) + 20px);
  gap: 15px;
}
.dock hr {
  width: 70%;
  border-color: var(--glass-border);
}

.item {
  position: relative;
  width: 50px;
  height: 50px;
}
.item .icon {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--text-secondary);
  cursor: pointer;
  
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}
.item:hover .icon {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(255, 187, 0, 0.1);
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--accent-primary);
}

.tip {
  position: absolute;
  left: calc(var(--dock-width) - 10px);
  top: 50%;
  transform: translateY(-50%);
  
  background: var(--bg-main);
  border: 1px solid var(--accent-primary);
  border-left: none;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 0 4px 4px 0;
  display: none;
  z-index: 10001;
}
.item:hover .tip {
  display: block;
}

/* --- 4. Main Content Area & Layout --- */
.wrap {
  max-width: var(--page-max);
  margin: 20px auto 120px auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ======================================================= */
/* --- 5. NAYA 'AUTONOMOUS' Sections / Cards (SECTION CONTRAST FIX) --- */
/* ======================================================= */
.slide {
  position: relative;
  background: rgba(20, 35, 60, 0.98); /* FIX: Section background ko Light Deep Blue kiya (High Contrast) */
  backdrop-filter: blur(3px); /* Blur further reduced */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin: 25px 0;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* 5.1 NAYA: DYNAMIC SECTION BORDER GLOW */
.slide::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: var(--radius);
  background: conic-gradient(
    from 180deg at 50% 50%,
    var(--accent-primary) 0deg,
    transparent 60deg,
    transparent 300deg,
    var(--accent-primary) 360deg
  );
  animation: section-spin var(--animation-speed) linear infinite; 
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
}

@keyframes section-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Layout 1: Default/HUD (No specific override) - Center spin, Normal opacity (0.4) */
.slide:hover::before,
.slide.open::before {
  opacity: 0.5; /* Border glow made more intense on hover/open */
}

/* Layout 2: Two Column (Corner Spin) */
body.tpl-two-column .slide::before {
  animation: corner-spin var(--animation-speed) linear infinite;
  background: conic-gradient(
    from 0deg at 0% 0%, 
    var(--accent-primary) 0deg,
    transparent 60deg,
    transparent 300deg,
    var(--accent-primary) 360deg
  );
}
@keyframes corner-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
body.tpl-two-column .slide:hover::before,
body.tpl-two-column .slide.open::before {
  opacity: 0.6;
}

/* Layout 3: Center Dock (Pulse Opacity) */
body.tpl-center-dock .slide::before {
  animation: section-pulse var(--animation-speed) ease-in-out infinite alternate;
  background: var(--accent-secondary); 
  opacity: 0.1;
}
@keyframes section-pulse {
    0% { transform: scale(1.0); opacity: 0.05; }
    100% { transform: scale(1.01); opacity: 0.25; }
}
body.tpl-center-dock .slide:hover::before,
body.tpl-center-dock .slide.open::before {
  opacity: 0.5;
}


.slideHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  font-weight: 900;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.4); 
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 2;
  transition: background 0.3s ease;
}
/* Section header background (default) */
.theme-default .slideHead { background: rgba(0, 0, 0, 0.4); }

.slideHead h2 {
  font-size: 1.1rem;
  letter-spacing: .08em;
  color: var(--accent-primary);
  text-shadow: 0 0 5px var(--accent-primary); /* Stronger glow for section headings */
  margin: 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.slideCaret {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: all .35s ease;
  font-size: 18px;
  color: var(--accent-primary);
  text-shadow: 0 0 3px var(--accent-primary);
  transform: rotate(0deg);
}
.slide.open .slideCaret {
  transform: rotate(180deg);
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

.slideBody {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  filter: blur(0);
  transition: max-height .5s ease, opacity .35s ease, filter .35s ease, padding .5s ease;
  padding: 0 22px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}
.slide.open .slideBody {
  padding: 22px;
  max-height: 5000px;
  opacity: 1;
  filter: blur(0);
}
.slideBody pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Consolas', 'Menlo', monospace;
  font-size: 13px;
}

/* --- 6. Forms, Inputs & Buttons (HUD Style) --- */
input, select, textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 187, 0, 0.1);
  box-shadow: 0 0 10px rgba(255, 187, 0, 0.3);
}
.theme-default input:focus, .theme-default select:focus, .theme-default textarea:focus {
  background: rgba(255, 187, 0, 0.1);
  box-shadow: 0 0 10px rgba(255, 187, 0, 0.3);
}


/* NAYA: Dropdown Option Fix */
select option {
  background: var(--bg-main);
  color: var(--text-primary);
  padding: 5px;
}

.btn {
  padding: 12px 18px;
  border: 1px solid var(--accent-primary);
  background: var(--accent-primary);
  color: #000;
  font-weight: 900;
  cursor: pointer;
  border-radius: var(--radius);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}
.btn:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 15px var(--accent-secondary);
  transform: scale(1.02);
}

.ghost, a.ghost {
  padding: 12px 18px;
  border: 1px solid var(--glass-border-active);
  background: transparent;
  color: var(--accent-secondary);
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  transition: all 0.2s ease;
}
.ghost:hover {
  background: rgba(255, 140, 0, 0.1);
  box-shadow: 0 0 10px var(--accent-secondary);
}
.theme-default .ghost:hover {
  background: rgba(255, 140, 0, 0.1);
  box-shadow: 0 0 10px var(--accent-secondary);
}


small, .muted { color: var(--text-muted); }
hr { border-color: var(--glass-border); border-style: solid; border-width: 1px 0 0 0; }
.sub-section-title {
  --qa-yes: #00ff7f; 
  color: var(--qa-yes);
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--qa-yes);
}

/* --- 7. Modals & Controls (HUD Style) --- */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: 0;
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(6px);
  padding: 40px;
  overflow-y: auto;
}
.modal.show { display: block; }
.modal .box {
  max-width: 700px;
  margin: 40px auto;
  position: relative;
  background: rgba(5, 10, 20, 0.95);
  backdrop-filter: blur(8px); 
  border: 1px solid var(--glass-border-active);
  border-radius: var(--radius);
  box-shadow: 0 0 30px var(--accent-secondary);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.modal .slideToggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(255, 140, 0, 0.1);
  cursor: pointer;
  transition: background 0.3s ease;
}
.theme-default .modal .slideToggle { background: rgba(255, 140, 0, 0.1); }

.modal .slideToggle h3 {
  color: var(--accent-secondary);
  text-shadow: 0 0 10px var(--accent-secondary);
  margin: 0;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.modal .slideBody {
  padding: 22px;
  max-height: 5000px;
  opacity: 1;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--glass-border);
}
.theme-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.theme-btn {
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 12px;
  text-align: center;
  transition: all 0.2s ease;
}
.theme-btn.active, .theme-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(255, 187, 0, 0.1);
  box-shadow: 0 0 10px var(--accent-primary);
}
.theme-default .theme-btn.active, .theme-default .theme-btn:hover {
  background: rgba(255, 187, 0, 0.1);
  box-shadow: 0 0 10px var(--accent-primary);
}

/* --- 9. Layout Templates (UNIQUE LAYOUTS) --- */

/* Base Layout - Default (Center Content, Dock Left) */
body.tpl-default {
  padding-top: var(--header-height);
  padding-left: var(--dock-width);
}

/* Layout 2 - Pro (Two Column) - Dock Left */
body.tpl-two-column {
    padding-left: var(--dock-width);
    padding-top: var(--header-height);
}
body.tpl-two-column .wrap {
  max-width: 1800px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* Layout 3 - Dock (Bottom Center) - No Left Dock, Dock Bottom */
body.tpl-center-dock {
    padding-left: 0;
    padding-top: var(--header-height);
    padding-bottom: 120px;
}
body.tpl-center-dock .header { left: 0; }
body.tpl-center-dock .wrap { padding-left: 20px; }
body.tpl-center-dock .dock {
  top: auto;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  flex-direction: row;
  padding: 10px 15px;
  border-right: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
body.tpl-center-dock .dock .item .tip {
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  clip-path: none;
  border-radius: 4px;
  border-bottom: none;
  border-top: 1px solid var(--accent-primary);
}

/* Layout 4 - Command Console (NO DOCK, FIXED HEADER) */
body.tpl-no-dock {
  padding-left: 0;
}
body.tpl-no-dock .wrap { 
    padding-left: 20px; 
    max-width: 1000px;
}
body.tpl-no-dock .header { left: 0; }
body.tpl-no-dock .dock { display: none; }

/* Layout 5 - Minimal (FULL MINIMALISM) */
body.tpl-minimal .header,
body.tpl-minimal .dock {
  display: none;
}
body.tpl-minimal {
  padding-left: 0;
  padding-top: 0;
}
body.tpl-minimal .wrap {
  padding-left: 20px;
  padding-top: 40px;
  max-width: 900px;
  margin-top: 0;
}

/* Layout 6 - Top Bar (HEADER IS THE DOCK - NO LEFT DOCK) */
body.tpl-top-bar {
    padding-left: 0;
    padding-top: 70px;
    --header-height: 70px;
}
body.tpl-top-bar .header {
    left: 0;
    height: 70px;
    padding: 10px 20px;
}
body.tpl-top-bar .plate {
    clip-path: none;
    max-width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    flex-direction: row;
    justify-content: flex-start;
    padding: 0 15px;
}
body.tpl-top-bar .plate h1 {
    font-size: 2rem;
    letter-spacing: 0px;
    margin-right: 15px;
}
body.tpl-top-bar .plate h2 {
    display: none;
}
body.tpl-top-bar .badge { display: none; }
body.tpl-top-bar #live-clock {
    position: relative;
    top: auto;
    right: auto;
    margin-left: auto;
    text-align: right;
    background: none;
    padding: 0;
    box-shadow: none;
    border: none;
}
body.tpl-top-bar .dock { display: none; }
body.tpl-top-bar .plate::before {
    animation: none;
    opacity: 0;
}
body.tpl-top-bar .wrap {
    max-width: 1000px;
}


/* NAYA: A-Class 3D Header Layout (FIXED) */
body.tpl-3d-header .header {
  perspective: 1000px;
}
body.tpl-3d-header .plate {
   box-shadow: 
        0 0 15px var(--accent-primary), 
        0 0 30px var(--accent-secondary),
        0 0 0 3px var(--accent-primary), 
        0 0 0 5px var(--accent-secondary), 
        inset 0 0 20px rgba(255, 255, 255, 0.2); 
   clip-path: none;
   border-radius: 16px;
}

/* NAYA: Share Mode UI (Limited Access Warning) */
#share-mode-cue {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(255, 71, 87, 0.9);
    color: white;
    font-weight: 900;
    text-align: center;
    line-height: 40px;
    z-index: 10002;
    font-size: 1rem;
    letter-spacing: 2px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}
body.share-mode .wrap {
    margin-top: 80px;
}
/* ======================================================= */


/* --- 10. Pro Estimator (BOQ, etc.) (HUD Style) --- */
/* (Original code retained) */
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 10px;
}
.tab-btn {
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  border-radius: var(--radius);
}
.tab-btn:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-color: var(--accent-primary);
}
.tab-btn.active {
  background: var(--accent-primary);
  color: var(--bg-main);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-primary);
}
.calc-form { display: none; animation: fadeInHud 0.5s ease; }
.calc-form.active { display: block; }

@keyframes fadeInHud {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 5px; }

.wizard-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 15px;
}
.dynamic-item-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
}

/* Result Table Styling */
.result-table-wrapper {
  margin-top: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--glass-border);
  /* NAYA CODE: Mobile Scroll Fix */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.result-table-wrapper h3 { --qa-yes: #00ff7f; color: var(--qa-yes); font-size: 1.5rem; }
.result-table { width: 100%; border-collapse: collapse; }
.result-table th, .result-table td { padding: 10px; text-align: left; border-bottom: 1px solid var(--glass-border); }
.result-table th { color: var(--text-secondary); font-size: 0.8rem; text-transform: uppercase; }
.result-table td { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; }
.result-table .col-amount { font-weight: 800; --qa-yes: #00ff7f; color: var(--qa-yes); }
.result-table tfoot td {
  font-weight: 900;
  font-size: 1.1rem;
  --qa-yes: #00ff7f;
  color: var(--qa-yes);
  border-top: 2px solid var(--qa-yes);
}

/* Simple Calc Result Box */
.calc-result-box {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 15px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
}
.calc-result-box .result-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--glass-border);
}
.calc-result-box .result-line:last-child { border-bottom: none; }
.calc-result-box .result-label { color: var(--text-secondary); font-weight: 600; }
.calc-result-box .result-value { --qa-yes: #00ff7f; color: var(--qa-yes); font-weight: 800; }

/* NAYA: BOQ Live Rate Box Styling */
#boq-add-rate-total-display {
    --qa-yes: #00ff7f;
    background: rgba(0, 255, 127, 0.1);
    border: 1px solid var(--qa-yes) !important;
    box-shadow: 0 0 10px rgba(0, 255, 127, 0.3);
}


/* ======================================================= */
/* --- 12. DPR v5.0 PRESENTATION MODE (Big & Clean) --- */
/* ======================================================= */

#dpr-output-container {
  display: grid;
  grid-template-columns: 1fr; /* Full width for presentation feel */
  gap: 25px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  padding: 25px;
  border-radius: var(--radius);
  margin-top: 20px;
}

#smart-dpr-generator .dpr-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--glass-border-active); /* Brighter border */
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 30, 50, 0.9), rgba(10, 20, 40, 0.95));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Deep shadow for 3D lift */
  color: var(--text-primary);
  page-break-inside: avoid;
  overflow: hidden;
  transition: transform 0.3s ease;
}

#smart-dpr-generator .dpr-card:hover {
  transform: translateY(-5px); /* Slight lift on hover */
  border-color: var(--accent-primary);
}

#smart-dpr-generator .dpr-card-body {
  padding: 30px; /* More breathing room */
  flex-grow: 1;
}

/* Header (Title) Styling */
#smart-dpr-generator .dpr-card h2 {
  margin: 0 0 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--accent-primary); /* Thicker separator */
  font-size: 1.6rem; /* Much Bigger Title */
  letter-spacing: 1px;
  color: var(--accent-primary);
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(255, 187, 0, 0.3);
}

/* Content (Text) Styling - The Main Fix */
#smart-dpr-generator .dpr-card pre {
  /* Font change: Monospace hata kar Clean Sans-Serif lagaya */
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
  font-size: 18px; /* Text size 14px se 18px kiya */
  font-weight: 500;
  line-height: 1.8; /* Line ke beech gap badhaya */
  color: #ffffff; /* Pure White text for contrast */
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  white-space: pre-wrap; /* Formatting same rahega par text wrap hoga */
  word-wrap: break-word;
}

/* Control Buttons Area */
#dpr-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 25px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  justify-content: center;
}
#dpr-controls .ghost, #dpr-controls a.ghost { 
    flex-grow: 0; 
    min-width: 200px; 
    font-size: 1rem;
    padding: 12px 20px;
}


/* ======================================================= */
/* --- 15. PRINT STYLES (v25.0 - HUD Print) --- */
/* (Original code maintained) */
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-family: Arial, sans-serif !important;
    font-size: 10pt;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }
  .header, .dock, .modal, .keyFoot, .print-hide, .slideHead, #dpr-input-area, #dpr-controls, #dpr-reset-btn, #share-mode-cue {
    display: none !important;
  }
  body .wrap, body .slide, body .slideBody, body .print-this-table {
    display: block !important;
    visibility: visible !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    opacity: 1 !important;
    filter: none !important;
    width: 100% !important;
    max-width: 100% !important;
    clip-path: none !important;
    backdrop-filter: none !important;
    background: none !important;
  }
  h1, h2, h3, h4 { 
    color: #000 !important; 
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: 700;
    text-align: center !important;
    page-break-after: avoid;
    text-shadow: none !important;
  }
  h1 { font-size: 16pt; border-bottom: 3px double #000; padding-bottom: 3px; }
  h3 { font-size: 14pt; color: #333 !important; text-align: left !important; margin-top: 10px; }
  
  #dpr-output-container {
    display: block !important;
  }
  #smart-dpr-generator .dpr-card {
    border: 1px solid #ccc !important;
    background: #f9f9f9 !important;
    color: #000 !important;
    clip-path: none !important;
  }
  #smart-dpr-generator .dpr-card h2 { color: #000 !important; text-shadow: none !important; }
  #smart-dpr-generator .dpr-card pre { color: #000 !important; }

  .report-header, #ra-bill-report-table-header {
    border: 1px solid #333 !important;
    padding: 8px !important;
    margin-bottom: 10mm !important;
    background: #f7f7f7 !important;
    clip-path: none !important;
  }
  .report-header .form-group input, #ra-bill-report-table-header input {
    border: none !important;
    font-weight: bold !important;
    color: #000 !important;
    font-size: 9pt !important;
    padding: 0 !important;
    border-bottom: 1px solid #999 !important;
  }
  
  .result-table-wrapper {
    margin: 8px 0 !important;
    clip-path: none !important;
  }
  .result-table { width: 100%; border-collapse: collapse; font-size: 9pt; page-break-inside: auto; }
  .result-table tr, .result-table td, .result-table th { page-break-inside: avoid; }
  .result-table th, .result-table td { 
    color: #000 !important; 
    border: 1px solid #666 !important; 
    padding: 4px;
  }
  .result-table th { background: #e0e0e0 !important; font-weight: 700; }
  .result-table .col-amount { font-weight: 700; }
  .result-table tfoot td {
  font-weight: 900 !important; 
  font-size: 10pt !important; 
  background: #eee !important;
  border-top: 2px solid #000 !important;
  border-bottom: 2px solid #000 !important;
  }
  .result-table .col-shape span {
    --bar-color: #000 !important;
  }
  #print-watermark {
    position: fixed;
    bottom: 10mm;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    font-size: 8pt;
    font-weight: 900;
    color: #ccc !important;
    white-space: nowrap;
    opacity: 0.5;
  }
  #print-watermark::after {
    content: "Taiyabos Autonomous Intelligence";
  }
}
/* ======================================================= */
/* ===== BBS Visual Shapes (HUD Style) --- */
/* (Original code maintained) */
.col-shape {
  text-align: center;
  width: 60px;
  min-width: 60px;
  position: relative;
  vertical-align: middle;
}
.col-shape span {
  display: inline-block;
  width: 35px;
  height: 30px;
  position: relative;
  transform: scale(0.8);
  background-color: transparent !important;
  margin: -5px 0;
}
.col-shape .shape-- { 
  height: var(--bar-thickness);
  background: var(--bar-color);
  border-radius: var(--bar-radius);
  width: 100%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.col-shape .shape-\\[\\ \\] { 
  width: 25px;
  height: 25px;
  border: var(--bar-thickness) solid var(--bar-color);
  border-radius: 4px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-top-color: transparent;
  border-right-color: transparent;
}
.col-shape .shape-\\[\\ \\]::before {
  content: '';
  position: absolute;
  width: 100%;
  height: var(--bar-thickness);
  background: var(--bar-color);
  top: calc(var(--bar-thickness) * -1);
  left: 0;
  border-radius: var(--bar-radius);
}
.col-shape .shape-\\[\\ \\]::after {
  content: '';
  position: absolute;
  width: var(--bar-thickness);
  height: 100%;
  background: var(--bar-color);
  top: 0;
  right: calc(var(--bar-thickness) * -1);
  border-radius: var(--bar-radius);
}
.col-shape .shape-\\[\\ \\] span {
  display: block;
  width: 10px;
  height: var(--bar-thickness);
  background: var(--bar-color);
  position: absolute;
  top: -2px;
  right: -8px;
  border-radius: var(--bar-radius);
}
.col-shape .shape-\\[\\ \\] span:nth-child(1) {
  transform: rotate(45deg);
  transform-origin: top left;
  left: 2px;
  top: -4px;
}
.col-shape .shape-\\[\\ \\] span:nth-child(2) {
  transform: rotate(-45deg);
  transform-origin: top right;
  right: -4px;
  top: 2px;
}
.col-shape .shape-O {
  width: 25px;
  height: 25px;
  border: var(--bar-thickness) solid var(--bar-color);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.col-shape .shape-L___ { 
  width: 30px;
  height: 25px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: none;
}
.col-shape .shape-L___::before {
  content: '';
  position: absolute;
  width: 100%;
  height: var(--bar-thickness);
  background: var(--bar-color);
  border-radius: var(--bar-radius);
  bottom: 0;
  left: 0;
}
.col-shape .shape-L___::after {
  content: '';
  position: absolute;
  width: var(--bar-thickness);
  height: 100%;
  background: var(--bar-color);
  border-radius: var(--bar-radius);
  bottom: 0;
  left: 0;
}
.col-shape .shape-\\_\\/--\\_\\_ {
  width: 35px;
  height: 25px;
  border: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
}
.col-shape .shape-\\_\\/--\\_\\_::before {
  content: '';
  position: absolute;
  width: 100%;
  height: var(--bar-thickness);
  background: var(--bar-color);
  border-radius: var(--bar-radius);
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
.col-shape .shape-\\_\\/--\\_\\_::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 30px;
  background: var(--bar-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ======================================================= */
/* --- 20. NAYA: 25+ Theme Colors (FIXED GOLD THEMES) --- */
/* ======================================================= */
/* Theme: Default/Custom (Uses Custom HSL Vars defined in root) */
body.theme-default,
body.theme-custom {
  --accent-primary: hsl(var(--custom-hue), var(--custom-sat), var(--custom-light-p));
  --accent-secondary: hsl(var(--custom-hue), var(--custom-sat), var(--custom-light-s));
}
/* Ensure the glass/border colors match the HSL variables */
body.theme-default,
body.theme-custom {
    --glass-border: hsla(var(--custom-hue), var(--custom-sat), 30%, 0.2);
    --glass-border-active: hsla(var(--custom-hue), var(--custom-sat), 70%, 0.5);
    --plate-border-color: var(--accent-primary);
}


/* Theme: Red */
body.theme-red {
  --accent-primary: #ff4757;
  --accent-secondary: #ff6b81;
  --plate-border-color: #ff4757;
  --glass-border: rgba(255, 71, 87, 0.2);
  --glass-border-active: rgba(255, 107, 129, 0.5);
}
/* Focus/Hover/Header matched to Red */
body.theme-red .slideHead { background: rgba(255, 71, 87, 0.05); }
body.theme-red .ghost:hover { background: rgba(255, 107, 129, 0.1); box-shadow: 0 0 15px var(--accent-secondary); }
body.theme-red .item:hover .icon { background: rgba(255, 71, 87, 0.1); box-shadow: 0 0 15px var(--accent-primary); }

/* Theme: Gold (Updated to match Deep Gold/Amber Base) */
body.theme-gold {
  --accent-primary: #feca57;
  --accent-secondary: #ff9f43;
  --plate-border-color: #feca57;
  --glass-border: rgba(254, 202, 87, 0.2);
  --glass-border-active: rgba(255, 159, 67, 0.5);
}
/* Focus/Hover/Header matched to Gold */
body.theme-gold .slideHead { background: rgba(254, 202, 87, 0.05); }
body.theme-gold .ghost:hover { background: rgba(255, 159, 67, 0.1); box-shadow: 0 0 15px var(--accent-secondary); }
body.theme-gold .item:hover .icon { background: rgba(254, 202, 87, 0.1); box-shadow: 0 0 15px var(--accent-primary); }


/* Theme: Green */
body.theme-green {
  --accent-primary: #2ed573;
  --accent-secondary: #7bed9f;
  --plate-border-color: #2ed573;
  --glass-border: rgba(46, 213, 115, 0.2);
  --glass-border-active: rgba(123, 237, 159, 0.5);
}
/* Focus/Hover/Header matched to Green */
body.theme-green .slideHead { background: rgba(46, 213, 115, 0.05); }
body.theme-green .ghost:hover { background: rgba(123, 237, 159, 0.1); box-shadow: 0 0 15px var(--accent-secondary); }
body.theme-green .item:hover .icon { background: rgba(46, 213, 115, 0.1); box-shadow: 0 0 15px var(--accent-primary); }


/* Theme: White */
body.theme-white {
  --accent-primary: #dfe6e9;
  --accent-secondary: #b2bec3;
  --plate-border-color: #dfe6e9;
  --glass-border: rgba(223, 230, 233, 0.2);
  --glass-border-active: rgba(178, 190, 195, 0.5);
}
/* Focus/Hover/Header matched to White */
body.theme-white .slideHead { background: rgba(223, 230, 233, 0.05); }
body.theme-white .ghost:hover { background: rgba(178, 190, 195, 0.1); box-shadow: 0 0 15px var(--accent-secondary); }
body.theme-white .item:hover .icon { background: rgba(223, 230, 233, 0.1); box-shadow: 0 0 15px var(--accent-primary); }

/* Theme: Magenta (Default Secondary) */
body.theme-magenta {
  --accent-primary: #ff00ff;
  --accent-secondary: #00ffff;
  --plate-border-color: #ff00ff;
  --glass-border: rgba(255, 0, 255, 0.2);
  --glass-border-active: rgba(0, 255, 255, 0.5);
}
/* Focus/Hover/Header matched to Magenta */
body.theme-magenta .slideHead { background: rgba(255, 0, 255, 0.05); }
body.theme-magenta .ghost:hover { background: rgba(0, 255, 255, 0.1); box-shadow: 0 0 15px var(--accent-secondary); }
body.theme-magenta .item:hover .icon { background: rgba(255, 0, 255, 0.1); box-shadow: 0 0 15px var(--accent-primary); }
/* ===== DPR RUNNING TEXT ANIMATION ===== */
@keyframes marqueeScroll {
    0% { transform: translateX(100%); } /* Right se shuru */
    100% { transform: translateX(-100%); } /* Left tak jaye */
}
/* Ensure container takes full width on mobile */
#dpr-marquee-wrapper {
    width: 100%;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.2);
}
/* Input Fields Fix */
input, select, textarea, datalist {
    position: relative; /* Ensure functionality */
    z-index: 10; /* Bring to front */
    cursor: text;
}
/* Dropdown arrow clickable fix */
select {
    cursor: pointer;
}
/* =========================================
   TAIYABOS V2 - PROFESSIONAL BUTTON STYLES
========================================= */

/* 1. Navigation Container */
.tabs-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 25px !important;
    padding: 15px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
    justify-content: center !important; 
}

/* 2. Common Button Shape (Pill) */
.tab-btn {
    padding: 12px 20px !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 50px !important; /* Gol Button */
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    background: rgba(20, 30, 50, 0.8) !important;
    color: var(--text-secondary) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* 3. Hover Effect (Uthna) */
.tab-btn:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4) !important;
    filter: brightness(1.2) !important;
}

/* 4. Active State (Selected) */
.tab-btn.active {
    background: var(--accent-primary) !important;
    color: #000 !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 15px var(--accent-primary) !important;
}

/* --- SPECIAL COLORS FOR MODULES --- */

/* Dashboard (Orange) */
.btn-dash { background: linear-gradient(135deg, #ff9f43, #ff6b6b) !important; color: white !important; border: none !important; }
.btn-dash:hover { box-shadow: 0 0 20px #ff6b6b !important; }

/* Inventory (Green) */
.btn-store { border-color: #2ed573 !important; color: #2ed573 !important; }
.btn-store.active, .btn-store:hover { background: #2ed573 !important; color: black !important; }

/* AI (Purple) */
.btn-ai { background: linear-gradient(135deg, #6a11cb, #2575fc) !important; color: white !important; border: none !important; }

/* Labor (Yellow) */
.btn-labor { border-color: #ffa502 !important; color: #ffa502 !important; }
.btn-labor.active, .btn-labor:hover { background: #ffa502 !important; color: black !important; }

/* Timeline (Cyan) */
.btn-time { border-color: #00d2d3 !important; color: #00d2d3 !important; }
.btn-time.active, .btn-time:hover { background: #00d2d3 !important; color: black !important; }