:root {
  --bg-color: #121212a5;
  --card-bg: #1e1e1e;
  --accent: #d35400; /* Burnt Orange/Brown theme */
  --text: #ffffff;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-image:
    linear-gradient(
      rgba(0, 0, 0, 0.666),
      rgba(0, 0, 0, 0.586),
      rgba(0, 0, 0, 0.753)
    ),
    url(https://i.pinimg.com/1200x/c5/c9/4e/c5c94e59aa8fd075e78c640c6e5e1533.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  color: var(--text);
  display: grid;
  place-items: center;
  height: 100vh;
  margin: 0;
}

.container {
  background: rgba(0, 0, 0, 0.607);
  backdrop-filter: 3px 10px;
  -webkit-backdrop-filter: blur(4px);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 400px;
}

h1 {
  text-align: center;
  color: var(--accent);
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #252525;
  color: white;
}

button {
  padding: 12px;
  background: var(--accent);
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.3s;
}

button:hover {
  background: #e67e22;
}

.toggle-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.message {
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
  display: none;
  font-size: 0.9rem;
  text-align: center;
  background: #2c3e50;
}

.browse-prompt {
  margin-top: 15px;
  border-top: 1px solid #333; /* Adds a subtle separator */
  padding-top: 15px;
  font-size: 0.9rem;
  text-align: center;
}

.browse-link {
  color: var(--accent); /* Uses your orange/brown theme color */
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.browse-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* --- PASSWORD TOGGLE REFINEMENTS --- */

/* 1. The Container: Keeps the icon relative to the input box */
.password-field {
  position: relative;
  width: 100%;
  margin-bottom: 15px; /* Matches your other spacing */
}

/* 2. The Input: Ensures text doesn't overlap the icon */
.password-field input {
  width: 100%;
  padding-right: 45px !important; /* Space for the icon on the right */
  box-sizing: border-box; /* Prevents width issues */
}

/* 3. The Icon: Positioned perfectly inside the box */
.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  user-select: none; /* Prevents highlighting the icon text */
  color: #777; /* Subdued color for a professional look */
  transition: color 0.3s ease;
}

.toggle-password:hover {
  color: #333; /* Darkens on hover to show it's clickable */
}

/* 4. Form Fix: Ensure consistency with your existing form-box */
.form-box form input {
  margin-bottom: 10px; /* Slight adjustment for the password container */
}





.sys-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}

.sys-alert-box {
    background: white; padding: 30px; border-radius: 20px;
    width: 90%; max-width: 400px; text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    animation: popIn 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.27);
}

.sys-icon { font-size: 3rem; margin-bottom: 15px; }

.sys-btn {
    padding: 12px 25px; border: none; border-radius: 8px;
    font-weight: 600; cursor: pointer; transition: 0.2s; margin: 5px;
}

.sys-btn.primary { background: #3c2f2a; color: white; }
.sys-btn.secondary { background: #f0eeed; color: #3c2f2a; }

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}




/* Professional Toast Stacking */
.global-toast-stack {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse; /* Newest toast at the bottom */
    gap: 10px;
    pointer-events: none; /* Allows clicking through the container background */
}

.toast {
    background: #3c2f2a; /* Your Brand Brown */
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideUp 0.4s cubic-bezier(0.17, 0.89, 0.32, 1.27);
    min-width: 280px;
    pointer-events: auto; /* Re-enable clicking for the toast itself */
}

@keyframes toastSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast.error { background: #e74c3c; }
.toast.success { background: #2e7d32; }