/* Global styles */
* {
  box-sizing: border-box;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
}

.nav-links {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.logout-btn {
  margin-left: auto;
  background: #ef4444;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.right-section {
  display: flex;
  align-items: center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
}

.nav-links {
  display: flex;
  gap: 12px;
  flex: 1;
  justify-content: center;
}

.logout-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
#header-container {
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logout-btn {
  display: inline-block !important;
  background: #ef4444;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: #60a5fa;
}

.nav-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-link {
  padding: 10px 18px;
  border-radius: 999px;
  color: #cbd5e1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: 0.2s;
}

.nav-link:hover {
  background: #1e293b;
  border-color: #334155;
  color: white;
}

.nav-link.active {
  background: #1e293b;
  border-color: #334155;
  color: white;
}

.logout-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

/* ================= HEADER SYSTEM (SAFE FIX) ================= */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    flex-wrap: wrap;
}

.brand {
    font-size: 1.35rem;
    font-weight: 700;
    color: #60a5fa;
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-link {
    padding: 10px 18px;
    border-radius: 999px;
    color: #cbd5e1;
    text-decoration: none;
    border: 1px solid transparent;
    transition: 0.2s;
}

.nav-link:hover {
    background: #1e293b;
    border-color: #334155;
    color: #fff;
}

.nav-link.active {
    background: #1e293b;
    border-color: #334155;
    color: #fff;
}

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
}

/* Mobile safety */
@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
    }

    .topbar {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

.welcome-text {
    color: #94a3b8;
    font-size: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: radial-gradient(circle at top, rgba(59,130,246,0.12), transparent 40%), #0f172a;
  color: #e2e8f0;
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.auth-view {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.96);
  overflow: hidden;
}

.auth-view.hidden {
  display: none;
}

#welcome-screen {
  position: relative;
}

#welcome-screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 5;
    color: white;
    transition: opacity 0.6s ease;
}

.overlay.hide {
    opacity: 0;
}

h1 {
    font-size: 40px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 20px;
    background: #2563eb;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 6px;
}
	.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}	
		#contact {
    background: rgba(0,0,0,0.6);
    padding: 15px;
    border-radius: 10px;
}

.welcome-panel {
  position: relative;
  z-index: 2;
  max-width: 720px;
  text-align: center;
  padding: 36px 32px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.welcome-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 1.05;
}

.welcome-panel p {
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.6;
}

.primary-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-radius: 999px;
  padding: 16px 40px;
  font-size: 1rem;
  font-weight: 700;
}

.login-card {
  width: min(450px, 92%);
  padding: 38px 32px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.logo {
  font-size: 32px;
  color: #38bdf8;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.subtitle {
  color: #94a3b8;
  margin: 0 0 28px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 10px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #334155;
  background: #111827;
  color: #e2e8f0;
}

.input-group input:focus {
  outline: none;
  border-color: #3b82f6;
}

.login-btn {
  width: 100%;
}

.options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: #94a3b8;
  font-size: 0.95rem;
}

.options-row a {
  color: #60a5fa;
  text-decoration: none;
}

.demo-note {
  margin-top: 20px;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-footer {
  position: fixed;
  bottom: 16px;
  right: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.navbar {
  background: #1e293b;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  color: #60a5fa;
}

.nav-menu {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
  background: #3b82f6;
  color: white;
}

.logout-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.logout-btn:hover {
  background: #dc2626;
}

.main-content {
  padding: 28px 32px 40px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.metric-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  padding: 24px;
}

.metric-card span {
  color: #94a3b8;
  display: block;
  margin-bottom: 10px;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  color: white;
}

.section-box {
  background: #111827;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 24px;
}

.section-box h2 {
  margin-top: 0;
  color: #e2e8f0;
}

.activity-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.activity-item {
  background: #0f172a;
  color: #cbd5e1;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #334155;
}

.activity-item.empty {
  text-align: center;
  color: #94a3b8;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px;
  border-bottom: 1px solid #334155;
}

th {
  background: #111827;
  color: #94a3b8;
  text-align: left;
}

td {
  background: #0f172a;
}

.cart {
  background: #000;
  color: yellow;
  padding: 15px;
  border-radius: 10px;
  margin-top: 20px;
}

.analysis-box {
  background: white;
  padding: 15px;
  border-left: 5px solid #ff6600;
  margin-top: 20px;
}

.log-box {
  background: black;
  color: #00ff00;
  padding: 10px;
  height: 150px;
  overflow-y: auto;
  margin-top: 20px;
  text-align: left;
}

