/* ==========================================================================
   Add On Sejoli Premium - Login OTP WhatsApp & Email
   ========================================================================== */

:root {
	--sotp-primary: #A8060C;
	--sotp-primary-dark: #830509;
	--sotp-primary-deep: #540306;
	--sotp-primary-soft: #fdf0f0;
	--sotp-accent: #BC884C;
	--sotp-accent-soft: #f2e7db;
	--sotp-ink: #2b2324;
	--sotp-muted: #7a6f6f;
	--sotp-line: #ebe3dc;
	--sotp-radius: 12px;
}

/* --------------------------------------------------------------------------
   Komponen form OTP (dipakai template bermerek, klasik, dan shortcode)
   -------------------------------------------------------------------------- */
.sotp-wrapper { text-align: left; }

.sotp-tabs {
	display: flex;
	gap: 4px;
	padding: 4px;
	margin: 0 0 18px;
	background: #f4efea;
	border-radius: 10px;
}
.sotp-tab {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 8px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--sotp-muted);
	font: inherit;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: background .2s, color .2s, box-shadow .2s;
}
.sotp-tab:hover { color: var(--sotp-primary); }
.sotp-tab[aria-selected="true"] {
	background: #fff;
	color: var(--sotp-primary);
	box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.06);
}
.sotp-tab:focus-visible { outline: 2px solid var(--sotp-accent); outline-offset: 2px; }

.sotp-panel[hidden], .sotp-step[hidden], .sotp-alert[hidden] { display: none !important; }

.sotp-label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--sotp-ink); }

.sotp-channels { display: flex; gap: 8px; }
.sotp-channel { position: relative; flex: 1; margin: 0; cursor: pointer; }
.sotp-channel input { position: absolute; opacity: 0; pointer-events: none; }
.sotp-channel span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 11px 10px;
	border: 1.5px solid var(--sotp-line);
	border-radius: 10px;
	background: #fff;
	font-weight: 700;
	color: var(--sotp-muted);
	transition: all .2s;
}
.sotp-channel:hover span { border-color: var(--sotp-accent); }
.sotp-channel input:checked + span {
	border-color: var(--sotp-primary);
	background: var(--sotp-primary-soft);
	color: var(--sotp-primary);
}
.sotp-channel--whatsapp input:checked + span { border-color: #1fa855; background: #effaf3; color: #138a43; }
.sotp-channel input:focus-visible + span { outline: 2px solid var(--sotp-accent); outline-offset: 2px; }

.sotp-info { margin: 0 0 14px; text-align: center; color: var(--sotp-ink); line-height: 1.5; }

.ui.form input.sotp-code,
input.sotp-code {
	width: 100%;
	text-align: center;
	font-size: 28px !important;
	font-weight: 800;
	letter-spacing: 12px;
	padding: 14px 8px !important;
	font-variant-numeric: tabular-nums;
}

.sotp-remember { margin: 12px 0 16px !important; font-size: 13px; color: var(--sotp-muted); }
.sotp-remember input { margin-right: 6px; vertical-align: middle; accent-color: var(--sotp-primary); }

.sotp-links { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 13px; }
.sotp-links a { color: var(--sotp-primary); font-weight: 600; }
.sotp-resend[aria-disabled="true"] { color: var(--sotp-muted) !important; pointer-events: none; cursor: default; font-weight: 400 !important; }
.sotp-timer { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--sotp-muted); }

.sotp-alert { margin: 0 0 14px !important; }

/* Tombol & fokus input mengikuti warna brand */
.sotp-wrapper .ui.teal.button,
.sotp-standalone .sotp-btn {
	background: var(--sotp-primary) !important;
	color: #fff !important;
}
.sotp-wrapper .ui.teal.button:hover,
.sotp-wrapper .ui.teal.button:focus,
.sotp-standalone .sotp-btn:hover { background: var(--sotp-primary-dark) !important; }
.sotp-wrapper .ui.form input:focus { border-color: var(--sotp-accent) !important; }

/* --------------------------------------------------------------------------
   Shortcode di luar member area (tanpa Semantic UI)
   -------------------------------------------------------------------------- */
