:root {
    color-scheme: light;
    --lime: #e6ec55;
    --ink: #252921;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
    background: #eff1e9;
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.shell {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    width: 100%;
    max-width: 960px;
    overflow: hidden;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 24px 70px #26331c12;
}

.intro {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 560px;
    padding: 38px;
    overflow: hidden;
    background: #252c21;
    color: #fff;
}

.brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    max-width: 100%;
    text-decoration: none;
}

.brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    mix-blend-mode: screen;
}

.brand-name {
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 2px;
}

.intro-copy {
    position: relative;
    z-index: 1;
    margin: auto 0;
    padding: 46px 0;
}

h1 {
    margin: 0 0 22px;
    font-size: 42px;
    font-weight: 550;
    line-height: 1.22;
    letter-spacing: -1.4px;
}

h1 em {
    color: var(--lime);
    font-style: normal;
}

.description {
    margin: 0;
    color: #c0c8b8;
    font-size: 15px;
    line-height: 1.8;
}

.modules {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.modules span {
    padding: 8px 12px;
    border-radius: 20px;
    background: #ffffff0c;
    color: #d9dfd2;
    font-size: 11px;
}

.intro-footer {
    margin: 0;
    color: #89957e;
    font-size: 10px;
    letter-spacing: 1px;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 48px 44px 24px;
}

.form-wrap {
    width: 100%;
    max-width: 350px;
    margin: auto;
}

h2 {
    margin: 0 0 10px;
    font-size: 25px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.6px;
}

.subtitle {
    margin: 0 0 30px;
    color: #858b7e;
    font-size: 14px;
    line-height: 1.7;
}

label {
    display: block;
    margin: 20px 0 8px;
    font-size: 13px;
    font-weight: 550;
}

input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid #e1e5da;
    border-radius: 12px;
    background: #fafbf7;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}

input::placeholder { color: #a0a696; }

input:focus-visible {
    outline: 3px solid #e6ec5560;
    border-color: #a3ad60;
}

button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    margin-top: 24px;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    background: var(--lime);
    color: #293019;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

button:hover { background: #dce445; }
button span { font-size: 20px; }

button:focus-visible,
.brand:focus-visible {
    outline: 3px solid #9eac60;
    outline-offset: 4px;
}

.help {
    margin: 24px 0 0;
    color: #919888;
    text-align: center;
    font-size: 12px;
    line-height: 1.8;
}

.help strong {
    color: #59634d;
    font-weight: 550;
}

footer {
    margin-top: 36px;
    color: #a3aa9a;
    text-align: center;
    font-size: 11px;
}

.error {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff1ed;
    color: #954632;
    font-size: 13px;
    line-height: 1.7;
}

.destination {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f1f4e9;
    color: #677650;
    font-size: 12px;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .intro { padding: 30px; }
    .login-panel { padding: 40px 28px 24px; }
    h1 { font-size: 36px; }
    h2 { font-size: 23px; }
}

@media (max-width: 620px) {
    body { padding: 20px 14px; }
    .shell { display: block; border-radius: 22px; }
    .intro { min-height: 0; padding: 24px; }
    .brand img { width: 46px; height: 46px; }
    .brand-name { font-size: 20px; }
    .intro-copy { padding: 24px 0 0; }
    h1 { margin-bottom: 0; font-size: 29px; }
    h1 br { display: none; }
    .description, .modules, .intro-footer { display: none; }
    .login-panel { padding: 30px 24px 22px; }
    .form-wrap { max-width: 400px; }
    h2 { font-size: 23px; }
    .subtitle { margin-bottom: 24px; }
    footer { margin-top: 28px; }
}

/* Ukuran dan proporsi yang lebih nyaman */
body {
    font-size: 16px;
    line-height: 1.6;
}

.shell {
    max-width: 1080px;
    grid-template-columns: 1fr 1fr;
}

.intro {
    min-height: 610px;
    padding: 40px;
}

.brand {
    gap: 16px;
}

.brand img {
    width: 84px;
    height: 84px;
}

.brand-name {
    font-size: 30px;
    font-weight: 750;
    letter-spacing: 2px;
}

h1 {
    font-size: 42px;
    line-height: 1.2;
    font-weight: 600;
}

.description {
    font-size: 16px;
    line-height: 1.75;
}

.modules span {
    padding: 8px 14px;
    font-size: 13px;
}

.intro-footer {
    font-size: 12px;
}

.login-panel {
    padding: 48px 44px 28px;
}

.form-wrap {
    max-width: 400px;
}

h2 {
    font-size: 28px;
    line-height: 1.35;
    font-weight: 650;
}

.subtitle {
    font-size: 16px;
}

label {
    font-size: 14px;
    font-weight: 600;
}

input {
    min-height: 54px;
    font-size: 16px;
}

button {
    min-height: 54px;
    font-size: 16px;
}

.help {
    font-size: 14px;
}

footer {
    font-size: 12px;
}

@media (max-width: 900px) {
    .intro {
        padding: 32px;
    }

    .login-panel {
        padding: 40px 32px 24px;
    }

    .brand img {
        width: 68px;
        height: 68px;
    }

    .brand-name {
        font-size: 26px;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 26px;
    }
}

@media (max-width: 620px) {
    .intro {
        min-height: 0;
        padding: 24px;
    }

    .brand {
        gap: 12px;
    }

    .brand img {
        width: 64px;
        height: 64px;
    }

    .brand-name {
        font-size: 25px;
        letter-spacing: 1.5px;
    }

    h1 {
        font-size: 30px;
    }

    .login-panel {
        padding: 30px 24px 24px;
    }

    h2 {
        font-size: 25px;
    }
}

@media (max-width: 360px) {
    .brand img {
        width: 54px;
        height: 54px;
    }

    .brand-name {
        font-size: 22px;
    }
}

/* Tema terang */
:root {
    color-scheme: light;
    --page: #eef1e8;
    --panel: #ffffff;
    --intro: #f3f5eb;
    --text: #252c20;
    --soft: #606d55;
    --border: #dce3d3;
    --field: #fafbf7;
    --accent-text: #596a16;
    --pill: #e7eddc;
    --brand-text: #28351f;
    --brand-background: #344225;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #11150f;
    --panel: #20261c;
    --intro: #192015;
    --text: #f0f3e9;
    --soft: #b3bda8;
    --border: #3c4733;
    --field: #282f22;
    --accent-text: #e6ec55;
    --pill: #2b3523;
    --brand-text: #f0f3e9;
    --brand-background: #303c25;
}

/* Su dispositivi senza una scelta salvata */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        color-scheme: dark;
        --page: #11150f;
        --panel: #20261c;
        --intro: #192015;
        --text: #f0f3e9;
        --soft: #b3bda8;
        --border: #3c4733;
        --field: #282f22;
        --accent-text: #e6ec55;
        --pill: #2b3523;
        --brand-text: #f0f3e9;
        --brand-background: #303c25;
    }
}

body {
    background: var(--page);
    color: var(--text);
    padding-top: 84px;
}

.shell {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px #00000012;
}

.intro {
    background: var(--intro);
    color: var(--text);
}

.login-panel {
    background: var(--panel);
    color: var(--text);
}

.brand {
    gap: 16px;
}

.brand img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    mix-blend-mode: normal;
    filter: url("/public/assets/logo-filter.svg#transparent-logo");
}

