/* ---- FILE: index.css REBUILT ---- */

:root {
  --color-black: #000000;
  --color-dark-grey: #333333;
  --color-light-grey: #f5f5f7;
  --color-white: #ffffff;
  --color-red: #cc0000;
  --color-text: #1c1c1c;
  --color-text-sub: #5c5e62;

  --radius: 40px;
  /* Pill shape for inputs/buttons */
  --card-radius: 20px;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  font-family: 'Inter', sans-serif;
  background-color: #ECEDF2;
  overflow: hidden;
}

/* --- LAYOUT & PANEL --- */

.panel {
  background-color: var(--color-white);
  border-radius: var(--card-radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  position: absolute;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* State: Login / Register (Centered Card) */
.panel.login,
.panel.loading {
  width: 400px;
  /* Allow height to grow, but set min-height */
  min-height: 520px;
  height: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* Start from top to stack logo */
  padding-bottom: 30px;
  z-index: 100;
}

/* State: App (Sidebar) */
.panel.to-nav {
  width: 260px;
  top: 10px;
  bottom: 10px;
  left: 10px;
  border-radius: 16px;
  transform: none;
  /* Reset center transform */
  z-index: 50;
  display: block;
  /* Normal block flow for sidebar */
}


/* --- LOGO --- */

.main-logo-img {
  transition: all 0.3s ease;
}

/* Logo in Login State */
.panel.loading .main-logo-img,
.panel.login .main-logo-img {
  display: block;
  width: 60px;
  height: 60px;
  margin-top: 40px;
  /* Space from top edge */
  margin-bottom: 10px;
  flex-shrink: 0;
}

/* Logo in Sidebar State */
.panel.to-nav .main-logo-img {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  margin: 0;
}


/* --- FORMS --- */

.login-content {
  width: 100%;
  padding: 0 40px;
  /* Horizontal padding */
  box-sizing: border-box;
  /* Fade transition */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  display: none;
  /* Hide conflicting forms completely */
}

/* Show content when panel is in login mode (handled by JS toggling hidden classes mostly, 
   but we need a base visibility for the container) */
.panel.login .login-content {
  opacity: 1;
  visibility: visible;
  display: block;
}

.hidden-form {
  display: none !important;
}

/* Title */
.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-black);
  margin: 10px 0 30px 0;
  text-align: center;
  width: 100%;
}

/* Inputs */
.input-wrapper {
  position: relative;
  /* For icon positioning */
  margin-bottom: 20px;
  width: 100%;
}

.panel-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-sub);
  margin-bottom: 5px;
  margin-left: 15px;
}

.panel-input {
  width: 100%;
  height: 45px;
  background-color: var(--color-light-grey);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 45px 0 20px;
  /* Right padding for eye icon */
  font-size: 14px;
  color: var(--color-text);
  outline: none;
  box-sizing: border-box;
  transition: background 0.2s, border 0.2s;
}

.panel-input:focus {
  background-color: var(--color-white);
  border-color: #ccc;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
  /* Soft highlight */
}

/* Error state for input */
.panel-input.input-error {
  background-color: #fff0f0;
  border-color: #ff3b30;
}

/* Password Toggle Eye */
.password-toggle {
  position: absolute;
  right: 15px;
  top: 38px;
  /* Approx center of input (label is ~20px + input top padding) */
  color: #999;
  cursor: pointer;
  font-size: 16px;
  z-index: 10;
}

.password-toggle:hover {
  color: var(--color-black);
}

/* Checkbox */
.checkbox-table {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-black);
}

.checkbox-label {
  font-size: 12px;
  color: var(--color-text-sub);
  cursor: pointer;
}

.checkbox-label a {
  color: var(--color-black);
  font-weight: 700;
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* Buttons */
.button {
  width: 100%;
  height: 45px;
  background-color: var(--color-black);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.button:hover {
  background-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.button:active {
  transform: scale(0.98);
}

/* Messages */
.error-message {
  color: #cc0000;
  font-size: 12px;
  text-align: center;
  min-height: 18px;
  margin-bottom: 10px;
}

/* --- APP INTERFACE (Sidebar & Topbar) --- */
/* (Keeping these simplistic as the main task is the login form) */

.panel.to-nav .login-content {
  display: none;
  /* Ensure form is gone */
}

.top-bar {
  position: absolute;
  left: 280px;
  /* 260 width + 10 margin + gap */
  right: 10px;
  top: 10px;
  height: 60px;
  background: #fff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.top-bar.hidden {
  display: none;
}

.main-content {
  position: absolute;
  left: 280px;
  right: 10px;
  top: 80px;
  bottom: 10px;
  background: #ecedf2;
  /* Matches body */
  overflow-y: auto;
}

.main-content.hidden {
  display: none;
}

/* Navbar items placehoders */
#navbar-container {
  margin-top: 80px;
  padding: 0 10px;
}

/* Loading Spinner */
.loading-bar {
  width: 30px;
  height: 30px;
  border: 3px solid #eee;
  border-top: 3px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

.loading-bar.show {
  display: block;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Utils */
.text-red {
  color: #fe2c2c;
}