/* ===== GLOBAL BASE ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: system-ui;
  background: #f3f4f6;
  margin: 0;
  padding: 20px 0;   /* 🔥 NO flex centering */
}

/* ===== MAIN CONTAINER ===== */
.app-container {
  position: static;
  width: 1200px;
  margin: 0 auto;     /* 🔥 proper centering */
  background: white;
  padding: 22px 44px 32px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}


/* ================== GLOBAL LOADER FIX ================== */
#globalLoader {
  position: fixed; /* Ensures it stays on top of everything */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8); /* Semi-transparent white */
  backdrop-filter: blur(4px); /* Modern blur effect */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* Highest priority */
}

.global-loader-card {
  background: white;
  padding: 30px 50px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  border: 1px solid #e2e8f0;
}

/* Hide when inactive */
#globalLoader.hidden {
  display: none !important;
}

/* ===== HEADERS ===== */
h2 {
  text-align: center;
  margin-bottom: 6px;
  font-size: 24px;
  font-weight: 800;
}

.subtitle {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

/* ===== FORM ===== */
.form-row { margin-bottom: 12px; }

input, select, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

/* ===== USER MENU (SINGLE SOURCE OF TRUTH) ===== */
.user-menu-wrapper {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 3000;
}

.avatar-circle {
  width: 38px;
  height: 38px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(37,99,235,0.35);
}

.user-dropdown {
  position: absolute;
  top: 48px;
  left: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  padding: 6px 0;
  display: none;
  min-width: 160px;
}

.user-dropdown.show { display: block; }

.user-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
}

.user-dropdown a:hover {
  background: #f3f4f6;
}

/* ===== UTILS ===== */
.hidden { display: none !important; }
