/* ==========================================================================
   H327 BRAND IDENTITY DESIGN SYSTEM — "CARBON & CRIMSON"
   ========================================================================== */

:root {
  --bg-dark: #0a0a0a;
  --card-bg: #141414;
  --accent-red: #e63946;
  --glow-red: rgba(230, 57, 70, 0.4);
  --text-main: #f5f5f5;
  --text-muted: #a0a0a0;
  --border: #222;
  --radius: 4px;
}

/* ---- Reset & Base Elements ---- */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

.hidden { 
  display: none !important; 
}

/* ---- Loading Engine UI ---- */
.loading-shield { 
  position: fixed; 
  inset: 0; 
  background: var(--bg-dark); 
  z-index: 9999; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: opacity 0.4s ease; 
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { 
  to { transform: rotate(360deg); } 
}

/* ---- Global Navigation Elements ---- */
.btn-home { 
  position: fixed; 
  top: 20px; 
  left: 20px; 
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid var(--border); 
  color: var(--text-muted); 
  padding: 8px 12px; 
  font-size: 0.7rem; 
  text-decoration: none; 
  border-radius: var(--radius); 
  z-index: 100; 
  transition: all 0.2s ease; 
  letter-spacing: 1px;
  font-weight: 700;
}

.btn-home:hover { 
  color: var(--text-main); 
  border-color: var(--text-muted); 
  background: rgba(255, 255, 255, 0.1);
}

.social-link { 
  color: var(--text-main); 
  text-decoration: none; 
  font-size: 0.8rem; 
  letter-spacing: 1px; 
  border-bottom: 1px solid var(--accent-red); 
}

/* ---- H327 Landing Architecture ---- */
.landing-container { 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column; 
  background: radial-gradient(circle at center, #1a0505 0%, #0a0a0a 100%); 
}

.landing-header { 
  padding: 40px; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}

.logo-h327 { 
  font-size: 2rem; 
  font-weight: 800; 
  letter-spacing: -1px; 
}

.landing-hero { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
  text-align: center; 
  padding: 20px; 
}

.hero-title { 
  font-size: clamp(3rem, 10vw, 6rem); 
  line-height: 0.9; 
  margin-bottom: 20px; 
  text-transform: uppercase; 
  font-weight: 800; 
}

.hero-desc { 
  max-width: 600px; 
  color: var(--text-muted); 
  margin-bottom: 40px; 
  font-size: 1.1rem; 
}

.landing-footer { 
  padding: 40px; 
  text-align: center; 
  font-size: 0.7rem; 
  color: #444; 
  letter-spacing: 2px; 
}

/* ---- Split Layout Interfaces ---- */
.split-layout { 
  display: flex; 
  min-height: 100vh; 
}

.brand-panel { 
  flex: 1.2; 
  background: linear-gradient(135deg, #000 0%, #1a0505 100%); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  border-right: 1px solid var(--border); 
}

.form-panel { 
  flex: 1; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 40px; 
}

.form-inner { 
  width: 100%; 
  max-width: 360px; 
}

/* ---- Typography & Components ---- */
h1, h2, h3 { 
  text-transform: uppercase; 
  letter-spacing: 2px; 
  font-weight: 800; 
}

.accent { 
  color: var(--accent-red); 
}

.switch-text {
  margin-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Forms, Inputs, Buttons ---- */
.field-group { 
  margin-bottom: 15px; 
}

.field-group label { 
  display: block; 
  font-size: 0.7rem; 
  margin-bottom: 5px; 
  color: var(--text-muted); 
  letter-spacing: 1px; 
}

input { 
  width: 100%; 
  background: #111; 
  border: 1px solid var(--border); 
  padding: 12px; 
  color: white; 
  border-radius: var(--radius); 
  outline: none; 
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus { 
  border-color: var(--accent-red); 
  box-shadow: 0 0 10px var(--glow-red);
}

.btn-primary { 
  width: 100%; 
  background: var(--accent-red); 
  color: white; 
  border: none; 
  padding: 14px; 
  font-weight: 700; 
  cursor: pointer; 
  text-transform: uppercase; 
  border-radius: var(--radius); 
  letter-spacing: 1px; 
  transition: all 0.3s ease; 
}

.btn-primary:hover { 
  box-shadow: 0 0 20px var(--glow-red); 
  transform: scale(1.02); 
}

.btn-google { 
  width: 100%; 
  background: transparent; 
  border: 1px solid var(--border); 
  color: white; 
  padding: 12px; 
  border-radius: var(--radius); 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 10px; 
  font-size: 0.8rem; 
  font-weight: 600; 
  text-transform: uppercase; 
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-google:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

/* ---- Command Profile HUD ---- */
.dash-header { 
  padding: 20px 40px; 
  border-bottom: 1px solid var(--border); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  background: #000; 
}

.header-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
}

.header-nav-link:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

.cards-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 20px; 
}

.card { 
  background: var(--card-bg); 
  border: 1px solid var(--border); 
  padding: 24px; 
  border-radius: var(--radius); 
  border-left: 4px solid var(--accent-red); 
}

/* ---- Tactical Modals ---- */
.modal { 
  position: fixed; 
  inset: 0; 
  background: rgba(0, 0, 0, 0.85); 
  backdrop-filter: blur(5px); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  z-index: 1000; 
}

.modal-content { 
  max-width: 400px; 
  width: 90%; 
}

/* ==========================================================================
   RESPONSIVE LAYOUT ENGINE (MOBILE MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 768px) {
  .split-layout { 
    flex-direction: column; 
  }
  
  .brand-panel { 
    padding: 60px 20px; 
    border-right: none; 
    border-bottom: 1px solid var(--border); 
  }
  
  .form-panel {
    padding: 40px 20px;
  }
}

@media (max-width: 480px) {
  .dash-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    padding: 20px;
  }
  
  .dash-header > div {
    width: 100%;
    justify-content: space-between;
    display: flex;
    align-items: center;
  }
  
  #btn-logout {
    width: 100%;
  }
}