:root {
    color-scheme: dark;

    --black: #050509;
    --black-soft: #0a0a11;

    --panel: rgba(15, 15, 24, 0.82);
    --panel-solid: #101018;

    --border: rgba(255, 255, 255, 0.13);

    --white: #f8f8fb;
    --muted: #a9a9b7;

    --cyan: #34d8ff;
    --purple: #8c4dff;
    --pink: #ff27d4;

    --danger: #ff4c68;

    --radius-small: 14px;
    --radius-medium: 20px;
    --radius-large: 30px;

    --shadow:
        0 24px 80px
        rgba(0, 0, 0, 0.48);
}


* {
    box-sizing: border-box;
}


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


body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--black);
    color: var(--white);
}


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


button {
    cursor: pointer;
}


.hidden {
    display: none !important;
}


/* =========================================
   REAL MILLIONAIRE PRODUCTIONS LOGO
========================================= */

.brand-logo {
    display: block;

    object-fit: contain;

    max-width: 100%;

    height: auto;

    user-select: none;

    -webkit-user-drag: none;

    filter:
        drop-shadow(
            0 0 18px
            rgba(52, 216, 255, 0.14)
        )
        drop-shadow(
            0 0 24px
            rgba(255, 39, 212, 0.12)
        );
}


.brand-logo-large {
    width: 130px;

    margin:
        0 auto
        20px;
}


.brand-logo-login {
    width: 105px;

    margin:
        0 auto
        18px;
}


.brand-logo-header {
    width: 58px;

    flex: 0 0 auto;
}


.gift-brand-logo {
    width: 80px;

    margin:
        0 auto
        14px;
}


.brand-logo-error {
    width: 95px;

    margin:
        0 auto
        20px;
}


.brand-name {
    color: var(--white);

    font-size: 14px;
    font-weight: 800;

    letter-spacing: 0.22em;
}


/* =========================================
   LANDING PAGE
========================================= */

.landing-body {
    min-height: 100svh;

    display: grid;
    place-items: center;

    padding: 24px;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(52, 216, 255, 0.16),
            transparent 32%
        ),
        radial-gradient(
            circle at 80% 25%,
            rgba(255, 39, 212, 0.14),
            transparent 34%
        ),
        radial-gradient(
            circle at 50% 90%,
            rgba(140, 77, 255, 0.16),
            transparent 40%
        ),
        #050509;
}


.landing-shell {
    width:
        min(
            620px,
            100%
        );

    text-align: center;
}


.landing-divider {
    width: 120px;
    height: 2px;

    margin:
        30px auto;

    background:
        linear-gradient(
            90deg,
            var(--cyan),
            var(--pink)
        );

    box-shadow:
        0 0 15px
        rgba(255, 39, 212, 0.25);
}


.landing-title {
    font-size:
        clamp(
            32px,
            7vw,
            58px
        );

    font-weight: 900;

    letter-spacing: 0.05em;
}


/* =========================================
   ADMIN LOGIN
========================================= */

.admin-body {
    min-height: 100svh;

    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(52, 216, 255, 0.12),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 0%,
            rgba(255, 39, 212, 0.10),
            transparent 35%
        ),
        #050509;
}


.login-view {
    min-height: 100svh;

    display: grid;
    place-items: center;

    padding: 22px;
}


.login-card {
    width:
        min(
            460px,
            100%
        );

    padding: 34px;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-large);

    background:
        rgba(
            10,
            10,
            17,
            0.92
        );

    box-shadow:
        var(--shadow);

    text-align: center;
}


.login-card h1 {
    margin:
        30px 0;

    font-size: 28px;
}


.login-card form {
    text-align: left;
}


label {
    display: block;

    color:
        var(--muted);

    font-size: 12px;
    font-weight: 800;

    letter-spacing:
        0.14em;
}


label small {
    display: block;

    margin-top: 5px;

    color:
        #797988;

    font-size: 11px;

    letter-spacing: normal;

    font-weight: 500;
}


input,
textarea,
select {
    width: 100%;

    margin-top: 10px;

    border:
        1px solid
        var(--border);

    outline: none;

    border-radius:
        var(--radius-small);

    padding:
        15px 16px;

    background:
        rgba(
            0,
            0,
            0,
            0.34
        );

    color:
        var(--white);
}


