@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700;800&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --sg-gold: #c99355;
  --sg-gold-dark: #a86f35;
  --sg-gold-soft: #f4dfbf;
  --sg-bg: #fffaf3;
  --sg-bg-soft: #fdf1e7;
  --sg-blush: #f6d8d2;
  --sg-blush-dark: #a96861;
  --sg-text: #4a2f2a;
  --sg-muted: #876b63;
  --sg-border: #ead6c8;
  --sg-border-soft: #f3e5dc;
  --sg-danger: #b9524d;
  --sg-danger-bg: #fcebe9;
  --sg-success: #3e7d5a;
  --sg-success-bg: #eaf6ef;
  --sg-shadow: 0 28px 70px rgba(112, 73, 55, 0.14);
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--sg-text);
  background: var(--sg-bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.sg-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(246, 216, 210, 0.72), transparent 34%),
    radial-gradient(circle at bottom right, rgba(244, 223, 191, 0.52), transparent 30%),
    linear-gradient(180deg, var(--sg-bg) 0%, var(--sg-bg-soft) 100%);
}

.sg-login-shell {
  width: min(100%, 1040px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 460px);
  gap: 1.25rem;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.sg-auth-brand-panel,
.sg-login-card {
  border: 1px solid var(--sg-border);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--sg-shadow);
}

.sg-auth-brand-panel {
  min-height: 610px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  padding: 2rem;
  background:
    radial-gradient(circle at bottom left, rgba(246, 216, 210, 0.82), transparent 42%),
    #fff;
}

.sg-auth-brand-panel::after {
  content: "";
  width: 285px;
  height: 285px;
  position: absolute;
  right: -35px;
  bottom: -18px;
  background: url("/asset/flower/dashboard-flower.png") center / contain no-repeat;
  opacity: 0.5;
  pointer-events: none;
  animation: authFlowerFloat 8s ease-in-out infinite;
}

@keyframes authFlowerFloat {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(12px, -10px) rotate(2deg); }
}

.sg-auth-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  z-index: 1;
}

.sg-brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--sg-border);
  border-radius: 18px;
  background: #fff7ec;
  color: var(--sg-gold-dark);
}

.sg-brand-mark svg,
.sg-login-brand-image {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.sg-auth-brand strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.sg-auth-brand span {
  display: block;
  margin-top: 0.25rem;
  color: var(--sg-muted);
  font-size: 12px;
  font-weight: 600;
}

.sg-auth-brand-copy {
  max-width: 390px;
  position: relative;
  z-index: 1;
  margin-bottom: 9rem;
}

.sg-auth-brand-copy p {
  margin: 0 0 0.65rem;
  color: var(--sg-gold-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sg-auth-brand-copy h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.25rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
}

.sg-auth-brand-copy > span {
  display: block;
  margin-top: 1rem;
  color: var(--sg-muted);
  font-size: 14px;
  line-height: 1.7;
}

.sg-login-card {
  width: 100%;
  align-self: center;
  padding: 2rem;
}

.sg-login-title {
  margin-bottom: 1.5rem;
  text-align: left;
}

.sg-login-title h2 {
  margin: 0 0 0.45rem;
  color: var(--sg-text);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.05;
}

.sg-login-title p {
  margin: 0;
  color: var(--sg-muted);
  font-size: 14px;
  line-height: 1.7;
}

.sg-form {
  display: grid;
  gap: 1rem;
}

.sg-field label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--sg-text);
  font-size: 13px;
  font-weight: 800;
}

.sg-input-wrap {
  width: 100%;
  height: 46px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--sg-border);
  border-radius: 12px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.sg-input-wrap:focus-within {
  border-color: var(--sg-gold);
  box-shadow: 0 0 0 3px rgba(201, 147, 85, 0.14);
}

.sg-input-icon,
.sg-password-eye {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--sg-muted);
}

.sg-password-eye {
  cursor: pointer;
}

.sg-password-eye:hover {
  color: var(--sg-gold-dark);
}

.sg-input-icon svg,
.sg-password-eye svg {
  width: 19px;
  height: 19px;
}

.sg-input-wrap input {
  width: 100%;
  height: 44px;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: #fff !important;
  color: var(--sg-text) !important;
  font-size: 14px;
  -webkit-text-fill-color: var(--sg-text) !important;
}

.sg-input-wrap input::placeholder {
  color: #ad948b;
}

.sg-input-wrap input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: var(--sg-text) !important;
}

.sg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sg-check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--sg-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.sg-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--sg-gold);
}

.sg-forgot-link {
  color: var(--sg-gold-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.sg-forgot-link:hover {
  color: var(--sg-gold);
  text-decoration: underline;
}

.sg-auth-link-center {
  display: block;
  text-align: center;
}

.sg-signin {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid var(--sg-gold);
  border-radius: 12px;
  background: var(--sg-gold);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(201, 147, 85, 0.2);
  transition: transform .2s ease, background .2s ease;
}

.sg-signin:hover {
  transform: translateY(-1px);
  background: var(--sg-gold-dark);
}

.sg-authorized {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--sg-muted);
  font-size: 12px;
  font-weight: 600;
}

.sg-authorized svg {
  width: 18px;
  height: 18px;
  color: var(--sg-success);
}

.sg-divider {
  height: 1px;
  background: var(--sg-border-soft);
}

.sg-powered {
  color: var(--sg-muted);
  font-size: 12px;
  text-align: center;
}

.sg-powered strong {
  color: var(--sg-gold-dark);
}

.sg-login-errors,
.sg-field-error {
  color: var(--sg-danger);
  font-size: 13px;
  font-weight: 700;
}

.sg-login-errors {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.8rem;
  border: 1px solid rgba(185, 82, 77, 0.25);
  border-radius: 14px;
  background: var(--sg-danger-bg);
}

.sg-field-error {
  display: block;
  margin-top: 0.35rem;
}

.sg-password-reqs {
  margin-top: 0.25rem !important;
  padding: 0.85rem !important;
  border: 1px solid var(--sg-border) !important;
  border-radius: 14px !important;
  background: var(--sg-bg) !important;
  color: var(--sg-muted) !important;
  font-size: 12px !important;
}

.sg-password-reqs h4 {
  margin: 0 0 0.55rem !important;
  color: var(--sg-text) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.sg-password-reqs ul {
  display: grid !important;
  gap: 0.35rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.sg-password-reqs li {
  color: var(--sg-muted) !important;
}

.sg-password-reqs li.valid {
  color: var(--sg-success) !important;
}

.sg-password-reqs li.invalid {
  color: var(--sg-danger) !important;
}

@media (max-width: 991.98px) {
  .sg-login-shell {
    max-width: 480px;
    grid-template-columns: 1fr;
  }

  .sg-auth-brand-panel {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .sg-login-page {
    align-items: start;
    padding: 1rem;
  }

  .sg-login-card {
    padding: 1.35rem;
    border-radius: 22px;
  }

  .sg-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }
}
