﻿/* ==========================================================================
   PREMIUM THEME v2 — structural redesign, not a recolor
   Fonts: Fraunces (serif, figures & headings) + Inter (sans, UI/body)
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">

   STRUCTURAL PRINCIPLES USED (this is what changed, not just color):
   1. Asymmetric corners — every surface uses a cut-corner signature
      (large radius on two diagonal corners, sharp on the other two)
      instead of one uniform border-radius on everything.
   2. Depth by edge, not by shadow — most cards read via a 1px hairline
      + a 3px accent bar on ONE side, not a soft grey shadow blob.
   3. The bottom nav is a detached floating island, not a bar glued
      to the screen edge.
   4. The balance card carries a watermark numeral + textured band —
      it's the one place doing something no other card does.
   5. Auth pages are a split panel (dark brand rail + light form),
      not a centered card floating on a gradient.
   ========================================================================== */

/* ============ Design tokens ============ */
:root {
    --ink: #10182b;
    --ink-soft: #2c3550;
    --porcelain: #f6f4ef;
    --card: #ffffff;
    --gold: #b8935a;
    --gold-deep: #8f6d3e;
    --emerald: #1f7a5c;
    --emerald-deep: #123f30;
    --claret: #a13d34;
    --hairline: rgba(16, 24, 43, 0.10);
    --hairline-dark: rgba(246, 244, 239, 0.14);
    --text-muted: #6b7280;
    /* asymmetric radius signature — reused deliberately, not per-component guessing */
    --cut-lg: 2rem 2rem 2rem 0.25rem;
    --cut-lg-rev: 0.25rem 2rem 2rem 2rem;
    --cut-md: 1.25rem 1.25rem 1.25rem 0.2rem;
    --cut-sm: 0.85rem 0.85rem 0.85rem 0.15rem;
    --shadow-card: 0 1px 2px rgba(16, 24, 43, 0.05);
    --shadow-raised: 0 20px 50px rgba(16, 24, 43, 0.16);
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: var(--porcelain);
    font-family: var(--font-body);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

h1, h2, h3, h4, .display-figure {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

/* ============ Buttons ============ */
.btn-primary {
    background-color: var(--ink);
    border-color: var(--ink);
    font-weight: 500;
    border-radius: var(--cut-sm);
    padding: 0.65rem 1.5rem;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

    .btn-primary:hover, .btn-primary:focus {
        background-color: var(--gold-deep);
        border-color: var(--gold-deep);
    }

    .btn-primary:active {
        transform: scale(0.98);
    }

.btn-outline-primary {
    color: var(--ink);
    border-color: var(--ink-soft);
    border-radius: var(--cut-sm);
    font-weight: 500;
}

    .btn-outline-primary:hover {
        background-color: var(--ink);
        border-color: var(--ink);
        color: #fff;
    }

.text-primary {
    color: var(--gold-deep) !important;
}

/* ============ Auth pages — split panel, not a floating centered card ============ */
.auth-page {
    min-height: 100vh;
    background: var(--ink);
    display: grid;
    grid-template-columns: 1fr;
    padding: 0;
}

@media (min-width: 860px) {
    .auth-page {
        grid-template-columns: 0.85fr 1fr;
    }
        /* left brand rail — add this markup once: <div class="auth-rail">...</div>
       if not present, the ::before below simulates a minimal version */
        .auth-page::before {
            content: "";
            display: block;
        }
}

.auth-card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    background: var(--card);
    border-radius: 0;
    box-shadow: none;
    padding: 3rem 2.25rem;
    align-self: center;
    justify-self: center;
    position: relative;
}

    /* signature accent: a single vertical gold rule instead of a top border */
    .auth-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 3rem;
        bottom: 3rem;
        width: 3px;
        background: var(--gold);
    }

    .auth-card h1, .auth-card h2 {
        font-size: 1.75rem;
        font-weight: 500;
        margin-bottom: 0.35rem;
        padding-left: 1.1rem;
    }

    .auth-card .text-muted, .auth-card p.subtitle {
        color: var(--text-muted);
        font-size: 0.92rem;
        padding-left: 1.1rem;
    }

    .auth-card form, .auth-card .form-inner {
        padding-left: 1.1rem;
    }

@media (max-width: 480px) {
    .auth-card {
        padding: 2.25rem 1.25rem;
    }
}

/* ============ App shell ============ */
.user-shell {
    min-height: 100vh;
    background: var(--porcelain);
    padding-bottom: 6.5rem;
}

.user-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border-bottom: 1px solid var(--hairline);
    padding: 1.1rem 1.5rem;
}

