/* Core Palette: Deep Indigo, Requiem Gold, Muted Purple */
body { background: #09070d; color: #eae5f0; margin: 0; font-family: monospace; overflow-x: hidden; }
.crest-bg { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80vh; height: 80vh; opacity: 0.03; transition: all 0.5s ease; z-index: 0; pointer-events: none; }
.crest-active { opacity: 0.15; filter: drop-shadow(0 0 20px #d6a848); }
.crest-active path { fill: #d6a848; }

/* Cards & Layout */
.card { background: #110d16; padding: 20px; border-top: 2px solid #d6a848; border-bottom: 1px solid #2b223d; border-left: 1px solid #2b223d; border-right: 1px solid #2b223d; margin-bottom: 20px; position: relative; z-index: 5; box-shadow: 0 15px 35px rgba(0,0,0,0.5); }
.auth-container { display: flex; justify-content: center; align-items: center; height: 100vh; width: 100vw; }
.auth-card { width: 320px; padding: 40px; margin: 0 auto; border-top: 3px solid #d6a848; opacity: 1; }
.view-container { padding: 20px; max-width: 1600px; margin: 0 auto; }

/* Navigation */
.nav-links { display: flex; gap: 20px; border-bottom: 1px solid #2b223d; padding-bottom: 15px; margin-bottom: 25px; align-items: center; }
.nav-item { color: #766a87; text-decoration: none; font-weight: bold; letter-spacing: 2px; padding: 8px 15px; transition: all 0.3s; border: 1px solid transparent; font-size: 14px; text-transform: uppercase; }
.nav-item:hover { color: #fff; border-color: #3d3154; }
.nav-item.active { color: #d6a848; border-color: #d6a848; background: rgba(214, 168, 72, 0.05); }

/* Command Center Grids */
.command-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.command-grid-full { display: grid; grid-template-columns: 1fr; gap: 20px; }
.chart-container { background: #110d16; padding: 20px; border: 1px solid #2b223d; border-top: 2px solid #d6a848; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.chart-title { margin-top: 0; color: #fff; text-transform: uppercase; letter-spacing: 2px; font-size: 14px; border-bottom: 1px solid #2b223d; padding-bottom: 10px; margin-bottom: 20px; }

/* Typography */
.auth-title { font-family: 'Times New Roman', serif; color: #fff; text-align: center; text-transform: uppercase; letter-spacing: 4px; margin-top: 0; margin-bottom: 30px; }
.header-title { margin: 0; font-family: 'Times New Roman', serif; text-transform: uppercase; letter-spacing: 3px; color: #fff; }

/* Forms & Inputs */
.input-group { margin-bottom: 25px; }
.requiem-input { width: 100%; background: transparent; border: none; border-bottom: 1px solid #3d3154; color: #fff; padding: 10px 5px; box-sizing: border-box; outline: none; transition: border-color 0.3s; font-family: monospace; font-size: 14px; }
.requiem-input:focus { border-color: #d6a848; }
.requiem-input::placeholder { color: #4a3f5e; }

/* Buttons */
.blood-btn { position: relative; background: transparent; border: 1px solid #3d3154; color: #766a87; cursor: pointer; user-select: none; overflow: hidden; padding: 15px; width: 100%; font-weight: bold; font-family: monospace; letter-spacing: 2px; transition: color 0.3s, border-color 0.3s; margin-top: 10px; }
.blood-btn:hover { color: #fff; border-color: #d6a848; }
.blood-btn .progress-bar { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: #5c3592; z-index: 1; transition: width 0s linear; } 
.blood-btn .btn-text { position: relative; z-index: 2; color: #fff; }
.blood-btn.is-holding .progress-bar { width: 100%; transition: width 1.5s linear; }

.action-btn { background: transparent; border: 1px solid #d6a848; color: #d6a848; padding: 8px 15px; cursor: pointer; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s; }
.action-btn:hover { background: #d6a848; color: #000; }

/* Terminal Sequence */
#terminal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; z-index: 10; background: #09070d; }
#terminal-text { color: #d6a848; font-size: 14px; letter-spacing: 2px; }

/* Tables & Data Density */
.requiem-table { width: 100%; border-collapse: collapse; text-align: left; font-family: monospace; }
.requiem-table th { padding: 12px; border-bottom: 2px solid #3d3154; background: #1a1423; color: #766a87; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.requiem-table td { padding: 16px 12px; border-bottom: 1px solid #2b223d; vertical-align: top; }
.requiem-table tr:hover { background: #15101d; }

/* Stat Grids & Deltas */
.stat-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 15px; align-items: center; font-size: 13px; }
.stat-label { color: #766a87; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; text-align: right; }
.stat-value { color: #eae5f0; }
.delta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 20px; padding: 15px; background: #1a1423; border: 1px solid #2b223d; }

/* Unit Pills */
.unit-container { display: flex; flex-wrap: wrap; gap: 6px; max-width: 400px; }
.unit-pill { background: #1a1423; border: 1px solid #3d3154; padding: 4px 8px; font-size: 11px; border-radius: 2px; white-space: nowrap; color: #a39bb3; }

/* Badges */
.badge { padding: 4px 8px; border-radius: 2px; font-size: 10px; font-weight: bold; letter-spacing: 1px; white-space: nowrap; }
.badge-offline { background: #1a1423; color: #766a87; border: 1px solid #3d3154; }
.badge-active { background: #261b0c; color: #d6a848; border: 1px solid #d6a848; }

/* Utilities */
.text-red { color: #d6a848; } 
.text-green { color: #10b981; }
.text-muted { color: #766a87; }
.link-muted { color: #766a87; text-decoration: none; transition: color 0.3s; }
.link-muted:hover { color: #d6a848; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ==========================================================================
   ADVANCED RECON DOSSIER SUB-SYSTEM (Incorporated from dashboard view)
   ========================================================================== */
.dossier-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.dossier-col { background: #130f1b; border: 1px solid #3d3154; padding: 15px; border-radius: 4px; }
.dossier-col h3 { margin-top: 0; color: #d6a848; border-bottom: 1px solid #3d3154; padding-bottom: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }

.dossier-meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; font-family: monospace; font-size: 12px; }
.dossier-meta-item { background: #1a1423; padding: 10px; border-left: 2px solid #5c3592; }
.dossier-meta-label { color: #766a87; display: block; font-size: 10px; text-transform: uppercase; margin-bottom: 4px; }
.dossier-meta-val { color: #fff; font-weight: bold; font-size: 13px; }

/* Fortification HP Vitals */
.dossier-bar-container { background: #1a1423; height: 18px; border: 1px solid #3d3154; border-radius: 3px; position: relative; overflow: hidden; margin-top: 5px; }
.dossier-bar-fill { height: 100%; width: 0%; background: #ef4444; transition: width 0.5s ease; }
.dossier-bar-text { position: absolute; top: 0; left: 0; width: 100%; text-align: center; font-size: 11px; line-height: 18px; color: #fff; font-weight: bold; font-family: monospace; }

/* Target Metric Summary Matrix */
.dossier-table { width: 100%; border-collapse: collapse; font-family: monospace; font-size: 12px; }
.dossier-table th { text-align: left; padding: 6px; color: #766a87; border-bottom: 1px solid #3d3154; font-size: 10px; text-transform: uppercase; }
.dossier-table td { padding: 6px; color: #eae5f0; border-bottom: 1px solid rgba(61, 49, 84, 0.3); }
.dossier-table tr:last-child td { border-bottom: none; }

/* Telemetry Classification Tags */
.badge-production { color: #10b981; }
.badge-offense { color: #ef4444; font-weight: bold; }
.badge-defense { color: #3b82f6; font-weight: bold; }
.badge-spy { color: #a855f7; }