.brand-name {
    color: var(--brand-text);
    font-size: 30px;
}

h1, h2, label {
    color: var(--text);
}

h1 em {
    color: var(--accent-text);
}

.description,
.subtitle,
.help,
.intro-footer,
footer {
    color: var(--soft);
}

.help strong {
    color: var(--text);
}

.modules span {
    background: var(--pill);
    color: var(--text);
    font-size: 13px;
}

input {
    background: var(--field);
    border-color: var(--border);
    color: var(--text);
}

input::placeholder {
    color: var(--soft);
    opacity: 0.8;
}

.destination {
    background: var(--pill);
    color: var(--text);
}

button[type="submit"] {
    background: #e6ec55;
    color: #242c12;
}

button[type="submit"]:hover {
    background: #dce445;
}

.theme-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: auto;
    min-height: 42px;
    margin: 0;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--panel);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.theme-toggle:hover {
    background: var(--pill);
}

@media (max-width: 900px) {
    .brand img {
        width: 68px;
        height: 68px;
    }

    .brand-name {
        font-size: 26px;
    }
}

@media (max-width: 620px) {
    body {
        padding-top: 80px;
    }

    .brand img {
        width: 60px;
        height: 60px;
    }

    .brand-name {
        font-size: 25px;
    }

    .theme-toggle {
        top: 18px;
        right: 16px;
    }
}