.user-content {
    padding: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

/* ============ Bottom navigation — floating island, detached from the edge ============ */
.bottom-nav {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    justify-content: space-around;
    background: var(--ink);
    border: 1px solid var(--hairline-dark);
    border-radius: 1.75rem;
    box-shadow: var(--shadow-raised);
    z-index: 1030;
    padding: 0.65rem 0.5rem;
    max-width: 520px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.66rem;
    font-weight: 500;
    color: rgba(246, 244, 239, 0.5);
    padding: 0.35rem 0.5rem;
    flex: 1;
    border-radius: 1.25rem;
    transition: color 0.15s ease, background 0.15s ease;
}

    .bottom-nav-item i {
        font-size: 1.15rem;
        margin-bottom: 0.2rem;
    }

a.bottom-nav-item.active {
    color: var(--ink) !important;
    background: var(--gold);
}

/* ============ Dashboard cards — vertical layout, top accent bar, icon breaks the edge ============ */
.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-top: 3px solid var(--gold);
    border-radius: var(--cut-md);
    padding: 1.25rem 1.1rem 1.1rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    height: 100%;
    color: inherit;
}

    .dashboard-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-raised);
        color: inherit;
    }

.dashboard-card-icon {
    width: 42px;
    height: 42px;
    margin-top: -1.9rem; /* breaks the top edge of the card */
    border-radius: var(--cut-sm);
    background: var(--ink);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(16, 24, 43, 0.25);
}

/* ============ Referral card — diagonal ribbon corner ============ */
.referral-card {
    background: var(--ink);
    border-radius: var(--cut-lg-rev);
    padding: 1.4rem 1.5rem;
    color: #fff;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--hairline-dark);
    position: relative;
    overflow: hidden;
}

    .referral-card::before {
        content: "";
        position: absolute;
        top: -30px;
        right: -30px;
        width: 90px;
        height: 90px;
        background: var(--gold);
        transform: rotate(45deg);
        opacity: 0.9;
    }

/* ============ Balance card — the one hero element: watermark + texture band ============ */
.balance-card {
    background: var(--emerald-deep);
    background-image: repeating-linear-gradient( 115deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 14px );
    border-radius: var(--cut-lg);
    padding: 2rem 1.75rem;
    color: #fff;
    box-shadow: var(--shadow-raised);
    position: relative;
    overflow: hidden;
}

    .balance-card::after {
        content: "$";
        font-family: var(--font-display);
        position: absolute;
        right: 0.5rem;
        bottom: -1.2rem;
        font-size: 8rem;
        color: rgba(255,255,255,0.06);
        line-height: 1;
        pointer-events: none;
    }

    .balance-card .balance-label {
        font-size: 0.8rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.72);
        margin-bottom: 0.4rem;
        letter-spacing: 0.02em;
    }

    .balance-card .balance-figure {
        font-family: var(--font-display);
        font-size: 2.75rem;
        font-weight: 500;
        line-height: 1;
        position: relative;
        z-index: 1;
    }

/* ============ Earning tiles — alternating baseline, numbered by position ============ */
.earning-tile {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--cut-sm);
    padding: 1.1rem 0.9rem;
    text-align: left;
    height: 100%;
    position: relative;
}

    .earning-tile:nth-child(even) {
        transform: translateY(0.6rem);
    }

    .earning-tile i {
        font-size: 1.1rem;
        color: var(--gold-deep);
        margin-bottom: 0.5rem;
        display: block;
    }

    .earning-tile .value {
        font-family: var(--font-display);
        font-size: 1.4rem;
        color: var(--ink);
        display: block;
    }

    .earning-tile .label {
        font-size: 0.72rem;
        color: var(--text-muted);
    }

