:root {
    /* Biru langit cerah, merah menyala, putih polos */
    --color-sky: #36b5ff;        /* biru langit */
    --color-sky-dark: #1694ff;   /* biru lebih pekat untuk hover */
    --color-red: #ff2b3b;        /* merah menyala */
    --color-red-dark: #e01024;   /* merah lebih gelap untuk hover */

    --color-bg: #ffffff;         /* putih polos sebagai background utama */
    --color-text: #111827;
    --color-muted: #6b7280;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
    --transition-fast: 0.2s ease-out;
}

/* GLOBAL */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* NAVBAR */

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 1000;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Gradien teks: merah → biru */
.nav-logo-gradient {
    background: linear-gradient(90deg, #ff2b3b, #245eff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-logo-img {
    height: 35px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    font-size: 0.9rem;
    padding: 0.3rem 0.4rem;
    color: var(--color-muted);
    border-radius: 999px;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-text);
    background-color: rgba(148, 163, 184, 0.16);
}

.nav-button {
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, var(--color-sky), var(--color-sky-dark));
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.45);
    cursor: pointer;
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.nav-button:hover {
    box-shadow: 0 16px 38px rgba(56, 189, 248, 0.6);
    transform: translateY(-1px);
}

.nav-button-outline {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: var(--color-text);
    box-shadow: none;
}

.nav-button-outline:hover {
    border-color: var(--color-red);
    color: var(--color-red-dark);
}

.nav-username {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* Tombol Dark / Light Mode */
.nav-toggle-theme {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(92, 92, 92, 0.9);
    background: #ffffff;
    color: var(--color-text);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast),
                color var(--transition-fast),
                border-color var(--transition-fast);
}

.nav-toggle-theme:hover {
    background: var(--color-sky);
    color: #ffffff;
    border-color: var(--color-sky-dark);
}

/* HERO */

.hero-section {
    position: relative;
    min-height: 65vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    color: #ffffff;
    background: #ffffff url("../assets/img/Ilustrasi Ruang Tamu.jpg") center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(63, 63, 63, 0.7),   /* biru langit */
            rgba(112, 112, 112, 0.75)     /* merah menyala */
        );
    mix-blend-mode: multiply;
}

.hero-content {
    position: relative;
    max-width: 1120px;
    width: 100%;
    padding: 4.5rem 1.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    max-width: 18ch;
    margin-bottom: 1rem;
}

.hero-subtitle {
    max-width: 36ch;
    color: rgba(226, 232, 240, 0.95);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-sky), var(--color-sky-dark));
    color: #fff;
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.45);
}

.btn-primary:hover {
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.7);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
    color: #fff;
    box-shadow: 0 10px 28px rgba(239, 68, 68, 0.55);
}

.btn-danger:hover {
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.75);
    transform: translateY(-1px);
}

.btn-outline-light {
    border-radius: 999px;
    border: 1px solid rgba(248, 250, 252, 0.8);
    background: transparent;
    color: #f9fafb;
    padding: 0.5rem 1.2rem;
}

.btn-outline-light:hover {
    background: rgba(248, 250, 252, 0.12);
}

/* SECTIONS */

.section {
    max-width: 1120px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 3rem;
}

.section-muted {
    background: linear-gradient(to bottom, #e5f4ff, #f8fafc);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    margin-top: 2rem;
}

.section-header {
    text-align: left;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

.section-header p {
    font-size: 0.95rem;
    color: var(--color-muted);
}

/* CARDS */

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.3rem 1.2rem 1.2rem;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.card-size {
    font-size: 0.9rem;
    color: var(--color-muted);
}

.card-price {
    font-size: 1.1rem;
    font-weight: 700;
}

.card .btn-danger {
    margin-top: 0.4rem;
    align-self: flex-start;
    font-size: 0.85rem;
}

/* CALCULATOR */

.calculator-card {
    max-width: 540px;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: var(--color-text);
}

.input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
    background-color: #f9fafb;
}

.input:focus {
    border-color: var(--color-sky);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
    background-color: #fff;
}

.calculator-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.6);
    font-size: 0.9rem;
}

.calculator-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-red-dark);
}

/* ABOUT */

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.about-text p {
    font-size: 0.95rem;
    color: var(--color-muted);
}

.about-highlight {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0.05));
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.about-highlight h3 {
    margin-top: 0;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.about-highlight ul {
    padding-left: 1.1rem;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* FOOTER */

.footer {
    margin-top: 3rem;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    background: #0b1120;
    color: #e5e7eb;
}

.footer-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
    justify-content: space-between;
    font-size: 0.85rem;

    .footer-actions {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(248, 250, 252, 0.85);
    color: #0b1120;
    background: #f9fafb;
    transition: background-color 0.2s ease-out,
                color 0.2s ease-out,
                border-color 0.2s ease-out,
                box-shadow 0.2s ease-out;
}

.footer-btn:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}

/* Warna khusus WA & IG */
.footer-btn-whatsapp {
    background: #22c55e;           /* hijau modern, bukan hijau polos */
    color: #f9fafb;
    border-color: rgba(22, 163, 74, 0.9);
}

.footer-btn-whatsapp:hover {
    background: #16a34a;
}

.footer-btn-instagram {
    background: linear-gradient(135deg, #f97316, #ec4899, #6366f1);
    color: #f9fafb;
    border-color: rgba(248, 250, 252, 0.9);
}

.footer-btn-instagram:hover {
    filter: brightness(1.05);
}
}

.footer-brand h3 {
    margin: 0 0 0.25rem;
}

.footer-brand p {
    margin: 0;
    color: #9ca3af;
}

.footer-contact p {
    margin: 0;
}

.footer-copy {
    flex-basis: 100%;
    text-align: right;
    color: #6b7280;
}


/* AUTH PAGE */

.auth-body {
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.2), transparent 55%),
                linear-gradient(to bottom, #020617, #020617 35%, #020617 100%);
}

