:root {
    --bg: #ffffff;
    --bg-soft: #f4f4f6;
    --text: #111111;
    --text-muted: #7b7b82;
    --border: #ececef;
    --accent: #f45d3d;
    --accent-soft: #ffe7e0;
    --chip-bg: #eaf1ff;
    --chip-text: #1f5dff;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
                 "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
}

body {
    padding-bottom: 88px; /* clear of bottom nav */
    min-height: 100vh;
}

.hidden { display: none !important; }

.screen {
    padding: 12px 16px;
}

.screen-title {
    margin: 8px 4px 16px;
    font-size: 24px;
    font-weight: 700;
}

/* --- Segmented (Ur Task / Market) ----------------------------------- */

.segmented {
    flex: 1;
    display: flex;
    gap: 8px;
    background: var(--bg-soft);
    border-radius: 14px;
    padding: 4px;
}

.seg {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}

.seg-icon { font-size: 16px; }

.seg-active {
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow);
}

/* --- Filter chips --------------------------------------------------- */

.filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -16px 16px;       /* bleed to viewport edges */
    padding: 0 16px 4px;
}
.filters::-webkit-scrollbar { display: none; }

.chip-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    flex-shrink: 0;
    padding-right: 12px;
    margin-right: 12px;
    border-right: 1px solid var(--border);
}
.chip-row:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

.chip {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.chip-active {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

/* --- Gig list ------------------------------------------------------- */

.gig-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.empty {
    text-align: center;
    color: var(--text-muted);
    padding: 32px 8px;
}

.gig {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--shadow);
}

.gig-client {
    display: inline-block;
    background: var(--chip-bg);
    color: var(--chip-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.gig-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
}

.gig-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.gig-meta .row { display: flex; align-items: center; gap: 4px; }
.gig-meta .row .accent { color: var(--accent); }

.gig-accept {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.gig-accept:disabled { background: var(--text-muted); cursor: default; }

.gig-accepted-stamp {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
}

/* --- Profile -------------------------------------------------------- */

.profile-body {
    background: var(--bg-soft);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.profile-key { color: var(--text-muted); font-size: 13px; }
.profile-val { font-weight: 600; }

/* --- Bottom bar (segmented + profile icon) -------------------------- */

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}

.profile-icon-btn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 999px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 120ms ease, transform 100ms ease;
}
.profile-icon-btn:active { transform: scale(0.94); }
.profile-icon-btn.active { background: var(--accent-soft); border-color: var(--accent); }

/* --- Profile dialog ------------------------------------------------- */

.dialog {
    border: none;
    border-radius: 18px;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    width: min(92vw, 360px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
.dialog-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}
.dialog-close {
    position: absolute;
    top: 6px; right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}
.dialog-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}
