/* 404 / upgrade-pro gate page — extracted verbatim from the inline <style> in
   application/views/home/404.tpl (home module default_404). Loaded only on the
   Next.js not-found route via <PageStyles files={['404.css']} />, mirroring the
   legacy per-page {$mod}.css convention. Do NOT move these rules into a global
   stylesheet: the reset (*{margin:0;padding:0}) and body rules are unscoped. */

body,
td,
th {
    font-family: "Be Vietnam Pro", sans-serif;
}

/* ===== CSS VARIABLES ===== */
:root {
    --red-primary: #D0202A;
    --red-dark: #B01820;
    --red-light: #F9E8E9;
    --red-medium: #F2C2C4;
    --gold: #F5A623;
    --text-dark: #1A1A2E;
    --text-body: #4A4A6A;
    --text-muted: #8888AA;
    --white: #FFFFFF;
    --bg-page: #FDF5F5;
    --border-soft: #F0DADA;
    --shadow-card: 0 4px 24px rgba(208, 32, 42, 0.08);
    --shadow-hover: 0 12px 40px rgba(208, 32, 42, 0.18);
    --radius-card: 12px;
    --radius-sm: 12px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background: var(--bg-page);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== DESKTOP HEADER (mobile nav bar) ===== */

/* ===== PAGE WRAPPER ===== */
.page_404 .page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 60px;
}

/* ===== DECORATIVE BG BLOBS ===== */
.page_404 .bg-blobs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.page_404 .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: blobFloat 8s ease-in-out infinite alternate;
}

.page_404 .blob-1 {
    width: 400px;
    height: 400px;
    background: var(--red-primary);
    top: -120px;
    right: -100px;
    animation-delay: 0s;
}

.page_404 .blob-2 {
    width: 300px;
    height: 300px;
    background: var(--gold);
    bottom: 80px;
    left: -80px;
    animation-delay: 3s;
}

.page_404 .blob-3 {
    width: 200px;
    height: 200px;
    background: var(--red-medium);
    top: 50%;
    left: 50%;
    animation-delay: 1.5s;
}

@keyframes blobFloat {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(20px, -30px) scale(1.08);
    }
}

/* ===== HERO ILLUSTRATION ===== */
.page_404 .hero-section {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.page_404 .hero-illustration {
    width: 280px;
    height: 170px;
    margin: 0 auto 24px;
    position: relative;
    animation: heroEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.85);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Browser-like card behind badge */
.page_404 .browser-card {
    width: 220px;
    height: 140px;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(208, 32, 42, 0.15);
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    border: 1.5px solid var(--border-soft);
    animation: cardPulse 4s ease-in-out infinite;
}

@keyframes cardPulse {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(208, 32, 42, 0.15);
    }

    50% {
        box-shadow: 0 12px 48px rgba(208, 32, 42, 0.28);
    }
}

.page_404 .browser-dots {
    display: flex;
    gap: 5px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-soft);
}

.page_404 .browser-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red-medium);
}

.page_404 .browser-dots span:nth-child(1) {
    background: #FF6B6B;
}

.page_404 .browser-dots span:nth-child(2) {
    background: #FFC107;
}

.page_404 .browser-dots span:nth-child(3) {
    background: #4CAF50;
}

.page_404 .browser-content {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page_404 .browser-line {
    height: 8px;
    border-radius: 4px;
    background: var(--red-light);
    animation: shimmer 2s ease-in-out infinite;
}

.page_404 .browser-line:nth-child(1) {
    width: 75%;
}


.page_404 .browser-line:nth-child(2) {
    width: 55%;
}

.page_404 .browser-line:nth-child(3) {
    width: 65%;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Buildings deco */
.page_404 .building {
    position: absolute;
    bottom: 0;
}

.page_404 .building-left {
    left: 0;
    width: 28px;
    height: 70px;
    background: var(--red-medium);
    border-radius: 4px 4px 0 0;
    opacity: 0.5;
}

.page_404 .building-right {
    right: 0;
    width: 22px;
    height: 55px;
    background: var(--red-medium);
    border-radius: 4px 4px 0 0;
    opacity: 0.4;
}

/* Stars sparkles */
.page_404 .sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--red-primary);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: sparklePop 2.5s ease-in-out infinite;
}

.page_404 .sparkle-1 {
    top: 8px;
    left: 30px;
    animation-delay: 0s;
    opacity: 0.7;
}

.page_404 .sparkle-2 {
    top: 30px;
    right: 20px;
    width: 6px;
    height: 6px;
    animation-delay: 0.8s;
    opacity: 0.5;
}

.page_404 .sparkle-3 {
    bottom: 15px;
    right: 40px;
    width: 10px;
    height: 10px;
    animation-delay: 1.6s;
    color: var(--gold);
    background: var(--gold);
}