@media (max-width: 360px) {
    .brand img {
        width: 50px;
        height: 50px;
    }

    .brand-name {
        font-size: 22px;
    }
}

/* Login sederhana: satu kartu */
body {
    padding: 88px 20px 32px;
    background: var(--page);
}

.shell {
    display: block;
    width: 100%;
    max-width: 460px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px #0000000d;
}

.intro {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 36px 28px 12px;
    background: var(--panel);
}

.intro::after,
.intro-copy,
.intro-footer {
    display: none;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
}

.brand img {
    width: 64px;
    height: 64px;
}

.brand-name {
    font-size: 27px;
    font-weight: 750;
    letter-spacing: 2px;
}

.login-panel {
    padding: 20px 36px 28px;
    background: var(--panel);
}

.form-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
}

h2 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.4px;
}

.subtitle {
    margin: 0 0 28px;
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
}

label {
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 600;
}

input {
    min-height: 52px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 16px;
}

button[type="submit"] {
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    margin-top: 26px;
    border-radius: 10px;
    font-size: 16px;
}

.help {
    margin: 22px 0 0;
    font-size: 13px;
}

footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

:root {
    --page: #f4f5f1;
    --panel: #ffffff;
    --text: #252a22;
    --soft: #697260;
    --border: #e2e6dc;
    --field: #fafbf8;
    --brand-text: #252a22;
}

:root[data-theme="dark"] {
    --page: #121510;
    --panel: #20251d;
    --text: #f1f3ed;
    --soft: #aeb7a4;
    --border: #394132;
    --field: #282e23;
    --brand-text: #f1f3ed;
}

@media (max-width: 620px) {
    body {
        padding: 80px 16px 24px;
    }

    .shell {
        max-width: 420px;
        border-radius: 20px;
    }

    .intro {
        padding: 28px 22px 12px;
    }

    .brand img {
        width: 58px;
        height: 58px;
    }

    .brand-name {
        font-size: 25px;
        letter-spacing: 1.5px;
    }

    .login-panel {
        padding: 18px 24px 24px;
    }

    h2 {
        font-size: 23px;
    }
}

@media (max-width: 360px) {
    .brand img {
        width: 48px;
        height: 48px;
    }

    .brand-name {
        font-size: 22px;
    }

    .login-panel {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Tampilkan warna logo asli */
.brand img {
    filter: none;
    mix-blend-mode: normal;
}

.brand img {
    display: block;
    width: 48px;
    height: 72px;
    flex-shrink: 0;
    object-fit: contain;
    background: transparent;
    filter: none !important;
    mix-blend-mode: normal !important;
    opacity: 1;
}

@media (max-width: 620px) {
    .brand img {
        width: 40px;
        height: 60px;
    }
}

/* Watermark logo di sisi kanan kartu */
.shell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.shell::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 50%;
    right: -140px;
    width: 280px;
    height: 425px;
    transform: translateY(-50%);
    background: url("/public/assets/paramesti-logo.svg?v=watermark1")
        center / contain no-repeat;
    opacity: 0.055;
    pointer-events: none;
}

.intro,
.login-panel {
    background: transparent;
}

@media (max-width: 620px) {
    .shell::before {
        right: -110px;
        width: 220px;
        height: 334px;
    }
}

.shell::before {
    width: 520px;
    height: 790px;
    right: -260px;
    opacity: 0.07;
}

@media (max-width: 620px) {
    .shell::before {
        width: 400px;
        height: 607px;
        right: -200px;
    }
}

/* Watermark tema terang: abu-abu lembut */
.shell::before {
    filter: grayscale(1) brightness(0);
    opacity: 0.045;
}

/* Watermark tema gelap: warna asli */
:root[data-theme="dark"] .shell::before {
    filter: none;
    opacity: 0.07;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .shell::before {
        filter: none;
        opacity: 0.07;
    }
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 54px;
}

.password-wrap .password-toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--soft);
    cursor: pointer;
}