textarea {
    resize: vertical;

    min-height: 120px;
}


input:focus,
textarea:focus,
select:focus {
    border-color:
        rgba(
            255,
            39,
            212,
            0.72
        );

    box-shadow:
        0 0 0 3px
        rgba(
            255,
            39,
            212,
            0.08
        );
}


.login-card label + label {
    margin-top: 18px;
}


.primary-button,
.secondary-button,
.small-button {
    border: 0;

    border-radius: 999px;

    color:
        var(--white);

    font-weight: 900;

    letter-spacing:
        0.04em;
}


.primary-button {
    padding:
        15px 24px;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--pink)
        );

    box-shadow:
        0 9px 30px
        rgba(
            255,
            39,
            212,
            0.18
        );
}


.secondary-button {
    padding:
        13px 20px;

    background:
        #171720;

    border:
        1px solid
        var(--border);
}


.full-button {
    width: 100%;

    margin-top: 24px;
}


button:disabled {
    opacity: 0.55;

    cursor: wait;
}


.status-message {
    min-height: 22px;

    margin-top: 18px;

    color:
        var(--cyan);

    font-size: 13px;

    line-height: 1.5;
}


.status-message.error {
    color:
        #ff7b91;
}


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

.admin-view {
    min-height: 100svh;
}


.admin-header {
    position: sticky;

    top: 0;

    z-index: 20;

    min-height: 88px;

    padding:
        18px
        clamp(
            18px,
            4vw,
            50px
        );

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    border-bottom:
        1px solid
        var(--border);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    background:
        rgba(
            5,
            5,
            9,
            0.88
        );
}


.admin-brand-wrap {
    display: flex;

    align-items: center;

    gap: 16px;
}


.admin-brand-copy {
    min-width: 0;
}


.admin-header h1 {
    margin:
        7px 0 0;

    font-size: 20px;
}


.admin-main {
    width:
        min(
            1300px,
            calc(100% - 32px)
        );

    margin:
        32px auto
        80px;
}


/* =========================================
   STATS
========================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            1fr
        );

    gap: 16px;

    margin-bottom: 24px;
}


.stat-card {
    min-height: 130px;

    padding: 22px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-medium);

    background:
        var(--panel);
}


.stat-card span {
    color:
        var(--muted);

    font-size: 11px;

    font-weight: 800;

    letter-spacing:
        0.14em;
}


.stat-card strong {
    font-size: 32px;
}


/* =========================================
   ADMIN PANELS
========================================= */

.admin-panel {
    margin-bottom: 24px;

    padding:
        clamp(
            20px,
            3vw,
            32px
        );

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-large);

    background:
        var(--panel);

    box-shadow:
        var(--shadow);
}


.panel-heading {
    margin-bottom: 28px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}


.panel-heading h2 {
    margin:
        6px 0 0;

    font-size: 27px;
}


.eyebrow {
    color:
        var(--pink);

    font-size: 11px;

    font-weight: 900;

    letter-spacing:
        0.18em;
}


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

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 20px;
}


.full-span {
    grid-column:
        1 / -1;
}


.conditional-section {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 20px;

    padding: 22px;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-medium);

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );
}


.conditional-section label:last-child {
    grid-column:
        1 / -1;
}


.existing-photo-box {
    overflow: hidden;

    min-height: 220px;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-small);

    background:
        #000;
}


.existing-photo-box img {
    width: 100%;

    height: 100%;

    max-height: 400px;

    display: block;

    object-fit: contain;
}


.toggle-row {
    display: flex;

    align-items: center;

    gap: 12px;
}


.toggle-row input {
    width: 20px;

    height: 20px;

    margin: 0;

    accent-color:
        var(--pink);
}


.form-actions {
    margin-top: 28px;

    display: flex;

    flex-wrap: wrap;

    gap: 12px;
}


.search-input {
    margin:
        0 0 22px;
}


/* =========================================
   CARD LIST
========================================= */

.cards-list {
    display: grid;

    gap: 14px;
}


.admin-card-row {
    padding: 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius-medium);

    background:
        rgba(
            255,
            255,
            255,
            0.025
        );
}


.admin-card-info {
    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 7px;
}


.admin-card-info strong {
    font-size: 16px;
}


.admin-card-info span {
    color:
        var(--muted);

    font-size: 11px;

    font-weight: 800;

    letter-spacing:
        0.1em;
}