@keyframes sparklePop {

    0%,
    100% {
        transform: scale(0.7) rotate(0deg);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2) rotate(20deg);
        opacity: 1;
    }
}

/* PRO Badge */
.page_404 .pro-badge {
    position: absolute;
    top: calc(50% - 47px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: 90px;
    height: 95px;
    z-index: 10;
    animation: badgeFloat 3s ease-in-out infinite;
}

@keyframes badgeFloat {

    0%,
    100% {
        transform: translateX(-50%) translateY(-10px);
    }

    50% {
        transform: translateX(-50%) translateY(-20px);
    }
}

.page_404 .badge-hex {
    width: 80px;
    height: 80px;
    background: linear-gradient(145deg, #E83040, #B01820);
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(176, 24, 32, 0.5);
    position: relative;
}

.page_404 .badge-hex::before {
    content: '';
    position: absolute;
    inset: 3px;
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), transparent);
}

.page_404 .crown-icon {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.badge-text-pro {
    font-size: 13px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 1px;
}

.page_404 .lock-icon {
    position: absolute;
    bottom: 0;
    right: -5px;
    font-size: 28px;
    animation: lockWiggle 4s ease-in-out infinite;
}

@keyframes lockWiggle {

    0%,
    80%,
    100% {
        transform: rotate(0deg);
    }

    85% {
        transform: rotate(-8deg);
    }

    90% {
        transform: rotate(8deg);
    }

    95% {
        transform: rotate(-4deg);
    }
}

/* ===== LABEL BADGE ===== */
.page_404 .label-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f9e8e9ad;
    color: #c80000;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 13px;
    margin-bottom: 16px;
    animation: fadeUp 0.6s 0.3s both;
    position: absolute;
    bottom: 0;
    right: 100%;
    white-space: nowrap;
    margin-right: 10px;
}

.page_404 .label-badge .crown-sm {
    font-size: 13px;
}

/* ===== HEADING ===== */
.page_404 .hero-title {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 14px;
    animation: fadeUp 0.6s 0.45s both;
}

.page_404 .hero-title .pro-word {
    color: var(--red-primary);
    position: relative;
    display: inline-block;
}

@keyframes underlineIn {
    to {
        transform: scaleX(1);
    }
}

.page_404 .hero-desc {
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
    animation: fadeUp 0.6s 0.55s both;
}

/* ===== BENEFITS GRID ===== */
.page_404 .benefits-section {
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.6s 0.65s both;
}

.benefits-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 14px;
    display: none;
    /* shown on mobile */
}

.page_404 .benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.page_404 .benefit-card {
    background: var(--white);
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius-card);
    padding: 20px 16px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    cursor: default;
    animation: cardEntrance 0.5s both;
    display: flex;
    gap: 10px
}

.page_404 .benefit-card:nth-child(1) {
    animation-delay: 0.7s;
}

.page_404 .benefit-card:nth-child(2) {
    animation-delay: 0.8s;
}

.page_404 .benefit-card:nth-child(3) {
    animation-delay: 0.9s;
}

.page_404 .benefit-card:nth-child(4) {
    animation-delay: 1.0s;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page_404 .benefit-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--red-medium);
}

.page_404 .benefit-icon-wrap {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--red-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
    transition: transform var(--transition), background var(--transition);
}

.page_404 .benefit-card:hover .benefit-icon-wrap {
    transform: scale(1.12) rotate(-5deg);
    background: var(--red-medium);
}

.page_404 .benefit-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.page_404 .benefit-desc {
    font-size: 12px;
    color: var(--text-body);
    line-height: 1.55;
}

/* ===== HOTLINE CARD ===== */
.page_404 .hotline-card {
    background: var(--white);
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius-card);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.6s 1.1s both;
    z-index: 1;
    transition: box-shadow var(--transition);
}

.page_404 .hotline-card:hover {
    box-shadow: var(--shadow-hover);
}

.page_404 .hotline-phone-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: var(--red-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    animation: phonePulse 2.5s ease-in-out infinite;
    cursor: pointer;
    transition: background var(--transition);
}

.page_404 .hotline-phone-wrap:hover {
    background: var(--red-medium);
}

@keyframes phonePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(208, 32, 42, 0.3);
    }

    50% {
        box-shadow: 0 0 0 14px rgba(208, 32, 42, 0);
    }
}

.page_404 .hotline-info {
    flex: 1;
}

.page_404 .hotline-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.page_404 .hotline-subtitle {
    font-size: 13px;
    color: var(--text-body);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page_404 .pro-tag {
    background: var(--red-primary);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.page_404 .hotline-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--red-primary);
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 4px;
}

.page_404 .hotline-hours {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: start;
    gap: 5px;
}

.page_404 .hotline-agent {
    flex-shrink: 0;
    font-size: 52px;
    animation: agentBob 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(208, 32, 42, 0.2));
}

