:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-muted: #f5f5f4;
  --bg-hover: #f0efed;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text: #1c1917;
  --text-muted: #57534e;
  --text-subtle: #78716c;
  --accent: #b8410f;
  --accent-text: #9a3a14;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --font: ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-soft);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

.signin-main {
  display: flex;
  justify-content: center;
  padding: 40px 0 60px;
}

/* Card */
.signin-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 36px 32px 28px;
}

.signin-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.signin-card .sub {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Session-expired / info notice */
.notice {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--amber-soft);
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 12px;
  color: #78350f;
  margin-bottom: 20px;
  align-items: flex-start;
}

.notice .nicon {
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 1px;
}

.notice strong {
  color: #5a2606;
  font-weight: 600;
}

/* Login error */
.si-error {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 12px;
  color: #7f1d1d;
  margin-bottom: 20px;
  align-items: flex-start;
}

/* Google button */
.btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background .12s, border-color .12s, box-shadow .12s;
}

.btn-google:hover {
  background: var(--bg-muted);
  border-color: #a8a29e;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
}

.btn-google::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84c-.21 1.13-.84 2.08-1.79 2.72v2.26h2.9c1.7-1.56 2.69-3.87 2.69-6.62z' fill='%234285F4'/%3E%3Cpath d='M9 18c2.43 0 4.47-.81 5.96-2.18l-2.9-2.26c-.81.54-1.84.86-3.06.86-2.35 0-4.34-1.59-5.05-3.71H.96v2.34A9 9 0 0 0 9 18z' fill='%2334A853'/%3E%3Cpath d='M3.95 10.71A5.41 5.41 0 0 1 3.66 9c0-.59.1-1.17.29-1.71V4.96H.96A9 9 0 0 0 0 9c0 1.45.35 2.83.96 4.04l2.99-2.33z' fill='%23FBBC05'/%3E%3Cpath d='M9 3.58c1.32 0 2.51.46 3.44 1.35l2.58-2.58A8.99 8.99 0 0 0 9 0 9 9 0 0 0 .96 4.96L3.95 7.3C4.66 5.18 6.65 3.58 9 3.58z' fill='%23EA4335'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Divider */
.or-div {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-subtle);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 500;
}

.or-div::before,
.or-div::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Form */
.si-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.si-form .label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.si-form .label-row .label {
  margin-bottom: 0;
}

.si-form .label-row .forgot {
  font-size: 11px;
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 500;
}

.si-form .label-row .forgot:hover {
  text-decoration: underline;
}

.si-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  font-family: inherit;
  color: var(--text);
  transition: border-color .12s, box-shadow .12s;
  display: block;
}

.si-input:hover {
  border-color: #a8a29e;
}

.si-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184,65,15,.12);
}

.si-input-group {
  position: relative;
}

.si-input-group .reveal {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  line-height: 1;
}

.si-input-group .reveal:hover {
  color: var(--text);
  background: var(--bg-muted);
}

.si-input-group .si-input {
  padding-right: 40px;
}

.btn-submit {
  width: 100%;
  padding: 11px 14px;
  background: var(--text);
  color: white;
  border: 1px solid var(--text);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-submit:hover {
  background: #000;
}

.signup-link {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.signup-link a {
  color: var(--accent-text);
  font-weight: 500;
  text-decoration: none;
}

.signup-link a:hover {
  text-decoration: underline;
}

.pw-rules {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.pw-rules-title {
  margin: 0 0 4px;
  font-weight: 500;
  color: var(--text-subtle);
}

.pw-rules ul {
  margin: 0;
  padding-left: 16px;
}

.pw-rules li {
  margin: 2px 0;
}

@media (max-width: 480px) {
  .signin-card {
    padding: 28px 20px 22px;
    border-radius: 12px;
  }
}
