/*
 * Worbour PARTNER panel — same design system as the customer dashboard.
 * The import works because both stylesheets live one folder below the site
 * root. Path-relative url() assets stay correct through the import chain.
 */
@import url("../user/dashboard.css?v=24");

/* ============ Partner palette ============ */
.dash {
    --p-accent: #0e9f6e;          /* Worbour green — trusted, earning */
    --p-accent-deep: #0b7c56;
    --p-accent-soft: #e2f5ec;
    --p-accent-ink: #0a5c41;
}

/* Sidebar active link + brand accent */
.dash .side-link.active { color: var(--p-accent-deep); }
.dash .side-link.active .icon { stroke: var(--p-accent-deep); }
.dash .side-note .side-script { color: var(--p-accent-deep); }
.dash .side-leaf .icon { stroke: var(--p-accent-deep); }

/* Topbar identity block */
.topbar-id { min-width: 0; }
.topbar-title { font-size: 1.05rem; font-weight: 800; color: var(--ink, #1d2a32); line-height: 1.2; }
.topbar-sub { font-size: .78rem; color: var(--muted, #5b6b74); margin-top: 1px; }

/* ============ Stat cards ============ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--line, #e6e9ec);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.stat-ic {
    width: 42px; height: 42px; flex: none;
    display: grid; place-items: center;
    border-radius: 12px;
    background: var(--p-accent-soft);
}
.stat-ic .icon { width: 20px; height: 20px; stroke: var(--p-accent-deep); }
.stat-ic.tint-rose   { background: #fdeef2; } .stat-ic.tint-rose   .icon { stroke: #c2255c; }
.stat-ic.tint-blue   { background: #e7f0fe; } .stat-ic.tint-blue   .icon { stroke: #1971c2; }
.stat-ic.tint-amber  { background: #fdf3e0; } .stat-ic.tint-amber  .icon { stroke: #b7791f; }
.stat-ic.tint-violet { background: #f3eefe; } .stat-ic.tint-violet .icon { stroke: #7048e8; }
.stat-label { font-size: .78rem; color: var(--muted, #5b6b74); font-weight: 600; }
.stat-value { font-size: 1.45rem; font-weight: 800; color: var(--ink, #1d2a32); line-height: 1.15; margin-top: 2px; }
.stat-sub   { font-size: .75rem; color: var(--muted, #5b6b74); margin-top: 2px; }

/* ============ Job rows ============ */
.job-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line, #e6e9ec);
    border-radius: 14px;
    background: #fff;
}
.job-row + .job-row { margin-top: 10px; }
.job-info { flex: 1; min-width: 0; }
.job-info h3 { font-size: .95rem; font-weight: 700; color: var(--ink, #1d2a32); }
.job-meta {
    display: flex; flex-wrap: wrap; gap: 4px 14px;
    font-size: .8rem; color: var(--muted, #5b6b74);
    margin-top: 3px;
}
.job-meta .icon { width: 14px; height: 14px; vertical-align: -2px; }
.job-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.job-price { font-weight: 800; color: var(--ink, #1d2a32); font-size: .95rem; }

/* Open job (marketplace) rows */
.open-row { border-style: dashed; }

/* ============ Availability editor ============ */
.avail-days { display: flex; flex-wrap: wrap; gap: 8px; }
.avail-days label {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line, #e6e9ec);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: .85rem; font-weight: 600;
    color: var(--ink, #1d2a32);
    cursor: pointer;
    user-select: none;
}
.avail-days label:has(input:checked) {
    background: var(--p-accent-soft);
    border-color: var(--p-accent);
    color: var(--p-accent-ink);
}
.avail-days input { accent-color: var(--p-accent); margin: 0; }

.avail-legend {
    display: flex; flex-wrap: wrap; gap: 8px 16px;
    font-size: .8rem; color: var(--muted, #5b6b74);
}
.avail-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.avail-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--p-accent); }
.dot-request { background: #f59f00; }
.dot-busy { background: #adb5bd; }

/* ============ Payout form ============ */
.payout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: end;
}
.payout-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip {
    border: 1px solid var(--line, #e6e9ec);
    background: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: .82rem; font-weight: 700;
    color: var(--ink, #1d2a32);
    cursor: pointer;
}
.chip:hover { border-color: var(--p-accent); color: var(--p-accent-deep); }

/* ============ Reviews ============ */
.review-row { border-top: 1px solid var(--line, #e6e9ec); padding: 14px 0; }
.review-row:first-child { border-top: 0; padding-top: 0; }
.review-stars { color: #f59f00; font-size: .85rem; letter-spacing: 2px; }
.review-row p { font-size: .88rem; color: var(--ink, #1d2a32); margin: 6px 0 4px; }
.review-row small { color: var(--muted, #5b6b74); }

/* ============ Empty & utilities ============ */
.stat-inline { font-size: .8rem; color: var(--muted, #5b6b74); }
.muted { color: var(--muted, #5b6b74); }

/* ============ Approval gate (pending/suspended notice page) ============ */
.gate-panel { overflow: hidden; }
.gate-hero {
    padding: 30px 24px;
    text-align: center;
    background: linear-gradient(180deg, var(--p-accent-soft), transparent 75%);
    border-radius: 14px;
}
.gate-hero.is-blocked {
    background: linear-gradient(180deg, #fdeef2, transparent 75%);
}
.gate-ic {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--p-accent);
    box-shadow: 0 6px 18px rgba(14, 159, 110, .18);
}
.gate-hero.is-blocked .gate-ic { border-color: #c2255c; box-shadow: 0 6px 18px rgba(194, 37, 92, .15); }
.gate-ic .icon { width: 30px; height: 30px; stroke: var(--p-accent-deep); }
.gate-hero.is-blocked .gate-ic .icon { stroke: #c2255c; }
.gate-hero h1 { font-size: 1.5rem; font-weight: 800; color: var(--ink, #1d2a32); }
.gate-copy { max-width: 560px; margin: 10px auto 0; color: var(--muted, #5b6b74); line-height: 1.55; }

/* Progress steps */
.gate-steps {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    margin: 22px auto 0;
    padding: 0;
    max-width: 520px;
}
.gate-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}
/* connector line */
.gate-step + .gate-step::before {
    content: "";
    position: absolute;
    top: 17px;
    right: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: var(--p-accent);
    opacity: .35;
}
.gate-dot {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 800;
    background: #fff;
    border: 2px solid var(--line, #e6e9ec);
    color: var(--muted, #5b6b74);
    position: relative;
    z-index: 1;
}
.gate-dot .icon { width: 16px; height: 16px; }
.gate-step.done .gate-dot { background: var(--p-accent); border-color: var(--p-accent); }
.gate-step.done .gate-dot .icon { stroke: #fff; }
.gate-step.now .gate-dot { border-color: var(--p-accent); color: var(--p-accent-deep); }
.gate-step-label { font-size: .78rem; font-weight: 700; color: var(--muted, #5b6b74); }
.gate-step.done .gate-step-label,
.gate-step.now .gate-step-label { color: var(--p-accent-ink); }
.gate-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--p-accent);
    animation: gatePulse 1.8s ease-out infinite;
}
@keyframes gatePulse {
    0%   { transform: scale(.8); opacity: .9; }
    70%  { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .gate-pulse { animation: none; }
}

.gate-meta {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
    margin-top: 20px;
    font-size: .82rem; color: var(--muted, #5b6b74);
}
.gate-meta .icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.gate-update { margin-top: 10px; line-height: 1.45; }
.gate-update .icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* ============ Login split (reuses .auth-* classes) ============ */
.partner-accent { color: var(--p-accent-deep); }

@media (max-width: 720px) {
    .job-row { flex-wrap: wrap; }
    .job-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}

/* ================= LIVE / INCOMING REQUESTS (dispatch) =================
   Visually distinct from previously accepted jobs: tinted card, pulsing
   "New" tag, live countdown to the response deadline. */
.panel-live { border: 1px solid rgba(37, 99, 235, .35); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.panel-live .panel-head h2 { display: flex; align-items: center; gap: 8px; }
.panel-note { font-size: .78rem; color: var(--muted, #6b7280); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .55); } 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.job-row-live { background: linear-gradient(0deg, rgba(37, 99, 235, .04), rgba(37, 99, 235, .04)), var(--card, #fff); border: 1px solid rgba(37, 99, 235, .25); }
.live-tag { display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: #16a34a; padding: 2px 7px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.job-dist { color: #2563eb; font-weight: 700; }
.job-countdown { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink, #1d2a32); }
.job-countdown.is-expired { color: #dc2626; }
/* Live operations controls */
.provider-presence{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #dbe8e2}
.provider-presence p{margin:5px 0;color:#52635d}
.provider-presence small{color:#718078}
@media(max-width:700px){.provider-presence{align-items:flex-start;padding:16px;gap:12px}.provider-presence [data-online-toggle]{min-height:46px;flex:none}.dash-content{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}}

/* Provider mobile workflow: keep presence and job actions easy to reach. */
@media (max-width: 767px) {
    .dash-grid, .dash-content, .panel, .rail-card { min-width: 0; }
    .provider-presence { flex-direction: column; align-items: stretch; }
    .provider-presence > div { min-width: 0; }
    .provider-presence p, .provider-presence small { overflow-wrap: anywhere; }
    .provider-presence [data-online-toggle] { width: 100%; min-height: 48px; }
    .job-row { align-items: stretch; min-width: 0; padding: 14px; }
    .job-info, .job-side { min-width: 0; }
    .job-info h3, .job-meta { overflow-wrap: anywhere; }
    .job-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; align-items: stretch; gap: 8px; }
    .job-side > form, .job-side > a, .job-side > .btn { min-width: 0; width: 100%; }
    .job-side > form .btn { width: 100%; min-height: 44px; }
    .job-side > .job-price, .job-side > .job-countdown, .job-side > .status-badge { align-self: center; }
    .panel-head { min-width: 0; flex-wrap: wrap; }
}

/* Availability card keeps location setup secondary to the main online action. */
.provider-presence-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.provider-presence-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; background: #f1f4f2; color: #5c6a62; font-size: 11px; font-weight: 800; }
.provider-presence[data-online="1"] .provider-presence-badge { background: #e7f5ed; color: #087349; }
.provider-presence-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.provider-presence-actions .btn { min-height: 44px; }
#providerLocationStatus { display: block; margin-top: 8px; line-height: 1.4; overflow-wrap: anywhere; }

@media (max-width: 767px) {
    .provider-presence-title { justify-content: space-between; }
    .provider-presence-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); width: 100%; }
    .provider-presence-actions .btn { width: 100%; min-height: 46px; white-space: normal; }
}