@keyframes agentBob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ===== ACTION BUTTONS ===== */
.page_404 .actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    animation: fadeUp 0.6s 1.2s both;
    position: relative;
    z-index: 1;
}

.page_404 .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    text-decoration: none;
    font-family: inherit;
	width: 220px;
	white-space: nowrap
}

.page_404 .btn:active {
    transform: scale(0.97);
}

.page_404 .btn-outline {
    background: var(--white);
    color: var(--text-dark);
    border: 1.5px solid var(--border-soft);
}

.page_404 .btn-outline:hover {
    border-color: var(--red-medium);
    background: var(--red-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(208, 32, 42, 0.1);
}

.page_404 .btn-primary {
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    color: var(--white);
    box-shadow: 0 6px 20px rgba(208, 32, 42, 0.4);
    justify-content: center
}

.page_404 .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(208, 32, 42, 0.5);
    background: linear-gradient(135deg, #E0303A, var(--red-primary));
}

/* ===== ANIMATION HELPERS ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TABLET (≤1024px) ===== */
@media (max-width: 1024px) {
    .page_404 .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page_404 .hero-illustration {
        width: 240px;
        height: 175px;
    }

    .page_404 .hotline-agent {
        font-size: 44px;
    }
}

/* ===== MOBILE (≤640px) ===== */
@media (max-width: 640px) {
    .page_404 .mobile-header {
        display: flex;
    }

    .page_404 .page-wrapper {
        padding: 24px 16px 50px;
    }

    /* Hero */
    .page_404 .hero-illustration {
        width: 200px;
        height: 155px;
    }

    .page_404 .browser-card {
        width: 165px;
        height: 105px;
    }

    .page_404 .badge-hex {
        width: 68px;
        height: 68px;
    }

    .page_404 .crown-icon {
        font-size: 18px;
    }

    .page_404 .badge-text-pro {
        font-size: 11px;
    }

    .page_404 .lock-icon {
        font-size: 22px;
    }

    .page_404 .page_404 .hero-title {
        font-size: 22px;
    }

    .hero-desc {
        font-size: 14px;
    }

    /* Benefits */
    .page_404 .benefits-label {
        display: block;
    }

    .page_404 .benefits-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .page_404 .benefit-card {
        display: flex;
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
        padding: 0;
        border: 0;
        align-items: center;
    }

    .page_404 .benefits-section {
        padding: 30px 20px;
        background: var(--white);
        border: 1.5px solid var(--border-soft);
        border-radius: var(--radius-card);
        margin-bottom: 20px;

    }

    .page_404 .benefit-icon-wrap {
        width: 50px;
        aspect-ratio: 1/1 !important;
        height: auto;
    }

    .page_404 .benefit-icon-wrap {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .page_404 .benefit-content {
        flex: 1;
    }

    /* Hotline */
    .page_404 .hotline-card {
        padding: 18px 16px;
        gap: 14px;
        margin-bottom: 20px;
    }

    .page_404 .hotline-number {
        font-size: 20px;
    }

    .page_404 .hotline-agent {
        font-size: 40px;
        position: absolute;
        bottom: 6px;
        right: 20px;
    }

    .page_404 .hotline-title {
        font-size: 15px;
    }

    /* Buttons */
    .page_404 .actions {
        gap: 10px;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .page_404 .btn {
		width: 40%;
        justify-content: center;
        padding: 10px;
        border-radius: 8px;
        font-size: 12px;
        flex: 1 1 0;
    }

    .page_404 .pro-badge {
        top: calc(50% - 35px);
        width: 80px;
        height: 80px;
    }

    .page_404 .label-badge {
        left: 50%;
        transform: translate(-50%, 10px) !important;
        width: fit-content;
        border-radius: 16px;
        font-size: 10px;
        padding: 3px 13px;
        margin: 0;
    }

    .page_404 .hero-title,
    .page_404 .hero-desc {
        max-width: 300px;
        margin: auto;
    }

    .page_404 .hero-title {
        font-size: 20px;
    }

    .page_404 .hero-section {
        margin-bottom: 20px;
    }

    .page_404 .hotline-phone-wrap {
        width: 45px;
        height: 45px;
        margin-bottom: 30px;
    }

    .page_404 .hotline-subtitle {
        font-size: 11px;
    }

    .hotline-hours {}

    .page_404 .hotline-hours svg {
        margin-top: 2px;
    }

    .page_404 .hotline-hours {
        font-size: 11px;
    }
    .page_404 .hotline-hours {
        padding-right: 100px;
    }
}

/* ===== VERY SMALL ===== */
@media (max-width: 360px) {
    .page_404 .hero-title {
        font-size: 19px;
    }

    .page_404 .hotline-number {
        font-size: 18px;
    }

    .page_404 .hotline-agent {
        display: none;
    }
}