.auth-main {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 900px;
}

/* Alert pesan error / sukses */
.alert {
    margin: 0 auto 1rem;
    max-width: 420px;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    text-align: center;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.alert-success {
    background: rgba(22, 163, 74, 0.1);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

/* Kontainer utama auth (kotak putih + overlay biru) */
.auth-container {
    background: #ffffff;
    border-radius: 1.4rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.45);
    position: relative;
    overflow: hidden;
    min-height: 440px;
}

/* FORM LOGIN & REGISTER (double slider) */
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2.5rem;
    transition: transform 0.6s ease-in-out, opacity 0.4s ease-out;
}

.sign-in-container {
    left: 0;
    z-index: 2;
}

.sign-up-container {
    left: 0;
    opacity: 0;
    z-index: 1;
    transform: translateX(100%);
}

/* Saat panel register aktif */
.auth-container.right-panel-active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
}

.auth-container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
}

/* OVERLAY BIRU DI SAMPING */
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 10;
}

.auth-container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), transparent 55%),
                linear-gradient(135deg, #020617, #020617 45%, #020617 100%);
    color: #f9fafb;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-container.right-panel-active .overlay {
    transform: translateX(50%);
}

/* PANEL TEKS DI DALAM OVERLAY – TEPAT DI TENGAH */
.overlay-panel {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;      /* center kiri-kanan */
    justify-content: center;  /* center atas-bawah */
    text-align: center;
    padding: 0 2.5rem;
}

.overlay-left {
    left: 0;
    transform: none;
}

.overlay-right {
    right: 0;
    transform: none;
}

.overlay-panel h2 {
    margin: 0 0 0.75rem;
}

.overlay-panel p {
    margin: 0 0 1rem;
    max-width: 260px;
}

/* FORM DI DALAM KOTAK PUTIH */
.auth-form {
    width: 100%;
    max-width: 260px;
}

.auth-form h2 {
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
    color: #111827; /* SELALU hitam */
}

/* Pastikan di mode gelap pun tetap hitam */
body.theme-dark .auth-form h2 {
    color: #111827;
}

.auth-form .input {
    margin-bottom: 0.75rem;
}

.btn-auth {
    width: 100%;
    margin-top: 0.25rem;
}

/* ========= DARK MODE ========= */

body.theme-dark {
    --color-bg: #020617;
    --color-text: #e5e7eb;
    --color-muted: #9ca3af;

    background: var(--color-bg);
    color: var(--color-text);
}

/* Navbar di dark mode */
body.theme-dark .navbar {
    background: rgba(15, 23, 42, 0.96);
    border-bottom-color: rgba(30, 64, 175, 0.65);
}

body.theme-dark .nav-link {
    color: #9ca3af;
}

body.theme-dark .nav-link:hover {
    color: #e5e7eb;
    background-color: rgba(30, 64, 175, 0.4);
}

/* Tombol theme di dark mode */
body.theme-dark .nav-toggle-theme {
    background: transparent;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.8);
}

body.theme-dark .nav-toggle-theme:hover {
    background: #e5e7eb;
    color: #020617;
}

/* Section & card */
body.theme-dark .section {
    background-color: #020617;
}

body.theme-dark .section-muted {
    background: radial-gradient(circle at top, rgba(54, 181, 255, 0.25), rgba(2, 6, 23, 1));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

body.theme-dark .card,
body.theme-dark .calculator-card {
    background: #0b1120;
    border-color: rgba(51, 65, 85, 0.9);
    color: var(--color-text);
}

body.theme-dark .card-size,
body.theme-dark .about-text p,
body.theme-dark .about-highlight ul {
    color: var(--color-muted);
}

/* Footer tetap gradien merah-biru, cukup pastikan teks putih kontras */
body.theme-dark .footer {
    background: linear-gradient(135deg, #41080d, #043158);
    color: #ffffff;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .auth-container {
        border-radius: 1rem;
        min-height: auto;
    }

    .overlay-container {
        display: none;
    }

    .form-container,
    .sign-in-container,
    .sign-up-container {
        position: relative;
        width: 100%;
        transform: translateX(0) !important;
        opacity: 1 !important;
        padding: 1.5rem 1.4rem 1.6rem;
        border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    }

    .auth-form {
        max-width: 100%;
    }
}

@media (max-width: 960px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .overlay-panel {
        padding: 0 1.4rem;
    }

    .form-container {
        padding: 0 1.4rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-content {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding-inline: 1.1rem;
    }

    .section-muted {
        border-radius: 0;
        box-shadow: none;
        margin-top: 0;
    }

    /* Auth responsif: stack vertikal */
    .auth-container {
        border-radius: 1rem;
        min-height: auto;
    }

    .overlay-container {
        display: none;
    }

    .form-container,
    .sign-in-container,
    .sign-up-container {
        position: relative;
        width: 100%;
        transform: translateX(0) !important;
        opacity: 1 !important;
        padding: 1.5rem 1.4rem 1.6rem;
        border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    }

    .auth-container.right-panel-active .sign-in-container,
    .auth-container.right-panel-active .sign-up-container {
        transform: none;
    }

    .auth-form {
        max-width: 100%;
    }

    .auth-main {
        padding-inline: 1rem;
    }

    .footer-copy {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .nav-links {
        gap: 0.4rem;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .nav-button {
        font-size: 0.8rem;
        padding-inline: 0.75rem;
    }
}