:root {
    --petpay-orange: #ff8b1f;
    --petpay-orange-2: #ff7429;
    --petpay-coral: #ff4a5f;
    --petpay-black: #08080a;
    --petpay-white: #ffffff;
    --petpay-cream: #fff4ea;
    --petpay-input: #fff7f1;
    --petpay-text: #111827;
    --petpay-muted: #6b7280;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--petpay-black);
    color: var(--petpay-white);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* =========================================================
   AUTH BASE
========================================================= */

.petpay-auth {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #ff8b1f 0%, #ff7429 52%, #ff4a5f 100%);
}

.petpay-auth::before {
    content: "";
    position: absolute;
    inset: 56px 0 0 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.34;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cg fill='none' stroke='rgba(255,210,185,0.62)' stroke-width='14' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='104' cy='76' rx='25' ry='38'/%3E%3Cellipse cx='160' cy='58' rx='25' ry='39'/%3E%3Cellipse cx='216' cy='76' rx='25' ry='38'/%3E%3Cellipse cx='72' cy='138' rx='25' ry='37' transform='rotate(-34 72 138)'/%3E%3Cpath d='M160 116c45 0 80 29 80 68 0 36-25 45-51 60-28 15-45 34-68 34-30 0-50-23-50-56 0-50 36-106 89-106Z'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 330px 330px;
    background-position: -26px -34px;
}

.petpay-auth::after {
    content: "";
    position: absolute;
    inset: 56px 0 0 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.045), transparent 24%),
        radial-gradient(circle at 78% 70%, rgba(255, 255, 255, 0.04), transparent 22%),
        linear-gradient(90deg, rgba(255, 139, 31, 0.04), transparent 48%, rgba(255, 74, 95, 0.05));
}

/* =========================================================
   TOPBAR
========================================================= */

.petpay-auth__topbar {
    height: 56px;
    flex: 0 0 56px;
    width: 100%;
    padding: 0 22px;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #08080a;
}

.petpay-auth__back {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--petpay-white);
    font-size: 28px;
    line-height: 1;
    transition: background 0.18s ease, transform 0.18s ease;
}

.petpay-auth__back:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-2px);
}

.petpay-auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--petpay-white);
    font-weight: 950;
}

.petpay-auth__brand-mark {
    width: 29px;
    height: 29px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #101010;
    font-size: 17px;
    line-height: 1;
    font-weight: 950;
}

.petpay-auth__brand-text {
    font-size: 17px;
    line-height: 1;
    letter-spacing: -0.04em;
}

/* =========================================================
   SCREEN
========================================================= */

.petpay-auth__screen {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding: 18px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* =========================================================
   LOGIN CARD
========================================================= */

.petpay-auth__panel {
    width: min(100%, 340px);
    color: var(--petpay-white);
}

.petpay-auth__panel--login-card {
    width: min(100%, 348px);
    padding: 18px;
    border-radius: 24px;
    color: var(--petpay-white);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.075));
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.petpay-auth__intro {
    margin-bottom: 12px;
}

.petpay-auth__eyebrow {
    margin: 0 0 6px;
    font-size: 9px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

.petpay-auth__intro h1 {
    margin: 0;
    max-width: 100%;
    font-size: 25px;
    line-height: 1.04;
    letter-spacing: -0.055em;
    font-weight: 950;
}

.petpay-auth__intro p {
    margin: 8px 0 0;
    max-width: 100%;
    font-size: 11px;
    line-height: 1.34;
    color: rgba(255, 255, 255, 0.84);
}

/* =========================================================
   ALERTS
========================================================= */

.petpay-auth__alert {
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
}

.petpay-auth__alert--success {
    background: rgba(22, 163, 74, 0.20);
    border: 1px solid rgba(187, 247, 208, 0.48);
    color: #f0fdf4;
}

.petpay-auth__alert--danger {
    background: rgba(220, 38, 38, 0.20);
    border: 1px solid rgba(254, 202, 202, 0.48);
    color: #fff1f2;
}

/* =========================================================
   FORMS
========================================================= */

.petpay-auth__form {
    width: 100%;
}

.petpay-auth__group {
    min-width: 0;
    margin-bottom: 8px;
}

.petpay-auth__label {
    display: block;
    margin: 0 0 4px;
    font-size: 10px;
    line-height: 1.15;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.92);
}

