/* Halaman login & tamu - gaya split screen GTK Kemendikdasmen */

:root {
    --gtk-primary: #0d4d91;
    --gtk-secondary: #0ea5e9;
    --gtk-dark: #0b1f3a;
    --gtk-text: #334155;
    --gtk-muted: #8a94a6;
    --gtk-border: #e2e8f0;
    --gtk-field: #f8fafc;
    --gtk-danger: #dc2626;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gtk-text);
    background: #fff;
}

/* ── PANEL KIRI ── */
.login-split {
    position: relative;
    flex: 0 0 50%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
    overflow: hidden;
    background: linear-gradient(160deg, #0d4d91 0%, #06315c 100%);
}

.login-split::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    opacity: 0.6;
}

.login-split::after {
    content: '';
    position: absolute;
    right: -160px;
    bottom: -180px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.login-split__logos {
    position: absolute;
    z-index: 1;
    top: 7rem;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.login-split__logos img {
    height: 64px;
    width: auto;
}

.login-split__inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
    color: #fff;
}

.login-split__badge {
    display: inline-flex;
    margin-bottom: 1.75rem;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-split__inner h2 {
    margin: 0 0 0.75rem;
    font-size: 2.1rem;
    font-weight: 700;
}

.login-split__inner p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
}

.login-split__foot {
    margin-top: 3rem;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* ── PANEL KANAN ── */
.login-content {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: radial-gradient(140% 140% at 100% 0%, #f7fafc 0%, #eef4fb 55%, #e7f0fa 100%);
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 2.75rem 2.25rem 2.25rem;
    overflow: hidden;
    border: 1px solid rgba(13, 77, 145, 0.12);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 55px -28px rgba(13, 77, 145, 0.45);
    animation: login-fade-up 0.6s ease 0.05s both;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--gtk-dark) 0%, var(--gtk-secondary) 100%);
}

@keyframes login-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.login-card__logo img {
    height: 44px;
    width: auto;
    max-width: 100%;
}

.login-card h1 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    color: var(--gtk-dark);
}

.login-card__subtitle {
    margin: 0 0 1.75rem;
    font-size: 14px;
    text-align: center;
    color: var(--gtk-muted);
}

.login-alert {
    margin-bottom: 1.25rem;
    padding: 10px 14px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
    font-size: 14px;
    color: #b91c1c;
}

.login-field {
    margin-bottom: 1rem;
}

.login-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gtk-text);
}

.login-input {
    display: flex;
    border: 1px solid var(--gtk-border);
    border-radius: 12px;
    background: var(--gtk-field);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-input:focus-within {
    border-color: var(--gtk-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 77, 145, 0.12);
}

.login-input.is-invalid {
    border-color: var(--gtk-danger);
}

.login-input input {
    flex: 1;
    min-width: 0;
    padding: 11px 16px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--gtk-dark);
    outline: none;
}

.login-input input::placeholder {
    color: #a0aab8;
}

.login-toggle-pass {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 0;
    background: transparent;
    color: var(--gtk-muted);
    cursor: pointer;
}

.login-toggle-pass:hover {
    color: var(--gtk-primary);
}

.login-toggle-pass svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-error {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gtk-danger);
}

.login-turnstile {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0 0.5rem;
}

.login-turnstile+.login-error {
    text-align: center;
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 1rem;
    padding: 12px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gtk-primary) 0%, #0b6bb8 100%);
    box-shadow: 0 8px 20px -6px rgba(13, 77, 145, 0.55);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #fff;
    cursor: pointer;
    transition: filter 0.2s, transform 0.12s;
}

.login-submit:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.login-submit:focus-visible,
.login-guest:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.5);
    outline-offset: 2px;
}

.login-submit[disabled] {
    cursor: wait;
    opacity: 0.75;
    transform: none;
}

.login-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: login-spin 0.7s linear infinite;
}

.login-submit.is-loading .login-spinner {
    display: inline-block;
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.5rem 0;
    font-size: 13px;
    color: #b0b7c3;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(13, 77, 145, 0.2);
}

.login-guest {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #e3e7ee;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #33394d;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.login-guest:hover {
    border-color: var(--gtk-secondary);
    background: #f2f9fe;
    color: var(--gtk-primary);
    box-shadow: 0 10px 26px -12px rgba(14, 165, 233, 0.4);
}

.login-guest svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 991.98px) {
    .login-split {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-content {
        padding: 1.5rem 1rem;
    }

    .login-card {
        padding: 2.25rem 1.5rem 1.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .login-card,
    .login-spinner {
        animation-duration: 0.01ms;
    }
}

/* ── HALAMAN TAMU ── */
.login-card--wide {
    max-width: 520px;
}

.guest-back svg,
.guest-option svg,
.guest-search svg,
.guest-item__meta svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.guest-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 1.25rem;
    font-size: 14px;
    font-weight: 600;
    color: var(--gtk-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.guest-back:hover {
    color: var(--gtk-primary);
}

.guest-back svg {
    width: 16px;
    height: 16px;
}

.guest-badge {
    align-self: flex-start;
    margin-top: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
}

.guest-badge.is-empty {
    background: #f1f5f9;
    color: var(--gtk-muted);
}

.guest-options,
.guest-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guest-option,
.guest-item {
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e3e7ee;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.guest-option {
    padding: 16px 18px;
}

.guest-item {
    padding: 14px 16px;
}

.guest-option:hover,
.guest-item:hover {
    border-color: var(--gtk-secondary);
    background: #f2f9fe;
    box-shadow: 0 10px 26px -12px rgba(14, 165, 233, 0.4);
    transform: translateY(-1px);
}

.guest-option:focus-visible,
.guest-item:focus-visible,
.guest-back:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.5);
    outline-offset: 2px;
}

.guest-option__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(13, 77, 145, 0.1) 0%, rgba(14, 165, 233, 0.14) 100%);
    color: var(--gtk-primary);
}

.guest-option__icon svg {
    width: 24px;
    height: 24px;
}

.guest-option__body,
.guest-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guest-option__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gtk-dark);
}

.guest-option__desc {
    font-size: 14px;
    line-height: 1.45;
    color: #64748b;
}

.guest-option__arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #94a3b8;
}

.guest-search {
    align-items: center;
    margin-bottom: 12px;
    padding-left: 14px;
    color: var(--gtk-muted);
}

.guest-search svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.guest-search input {
    padding-left: 10px;
}

.guest-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.guest-list__count {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gtk-muted);
}

.guest-item__group {
    font-size: 12px;
    font-weight: 600;
    color: var(--gtk-primary);
}

.guest-item__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--gtk-dark);
}

.guest-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 13px;
    color: #64748b;
}

.guest-item__meta > span {
    display: inline-flex;
    align-items: flex-start;
    gap: 5px;
}

/* icon stays aligned with the first line when the text wraps */
.guest-item__meta svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 2px;
}

.guest-item__cta {
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gtk-primary) 0%, #0b6bb8 100%);
    box-shadow: 0 6px 14px -6px rgba(13, 77, 145, 0.55);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.guest-empty {
    padding: 28px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    text-align: center;
}

.guest-empty__title {
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--gtk-dark);
}

.guest-empty__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
}

.guest-no-result {
    margin-top: 12px;
    text-align: center;
}

@media (max-width: 480px) {

    .guest-option,
    .guest-item {
        gap: 12px;
        padding: 14px;
    }

    .guest-option__icon {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .guest-option,
    .guest-item {
        transition: none;
    }
}
