/* ===========================
   BAMISOCKS Auth – Webshare style (FIXED)
   - Centered layout (always)
   - Mobile responsive
   - Supports your PHP class names
   =========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.auth-body {
  /* Better mobile viewport handling */
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Safe padding so it doesn't touch edges */
  padding: 24px 16px;

  background: #050608;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: #f9fafb;
}

/* Layout wrapper */
.auth-page {
  width: 100%;
  max-width: 440px;

  /* Ensure it stays centered even if body changes later */
  margin: 0 auto;
}

/* Logo at top */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;

  /* OPTIONAL: center logo (looks cleaner on mobile) */
  justify-content: center;
}

.auth-logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #0b1120;
}

.auth-logo-text {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

/* Card */
.auth-card {
  background: #111827;
  border-radius: 18px;
  padding: 22px 20px 18px;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

/* If you later add left/right columns, keep it safe */
.auth-card-left {
  width: 100%;
}

/* Header text */
.auth-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}

.auth-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: #9ca3af;
}

/* Alert messages */
.auth-alert {
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

/* ✅ Supports BOTH formats:
   - .auth-alert.error / .auth-alert.success  (old)
   - .auth-alert-error / .auth-alert-success  (your PHP)
*/
.auth-alert.error,
.auth-alert-error {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.7);
  color: #fecaca;
}

.auth-alert.success,
.auth-alert-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
}

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
}

/* Disabled look (because yours is disabled now) */
.btn-google:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-google-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: conic-gradient(
    from 0deg,
    #ea4335,
    #fbbc05,
    #34a853,
    #4285f4,
    #ea4335
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
  font-size: 11px;
  color: #6b7280;
}

.auth-divider span.line {
  flex: 1;
  height: 1px;
  background: #1f2937;
}

/* Form */
.auth-form {
  margin: 0;
}

.auth-group {
  margin-bottom: 10px;
}

.auth-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #e5e7eb;
}

.auth-input {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #374151;
  background: #020617;
  color: #f9fafb;
  font-size: 13px;
  outline: none;
}

.auth-input::placeholder {
  color: #6b7280;
}

.auth-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.7);
}

/* Row below password */
.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 11px;
  color: #9ca3af;
  flex-wrap: wrap; /* ✅ helps mobile */
}

/* ✅ Supports BOTH:
   - .auth-check (old)
   - .auth-checkbox-label (your PHP)
*/
.auth-check,
.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-check input,
.auth-checkbox-label input {
  width: 14px;
  height: 14px;
}

.auth-link {
  color: #22c55e;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Main sign-in button */
.btn-primary {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: #10b981;
  color: #020617;
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: none;
}

/* Bottom text & CTA */
.auth-bottom {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #9ca3af;
  flex-wrap: wrap; /* ✅ mobile safe */
}

.auth-bottom-text {
  max-width: 60%;
}

.btn-ghost {
  border-radius: 999px;
  border: none;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: #10b981;
  color: #020617;
}

/* Back link under card */
.auth-back {
  margin-top: 12px;
  font-size: 11px;
  text-align: center;
  color: #6b7280;
}

.auth-back a {
  color: #9ca3af;
  text-decoration: none;
}

.auth-back a:hover {
  text-decoration: underline;
}

/* =======================
   Mobile improvements
   ======================= */
@media (max-width: 480px) {
  body.auth-body {
    padding: 18px 12px;
  }

  .auth-page {
    max-width: 100%;
  }

  .auth-card {
    padding: 18px 16px 16px;
    border-radius: 16px;
  }

  .auth-title {
    font-size: 20px;
  }

  .auth-sub {
    font-size: 12.5px;
  }

  /* Stack bottom section nicely */
  .auth-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-bottom-text {
    max-width: 100%;
  }

  .btn-ghost {
    width: 100%;
    padding: 10px 14px;
    font-size: 12px;
  }
}