/* =====================================================================
   PetSahabat - stylesheet dasar
   Palet hangat: oranye, hijau, krem. Mobile-first.
   File ini dipakai halaman sistem/error dan menjadi fondasi desain
   frontend pada Tahap 3.
   ===================================================================== */

:root {
    --orange: #f97316;
    --orange-dark: #ea580c;
    --orange-soft: #ffedd5;
    --green: #16a34a;
    --green-dark: #15803d;
    --green-soft: #dcfce7;
    --cream: #fff7ed;
    --cream-dark: #ffedd5;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #f1e4d4;
    --white: #ffffff;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --shadow-sm: 0 1px 2px rgba(31, 41, 55, .06);
    --shadow-md: 0 10px 30px rgba(234, 88, 12, .10);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(249, 115, 22, .12), transparent 60%),
        radial-gradient(700px 380px at -10% 10%, rgba(22, 163, 74, .09), transparent 60%),
        var(--cream);
    min-height: 100vh;
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--orange-dark);
    text-decoration: none;
}

a:hover {
    color: var(--orange);
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.25;
    margin: 0 0 .5rem;
    color: var(--ink);
}

h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); }

p { margin: 0 0 1rem; }

code {
    font-size: .9em;
    background: var(--orange-soft);
    color: var(--orange-dark);
    padding: .1em .4em;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---------------------------------------------------------------- Brand */
.brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: var(--ink);
}

.brand:hover { color: var(--ink); }

.brand img {
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__text strong {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 700;
}

.brand__text small {
    color: var(--muted);
    font-size: .74rem;
}

.brand--center {
    margin: 0 auto 2rem;
    display: flex;
    width: max-content;
}

/* ---------------------------------------------------------------- Tombol */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    padding: .65rem 1.25rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: var(--white);
    box-shadow: 0 8px 20px rgba(249, 115, 22, .28);
}

.btn--primary:hover {
    color: var(--white);
    box-shadow: 0 10px 24px rgba(249, 115, 22, .34);
}

.btn--ghost {
    background: var(--white);
    color: var(--orange-dark);
    border-color: var(--orange-soft);
}

.btn--ghost:hover {
    border-color: var(--orange);
    color: var(--orange-dark);
}

/* ---------------------------------------------------------------- Kartu */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
}

.card__title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.card__title::before {
    content: "";
    width: 6px;
    height: 1.1em;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--orange), var(--green));
}

/* ---------------------------------------------------------------- Halaman sistem */
.system-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.system-header {
    padding: 1rem 0;
}

.system-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .85rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.status-pill--ok {
    background: var(--green-soft);
    color: var(--green-dark);
}

.status-pill--warn {
    background: var(--danger-soft);
    color: var(--danger);
}

.system-main {
    flex: 1;
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.system-hero {
    max-width: 760px;
    margin-bottom: 1.75rem;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--green-dark);
    background: var(--green-soft);
    padding: .3rem .75rem;
    border-radius: 999px;
    margin-bottom: .9rem;
}

.lead {
    font-size: 1.02rem;
    color: var(--muted);
    max-width: 65ch;
}

.system-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .7rem;
}

.check-list__item {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
}

.check-icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .85rem;
    margin-top: .1rem;
}

.check-icon--ok { background: var(--green-soft); color: var(--green-dark); }
.check-icon--bad { background: var(--danger-soft); color: var(--danger); }

.check-list__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.check-list__label {
    font-weight: 700;
    font-size: .94rem;
}

.check-list__value {
    color: var(--muted);
    font-size: .84rem;
    overflow-wrap: anywhere;
}

.next-steps {
    margin: 0 0 1.25rem;
    padding-left: 1.2rem;
    display: grid;
    gap: .55rem;
    color: var(--muted);
}

.next-steps strong { color: var(--ink); }

.system-next__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: .8rem;
}

.hint {
    font-size: .82rem;
    color: var(--muted);
    margin: 0;
}

.system-footer {
    padding: 1.4rem 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .83rem;
}

.system-footer p { margin: 0; }

/* ---------------------------------------------------------------- Halaman error */
.error-page {
    display: grid;
    place-items: center;
    padding: 2rem 0;
}

.error-main {
    width: 100%;
    max-width: 640px;
}

.error-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.error-code {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: clamp(2.6rem, 2rem + 4vw, 4.2rem);
    line-height: 1;
    background: linear-gradient(135deg, var(--orange), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: .4rem;
}

.error-card .lead {
    margin-left: auto;
    margin-right: auto;
}

.error-detail {
    text-align: left;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-size: .76rem;
    overflow: auto;
    max-height: 260px;
    margin: 1rem 0 .5rem;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
    margin-top: 1.2rem;
}

/* ---------------------------------------------------------------- Responsif */
@media (min-width: 640px) {
    .system-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .error-card {
        padding: 2.6rem 2.4rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .system-header {
        padding: 1.4rem 0;
    }
}

/* ---------------------------------------------------------------- Aksesibilitas */
:focus-visible {
    outline: 3px solid rgba(249, 115, 22, .55);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
