/* ==========================================
   SURETECH ENGINEERING - CORE STYLE SYSTEM
   Theme: Industrial Premium (Dark Steel & Safety Orange)
   ========================================== */

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

/* CSS variables for consistent Design Tokens */
:root {
  /* Colors */
  --bg-primary: #0a0d14;         /* Deep dark steel */
  --bg-secondary: #111622;       /* Charcoal grey for containers */
  --bg-light: #f8fafc;           /* Light grey for clean spec sheets */
  --bg-card: rgba(255, 255, 255, 0.03); /* Glassmorphic card back */
  
  --text-primary: #ffffff;       /* Pure white text */
  --text-secondary: #94a3b8;     /* Muted slate text */
  --text-dark: #0f172a;          /* Dark text for light backgrounds */
  --text-muted: #64748b;         /* Neutral slate */

  --accent-orange: #ff5500;      /* Safety industrial orange */
  --accent-orange-hover: #e04a00;
  --accent-orange-glow: rgba(255, 85, 0, 0.3);
  
  --accent-amber: #f59e0b;       /* Quality gold accent */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-light: rgba(15, 23, 42, 0.08);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Grid & Spacing */
  --max-width: 1280px;
  --header-height: 140px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Shadow & Glass */
  --glass-bg: rgba(10, 13, 20, 0.75);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-orange) var(--bg-primary);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border-radius: 4px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-orange);
}

/* Typography Utility Classes */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.text-orange {
  color: var(--accent-orange);
}

.text-gradient {
  background: linear-gradient(135deg, #fff 30%, var(--accent-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--text-secondary);
}

/* Layout Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section {
  padding: 100px 0;
  position: relative;
}

.grid {
  display: grid;
  gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--accent-orange);
  color: #fff;
  border: 1px solid var(--accent-orange);
  box-shadow: 0 4px 15px var(--accent-orange-glow);
}

.btn-primary:hover {
  background-color: var(--accent-orange-hover);
  border-color: var(--accent-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 85, 0, 0.45);
}

.btn-secondary {
  background-color: transparent;
  color: #fff;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #fff;
  transform: translateY(-2px);
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-medium);
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background-color: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  height: 85px;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  max-height: 130px;
  width: auto;
  object-fit: contain;
  transition: all var(--transition-fast);
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.7));
}

header.scrolled .logo-img {
  max-height: 70px;
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-amber) 100%);
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 20px;
  position: relative;
  overflow: hidden;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  line-height: 1;
}

.logo-text span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-top: 3px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
  padding: 8px 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-orange);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.header-cta {
  display: flex;
  align-items: center;
}

/* Mobile Menu Button */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.burger-menu span {
  width: 100%;
  height: 2px;
  background-color: #fff;
  transition: all var(--transition-fast);
}

/* Scroll Indicators & Background elements */
.section-subtitle {
  text-transform: uppercase;
  color: var(--accent-orange);
  letter-spacing: 0.15em;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-subtitle::before {
  content: '';
  width: 16px;
  height: 2px;
  background-color: var(--accent-orange);
  display: inline-block;
}

.section-title {
  font-size: 42px;
  margin-bottom: 20px;
  font-weight: 800;
}

.section-header {
  margin-bottom: 60px;
  max-width: 600px;
}

/* Footer Style */
footer {
  background-color: #06090e;
  border-top: 1px solid var(--border-color);
  padding: 80px 0 30px;
  font-size: 14px;
  position: relative;
}

.footer-top {
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  margin-bottom: 60px;
}

.footer-logo {
  margin-bottom: 24px;
}

.footer-about p {
  margin-bottom: 24px;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  border-color: var(--accent-orange);
  background-color: var(--accent-orange);
  color: #fff;
  transform: translateY(-2px);
}

.footer-links-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
}

.footer-menu {
  list-style: none;
}

.footer-menu li {
  margin-bottom: 12px;
}

.footer-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-block;
}

.footer-menu a:hover {
  color: var(--accent-orange);
  padding-left: 4px;
}

.footer-contact-info {
  list-style: none;
}

.footer-contact-info li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  align-items: flex-start;
}

.footer-contact-info svg {
  color: var(--accent-orange);
  flex-shrink: 0;
  margin-top: 3px;
}

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

.footer-bottom p {
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--accent-orange);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .section { padding: 80px 0; }
  .section-title { font-size: 36px; }
}

@media (max-width: 768px) {
  :root {
    --header-height: 80px;
  }
  
  .logo-img {
    max-height: 65px;
  }

  header.scrolled .logo-img {
    max-height: 55px;
  }
  
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  
  .header-cta {
    display: none;
  }
  
  .burger-menu {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
    gap: 40px;
    transform: translateX(100%);
    transition: transform var(--transition-medium);
    border-top: 1px solid var(--border-color);
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  /* Burger states */
  .burger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .burger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* ==========================================
   ADMIN PANEL DASHBOARD & LOGIN STYLES
   ========================================== */

.admin-body {
  background-color: var(--bg-primary);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

/* Login Panel Wrapper */
.admin-login-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(circle at center, rgba(255, 85, 0, 0.04) 0%, var(--bg-primary) 70%);
}

.login-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-width: 420px;
  width: 100%;
  padding: 40px;
  box-shadow: var(--card-shadow);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header .logo-icon {
  margin: 0 auto 15px;
}

.login-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #fff;
}

.login-error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
}

/* Dashboard Layout */
.admin-dashboard {
  display: none; /* hidden until logged in */
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-dashboard.active {
  display: grid;
}

/* Dashboard Sidebar */
.admin-sidebar {
  background-color: #080a0f;
  border-right: 1px solid var(--border-color);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-item:hover,
.sidebar-item.active {
  color: #fff;
  background-color: rgba(255, 85, 0, 0.06);
}

.sidebar-item.active {
  background-color: var(--accent-orange);
  box-shadow: 0 4px 15px var(--accent-orange-glow);
}

.sidebar-user {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info h4 {
  font-size: 14px;
  color: #fff;
}

.user-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  color: var(--accent-orange);
  background-color: rgba(255,255,255,0.03);
}

/* Dashboard Content Main Area */
.admin-main {
  background-color: var(--bg-primary);
  padding: 40px;
  overflow-y: auto;
  height: 100vh;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.admin-tab-content {
  display: none;
}

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

/* Data Tables */
.admin-table-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 30px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background-color: rgba(255,255,255,0.01);
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

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

.admin-table td img {
  border-radius: 4px;
  object-fit: cover;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.btn-action:hover {
  border-color: #fff;
  color: #fff;
}

.btn-action.btn-delete:hover {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

/* Modal form style */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(6, 9, 14, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
  padding: 20px;
}

.admin-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.admin-modal-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-width: 650px;
  width: 100%;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transform: translateY(30px);
  transition: transform var(--transition-medium);
}

.admin-modal.active .admin-modal-container {
  transform: translateY(0);
}

.admin-modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.admin-modal-close:hover {
  color: #fff;
}

.admin-modal-body {
  padding: 30px;
  max-height: 70vh;
  overflow-y: auto;
}

.spec-builder-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

/* Stats Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.admin-stat-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background-color: rgba(255, 85, 0, 0.05);
  border: 1px solid rgba(255,85,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
}

.admin-stat-info h3 {
  font-size: 24px;
  color: #fff;
  line-height: 1.2;
}

.admin-stat-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .admin-dashboard {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
  }
  .sidebar-brand {
    margin-bottom: 20px;
  }
  .sidebar-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sidebar-user {
    margin-top: 20px;
  }
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
  .admin-main {
    padding: 20px;
  }
}


