:root {
    --bg: #f4f2ee;
    --bg-card: #ffffff;
    --bg-hover: #f8f8f8;
    --border: #e0dfdc;
    --border-bright: #d0cec9;
    --blue: #0A66C2;
    --blue-light: #e8f3fc;
    --blue-dim: rgba(10, 102, 194, 0.12);
    --green: #057642;
    --green-light: #e8f5e1;
    --danger: #cc1016;
    --text: #191919;
    --text-secondary: #404040;
    --text-muted: #666666;
    --text-light: #8c8c8c;
    --nav-h: 52px;
    --radius: 8px;
    --shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-inner {
    max-width: 1128px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.nav-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.nav-logo {
    height: 38px;
    width: 38px;
    border-radius: 6px;
    object-fit: cover;
}


.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.nav-link:hover {
    color: var(--text);
    border-color: var(--text);
    background: var(--bg-hover);
}

.nav-link.nav-signup-btn {
    color: var(--blue);
    border-color: var(--blue);
}

.nav-link.nav-signup-btn:hover {
    background: var(--blue-light);
}

/* ── Layout ── */
.page-wrap {
    max-width: 1128px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 24px) 16px 60px;
    display: grid;
    grid-template-columns: 225px 1fr 300px;
    gap: 24px;
}

@media (max-width: 1024px) {
    .page-wrap { grid-template-columns: 1fr; }
    .sidebar-left, .sidebar-right { display: none; }
}

/* ── Sidebar Left (Profile) ── */
.sidebar-left .profile-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: center;
    padding-bottom: 16px;
}

.profile-banner {
    height: 56px;
    background: linear-gradient(135deg, var(--blue) 0%, #004182 100%);
}

.profile-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #fff;
    margin-top: -32px;
    object-fit: contain;
    background: #fff;
}

.profile-card-name {
    font-size: 15px;
    font-weight: 600;
    margin-top: 8px;
    color: var(--text);
}

.profile-card-handle {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-card-stats {
    margin-top: 12px;
    padding: 12px 16px 0;
    border-top: 1px solid var(--border);
    text-align: left;
}

.profile-stat {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.profile-stat span:last-child {
    font-weight: 600;
    color: var(--blue);
}

/* ── Sidebar Right ── */
.sidebar-right .info-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}

.info-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.info-card a {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

/* ── Main Feed ── */
.main-feed {
    min-width: 0;
}

.feed-header {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.feed-header h1 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.feed-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Job Cards ── */
.jobs-feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.job-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    transition: box-shadow 0.15s;
}

.job-card:hover {
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.08);
}

.job-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.job-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.job-reward {
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
    background: var(--green-light);
    border-radius: 16px;
    padding: 3px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.job-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.job-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.job-tag {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
}

.job-completed {
    font-size: 12px;
    font-weight: 600;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-pending {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

/* ── Job Form ── */
.job-form {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-apply-btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue);
    background: transparent;
    border: 1px solid var(--blue);
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    align-self: flex-start;
    transition: all 0.15s;
}

.job-apply-btn:hover {
    background: var(--blue-light);
}

.job-form-fields {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.job-form-fields.open {
    display: flex;
}

/* ── Inputs ── */
.input {
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 1px var(--blue);
}

.input::placeholder {
    color: var(--text-light);
}

textarea.input {
    resize: vertical;
    min-height: 60px;
}

.btn-primary {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--blue);
    border: none;
    border-radius: 20px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.15s;
    align-self: flex-start;
}

.btn-primary:hover {
    background: #004182;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-ghost {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text);
}

/* ── Upload zone ── */
.upload-mini {
    border: 1px dashed var(--border-bright);
    border-radius: 6px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.upload-mini:hover {
    border-color: var(--blue);
    background: var(--blue-light);
}

.upload-mini input { display: none; }

.upload-mini-label {
    font-size: 12px;
    color: var(--text-muted);
}

.upload-mini-preview {
    max-width: 100%;
    max-height: 100px;
    border-radius: 4px;
    margin-top: 8px;
    display: none;
}

/* ── Form messages ── */
.job-form-msg {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 4px;
}

.job-form-msg.msg-ok {
    color: var(--green);
    background: var(--green-light);
}

.job-form-msg.msg-err {
    color: var(--danger);
    background: #fce8e8;
}

/* ── Submissions List ── */
.submissions-section {
    margin-top: 20px;
}

.submissions-section h2 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sub-item-info { flex: 1; min-width: 0; }

.sub-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.sub-item-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.sub-item-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 10px;
    border-radius: 12px;
}

.sub-item-status.s-pending { color: var(--text-muted); background: var(--bg); }
.sub-item-status.s-approved { color: var(--green); background: var(--green-light); }
.sub-item-status.s-declined { color: var(--danger); background: #fce8e8; }

.sub-item-tx {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 3px;
}

.sub-item-tx a { color: var(--blue); text-decoration: none; }
.sub-item-tx a:hover { text-decoration: underline; }

.submissions-empty {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

/* ── Signup Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 20px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.modal-msg {
    font-size: 12px;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
}

.modal-msg.msg-ok { color: var(--green); background: var(--green-light); }
.modal-msg.msg-err { color: var(--danger); background: #fce8e8; }

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 20px 16px;
    background: #fff;
}

.footer-inner {
    max-width: 1128px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    object-fit: contain;
}

.footer-copy {
    font-size: 11px;
    color: var(--text-light);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .page-wrap {
        grid-template-columns: 1fr;
        padding-top: calc(var(--nav-h) + 16px);
    }

    .sidebar-left, .sidebar-right { display: none; }

    .job-header { flex-direction: column; gap: 6px; }
    .sub-item { flex-direction: column; align-items: flex-start; }
}
