/*
  CSS Page Name: Login & Signup - Jester Software Systems Limited
*/

/* ================================
   GLOBAL STYLES & RESET
   ================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* ================================
   ROOT VARIABLES (match your main site)
   ================================ */

:root {
  /* Background & Text */
  --bg-color: #121212;
  --text-color: #e6e6e6;
  --muted-text: rgba(230, 230, 230, 0.75);

  /* Brand */
  --main-color-1: #FF0000;
  --main-color-2: #0033CC;
  --accent-color: #FFD700;

  /* UI Surfaces */
  --nav-bg: rgba(40, 40, 40, 0.95);
  --hover-bg: rgba(255, 0, 0, 0.15);

  /* Borders / Shadows */
  --border-color: rgba(255, 255, 255, 0.07);
  --border: 1px solid var(--border-color);
  --box-shadow-strong: 0 20px 40px rgba(255, 0, 0, 0.08);

  /* Form / Card */
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-bg-strong: rgba(255, 255, 255, 0.10);
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-bg-focus: rgba(255, 255, 255, 0.12);
  --input-text: var(--text-color);

  /* Status */
  --error-color: #ff4d4d;

  /* Layout */
  --header-height: 70px;
}

/* Light mode overrides */
body.light-mode {
  --bg-color: #ffffff;
  --text-color: #000000;
  --muted-text: rgba(0, 0, 0, 0.6);

  --border-color: rgba(0, 0, 0, 0.10);
  --border: 1px solid var(--border-color);
  --box-shadow-strong: 0 20px 40px rgba(0, 51, 204, 0.06);

  --card-bg: rgba(0, 0, 0, 0.03);
  --card-bg-strong: rgba(0, 0, 0, 0.05);
  --input-bg: rgba(0, 0, 0, 0.05);
  --input-bg-focus: rgba(0, 0, 0, 0.08);
  --input-text: var(--text-color);

  --hover-bg: rgba(255, 0, 0, 0.08);
}

/* ================================
   BODY
   ================================ */

body {
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ================================
   LOGIN LAYOUT
   ================================ */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;

  /* account for fixed header if you keep it */
  padding: calc(var(--header-height) + 30px) 20px 40px;

  position: relative;
  overflow: hidden;
}

/* Decorative background like your hero */
.login-container::before {
  content: '';
  position: absolute;
  top: -55%;
  right: -15%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.22) 0%, rgba(255, 0, 0, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

.login-container::after {
  content: '';
  position: absolute;
  bottom: -35%;
  left: 10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 51, 204, 0.18) 0%, rgba(0, 51, 204, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

/* ================================
   LOGIN CARD
   ================================ */

.login-box {
  position: relative;
  z-index: 1;

  width: min(420px, 100%);
  padding: 34px 34px;

  border-radius: 16px;
  background: var(--card-bg);
  border: var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--box-shadow-strong);

  text-align: center;
}

.login-box:hover {
  background: var(--card-bg-strong);
  border-color: rgba(255, 0, 0, 0.22);
}

/* Optional title if you add one */
.login-box h1,
.login-box h2 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.login-box p.sub {
  color: var(--muted-text);
  margin-bottom: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ================================
   FORM
   ================================ */

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* error (your PHP uses <p class="error">...) */
.error,
.error-message {
  border: 1px solid rgba(255, 77, 77, 0.25);
  background: rgba(255, 77, 77, 0.08);
  color: var(--error-color);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  text-align: center;
}

/* ================================
   INPUTS + FLOATING LABELS
   ================================ */

.form-group {
  position: relative;
  width: 100%;
  margin: 0;
}

.form-group input {
  width: 100%;
  padding: 14px 14px 14px 14px;

  background: var(--input-bg);
  border: var(--border);
  border-radius: 12px;

  color: var(--input-text);
  font-size: 15px;

  outline: none;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

/* Make placeholder-shown usable */
.form-group input::placeholder {
  color: transparent;
}

/* Focus state */
.form-group input:focus {
  background: var(--input-bg-focus);
  border-color: rgba(255, 0, 0, 0.35);
  box-shadow: 0 10px 22px rgba(255, 0, 0, 0.12);
  transform: translateY(-1px);
}

/* Floating label */
.form-group label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);

  color: var(--muted-text);
  pointer-events: none;

  padding: 0 8px;
  border-radius: 6px;

  transition: all 0.22s ease;
}

/* On focus or when filled */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
  top: -8px;
  left: 10px;
  font-size: 12px;
  color: var(--text-color);

  /* "chip" background so it doesn't overlap borders */
  background: color-mix(in srgb, var(--bg-color) 65%, transparent);
  border: var(--border);
  backdrop-filter: blur(8px);
}

