/* PETRA public home — served without Vite so `php artisan serve` works without npm build */
.petra-home {
    --petra-shell-max: min(100%, 28rem);
    --petra-shell-padding: 0.75rem;
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    min-height: 100dvh;
    color: #0f172a;
    position: relative;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .petra-home {
        --petra-shell-max: min(100%, 46rem);
        --petra-shell-padding: 1rem;
    }
}

@media (min-width: 1024px) {
    .petra-home {
        --petra-shell-max: min(100%, 72rem);
        --petra-shell-padding: 1.25rem;
    }
}

.petra-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(160deg, #c7d2fe 0%, #e0e7ff 35%, #bfdbfe 100%);
}

.petra-app {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--petra-shell-max);
    margin: 0 auto;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: var(--petra-shell-padding) var(--petra-shell-padding) 1.25rem;
    box-sizing: border-box;
}

.petra-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.25rem 0.75rem;
}

.petra-icon-btn {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.55);
    color: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.petra-notify-dot {
    position: absolute;
    top: 0.4rem;
    right: 0.45rem;
    width: 0.4rem;
    height: 0.4rem;
    background: #ef4444;
    border-radius: 999px;
}

.petra-logo-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 0.5rem;
}

.petra-logo {
    max-width: 10rem;
    height: auto;
    object-fit: contain;
}

.petra-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.petra-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 4px 24px rgba(30, 64, 175, 0.1);
}

.petra-range-tabs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.petra-tab {
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #94a3b8;
    padding: 0.25rem 0;
    cursor: pointer;
}

.petra-tab.is-active {
    color: #1e3a8a;
    font-weight: 700;
}

.petra-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.petra-spot {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    color: #1e3a8a;
    letter-spacing: -0.02em;
}

.petra-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.petra-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.petra-toggle-ui {
    width: 3rem;
    height: 1.65rem;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    transition: background 0.2s;
}

.petra-toggle-ui::after {
    content: '';
    position: absolute;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #fff;
    top: 0.15rem;
    left: 0.15rem;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.petra-toggle input:checked + .petra-toggle-ui {
    background: #2563eb;
}

.petra-toggle input:checked + .petra-toggle-ui::after {
    transform: translateX(1.35rem);
}

.petra-chart-box {
    position: relative;
    height: 220px;
    margin: 0.25rem -0.25rem 0.75rem;
}

.petra-metals {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.petra-pill {
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    background: #cbd5e1;
    color: #fff;
}

.petra-pill.is-active {
    background: #1e3a8a;
}

.petra-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 0.35rem 0;
}

.petra-logout-form {
    margin: 0;
}

.petra-menu-logout {
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.petra-menu-item {
    display: block;
    text-align: center;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.petra-menu-cta {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    background: #1d4ed8;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4);
}

.petra-menu-cta:hover,
.petra-menu-item:hover {
    filter: brightness(1.05);
}

/* Dashboard: chart card + dark nav block (reference layout) */
body.petra-dashboard .petra-bg {
    background: linear-gradient(165deg, #93c5fd 0%, #bfdbfe 40%, #e0e7ff 100%);
}

.petra-dashboard-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    margin: 0 calc(-1 * var(--petra-shell-padding));
    width: calc(100% + 2 * var(--petra-shell-padding));
    max-width: none;
}

.petra-dashboard-chartcard {
    border-radius: 1.25rem 1.25rem 0 0;
    margin-bottom: 0;
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.12);
}

.petra-dashboard-navblock {
    flex: 1;
    background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 55%, #0c1428 100%);
    padding: 1.25rem var(--petra-shell-padding) 1.75rem;
    border-radius: 0 0 1.35rem 1.35rem;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.2);
}

.petra-menu--dashboard {
    padding: 0;
    gap: 0.65rem;
    max-width: 22rem;
    margin: 0 auto;
}

.petra-dashboard-navblock .petra-menu-item {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.petra-dashboard-navblock .petra-menu-item:hover {
    background: #fff;
    filter: none;
}

.petra-dashboard-navblock .petra-menu-logout {
    background: #f1f5f9;
}

.petra-dashboard-navblock .petra-menu-cta {
    margin-top: 0.75rem;
    background: rgba(59, 130, 246, 0.35);
    border: 1px solid rgba(147, 197, 253, 0.45);
    color: #f8fafc;
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.petra-dashboard-navblock .petra-menu-cta:hover {
    background: rgba(59, 130, 246, 0.5);
    filter: none;
}

.petra-pill.petra-pill--pd:not(.is-active) {
    background: #93c5fd;
    color: #fff;
}

.petra-pill.petra-pill--rh:not(.is-active) {
    background: #60a5fa;
    color: #fff;
}

.petra-pill:not(.is-active):not(.petra-pill--pd):not(.petra-pill--rh) {
    background: #cbd5e1;
    color: #fff;
}
