/* The sign-in page (/login) in the Coptic Data look: the logo's green, a cream card, a gold accent, the Google button
   first (as Notion, Slack, Figma and Linear put it) then the password form. Frappe's own page is kept (its form, its
   scripts); this only paints it. ss_web.js adds the Google button and the "no account" message. */

/* Light and night colours of these pages. Night: in the app as the app is (ss_offline.js sets data-theme), in a
   browser as the phone or computer is (no data-theme there). */
body {
	--l-card: #fffdf6; --l-card-edge: rgba(255, 255, 255, .5); --l-strong: #0e3b27; --l-soft: #5a6a5f; --l-faint: #7b887f;
	--l-input: #fff; --l-input-edge: #cfd9d1; --l-link: #1b6b46; --l-btn: #fff; --l-btn-text: #1f1f1f;
	--l-warn-bg: #fdecea; --l-warn: #8a1c14; --l-deep: #0e3b27; --l-glow: rgba(217, 169, 58, .45);
}
:root[data-theme="dark"] body {
	--l-card: #1b211d; --l-card-edge: rgba(255, 255, 255, .06); --l-strong: #dfe4dd; --l-soft: #bfc9c1; --l-faint: #8a938b;
	--l-input: #0f1511; --l-input-edge: #404942; --l-link: #98d5ad; --l-btn: #262c27; --l-btn-text: #dfe4dd;
	--l-warn-bg: #4a1f1f; --l-warn: #ffb4ab; --l-deep: #06140d; --l-glow: rgba(217, 169, 58, .22);
	background-color: #0f1511; color: #dfe4dd;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) body {
		--l-card: #1b211d; --l-card-edge: rgba(255, 255, 255, .06); --l-strong: #dfe4dd; --l-soft: #bfc9c1; --l-faint: #8a938b;
		--l-input: #0f1511; --l-input-edge: #404942; --l-link: #98d5ad; --l-btn: #262c27; --l-btn-text: #dfe4dd;
		--l-warn-bg: #4a1f1f; --l-warn: #ffb4ab; --l-deep: #06140d; --l-glow: rgba(217, 169, 58, .22);
		background-color: #0f1511; color: #dfe4dd;
	}
}

body[data-path="login"] {
	--ss-green: #1b6b46; --ss-deep: #0e3b27; --ss-gold: #d9a93a; --ss-cream: #f3efd8;
	min-height: 100vh;
	background:
		radial-gradient(900px 420px at 85% -10%, var(--l-glow), transparent 60%),
		radial-gradient(700px 400px at -10% 110%, rgba(152, 213, 173, .35), transparent 60%),
		linear-gradient(165deg, var(--l-deep) 0%, var(--ss-green) 100%) fixed;
}
body[data-path="login"] .page-content-wrapper, body[data-path="login"] main { background: transparent; }
body[data-path="login"] .for-login, body[data-path="login"] .for-forgot, body[data-path="login"] .for-email-login,
body[data-path="login"] .for-signup, body[data-path="login"] .for-login-with-email-link { background: transparent; }
body[data-path="login"] .page-card {
	background: var(--l-card); border-radius: 28px; border: 0; padding: 28px 24px 24px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .28), 0 0 0 1px var(--l-card-edge) inset;
	max-width: 420px; width: calc(100% - 32px); margin: 6vh auto 24px;
}
body[data-path="login"] .page-card-head { align-items: center !important; text-align: center !important; }
body[data-path="login"] .page-card-head h4 { color: var(--l-strong) !important; font-weight: 800; text-align: center; }
body[data-path="login"] .page-card-head .page-card-subtitle { color: var(--l-soft) !important; text-align: center; }
body[data-path="login"] .app-logo {
	width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
	box-shadow: 0 6px 18px rgba(27, 107, 70, .35), 0 0 0 4px var(--ss-cream), 0 0 0 6px var(--ss-gold);
}
body[data-path="login"] .form-control {
	border-radius: 14px; height: 48px; background: var(--l-input); border: 1.5px solid var(--l-input-edge); color: var(--l-strong); font-size: 16px;
}
body[data-path="login"] .page-card .page-card-body input.form-control { background: var(--l-input) !important; color: var(--l-strong); }
body[data-path="login"] .form-control:focus { border-color: var(--ss-green); box-shadow: 0 0 0 4px rgba(27, 107, 70, .15); }
body[data-path="login"] .es-button[data-variant="solid"], body[data-path="login"] .btn-primary {
	background: linear-gradient(135deg, var(--ss-green), #25905d) !important; color: #fff !important; border: 0 !important;
	border-radius: 14px; height: 50px; font-size: 16px; font-weight: 700; box-shadow: 0 6px 16px rgba(27, 107, 70, .35);
}
body[data-path="login"] a { color: var(--l-link); }
body[data-path="login"] label, body[data-path="login"] .form-label, body[data-path="login"] .text-muted { color: var(--l-soft) !important; }
body[data-path="login"] .form-control::placeholder { color: var(--l-faint); }
body[data-path="login"] .ss-first-time { color: var(--l-soft); font-size: 14px; line-height: 1.8; }
body[data-path="login"] .ss-first-time a { font-weight: 700; }

/* Google first, then "or" */
.ss-google { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 2px; }
.ss-google-btn {
	display: flex; align-items: center; justify-content: center; gap: 12px; height: 52px; border-radius: 14px;
	background: var(--l-btn); color: var(--l-btn-text) !important; border: 1.5px solid var(--l-input-edge); font-size: 16px; font-weight: 600;
	text-decoration: none !important; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); transition: box-shadow .15s, transform .05s;
}
.ss-google-btn:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .14); }
.ss-google-btn:active { transform: scale(.985); }
.ss-google-btn svg { width: 22px; height: 22px; flex: none; }
.ss-or { display: flex; align-items: center; gap: 12px; color: var(--l-faint); font-size: 13px; }
.ss-or::before, .ss-or::after { content: ""; flex: 1; height: 1px; background: var(--l-input-edge); }

/* "no account" popup with the WhatsApp button */
.ss-pop { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
	background: rgba(8, 30, 20, .6); padding: 20px; backdrop-filter: blur(3px); }
.ss-pop-card { background: var(--l-card); border-radius: 24px; max-width: 380px; width: 100%; padding: 26px 22px 20px;
	text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.ss-pop-card h3 { margin: 0 0 8px; font-size: 20px; color: var(--l-strong); }
.ss-pop-card p { margin: 0 0 18px; color: var(--l-soft); line-height: 1.8; }
.ss-wa { display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 14px;
	background: #25d366; color: #fff !important; font-weight: 700; font-size: 16px; text-decoration: none !important;
	box-shadow: 0 6px 16px rgba(37, 211, 102, .4); }
.ss-wa svg { width: 26px; height: 26px; }
.ss-pop-close { margin-top: 12px; background: none; border: 0; color: var(--l-soft); font-size: 15px; padding: 8px 16px; }
.ss-banner { background: var(--l-warn-bg); color: var(--l-warn); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 4px; }

/* error pages: the way out (ss_web.js) */
.error-page { text-align: center; padding: 18vh 20px 40px; }
.error-page h4 { font-size: 22px; font-weight: 800; color: var(--l-strong); }
.error-page .details { color: var(--l-soft); margin: 8px 0 22px; }
.ss-error-actions { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 0 auto; }
.ss-error-actions .btn { height: 48px; border-radius: 14px; font-weight: 700; font-size: 16px; }
.ss-error-actions .btn-primary { background: #1b6b46; border-color: #1b6b46; color: #fff; }