/* ================================
   OPTIONS ROW
   ================================ */

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 0.9rem;
  margin-top: 2px;
  margin-bottom: 6px;
}

.forgot-password,
.signup-link a {
  color: var(--muted-text);
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
}

.forgot-password::after,
.signup-link a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--main-color-1);
  transition: width 0.25s ease;
  border-radius: 2px;
}

.forgot-password:hover,
.signup-link a:hover {
  color: var(--text-color);
}

.forgot-password:hover::after,
.signup-link a:hover::after {
  width: 100%;
}

/* ================================
   BUTTON
   ================================ */

.login-button {
  margin-top: 6px;

  background: var(--main-color-1);
  color: #fff;

  padding: 13px 14px;
  border: none;
  border-radius: 12px;

  font-size: 15px;
  font-weight: 700;

  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(255, 0, 0, 0.22);
  filter: brightness(1.02);
}

.login-button:active {
  transform: translateY(0px);
  box-shadow: 0 10px 18px rgba(255, 0, 0, 0.18);
}

/* ================================
   SIGNUP LINK
   ================================ */

.signup-link {
  color: var(--muted-text);
  font-size: 0.92rem;
  margin-top: 10px;
  line-height: 1.5;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 768px) {
  .login-container {
    padding: calc(var(--header-height) + 20px) 16px 30px;
  }

  .login-box {
    padding: 28px 22px;
    border-radius: 14px;
  }
}

.password-group {
  position: relative;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--muted-text, rgba(255,255,255,0.6));
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.password-toggle:hover {
  color: var(--text-color, #fff);
  transform: translateY(-50%) scale(1.1);
}

/* ================================
   FIXED CONFIDENTIAL NOTICE
   ================================ */
.confidential {
  position: fixed;
  bottom: 16px;
  left: 16px;
  max-width: 360px;

  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.4;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);

  border: var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);

  color: var(--muted-text);
  z-index: 50;
  pointer-events: none; /* prevents blocking clicks */
}

.confidential strong {
  color: var(--text-color);
  font-weight: 600;
}

/* Light mode */
body.light-mode .confidential {
  background: rgba(255, 255, 255, 0.75);
  color: rgba(0, 0, 0, 0.65);
}

/* ================================
   MOBILE ADAPTATION
   ================================ */
@media (max-width: 600px) {
  .confidential {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: unset;
    font-size: 0.75rem;
    text-align: center;
  }
}

/* ================================
   IN-PAGE HEADER
   ================================ */
.page-header {
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  gap: 14px;

  max-width: 420px;
  margin: 0 auto 18px auto;
  padding: 14px 18px; 

  background: var(--card-bg);
  border: var(--border);
  border-radius: 14px;
  backdrop-filter: blur(10px);

  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

/* ================================
   STICKY PAGE HEADER OVER SCREEN
   ================================ */
.page-header {
  position: fixed;       /* sticks to the viewport */
  top: 60px;             /* distance from top of screen */
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;            /* below modal (login-box z-index:2) */
  margin: 0;             /* override any previous margin */
}

/* ensure modal stays above header */
.login-box {
  position: relative;
  z-index: 2;
}

.page-header img {
  width: 56px;
  height: auto;
  flex-shrink: 0;

  filter: drop-shadow(0 6px 14px rgba(255, 0, 0, 0.25));
}

.page-header-text {
  display: flex;
  flex-direction: column;
}

.page-header-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;

  color: var(--text-color);
}

.page-header-text p {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--main-color-1) 55%, var(--muted-text));
  margin-top: 2px;
}

/* ================================
   LIGHT MODE
   ================================ */
body.light-mode .page-header {
  background: var(--card-bg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* ================================
   MOBILE ADAPTATION
   ================================ */
@media (max-width: 600px) {
  .page-header {
    padding: 12px 14px;
    gap: 12px;
  }

  .page-header img {
    width: 48px;
  }

  .page-header-text h1 {
    font-size: 0.95rem;
  }

  .page-header-text p {
    font-size: 0.75rem;
  }
}