/* ============ Confirm dialogs / modals ============ */
.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 43, 0.68);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}

.confirm-dialog {
    background: #fff;
    border-radius: var(--cut-lg);
    padding: 1.75rem;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 30px 70px rgba(16, 24, 43, 0.4);
    border-left: 3px solid var(--gold);
}

/* ============ Package selection cards — diagonal-cut header, ribbon for "selected" ============ */
.package-card {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: var(--cut-md);
    padding: 0;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    position: relative;
}

    .package-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-raised);
    }

    .package-card .package-header {
        background: var(--ink);
        color: #fff;
        padding: 1rem 1.4rem;
        clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
        margin-bottom: -0.5rem;
    }

    .package-card .package-body {
        padding: 1.6rem 1.4rem 1.4rem;
    }

    .package-card.selected {
        border-color: var(--gold);
        box-shadow: var(--shadow-raised);
    }

        .package-card.selected .package-header {
            background: var(--gold-deep);
        }

    .package-card .price {
        font-family: var(--font-display);
        font-size: 2rem;
        color: var(--ink);
    }

/* ============ General card / table polish ============ */
.card {
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--ink-soft);
    border-radius: var(--cut-md);
    box-shadow: var(--shadow-card);
}

.table-responsive.bg-white {
    border: 1px solid var(--hairline);
    border-radius: var(--cut-md);
    overflow: hidden;
}

.table thead th {
    background: var(--ink);
    color: rgba(246, 244, 239, 0.85);
    border-bottom: none;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.9rem 1.1rem;
}

.table tbody tr {
    border-left: 3px solid transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
}

    .table tbody tr:hover {
        border-left-color: var(--gold);
        background: rgba(184, 147, 90, 0.05);
    }

.table td, .table th {
    padding: 0.9rem 1.1rem;
    vertical-align: middle;
}

.rounded {
    border-radius: var(--cut-md) !important;
}

/* ============ Badges ============ */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: var(--cut-sm);
}

    .badge.bg-success {
        background-color: var(--emerald) !important;
    }

    .badge.bg-danger {
        background-color: var(--claret) !important;
    }

    .badge.bg-warning {
        background-color: var(--gold) !important;
        color: var(--ink) !important;
    }

/* ============ Top loading bar ============ */
.nav-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2.5px;
    width: 100%;
    z-index: 2000;
    pointer-events: none;
    background: transparent;
}

.nav-progress-bar-inner {
    height: 100%;
    width: 0%;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(184, 147, 90, 0.6);
    transition: width 0.3s ease;
}

.nav-progress-bar.loading .nav-progress-bar-inner {
    animation: nav-progress-grow 1.1s ease-in-out infinite;
}

@keyframes nav-progress-grow {
    0% {
        width: 0%;
        margin-left: 0%;
    }

    50% {
        width: 60%;
        margin-left: 20%;
    }

    100% {
        width: 0%;
        margin-left: 100%;
    }
}

/* ============ Accessibility floor ============ */
a:focus-visible, button:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
/* ==========================================================================
   Razor-extracted component styling
   Moved from inline style attributes; values intentionally preserved.
   ========================================================================== */

/* Access denied */
.access-denied-page {
    min-height: 70vh;
}

.access-denied-icon {
    font-size: 3rem;
}

/* User pages */
.fbr-image {
    max-height: 400px;
}

.channel-icon,
.contact-icon,
.auth-signup-icon,
.auth-login-icon,
.task-icon {
    font-size: 2.5rem;
}

.approval-icon,
.reward-icon,
.payment-pending-icon {
    font-size: 3rem;
}

.salary-description {
    white-space: pre-wrap;
}

/* Auth pages */
.package-selection-page {
    max-width: 960px;
    width: 100%;
}

.payment-submission-page {
    max-width: 520px;
    width: 100%;
}

/* Admin pages */
.package-edit-dialog,
.task-edit-dialog {
    max-width: 420px;
}

.fbr-settings-image {
    max-height: 180px;
}

.payment-screenshot {
    max-height: 200px;
    object-fit: cover;
}