/* ============================================================================
   READY-SET-BAG! LOGIN PAGE - STYLES
   ============================================================================ */

:root {
  --theme: #8AA103;
  --transition-speed: 0.45s;
  --jersey: 'Jersey 25', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #d8d8d8;
  font-family: var(--jersey);
}

/* ---- OUTER WRAPPER: true 50/50 split, full screen ---- */
.login-wrapper {
  display: flex;
  width: 100vw;
  height: 100vh;
  background: #d8d8d8;
  font-family: var(--jersey);
}

/* ---- LEFT HALF (container, no bg) ---- */
.left-half {
  width: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d8d8d8;
}

/* ---- LOGIN CARD (LEFT PANEL) ---- */
.left-panel {
  background: #8AA103;
  width: 80%;
  height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 200px 80px;
  position: relative;
  border-radius: 60px;
  border: 10px solid #5e6e02;
  box-shadow: 6px 6px 24px rgba(0,0,0,0.22);
  transition: background var(--transition-speed) ease,
              border-color var(--transition-speed) ease;
}

body.admin-mode .left-panel {
  background: #E85050;
  border-color: #a82020;
}

/* "Log In" title */
.login-title {
  margin-bottom: 48px;
  line-height: 1;
  font-family: var(--jersey);
  font-size: clamp(100px, calc(100px + (100vw - 1024px) / 17.92), 150px);
  color: rgba(255,255,255,0.92);
  letter-spacing: 2px;
  text-align: center;
}

/* ---- INPUT FIELDS ---- */
.input-group {
  width: 100%;
  position: relative;
  margin-bottom: 24px;
}

.input-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 70px;
  height: 70px;
  background: #E8E8E8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.4);
  z-index: 2;
}

.user-img {
  width: 45px;
  height: 55px;
  transform: translateY(8px);
}

.lock-img {
  width: 30px;
  height: 35px;
}

.input-group input {
  width: 100%;
  padding: 18px 24px 18px 90px;
  background: #e6e6e6;
  border: none;
  outline: none;
  border-radius: 40px;
  font-family: var(--jersey);
  font-size: 28px;
  color: #555;
  box-shadow: inset 4px 4px 10px rgba(0,0,0,0.25), inset -3px -3px 8px rgba(255,255,255,0.8);
  transition: box-shadow 0.2s;
  letter-spacing: 1px;
}

.input-group input:focus {
  box-shadow: inset 4px 4px 10px rgba(0,0,0,0.2), inset -2px -2px 5px rgba(255,255,255,0.7);
}

.input-group input::placeholder {
  color: #bbb;
}

/* ---- LOGIN BUTTON ---- */
.btn-login-index {
  margin-top: 16px;
  padding: 8px 72px;
  background: #e6e6e6;
  border: none;
  outline: none;
  border-radius: 40px;
  font-family: var(--jersey);
  font-size: 50px;
  color: var(--theme);
  cursor: pointer;
  box-shadow: 6px 6px 16px rgba(0,0,0,0.5);
  transition: all 0.2s, color var(--transition-speed) ease;
  letter-spacing: 1px;
}

.btn-login-index:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

.btn-login-index:active {
  box-shadow: none;
  transform: translateY(0);
}

.btn-login-index:focus {
  outline: none;
  box-shadow: 6px 6px 16px rgba(0,0,0,0.5);
}

body.admin-mode .btn-login-index {
  color: #E85050;
}

/* ---- TOGGLE SWITCH ---- */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.toggle-label {
  font-family: var(--jersey);
  font-size: 24px;
  color: rgba(255,255,255,0.9);
  letter-spacing: 1px;
}

.toggle-switch {
  position: relative;
  width: 70px;
  height: 38px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: #E8E8E8;
  border-radius: 20px;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.3), inset -1px -1px 3px rgba(255,255,255,0.1);
  transition: background 0.3s;
}

.toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 30px;
  height: 30px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.toggle-switch input:checked ~ .toggle-thumb {
  transform: translateX(32px);
}

body.admin-mode .right-panel {
  background: #E83F3F;
}

/* ---- RIGHT PANEL ---- */
.right-panel {
  background: #8AA103;
  width: 50%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: none;
  transition: background var(--transition-speed) ease;
}

.panel-icon {
  position: relative;
  z-index: 1;
  width: 450px;
  height: 900px;
}

/* ---- ICONS ---- */
.icon-pencil, .icon-wrench {
  position: absolute;
  transition: opacity 0.45s ease, transform 0.45s ease;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
}

.icon-pencil {
  opacity: 1;
  width: 100px;
  height: 600px;
  transform: translate(-50%, -50%) scale(1);
}

.icon-wrench {
  opacity: 0;
  width: 200px;
  height: 600px;
  transform: translate(-50%, -50%) scale(1);
}

/* admin mode */
body.admin-mode .icon-pencil {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
}

