/* =========================================================
   FORM ELEMENTS
   ========================================================= */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  padding: 12px;
  transition: border 0.2s ease, background 0.2s ease;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  background: var(--bg-color);
  border-color: var(--btn-bg);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-sub);
  opacity: 0.7;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='%23444' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 36px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
button,
input[type="submit"],
input[type="button"] {
  background: var(--btn-bg);
  border: none;
  border-radius: 6px;
  color: var(--btn-text);
  cursor: pointer;
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  margin-top: 1rem;
  padding: 10px 16px;
  transition: background 0.2s ease;
  margin-right: 10px;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: #1e4ed8;
}

button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
  background: #9ca3af;
  color: #f3f4f6;
  cursor: not-allowed;
}

/* Make <a> look like your buttons */
.btn {
  background: var(--btn-bg);
  border: none;
  border-radius: 6px;
  color: var(--btn-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 16px;
  text-decoration: none;
  transition: background 0.2s ease;
  margin-top: 1rem;
  margin-right: 10px;
}

/* Hover */
.btn:hover {
  background: #1e4ed8;
}

/* Disabled state for <a> and <button> */
.btn.disabled,
.btn:disabled {
  background: #9ca3af;
  color: #f3f4f6;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-wrapper {
  align-items: center;
  background: var(--bg-color);
  display: flex;
  height: 100vh;
  justify-content: center;
  padding: 20px;
}

.login-container {
  animation: fadeIn 0.4s ease;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  max-width: 360px;
  padding: 35px 30px;
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-container h2 {
  color: var(--text-main);
  font-weight: 500;
  margin: 0 0 25px;
  text-align: center;
}

.input-group {
  margin-bottom: 20px;
  position: relative;
}

.input-group i {
  color: var(--text-sub);
  font-size: 16px;
  left: 12px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.login-btn {
  background: var(--btn-bg);
  border: none;
  border-radius: 6px;
  color: var(--btn-text);
  font-size: 16px;
  padding: 12px;
  width: 100%;
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert-error,
.alert-success {
  display: inline-block;
  width: auto;
  padding: 12px 16px;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  border-radius: 6px;
  white-space: nowrap;
  /* remove if you want wrapping */
}

/* Error */
.alert-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

[data-theme="dark"] .alert-error {
  background: #4b1c1c;
  border-color: #7f1d1d;
  color: #fca5a5;
}

/* Success */
.alert-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

[data-theme="dark"] .alert-success {
  background: #1e3a1e;
  border-color: #166534;
  color: #86efac;
}

.footer-text {
  color: var(--text-sub);
  font-size: 14px;
  margin-top: 18px;
  text-align: center;
}

.footer-text a {
  color: var(--btn-bg);
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  cursor: pointer;
  color: var(--text-sub);
}
