/* ==========================================================================
   RoyJobs — Local Jobs & Services Portal (Design System)
   Theme: "Workday" — warm, neighbourhood marketplace for casual work
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
    --bg: #eef0e9;
    --bg-soft: #f7f8f2;
    --surface: #ffffff;
    --ink: #1f2a1e;
    --text: #26311f;
    --muted: #66715e;
    --line: #e2e5d8;
    --line-strong: #ccd2c0;

    --primary: #f59e0b;
    --primary-strong: #d97706;
    --primary-soft: #fef3c7;
    --lime: #65a30d;
    --lime-strong: #4d7c0f;
    --lime-soft: #ecfccb;
    --teal: #0d9488;
    --teal-soft: #ccfbf1;
    --red: #ef4444;
    --red-soft: #fee2e2;
    --blue: #2563eb;
    --blue-soft: #dbeafe;
    --ok: #059669;
    --ok-soft: #d1fae5;

    --shadow-sm: 0 1px 2px rgba(31, 42, 30, 0.06);
    --shadow: 0 14px 38px rgba(31, 42, 30, 0.1);
    --shadow-lg: 0 30px 80px rgba(31, 42, 30, 0.22);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Sora", "Manrope", ui-sans-serif, system-ui, sans-serif;
}

/* --- Reset & base ----------------------------------------------------------- */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(52% 40% at 4% -6%, rgba(245, 158, 11, 0.13), transparent 60%),
        radial-gradient(46% 36% at 98% 0%, rgba(101, 163, 13, 0.12), transparent 58%),
        radial-gradient(40% 32% at 50% 110%, rgba(13, 148, 136, 0.06), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
    color: var(--ink);
}

h3 {
    margin: 0 0 0.6rem;
}

button {
    font: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.muted {
    color: var(--muted);
}

a {
    color: var(--teal);
}

.hidden,
[hidden] {
    display: none !important;
}

/* --- Buttons --------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 1.15rem;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    transition: 0.18s ease;
    color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--line);
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(1.03);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #fbbf24);
    color: #3a2502;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-lime {
    background: linear-gradient(135deg, var(--lime), #84cc16);
    color: #1a2e05;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(101, 163, 13, 0.35);
}

.btn-lime:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-alt {
    background: var(--ink);
    color: #fff;
    border-color: transparent;
}

.btn-ghost {
    background: transparent;
}

.btn-ghost:hover {
    background: var(--bg-soft);
}

.btn-plain {
    background: transparent;
    border-color: transparent;
    color: var(--teal);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.btn-big {
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
}

.btn-account {
    background: var(--ink);
    color: #fff;
    border-color: transparent;
}

.btn-hero {
    background: linear-gradient(135deg, var(--primary), #fbbf24);
    color: #3a2502;
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.4);
}

.btn-hero:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

/* Hero buttons sit on fixed dark hero gradients, so their colours must NOT
   follow the theme variables (--ink flips to light in dark mode). */
.btn-hero-ghost {
    background: rgba(255, 255, 255, 0.9);
    color: #16221a;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 20px rgba(31, 42, 30, 0.12);
}

.btn-hero-ghost:hover {
    background: #fff;
    color: #16221a;
    transform: translateY(-2px);
}

.btn-hero-pro {
    background: #16221a;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(31, 42, 30, 0.25);
}

.btn-hero-pro:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.btn-pro {
    background: rgba(31, 42, 30, 0.06);
    color: var(--ink);
    border: 1px solid var(--line);
    font-size: 0.82rem;
}

.btn-pro:hover {
    background: var(--ink);
    color: #fff;
}

.pro-arrow {
    font-size: 0.9em;
}

/* --- Top app bar ------------------------------------------------------------ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(226, 229, 216, 0.9);
}

.topbar-inner {
    width: min(1320px, calc(100% - 2rem));
    margin: 0 auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--lime));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.35);
}

.brand-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.12rem;
    color: var(--ink);
}

.brand-accent {
    color: var(--lime-strong);
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.account-chip {
    display: flex;
    align-items: center;
}

.account-user {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--lime-soft);
    color: var(--lime-strong);
    font-weight: 700;
    font-size: 0.85rem;
}

/* --- View switch ------------------------------------------------------------- */
.viewswitch {
    display: flex;
    gap: 0.35rem;
    background: rgba(31, 42, 30, 0.05);
    padding: 0.3rem;
    border-radius: 999px;
}

.viewswitch button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: 0.18s ease;
}