.sotp-standalone { max-width: 420px; margin: 0 auto; }
.sotp-standalone .segment { padding: 22px; border: 1px solid var(--sotp-line); border-radius: var(--sotp-radius); background: #fff; }
.sotp-standalone .field { margin-bottom: 12px; }
.sotp-standalone input[type="text"] { width: 100%; padding: 11px 12px; border: 1px solid #d6cdc6; border-radius: 8px; box-sizing: border-box; }
.sotp-standalone .icon { display: none; }
.sotp-standalone .sotp-btn { width: 100%; padding: 13px; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.sotp-standalone .sotp-btn[disabled] { opacity: .7; cursor: wait; }
.sotp-standalone .sotp-alert { padding: 10px 12px; border-radius: 8px; background: #fff6f6; color: #9f3a38; border: 1px solid #e0b4b4; }
.sotp-standalone .sotp-alert.success { background: #fcfff5; color: #2c662d; border-color: #a3c293; }

/* ==========================================================================
   Halaman login bermerek (body.sotp-branded)
   ========================================================================== */
body.sotp-branded {
	margin: 0 !important;
	padding: 0 !important;
	min-height: 100vh;
	background: #faf6f1 !important;
	color: var(--sotp-ink);
	font-family: Lato, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sotp-auth {
	display: grid;
	grid-template-columns: minmax(380px, 46%) 1fr;
	min-height: 100vh;
}

/* ---------- Panel brand (kiri) ---------- */
.sotp-brand {
	position: relative;
	overflow: hidden;
	color: #fff;
	background:
		radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,.10), transparent 55%),
		linear-gradient(155deg, var(--sotp-primary) 0%, var(--sotp-primary-dark) 55%, var(--sotp-primary-deep) 100%);
}
.sotp-brand::before {             /* foto latar opsional */
	content: "";
	position: absolute;
	inset: 0;
	background: var(--sotp-panel-bg, none) center / cover no-repeat;
	opacity: .18;
	mix-blend-mode: luminosity;
}
.sotp-brand__pattern {            /* ornamen bintang 8 sudut, memudar ke kanan bawah */
	position: absolute;
	inset: 0;
	background: var(--sotp-accent);
	opacity: .18;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.2'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='6'/%3E%3Cpath d='M0 36h16M56 36h16M36 0v16M36 56v16'/%3E%3C/g%3E%3C/svg%3E"), linear-gradient(115deg, #000 0%, transparent 80%);
	        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.2'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3Ccircle cx='36' cy='36' r='6'/%3E%3Cpath d='M0 36h16M56 36h16M36 0v16M36 56v16'/%3E%3C/g%3E%3C/svg%3E"), linear-gradient(115deg, #000 0%, transparent 80%);
	-webkit-mask-size: 72px 72px, 100% 100%;
	        mask-size: 72px 72px, 100% 100%;
	-webkit-mask-repeat: repeat, no-repeat;
	        mask-repeat: repeat, no-repeat;
	-webkit-mask-composite: source-in;
	        mask-composite: intersect;
}
.sotp-brand::after {              /* garis emas tipis di tepi kanan */
	content: "";
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, transparent, var(--sotp-accent) 20%, var(--sotp-accent) 80%, transparent);
	opacity: .9;
}

.sotp-brand__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 40px;
	height: 100%;
	box-sizing: border-box;
	padding: 48px clamp(32px, 5vw, 72px);
}
.sotp-brand__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sotp-brand__logo img { display: block; max-height: 56px; max-width: 200px; width: auto; }

.sotp-badge {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid rgba(255,255,255,.35);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--sotp-accent-soft);
	background: rgba(0,0,0,.12);
	backdrop-filter: blur(4px);
}

.sotp-brand__body { max-width: 480px; }
.sotp-brand__title {
	margin: 0 !important;
	font-family: inherit !important;
	font-size: clamp(30px, 3.3vw, 44px) !important;
	line-height: 1.15 !important;
	font-weight: 900 !important;
	color: #fff !important;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.sotp-ornament { display: flex; align-items: center; gap: 10px; margin: 22px 0; max-width: 220px; }
.sotp-ornament span { flex: 1; height: 1.5px; background: var(--sotp-accent); }
.sotp-ornament i { width: 10px; height: 10px; transform: rotate(45deg); background: var(--sotp-accent); }

.sotp-brand__tagline { margin: 0 0 28px; font-size: 17px; line-height: 1.65; color: rgba(255,255,255,.88); }

.sotp-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sotp-features li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: #fff; }
.sotp-features__icon {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 26px; height: 26px;
	border-radius: 50%;
	background: var(--sotp-accent);
	color: var(--sotp-primary-deep);
	box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}

.sotp-brand__foot { font-size: 13px; color: rgba(255,255,255,.6); }

/* ---------- Kolom form (kanan) ---------- */
.sotp-main {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	background:
		radial-gradient(60% 50% at 100% 0%, var(--sotp-accent-soft), transparent 70%),
		radial-gradient(50% 40% at 0% 100%, var(--sotp-primary-soft), transparent 70%),
		#faf6f1;
}

.sotp-card {
	width: 100%;
	max-width: 440px;
	box-sizing: border-box;
	padding: 36px 36px 28px;
	background: #fff;
	border-radius: 20px;
	border-top: 4px solid var(--sotp-primary);
	box-shadow: 0 1px 2px rgba(60,20,20,.04), 0 12px 40px -8px rgba(90,20,20,.16);
}

.sotp-card__logo { display: block; text-align: center; margin: 0 0 20px; }
.sotp-card__logo img {
	display: inline-block;
	max-width: 190px;
	max-height: 110px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.sotp-card__head { text-align: center; margin: 0 0 22px; }
.sotp-card__head h2 {
	margin: 0 0 6px !important;
	font-family: inherit !important;
	font-size: 22px !important;
	font-weight: 800 !important;
	color: var(--sotp-ink) !important;
}
.sotp-card__head p { margin: 0; color: var(--sotp-muted); font-size: 14px; }

/* Ratakan tampilan Semantic UI di dalam kartu */
.sotp-card .ui.stacked.segment {
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}
.sotp-card .ui.stacked.segment::after { display: none !important; }
.sotp-card .ui.form .field { margin-bottom: 14px; }
.sotp-card .ui.form input[type="text"],
.sotp-card .ui.form input[type="password"] {
	padding-top: 13px !important;
	padding-bottom: 13px !important;
	border: 1.5px solid var(--sotp-line) !important;
	border-radius: 10px !important;
	background: #fdfbf9 !important;
	font-size: 15px !important;
	transition: border-color .2s, box-shadow .2s, background .2s;
}
.sotp-card .ui.form input:focus {
	background: #fff !important;
	border-color: var(--sotp-accent) !important;
	box-shadow: 0 0 0 4px rgba(188,136,76,.15) !important;
}
.sotp-card .ui.left.icon.input > i.icon { color: var(--sotp-accent); opacity: .9; }
.sotp-card .ui.large.button {
	padding: 15px !important;
	border-radius: 10px !important;
	font-size: 16px !important;
	font-weight: 800 !important;
	letter-spacing: .02em;
	box-shadow: 0 8px 18px -8px var(--sotp-primary) !important;
	transition: transform .15s, background .2s, box-shadow .2s;
}
.sotp-card .ui.large.button:hover { transform: translateY(-1px); }
.sotp-card .ui.large.button:active { transform: translateY(0); }
.sotp-card .ui.message { border-radius: 10px; box-shadow: none; }

.sotp-forgot { text-align: right; margin: -4px 0 14px; font-size: 13px; }
.sotp-forgot a { color: var(--sotp-primary); font-weight: 600; }

.sotp-card__foot {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px dashed var(--sotp-line);
	text-align: center;
	font-size: 14px;
	color: var(--sotp-muted);
}
.sotp-card__foot p { margin: 0 0 6px; }
.sotp-card__foot a { color: var(--sotp-primary); }
.sotp-help { font-size: 13px; }

.sotp-secure {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 18px 0 0;
	font-size: 12px;
	color: var(--sotp-muted);
}
.sotp-secure svg { color: var(--sotp-accent); }

/* ---------- Animasi masuk ---------- */
@media (prefers-reduced-motion: no-preference) {
	.sotp-card { animation: sotp-rise .5s cubic-bezier(.2,.7,.2,1) both; }
	.sotp-brand__body > * { animation: sotp-fade .6s ease both; }
	.sotp-brand__body > *:nth-child(2) { animation-delay: .08s; }
	.sotp-brand__body > *:nth-child(3) { animation-delay: .16s; }
	.sotp-brand__body > *:nth-child(4) { animation-delay: .24s; }
}
@keyframes sotp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sotp-fade { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Tablet & ponsel ---------- */
@media (max-width: 960px) {
	.sotp-auth { grid-template-columns: 1fr; }

	.sotp-brand::after {
		top: auto; left: 0; width: auto; height: 4px;
		background: linear-gradient(90deg, transparent, var(--sotp-accent) 20%, var(--sotp-accent) 80%, transparent);
	}
	.sotp-brand__inner { padding: 28px 24px 84px; gap: 18px; text-align: center; }
	.sotp-brand__top { justify-content: center; flex-direction: column; gap: 12px; }
	.sotp-brand__body { max-width: none; }
	.sotp-brand__title { font-size: 26px !important; }
	.sotp-ornament { margin: 14px auto; max-width: 160px; }
	.sotp-brand__tagline { margin: 0; font-size: 15px; }
	.sotp-features, .sotp-brand__foot { display: none; }

	.sotp-main { justify-content: flex-start; padding: 0 16px 32px; background: #faf6f1; }
	.sotp-card { margin-top: -64px; padding: 28px 22px 22px; border-radius: 18px; }
}
@media (max-width: 380px) {
	.sotp-channels { flex-direction: column; }
	input.sotp-code, .ui.form input.sotp-code { letter-spacing: 8px; }
}