.admin-card-info code {
    color:
        var(--cyan);

    font-size: 12px;

    overflow-wrap: anywhere;
}


.admin-card-actions {
    display: flex;

    flex-wrap: wrap;

    justify-content: flex-end;

    gap: 8px;
}


.small-button {
    padding:
        10px 14px;

    font-size: 10px;

    background:
        #191922;

    border:
        1px solid
        var(--border);
}


.danger-button {
    color:
        #ff8296;

    border-color:
        rgba(
            255,
            76,
            104,
            0.28
        );
}


.empty-state {
    padding: 28px;

    text-align: center;

    color:
        var(--muted);

    border:
        1px dashed
        var(--border);

    border-radius:
        var(--radius-medium);
}


/* =========================================
   CUSTOMER GIFT PAGE
========================================= */

.gift-body {
    min-height: 100svh;

    overflow-x: hidden;
}


.gift-body::before,
.gift-body::after {
    content: "";

    position: fixed;

    width: 430px;

    height: 430px;

    border-radius: 999px;

    filter:
        blur(100px);

    opacity: 0.24;

    pointer-events: none;
}


.gift-body::before {
    top: -180px;

    left: -170px;
}


.gift-body::after {
    right: -180px;

    bottom: -160px;
}


/* =========================================
   THEMES
========================================= */

.theme-midnight {
    background:
        radial-gradient(
            circle at 50% 0%,
            #121121,
            #050509 50%
        );
}


.theme-midnight::before {
    background:
        var(--cyan);
}


.theme-midnight::after {
    background:
        var(--pink);
}


.theme-aurora {
    background:
        radial-gradient(
            circle at 25% 10%,
            #10232d,
            transparent 42%
        ),
        radial-gradient(
            circle at 80% 20%,
            #29133b,
            transparent 44%
        ),
        #050509;
}


.theme-aurora::before {
    background:
        #19e4ff;
}


.theme-aurora::after {
    background:
        #a94eff;
}


.theme-velvet {
    background:
        radial-gradient(
            circle at 50% 0%,
            #321229,
            transparent 45%
        ),
        radial-gradient(
            circle at 50% 100%,
            #15091e,
            transparent 55%
        ),
        #070509;
}


.theme-velvet::before {
    background:
        #ff2c9e;
}


.theme-velvet::after {
    background:
        #733cff;
}


/* =========================================
   CUSTOMER PAGE STRUCTURE
========================================= */

.gift-page {
    position: relative;

    z-index: 1;

    width:
        min(
            760px,
            100%
        );

    min-height: 100svh;

    margin:
        0 auto;

    padding:
        max(
            30px,
            env(safe-area-inset-top)
        )
        20px
        max(
            34px,
            env(safe-area-inset-bottom)
        );
}


.gift-brand {
    margin-bottom: 28px;

    text-align: center;
}


.gift-brand-name {
    color:
        rgba(
            255,
            255,
            255,
            0.78
        );

    font-size: 10px;

    font-weight: 800;

    letter-spacing:
        0.22em;
}


/* =========================================
   CUSTOMER CARD
========================================= */

.gift-card {
    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.13
        );

    border-radius: 32px;

    padding:
        clamp(
            18px,
            4vw,
            34px
        );

    background:
        linear-gradient(
            145deg,
            rgba(
                255,
                255,
                255,
                0.07
            ),
            rgba(
                255,
                255,
                255,
                0.025
            )
        );

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    box-shadow:
        0 30px 90px
        rgba(
            0,
            0,
            0,
            0.48
        );
}


.gift-headline {
    margin:
        0 0 24px;

    text-align: center;

    font-size:
        clamp(
            27px,
            7vw,
            48px
        );

    line-height: 1.08;

    letter-spacing:
        -0.025em;
}


/* =========================================
   PHOTO CARD
========================================= */

.photo-frame {
    position: relative;

    overflow: hidden;

    width: 100%;

    min-height:
        min(
            68svh,
            760px
        );

    display: grid;

    place-items: center;

    border-radius: 24px;

    background:
        #040406;

    box-shadow:
        inset 0 0 0 1px
        rgba(
            255,
            255,
            255,
            0.05
        );
}


.photo-frame::before {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 1;

    pointer-events: none;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.12
        );

    border-radius: inherit;
}