body.admin-mode .icon-wrench {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---- RESPONSIVE BREAKPOINTS ---- */

/* Desktop / large laptop */
@media (min-width: 1280px) {
  .left-panel {
    width: 770px;
    height: 970px;
  }

  .panel-icon {
    width: 480px;
    height: 920px;
  }
}

/* Laptop / small PC */
@media (min-width: 769px) and (max-width: 1279px) {
  .login-title {
    font-size: clamp(84px, 9vw, 120px);
    margin-bottom: 28px;
  }

  .left-panel {
    width: 86%;
    height: 84%;
    padding: 120px 56px;
  }

  .input-group {
    margin-bottom: 22px;
  }

  .input-icon {
    width: 56px;
    height: 56px;
  }

  .input-icon img {
    width: 28px !important;
    height: 28px !important;
  }

  .user-img {
    transform: translateY(4px);
  }

  .input-group input {
    font-size: 18px;
    padding: 14px 16px 14px 76px;
  }

  .btn-login-index {
    font-size: 36px;
    padding: 8px 52px;
    margin-top: 14px;
  }

  .toggle-row {
    margin-top: 22px;
    gap: 14px;
  }

  .toggle-label {
    font-size: 16px;
  }

  .panel-icon {
    width: 360px;
    height: 700px;
  }

  .icon-pencil,
  .icon-wrench {
    width: 140px;
    height: 460px;
  }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 850px) {
  body {
    overflow: auto;
    min-height: 100dvh;
  }

  .login-wrapper {
    flex-direction: column;
    height: auto;
    width: 100vw;
    min-height: 100dvh;
  }

  .left-half,
  .right-panel {
    width: 100%;
    height: auto;
    flex-shrink: 0;
  }

  .left-half {
    padding: 24px 0 12px;
  }

  .right-panel {
    min-height: 360px;
    padding: 12px 0 28px;
  }

  .login-title {
    font-size: clamp(68px, 10vw, 88px);
    margin-bottom: 20px;
  }

  .left-panel {
    width: min(500px, 88vw);
    height: auto;
    min-height: auto;
    padding: 44px 32px;
  }

  .input-group {
    margin-bottom: 18px;
  }

  .input-icon {
    width: 44px;
    height: 44px;
  }

  .input-icon img {
    width: 22px !important;
    height: 22px !important;
  }

  .user-img {
    transform: translateY(2px);
  }

  .input-group input {
    font-size: 14px;
    padding: 9px 10px 9px 58px;
  }

  .btn-login-index {
    font-size: 24px;
    padding: 6px 28px;
    margin-top: 10px;
  }

  .toggle-row {
    margin-top: 18px;
    gap: 12px;
  }

  .toggle-label {
    font-size: 14px;
  }

  .panel-icon {
    width: min(260px, 70vw);
    height: 320px;
  }

  .icon-pencil,
  .icon-wrench {
    width: 104px;
    height: 300px;
  }
}

/* Tablet landscape: keep right-panel icon anchored to bottom to match smartphone layout
   extend to larger tablets/laptop-tables for consistent behavior */
@media (min-width: 481px) and (max-width: 1200px) and (orientation: landscape) {
  .right-panel {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px; /* small breathing space */
  }
  .panel-icon { margin-bottom: 6px; }
}

/* Small phones and narrow tablets: stack halves (top = login, bottom = icon) */
@media (max-width: 850px) {
  body {
    overflow: auto;
    min-height: 100dvh;
  }

  .login-wrapper {
    flex-direction: column;
    height: auto;
    width: 100vw;
    min-height: 100dvh;
  }

  .left-half,
  .right-panel {
    width: 100%;
    height: auto;
    flex-shrink: 0;
  }

  .left-half {
    padding: 18px 0 10px;
  }

  .right-panel {
    min-height: 260px;
    padding: 8px 0 22px;
  }

  .login-title {
    font-size: clamp(52px, 15vw, 66px);
    margin-bottom: 14px;
  }

  .left-panel {
    width: min(320px, 92vw);
    height: auto;
    min-height: auto;
    padding: 20px 16px;
    border-radius: 28px;
  }

  .input-group {
    margin-bottom: 14px;
  }

  .input-icon {
    width: 36px;
    height: 36px;
  }

  .input-icon img {
    width: 20px !important;
    height: 20px !important;
  }

  .user-img {
    transform: translateY(1px);
  }

  .input-group input {
    font-size: 12px;
    padding: 8px 10px 8px 50px;
  }

  .btn-login-index {
    font-size: 20px;
    padding: 5px 22px;
    margin-top: 8px;
  }

  .toggle-row {
    margin-top: 16px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .toggle-switch {
    width: 55px;
    height: 30px;
  }

  .toggle-thumb {
    width: 22px;
    height: 22px;
  }

  .toggle-switch input:checked ~ .toggle-thumb {
    transform: translateX(25px);
  }

  .toggle-label {
    font-size: 12px;
  }

  .panel-icon {
    width: min(200px, 76vw);
    height: 240px;
  }

  .icon-pencil,
  .icon-wrench {
    width: 84px;
    height: 220px;
  }

  /* Ensure right-panel content sits directly below left panel without extra gap */
  .right-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8px;
  }
  .panel-icon { margin-top: 0; }

  /* Make the two halves each occupy ~50% of the viewport height so login sits above and wrench below */
  .login-wrapper {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }
  .left-half, .right-panel {
    width: 100%;
    height: 50vh;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .left-panel { width: min(500px, 92vw); height: auto; min-height: 0; }
}