.viewswitch button.is-active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 4px 14px rgba(31, 42, 30, 0.12);
}

.vs-icon {
    font-size: 1rem;
    line-height: 1;
}

.vs-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
}

/* --- Shell & panels ---------------------------------------------------------- */
.shell {
    width: min(1320px, calc(100% - 2rem));
    margin: 1.4rem auto 3rem;
}

.panel {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* --- Hero -------------------------------------------------------------------- */
.hero {
    border-radius: var(--radius-xl);
    padding: clamp(1.6rem, 4vw, 3.2rem);
    color: #fff;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-find {
    background: linear-gradient(135deg, #2f3d2a 0%, #22301f 42%, #16221a 100%);
}

.hero-seeker {
    background: linear-gradient(135deg, #164e46 0%, #0d3f39 55%, #0a2f2b 100%);
}

.hero-lister {
    background: linear-gradient(135deg, #6b3a0a 0%, #7c4510 55%, #5c3208 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-copy {
    flex: 1 1 480px;
    max-width: 680px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.75);
}

.kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
}

.hero h1 {
    color: #fff;
    font-size: clamp(1.7rem, 3.4vw, 2.7rem);
    line-height: 1.08;
    margin: 0.8rem 0 1rem;
    max-width: 640px;
}

.hero h1 em {
    font-style: normal;
    color: #fbbf24;
}

.hero-seeker h1 em {
    color: #5eead4;
}

.hero-lister h1 em {
    color: #fcd34d;
}

.hero p {
    color: rgba(255, 255, 255, 0.82);
    max-width: 560px;
    line-height: 1.6;
    margin: 0 0 1.3rem;
}

.hero p strong {
    color: #fff;
}

.hero-cta {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.hero-trust {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
}

.trust-check {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(132, 204, 22, 0.22);
    color: #bef264;
    font-size: 0.72rem;
    font-weight: 800;
}

/* --- Hero art ----------------------------------------------------------------- */
.hero-art {
    position: relative;
    flex: 0 1 320px;
    height: 240px;
    min-width: 240px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        radial-gradient(60% 60% at 20% 18%, rgba(245, 158, 11, 0.28), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.art-sky {
    position: absolute;
    inset: 0;
}

.art-sun {
    position: absolute;
    top: 18%;
    right: 16%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fde047, #f59e0b);
    box-shadow: 0 0 42px rgba(253, 224, 71, 0.5);
}

.art-cloud {
    position: absolute;
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.art-cloud.c1 {
    width: 90px;
    top: 30%;
    left: 10%;
}

.art-cloud.c2 {
    width: 60px;
    top: 46%;
    left: 24%;
    opacity: 0.7;
}

.art-ground {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 26%;
    background: linear-gradient(180deg, rgba(132, 204, 22, 0.18), rgba(132, 204, 22, 0.08));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* tools scene */
.art-tools {
    position: absolute;
    inset: auto 0 26%;
    display: flex;
    justify-content: center;
    gap: 1.4rem;
    align-items: flex-end;
    height: 90px;
}

.art-tool {
    display: block;
    border-radius: 8px 8px 4px 4px;
    position: relative;
}

.art-tool.t-shovel {
    width: 12px;
    height: 72px;
    background: linear-gradient(#d97706, #b45309);
    border-radius: 6px;
    transform: rotate(8deg);
}

.art-tool.t-shovel::after {
    content: "";
    position: absolute;
    top: -16px;
    left: -6px;
    width: 24px;
    height: 18px;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(#a3e635, #65a30d);
}

.art-tool.t-rake {
    width: 10px;
    height: 66px;
    background: linear-gradient(#d97706, #92400e);
    border-radius: 6px;
    transform: rotate(-6deg);
}

.art-tool.t-rake::after {
    content: "";
    position: absolute;
    top: -8px;
    left: -9px;
    width: 28px;
    height: 10px;
    background: linear-gradient(#a3e635, #65a30d);
    border-radius: 4px;
}

.art-tool.t-brush {
    width: 14px;
    height: 54px;
    background: linear-gradient(#f59e0b, #d97706);
    transform: rotate(4deg);
}

.art-tool.t-brush::after {
    content: "";
    position: absolute;
    top: -12px;
    left: -3px;
    width: 20px;
    height: 14px;
    border-radius: 3px 3px 6px 6px;
    background: #fbbf24;
}

.art-tool.t-bucket {
    width: 40px;
    height: 34px;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(#2dd4bf, #0d9488);
}

.art-sign {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 0.9rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

/* alerts bell scene */
.art-bell {
    position: absolute;
    top: 26%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3.4rem;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.3));
}

.art-pulse {
    position: absolute;
    top: 26%;
    left: 50%;
    width: 70px;
    height: 70px;
    margin: -20px 0 0 -35px;
    border-radius: 50%;
    border: 2px solid rgba(94, 234, 212, 0.4);
    animation: pulse-ring 2.4s ease-out infinite;
}

.art-pulse.p2 {
    animation-delay: 1.2s;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.7);
        opacity: 1;
    }

    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

.art-card {
    position: absolute;
    bottom: 12%;
    left: 18%;
    right: 18%;
    height: 52px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.art-card::after {
    content: "New job in your area";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* notice board scene */
.art-board {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 130px;
    border-radius: 12px;
    background: linear-gradient(160deg, #b45309, #8a3c06);
    border: 6px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.art-board-note {
    position: absolute;
    width: 78px;
    height: 24px;
    border-radius: 4px;
    background: rgba(255, 251, 235, 0.92);
}

.art-board-note.n1 {
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    height: 30px;
}

.art-board-note.n2 {
    bottom: 44px;
    left: 14px;
    width: 56px;
}

.art-board-note.n3 {
    bottom: 14px;
    right: 12px;
    width: 66px;
}

/* --- Panel head ---------------------------------------------------------------- */
.panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.panel-head h2 {
    margin: 0;
    font-size: 1.5rem;
}

.panel-head p {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* --- Search / filter card ------------------------------------------------------ */
.search-card,
.box,
.upsell-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.search-card {
    padding: 1.2rem;
}

.filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    align-items: end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    min-width: 0;
}

.field span-2 {
    grid-column: span 2;
}

.field span-3 {
    grid-column: span 3;
}

.field label {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.62rem 0.8rem;
    font: inherit;
    font-size: 0.9rem;
    background: var(--bg-soft);
    color: var(--text);
    transition: 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
    background: var(--surface);
}

.field textarea {
    resize: vertical;
}

.field-hint {
    font-size: 0.74rem;
    color: var(--muted);
    margin: 0.2rem 0 0;
}

.check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

/* --- Results strip ------------------------------------------------------------- */
.results-strip {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.pill-soft {
    background: var(--lime-soft);
    border-color: transparent;
    color: var(--lime-strong);
}

.pill strong {
    color: var(--ink);
}

/* --- Listing grid & cards ------------------------------------------------------ */
.grid-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1rem;
}

.job-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: 0.2s ease;
    min-width: 0;
}

.job-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--line-strong);
}

.job-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.job-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.26rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.job-type-badge.job {
    background: var(--blue-soft);
    color: var(--blue);
}

.job-type-badge.service {
    background: var(--teal-soft);
    color: var(--teal);
}

.job-cat {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.job-card h3 {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.35;
}

.job-card-desc {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.job-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);
}

.job-pay {
    font-weight: 800;
    color: var(--lime-strong);
}

.job-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: auto;
}

.job-lister {
    font-size: 0.78rem;
    color: var(--muted);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-time {
    font-size: 0.74rem;
    color: var(--muted);
}

/* --- Boxes ---------------------------------------------------------------------- */
.box {
    padding: 1.2rem;
    min-width: 0;
}

.box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.box-head h3 {
    margin: 0;
}

.box-tools {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.6rem;
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* --- Tight list (rows) ----------------------------------------------------------- */
.tight-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
    min-width: 0;
}

.list-row-main {
    flex: 1;
    min-width: 0;
}

.list-row-title {
    font-weight: 700;
    color: var(--ink);
    font-size: 0.92rem;
}

.list-row-sub {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.15rem;
    line-height: 1.45;
}

.list-row-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.empty-note {
    padding: 1.6rem;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* --- Status & upsell cards -------------------------------------------------------- */
.status-card {
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-soft);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.status-row {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
}

.status-row span:first-child {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.badge.badge-ok {
    background: var(--ok-soft);
    color: var(--ok);
}

.badge.badge-off {
    background: var(--red-soft);
    color: var(--red);
}

.badge.badge-mid {
    background: var(--primary-soft);
    color: var(--primary-strong);
}

.upsell-card {
    padding: 1.4rem;
    background: linear-gradient(135deg, var(--primary-soft), #fff 60%);
    border-color: #fcd34d;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upsell-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.upsell-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.upsell-head h3 {
    margin: 0 0 0.3rem;
}

.upsell-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.upsell-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.upsell-note {
    font-size: 0.8rem;
    color: var(--muted);
}

/* --- Chip picker ------------------------------------------------------------------- */
.chip-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.chip {
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: 0.15s ease;
    user-select: none;
}

.chip:hover {
    border-color: var(--line-strong);
}

.chip.is-on {
    background: linear-gradient(135deg, var(--lime), #84cc16);
    color: #1a2e05;
    border-color: transparent;
    font-weight: 700;
}

/* --- Workspace (console rails) -------------------------------------------------------- */
.workspace {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1rem;
    align-items: start;
    min-width: 0;
}

.workspace-rail {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 0.6rem;
    position: sticky;
    top: 84px;
}

.workspace-rail button {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: 0.15s ease;
}

.workspace-rail button:hover {
    background: var(--bg-soft);
}

.workspace-rail button.is-active {
    background: var(--lime-soft);
    color: var(--lime-strong);
}

.rail-icon {
    width: 22px;
    text-align: center;
}

.workspace-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.tab-content {
    display: none;
}

.tab-content.is-active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- Detail modal body --------------------------------------------------------------- */
.detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.detail-head h2 {
    margin: 0.5rem 0 0;
    font-size: 1.5rem;
    line-height: 1.25;
}

.detail-section {
    margin-top: 1rem;
}

.detail-section h4 {
    margin: 0 0 0.4rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.detail-text {
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-line;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.contact-card {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--lime-soft);
    border: 1px solid #bef264;
}

.contact-card h4 {
    color: var(--lime-strong);
    margin: 0 0 0.5rem;
}

.contact-line {
    font-size: 0.9rem;
    color: var(--text);
    margin: 0.25rem 0;
}

/* --- Pay box ------------------------------------------------------------------------- */
.pay-box {
    margin: 0.8rem 0;
    padding: 1.2rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-soft), #fff);
    border: 1px solid #fcd34d;
    text-align: center;
}

.pay-amount {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.4rem;
    color: var(--ink);
}

.pay-label {
    font-size: 0.82rem;
    color: var(--muted);
}

/* --- Modals --------------------------------------------------------------------------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 1.2rem;
    background: rgba(15, 20, 14, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-card {
    width: min(520px, 100%);
    max-height: calc(100vh - 2.4rem);
    overflow-y: auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-card-sm {
    width: min(440px, 100%);
}

.modal-card-wide {
    width: min(760px, 100%);
}

.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.15s ease;
}

.modal-close:hover {
    background: var(--red-soft);
    color: var(--red);
}

.login-card {
    text-align: center;
    padding: 1rem 0 0.4rem;
}

.login-card h3 {
    margin: 0.7rem 0 0.4rem;
}

.login-icon {
    font-size: 2.6rem;
    line-height: 1;
}

.login-note {
    margin-top: 1rem;
}

.login-card .filters {
    text-align: left;
    margin-top: 1rem;
}

/* --- Notification rows ------------------------------------------------------------------ */
.notif-row {
    border-left: 3px solid var(--primary);
}

.notif-row.is-read {
    border-left-color: var(--line);
    opacity: 0.72;
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    flex: 0 0 auto;
}

/* --- Application rows --------------------------------------------------------------------- */
.app-status {
    text-transform: capitalize;
}

/* --- Responsive --------------------------------------------------------------------------- */
@media (max-width: 980px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .workspace-rail {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .workspace-rail button {
        flex: 1 1 auto;
    }

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

    .filters {
        grid-template-columns: repeat(2, 1fr);
    }

    .field span-3 {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    .topbar-inner {
        width: min(100% - 1rem, 1320px);
        gap: 0.6rem;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .viewswitch {
        width: 100%;
        justify-content: stretch;
    }

    .viewswitch button {
        flex: 1 1 auto;
        justify-content: center;
    }

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

    .field span-2,
    .field span-3 {
        grid-column: span 1;
    }

    .hero {
        padding: 1.4rem;
    }

    .hero-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-art {
        flex: 1 1 auto;
        width: 100%;
        min-height: 200px;
        height: 220px;
    }

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

    .modal-backdrop {
        padding: 0.8rem;
        align-items: end;
    }

    .modal-card {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: calc(100vh - 2rem);
    }

    .list-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* --- Dark mode --------------------------------------------------------------------------- */
html[data-bs-theme="dark"] {
    --bg: #12160f;
    --bg-soft: #1a1f16;
    --surface: #1c2118;
    --ink: #f3f5ec;
    --text: #dfe4d2;
    --muted: #9aa48b;
    --line: #2a3122;
    --line-strong: #39422f;

    --primary-soft: #4a3203;
    --lime-soft: #24320a;
    --teal-soft: #0c3530;
    --red-soft: #47110f;
    --blue-soft: #10294e;
    --ok-soft: #0b3527;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.6);
}

html[data-bs-theme="dark"] body {
    background:
        radial-gradient(52% 40% at 4% -6%, rgba(245, 158, 11, 0.1), transparent 60%),
        radial-gradient(46% 36% at 98% 0%, rgba(101, 163, 13, 0.1), transparent 58%),
        var(--bg);
}

html[data-bs-theme="dark"] .topbar {
    background: rgba(28, 33, 24, 0.8);
    border-bottom-color: rgba(42, 49, 34, 0.9);
}

html[data-bs-theme="dark"] .brand-text,
html[data-bs-theme="dark"] .panel-head h2 {
    color: var(--ink);
}

html[data-bs-theme="dark"] .viewswitch {
    background: rgba(0, 0, 0, 0.25);
}

html[data-bs-theme="dark"] .viewswitch button.is-active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

html[data-bs-theme="dark"] .btn-pro {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    border-color: var(--line);
}

html[data-bs-theme="dark"] .btn-pro:hover {
    background: var(--ink);
    color: #1c2118;
}

html[data-bs-theme="dark"] .field input,
html[data-bs-theme="dark"] .field select,
html[data-bs-theme="dark"] .field textarea {
    background: var(--bg-soft);
    color: var(--text);
    border-color: var(--line);
}

html[data-bs-theme="dark"] .field input:focus,
html[data-bs-theme="dark"] .field select:focus,
html[data-bs-theme="dark"] .field textarea:focus {
    background: var(--surface);
    border-color: var(--primary);
}

html[data-bs-theme="dark"] .upsell-card {
    background: linear-gradient(135deg, #2c240a, var(--surface) 60%);
}

html[data-bs-theme="dark"] .list-row,
html[data-bs-theme="dark"] .status-card {
    background: var(--bg-soft);
}

html[data-bs-theme="dark"] .chip.is-on {
    background: linear-gradient(135deg, var(--lime), #84cc16);
    color: #1a2e05;
}

html[data-bs-theme="dark"] .pay-box {
    background: linear-gradient(135deg, #2c240a, var(--surface));
}