.hidden { display: none !important; }

/* ==========================================================================
   LEAF AND LOFT - CACTUS COLLECTION (login.css)
   Mobile-First Luxury Monochrome Studio Theme (Clean Gallery White)
   Zero Emoji. High Contrast, Tactile & Minimalist.
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-app: #f7f7f8;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --text-main: #121214;
  --text-muted: #71717a;
  --text-subtle: #a1a1aa;
  --border-light: #e4e4e7;
  --border-focus: #121214;
  --btn-main: #121214;
  --btn-hover: #27272a;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  line-height: 1.5;
}

.login-wrapper {
  width: 100%;
  max-width: 390px;
  margin: auto;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2.25rem 1.75rem 1.75rem;
  width: 100%;
}

/* Header & Brand Identity */
.brand-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.brand-logo-img {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.35);
  display: block;
}

.brand-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.brand-divider {
  width: 36px;
  height: 2px;
  background-color: var(--text-main);
  margin: 1rem auto 0;
  border-radius: var(--radius-full);
}

/* Form Layout */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.error-box {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.text-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
}

.text-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(18, 18, 20, 0.08);
}

.text-input::placeholder {
  color: var(--text-subtle);
  font-size: 0.9rem;
}

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

.password-wrapper .text-input {
  padding-right: 2.75rem;
}

.btn-toggle-password {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.btn-toggle-password:hover {
  color: var(--text-main);
}

/* Checkbox Row */
.options-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: -0.25rem;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-light);
  border-radius: 4px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.checkbox-input:checked + .custom-checkbox {
  background: var(--btn-main);
  border-color: var(--btn-main);
}

.checkbox-input:checked + .custom-checkbox::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.remember-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 0.85rem;
  background: var(--btn-main);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  box-shadow: 0 4px 12px rgba(18, 18, 20, 0.18);
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-submit:hover {
  background: var(--btn-hover);
  box-shadow: 0 6px 16px rgba(18, 18, 20, 0.24);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(18, 18, 20, 0.15);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Eye Icons */
.icon-eye, .icon-eye-off {
  width: 18px;
  height: 18px;
  background-color: currentColor;
  display: inline-block;
}

.icon-eye {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center;
}

.icon-eye-off {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E") no-repeat center;
}

/* Card Footer */
.card-footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-weight: 500;
  letter-spacing: 0.04em;
}