.petpay-auth__field {
    width: 100%;
    height: 39px;
    border: 0;
    outline: none;
    border-radius: 11px;
    padding: 0 12px;
    background: rgba(255, 247, 241, 0.96);
    color: var(--petpay-text);
    font-size: 12px;
    box-shadow:
        inset 0 0 0 1px rgba(17, 24, 39, 0.06),
        0 10px 24px rgba(0, 0, 0, 0.06);
}

.petpay-auth__field::placeholder {
    color: #7b7f89;
}

.petpay-auth__field:focus {
    box-shadow:
        inset 0 0 0 2px #111827,
        0 12px 28px rgba(0, 0, 0, 0.14);
}

.petpay-auth__remember {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    font-size: 10px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.88);
}

.petpay-auth__remember input {
    width: 12px;
    height: 12px;
    accent-color: #111111;
}

.petpay-auth__primary {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 11px;
    background: #08080a;
    color: var(--petpay-white);
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.20);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.petpay-auth__primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
}

/* =========================================================
   SOCIAL / DIVIDERS
========================================================= */

.petpay-auth__divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
    margin: 11px 0;
    color: rgba(255, 255, 255, 0.82);
}

.petpay-auth__divider span {
    height: 1px;
    background: rgba(0, 0, 0, 0.38);
}

.petpay-auth__divider small {
    font-size: 10px;
    font-weight: 900;
}

.petpay-auth__social {
    display: grid;
    gap: 7px;
}

.petpay-auth__social-button {
    width: 100%;
    min-height: 39px;
    border: 0;
    border-radius: 11px;
    background: rgba(255, 244, 234, 0.88);
    color: #1f130d;
    font-size: 12px;
    font-weight: 950;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.07);
}

.petpay-auth__social-button span {
    font-size: 15px;
    font-weight: 950;
    line-height: 1;
}

.petpay-auth__social-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

/* =========================================================
   LEGAL / LINKS
========================================================= */

.petpay-auth__legal {
    margin: 9px 0 0;
    font-size: 8.7px;
    line-height: 1.28;
    color: rgba(255, 255, 255, 0.78);
}

.petpay-auth__links {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 10px;
    font-weight: 950;
}

.petpay-auth__links a {
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.52);
}

/* =========================================================
   WIDE REGISTER CARD
========================================================= */

.petpay-auth__panel--wide {
    width: min(100%, 455px);
    max-height: calc(100vh - 78px);
    overflow-y: auto;
    padding: 13px;
    border-radius: 20px;
    color: var(--petpay-white);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.075));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 210, 195, 0.55) transparent;
}

.petpay-auth__panel--wide::-webkit-scrollbar {
    width: 5px;
}

.petpay-auth__panel--wide::-webkit-scrollbar-track {
    background: transparent;
}

.petpay-auth__panel--wide::-webkit-scrollbar-thumb {
    background: rgba(255, 210, 195, 0.55);
    border-radius: 999px;
}

.petpay-auth__form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 9px;
}

.petpay-auth__group--full {
    grid-column: 1 / -1;
}

.petpay-auth__textarea {
    height: auto;
    min-height: 48px;
    padding-top: 9px;
    padding-bottom: 9px;
    resize: vertical;
}

.petpay-auth__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 9px 0;
}

.petpay-auth__check-card {
    min-height: 52px;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 8px 9px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 214, 195, 0.34);
    cursor: pointer;
}

.petpay-auth__check-card input {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin-top: 1px;
    accent-color: #111111;
}

.petpay-auth__check-card strong {
    display: block;
    margin-bottom: 1px;
    font-size: 10px;
    line-height: 1.15;
    font-weight: 950;
}

.petpay-auth__check-card small {
    display: block;
    font-size: 8.7px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.78);
}

/* =========================================================
   ADMIN AUTH
========================================================= */

.petpay-auth--admin::before {
    opacity: 0.25;
}

.petpay-auth__panel--admin {
    width: min(100%, 360px);
    padding: 20px;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.075));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.petpay-auth__panel--admin .petpay-auth__intro {
    margin-bottom: 16px;
}

.petpay-auth__panel--admin .petpay-auth__intro h1 {
    font-size: 30px;
}