.password-wrap .password-toggle:hover {
    background: var(--pill);
    color: var(--text);
    transform: translateY(-50%);
}

.password-toggle svg {
    display: block;
    width: 22px;
    height: 22px;
}

/* Watermark besar di dalam kartu login */
.shell::before {
    width: 800px;
    height: auto;
    aspect-ratio: 3661 / 5551;
    top: 50%;
    bottom: auto;
    right: -400px;
    transform: translateY(-50%);
    background-size: contain;
    pointer-events: none;
}

@media (max-width: 700px) {
    .shell::before {
        width: 640px;
        height: auto;
        right: -320px;
    }
}


/* Warna teks navbar seragam */
.topbar .brand,
.topbar .primary-nav > a,
.topbar .primary-nav > details > summary,
.topbar .top-actions > details > summary,
.topbar .theme-toggle {
    color: var(--text);
}

.topbar .primary-nav > a:hover,
.topbar .primary-nav > details > summary:hover {
    color: var(--gold);
}

/* Tombol tema hanya ikon */
button.theme-toggle,
button#theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

button.theme-toggle svg,
button#theme-toggle svg {
    display: block;
    width: 20px;
    height: 20px;
}

button.theme-toggle:focus-visible,
button#theme-toggle:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@media (max-width: 600px) {
    button.theme-toggle,
    button#theme-toggle {
        flex-basis: 44px;
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
    }
}

/* Login: compact card and balanced spacing */
body {
    min-height: 100svh;
    margin: 0;
    padding: 24px 16px;
    display: grid;
    place-items: center;
    font-family: Arial, sans-serif;
}

.shell {
    width: 100%;
    max-width: 420px;
    min-height: 0;
    margin: 0 auto;
    padding: 28px 30px;
    display: block;
    border-radius: 20px;
}

.shell .login-panel,
.shell .form-wrap {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.shell .brand {
    justify-content: center;
    gap: 12px;
    margin: 0 0 24px;
    padding: 0;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: 2px;
}

.shell .brand img {
    width: 40px;
    height: 60px;
    object-fit: contain;
}

.shell h1,
.shell h2 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -.4px;
}

.shell .subtitle {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.65;
}

.shell label {
    margin: 16px 0 7px;
    font-size: 13px;
    line-height: 1.5;
}

.shell input[type="text"],
.shell input[type="password"] {
    min-height: 44px;
    height: 44px;
    padding: 10px 12px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 15px;
}

.shell input[autocomplete="current-password"] {
    padding-right: 48px;
}

.shell button[type="submit"] {
    width: 100%;
    min-height: 44px;
    margin-top: 22px;
    padding: 11px 16px;
    justify-content: center;
    font-family: inherit;
    font-size: 14px;
    border-radius: 9px;
}

.shell .help {
    margin: 18px 0 0;
    font-size: 12px;
    line-height: 1.6;
}

.shell footer,
.shell .footer {
    margin-top: 20px;
    padding-top: 16px;
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    body {
        padding: 64px 16px 24px;
    }

    .shell {
        padding: 26px 22px;
        border-radius: 18px;
    }

    .shell input[type="text"],
    .shell input[type="password"] {
        font-size: 16px;
    }

    .shell .brand {
        font-size: 22px;
    }
}

@media (max-height: 650px) {
    body {
        align-items: start;
    }

    .shell {
        margin-top: 24px;
    }
}