.photo-frame img {
    width: 100%;

    height:
        min(
            68svh,
            760px
        );

    display: block;

    background:
        #030304;
}


.gift-caption {
    margin-top: 24px;

    padding:
        4px 8px;

    text-align: center;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

    font-size:
        clamp(
            18px,
            4.5vw,
            25px
        );

    line-height: 1.55;
}


.gift-date {
    margin-top: 24px;

    text-align: center;

    color:
        var(--muted);

    font-size: 11px;

    font-weight: 800;

    letter-spacing:
        0.16em;

    text-transform: uppercase;
}


/* =========================================
   MESSAGE CARD
========================================= */

.message-gift {
    min-height:
        min(
            72svh,
            760px
        );

    display: flex;

    flex-direction: column;

    justify-content: center;
}


.gift-message {
    padding:
        clamp(
            12px,
            3vw,
            28px
        );

    text-align: center;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            25px,
            6.5vw,
            42px
        );

    line-height: 1.52;

    color:
        #ffffff;
}


/* =========================================
   ERROR PAGE
========================================= */

.gift-error {
    width:
        min(
            500px,
            calc(
                100% - 36px
            )
        );

    min-height: 100svh;

    margin: auto;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;
}


.gift-error p {
    margin-top: 28px;

    color:
        var(--muted);
}


/* =========================================
   BUTTON EFFECTS
========================================= */

.primary-button,
.secondary-button,
.small-button {
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        opacity 0.18s ease,
        background 0.18s ease;
}


.primary-button:active,
.secondary-button:active,
.small-button:active {
    transform:
        scale(0.97);
}


.secondary-button:hover,
.small-button:hover {
    border-color:
        rgba(
            255,
            255,
            255,
            0.28
        );
}


/* =========================================
   SCROLLBAR
========================================= */

::-webkit-scrollbar {
    width: 9px;
}


::-webkit-scrollbar-track {
    background:
        #050509;
}


::-webkit-scrollbar-thumb {
    background:
        #292934;

    border-radius:
        999px;
}


::-webkit-scrollbar-thumb:hover {
    background:
        #3a3a48;
}


/* =========================================
   MOBILE
========================================= */

@media (
    max-width: 760px
) {

    .stats-grid {
        grid-template-columns:
            1fr;
    }


    .form-grid,
    .conditional-section {
        grid-template-columns:
            1fr;
    }


    .conditional-section label:last-child {
        grid-column: auto;
    }


    .admin-card-row {
        align-items: stretch;

        flex-direction: column;
    }


    .admin-card-actions {
        justify-content:
            flex-start;
    }


    .admin-header {
        align-items:
            flex-start;
    }


    .admin-header .brand-name {
        font-size:
            10px;
    }


    .admin-header h1 {
        font-size:
            17px;
    }


    .admin-brand-wrap {
        align-items:
            flex-start;
    }


    .brand-logo-header {
        width: 46px;
    }


    .admin-main {
        width:
            min(
                calc(
                    100% - 20px
                ),
                1300px
            );

        margin-top: 18px;
    }


    .admin-panel {
        padding: 18px;
    }


    .panel-heading {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .admin-card-actions {
        width: 100%;
    }


    .small-button {
        flex:
            1 1
            calc(
                50% - 8px
            );
    }


    .gift-page {
        padding-left: 14px;

        padding-right: 14px;
    }


    .gift-card {
        border-radius: 24px;

        padding: 15px;
    }


    .photo-frame {
        border-radius: 18px;
    }

}


/* =========================================
   VERY SMALL PHONES
========================================= */

@media (
    max-width: 420px
) {

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


    .brand-logo-large {
        width: 110px;
    }


    .brand-logo-login {
        width: 90px;
    }


    .login-card {
        padding: 24px;
    }


    .primary-button,
    .secondary-button {
        width: 100%;
    }


    .form-actions {
        flex-direction:
            column;
    }


    .admin-header {
        flex-direction:
            column;
    }


    .admin-header .secondary-button {
        width: auto;
    }


    .gift-brand-logo {
        width: 68px;
    }


    .gift-brand-name {
        font-size: 8px;

        letter-spacing:
            0.17em;
    }


    .gift-message {
        font-size:
            clamp(
                23px,
                7vw,
                34px
            );
    }

}