.petpay-auth__panel--admin .petpay-auth__group {
    margin-bottom: 10px;
}

.petpay-auth__panel--admin .petpay-auth__field {
    height: 42px;
    font-size: 13px;
}

.petpay-auth__panel--admin .petpay-auth__primary {
    min-height: 42px;
    font-size: 13px;
}

/* =========================================================
   BASIC DASHBOARD FALLBACK
========================================================= */

.petpay-dashboard {
    min-height: 100vh;
    padding: 36px 18px;
    background:
        radial-gradient(circle at top left, rgba(255, 122, 24, 0.20), transparent 34%),
        #f7f4ef;
    color: #121212;
}

.petpay-dashboard__hero {
    max-width: 920px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: 0 20px 60px rgba(17, 24, 39, 0.08);
}

.petpay-eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ff6a26;
}

.petpay-dashboard__hero h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -0.05em;
}

.petpay-dashboard__hero p {
    color: #4b5563;
    line-height: 1.55;
}

.petpay-dashboard__grid {
    max-width: 920px;
    margin: 18px auto 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.petpay-dashboard-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 44px rgba(17, 24, 39, 0.08);
}

.petpay-dashboard-card__icon {
    font-size: 26px;
}

.petpay-dashboard-card h2 {
    margin: 10px 0 6px;
    font-size: 17px;
}

.petpay-dashboard-card p {
    margin: 0;
    color: #6b7280;
    line-height: 1.45;
    font-size: 13px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-height: 720px) {
    .petpay-auth__screen {
        padding: 10px;
    }

    .petpay-auth__panel--login-card {
        width: min(100%, 320px);
        padding: 14px;
        border-radius: 18px;
    }

    .petpay-auth__intro {
        margin-bottom: 8px;
    }

    .petpay-auth__intro h1 {
        font-size: 22px;
    }

    .petpay-auth__intro p {
        font-size: 10px;
    }

    .petpay-auth__field,
    .petpay-auth__social-button {
        min-height: 34px;
        height: 34px;
    }

    .petpay-auth__primary {
        min-height: 36px;
    }

    .petpay-auth__divider {
        margin: 8px 0;
    }
}

@media (max-width: 900px) {

    html,
    body {
        height: auto;
        overflow: auto;
    }

    .petpay-auth {
        height: auto;
        min-height: 100svh;
        overflow: visible;
    }

    .petpay-auth__screen {
        min-height: calc(100svh - 56px);
        padding: 14px 12px 18px;
        align-items: flex-start;
        overflow: visible;
    }

    .petpay-auth__panel--wide {
        width: min(100%, 455px);
        max-height: none;
        overflow-y: visible;
    }

    .petpay-dashboard__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .petpay-auth__topbar {
        height: 54px;
        flex: 0 0 54px;
        padding: 0 14px;
    }

    .petpay-auth::before,
    .petpay-auth::after {
        inset: 54px 0 0 0;
    }

    .petpay-auth::before {
        background-size: 240px 240px;
        background-position: -24px -20px;
        opacity: 0.32;
    }

    .petpay-auth__brand-mark {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 16px;
    }

    .petpay-auth__brand-text {
        font-size: 16px;
    }

    .petpay-auth__panel,
    .petpay-auth__panel--login-card,
    .petpay-auth__panel--wide,
    .petpay-auth__panel--admin {
        width: 100%;
    }

    .petpay-auth__panel--login-card,
    .petpay-auth__panel--admin {
        padding: 16px;
        border-radius: 20px;
    }

    .petpay-auth__panel--wide {
        padding: 14px;
        border-radius: 18px;
    }

    .petpay-auth__form-grid,
    .petpay-auth__options,
    .petpay-dashboard__grid {
        grid-template-columns: 1fr;
    }

    .petpay-auth__intro h1 {
        font-size: 24px;
    }

    .petpay-auth__field {
        height: 38px;
        font-size: 12px;
    }

    .petpay-auth__textarea {
        min-height: 58px;
    }

    .petpay-auth__primary,
    .petpay-auth__social-button {
        min-height: 39px;
        font-size: 12px;
    }

    .petpay-dashboard {
        padding: 20px 12px;
    }

    .petpay-dashboard__hero {
        padding: 20px;
    }

    .petpay-dashboard__hero h1 {
        font-size: 29px;
    }
}