/* HumanAPI Cabinet — Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #eff6ff;
    --green: #16a34a;
    --green-bg: #dcfce7;
    --red: #ef4444;
    --red-bg: #fef2f2;
    --yellow: #f59e0b;
    --yellow-bg: #fef3c7;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg: #f0f4f8;
    --card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --nav-bg: rgba(255,255,255,0.95);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAVIGATION ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity var(--transition);
}
.nav-logo:hover { opacity: 0.8; }
.nav-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-light);
}
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}
.nav-links .logout {
    color: var(--red);
}
.nav-links .logout:hover {
    background: var(--red-bg);
}

/* Avatar placeholder */
.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform var(--transition);
}
.nav-avatar:hover { transform: scale(1.08); }

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text);
    padding: 0.25rem;
    border-radius: var(--radius-xs);
    transition: background var(--transition);
}
.hamburger:hover { background: var(--border-light); }

/* ===== MAIN CONTENT ===== */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    width: 100%;
    flex: 1;
}
.main-narrow { max-width: 640px; }
.main-medium { max-width: 800px; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { opacity: 0.5; }
.breadcrumbs .current { color: var(--text); font-weight: 500; }

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}
h1 .icon { margin-right: 0.3rem; }

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 50%, #a855f7 100%);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    color: #fff;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero h1 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}
.hero p {
    opacity: 0.85;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

/* ===== CARDS ===== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow var(--transition), transform var(--transition);
}
.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.card-title .icon {
    font-size: 1.2rem;
}

/* ===== WIDGETS ===== */
.widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.widget {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow var(--transition), transform var(--transition);
    position: relative;
    overflow: hidden;
}
.widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.widget:nth-child(1)::before { background: linear-gradient(90deg, #16a34a, #22d3ee); }
.widget:nth-child(2)::before { background: linear-gradient(90deg, var(--primary), #7c3aed); }
.widget:nth-child(3)::before { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.widget:nth-child(4)::before { background: linear-gradient(90deg, #ec4899, #8b5cf6); }

.widget-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}
.widget-icon.green { background: #dcfce7; }
.widget-icon.blue { background: #dbeafe; }
.widget-icon.orange { background: #fef3c7; }
.widget-icon.purple { background: #f3e8ff; }

.widget-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}
.widget-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}
.widget-value.balance { color: var(--green); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--green), #22c55e);
    color: #fff;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}
.btn-success:hover { box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4); transform: translateY(-1px); }

.btn-warning {
    background: linear-gradient(135deg, var(--yellow), #fb923c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.btn-warning:hover { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4); transform: translateY(-1px); }

.btn-secondary {
    background: var(--border-light);
    color: var(--text-secondary);
}
.btn-secondary:hover { background: var(--border); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-group { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }

.btn-full { width: 100%; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.2rem; }
label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}
input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
    background: var(--card);
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
input[readonly] {
    background: var(--border-light);
    color: var(--text-muted);
}
textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

.error {
    color: var(--red);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}
.error-msg { color: var(--red); font-size: 0.85rem; display: none; margin-top: 0.5rem; }
.success-msg { color: var(--green); font-size: 0.85rem; display: none; margin-top: 0.5rem; }
.saved { color: var(--green); font-size: 0.85rem; display: none; margin-left: 0.5rem; }

/* ===== TABS ===== */
.tabs {
    display: flex;
    border-radius: var(--radius-sm);
    background: var(--border-light);
    padding: 4px;
    margin-bottom: 1.5rem;
}
.tab {
    flex: 1;
    padding: 0.65rem;
    text-align: center;
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-muted);
}
.tab.active {
    background: var(--card);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.tab:hover:not(.active) { color: var(--text-secondary); }

.panel { display: none; }
.panel.active { display: block; }

/* ===== FILTERS ===== */
.filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 0.5rem 1.1rem;
    border: 1.5px solid var(--border);
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--card);
    color: var(--text-secondary);
    font-family: inherit;
    transition: all var(--transition);
}
.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.filter-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* ===== FILTER BAR (Marketplace) ===== */
.filter-bar {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: end;
    border: 1px solid rgba(0,0,0,0.04);
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0;
}
.filter-group select,
.filter-group input {
    padding: 0.55rem 0.8rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-family: inherit;
}
.btn-filter {
    padding: 0.58rem 1.3rem;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
    box-shadow: 0 2px 6px rgba(37,99,235,0.25);
    align-self: end;
}
.btn-filter:hover { box-shadow: 0 4px 10px rgba(37,99,235,0.35); }

/* ===== TASK LIST ===== */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.task-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
    cursor: pointer;
}
.task-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.15);
}
.task-info { flex: 1; min-width: 0; }
.task-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.task-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.task-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}
.task-budget {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

/* ===== TASK GRID (Marketplace) ===== */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
.task-grid-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.task-grid-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.15);
}
.task-grid-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.task-grid-card .desc {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.task-grid-card .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.task-grid-card .bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}
.task-grid-card .price {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text);
}
.btn-take {
    padding: 0.5rem 1.1rem;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
    box-shadow: 0 2px 6px rgba(37,99,235,0.2);
}
.btn-take:hover { box-shadow: 0 4px 10px rgba(37,99,235,0.35); transform: translateY(-1px); }
.btn-view {
    padding: 0.5rem 1.1rem;
    background: var(--border-light);
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: all var(--transition);
}
.btn-view:hover { background: var(--border); }

/* ===== STATUS BADGES ===== */
.task-status {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 24px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.status-open { background: var(--green-bg); color: var(--green); }
.status-progress { background: #dbeafe; color: var(--primary); }
.status-completed { background: var(--border-light); color: var(--text-secondary); }
.status-cancelled { background: var(--red-bg); color: var(--red); }

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ===== EMPTY STATE ===== */
.empty {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1.5rem;
    font-size: 0.95rem;
}
.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}
.empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ===== TASK DETAIL ===== */
.task-header-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}
.task-header-card h1 { margin-bottom: 0.75rem; }
.task-header-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.task-header-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.task-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    transition: color var(--transition);
}
.back-link:hover { color: var(--primary); }

/* Grid layout */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* ===== CHAT ===== */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
}
.msg {
    max-width: 80%;
    padding: 0.7rem 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
    word-break: break-word;
    animation: msgIn 0.2s ease;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.msg-mine {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.msg-other {
    align-self: flex-start;
    background: var(--card);
    color: var(--text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.msg-author { font-size: 0.72rem; font-weight: 600; margin-bottom: 0.15rem; opacity: 0.7; }
.msg-time { font-size: 0.68rem; opacity: 0.6; margin-top: 0.2rem; text-align: right; }
.chat-input {
    display: flex;
    gap: 0.5rem;
}
.chat-input input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}
.chat-input input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.chat-input button {
    padding: 0.7rem 1.2rem;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition);
}
.chat-input button:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }

/* ===== REPORTS ===== */
.report {
    background: var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--primary);
}
.report.pending { border-left-color: var(--yellow); }
.report.accepted { border-left-color: var(--green); }
.report.revision { border-left-color: var(--red); }
.report-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 0.4rem;
}
.report-text { font-size: 0.88rem; line-height: 1.5; }
.report-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; }
.report-comment { font-size: 0.82rem; color: var(--red); margin-top: 0.3rem; font-style: italic; }

/* ===== BALANCE ===== */
.balance-card {
    background: linear-gradient(135deg, #1e40af, #7c3aed);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    border-radius: 50%;
}
.balance-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
}
.balance-amount {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0.5rem 0;
    position: relative;
    z-index: 1;
}
.topup-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 2rem;
}
.topup-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}
.topup-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.topup-btn {
    padding: 0.65rem 1.3rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.topup-btn:hover { border-color: var(--primary); color: var(--primary); }
.topup-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.custom-amount {
    display: flex;
    gap: 0.5rem;
}
.custom-amount input {
    width: 160px;
    padding: 0.65rem 1rem;
    text-align: center;
}
.btn-pay {
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition);
    box-shadow: 0 2px 6px rgba(37,99,235,0.25);
}
.btn-pay:hover { box-shadow: 0 4px 10px rgba(37,99,235,0.35); }
.btn-pay:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== TABLE ===== */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
}
th {
    background: var(--border-light);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    padding: 0.85rem 1rem;
}
td {
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
    border-top: 1px solid var(--border-light);
}
.txn-plus { color: var(--green); font-weight: 600; }
.txn-minus { color: var(--red); font-weight: 600; }

/* ===== ROLE BADGE ===== */
.role-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 24px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
}

/* ===== TELEGRAM STATUS ===== */
.tg-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.tg-linked { background: #f0fdf4; color: var(--green); }
.tg-unlinked { background: #f0f9ff; color: var(--primary-dark); }
.tg-deeplink {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: var(--border-light);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    word-break: break-all;
    display: none;
}
.tg-deeplink a { color: var(--primary); font-weight: 600; }
.pwd-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 0.3rem; }

/* ===== SUMMARY ===== */
.summary {
    background: var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    margin: 1.5rem 0;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}
.summary-row.total {
    font-weight: 700;
    font-size: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    margin-top: 0.4rem;
}
.balance-info { font-size: 0.85rem; color: var(--text-muted); margin: 0.8rem 0; }
.balance-ok { color: var(--green); }
.balance-low { color: var(--red); }

/* ===== SUCCESS BLOCK ===== */
.success-block {
    background: linear-gradient(135deg, #dcfce7, #f0fdf4);
    color: var(--green);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    display: none;
    border: 1px solid rgba(22, 163, 74, 0.15);
}
.success-block h2 { margin-bottom: 0.5rem; color: var(--green); }

/* ===== PROGRESS BAR ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ===== DIVIDER ===== */
.divider {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 1.2rem 0;
    position: relative;
}
.divider::before, .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}
.divider::before { left: 0; }
.divider::after { right: 0; }

/* ===== LOGIN / AUTH PAGES ===== */
.auth-container {
    max-width: 440px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    flex: 1;
}
.auth-card {
    background: var(--card);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.06);
}
.auth-card h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 0.82rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}
.footer a:hover { color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
    .hero { padding: 2rem 1.5rem; }
    .hero h1 { font-size: 1.4rem; }
    .widget-value { font-size: 1.5rem; }
    h1 { font-size: 1.35rem; }
    .balance-amount { font-size: 2.2rem; }
    .task-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--card);
        flex-direction: column;
        padding: 0.75rem;
        border-bottom: 1px solid var(--border);
        gap: 0.2rem;
        box-shadow: var(--shadow-md);
        z-index: 99;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.65rem 1rem; width: 100%; }
    .hamburger { display: block; }
    .nav-user span { display: none; }
    
    .task-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .task-right {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
    .widgets { grid-template-columns: 1fr 1fr; }
    .filter-bar { flex-direction: column; }
    .custom-amount { flex-direction: column; }
    .custom-amount input { width: 100%; }
    .chat-messages { height: 300px; }
}

/* Skill checkboxes */
.skills-checkboxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.skill-check { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; }
.skill-check:hover { border-color: #6366f1; background: #f0f0ff; }
.skill-check:has(input:checked) { border-color: #6366f1; background: #eef2ff; }
@media (max-width: 480px) { .skills-checkboxes { grid-template-columns: 1fr; } }

/* City autocomplete */
.autocomplete-wrap { position: relative; }
.autocomplete-list { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); max-height: 200px; overflow-y: auto; z-index: 100; }
.ac-item { padding: 0.6rem 1rem; cursor: pointer; font-size: 0.95rem; }
.ac-item:hover { background: #eef2ff; color: #6366f1; }

/* Danger button (unlink) */
.btn-danger { background:#ef4444; color:#fff; border:none; border-radius:6px; padding:0.3rem 0.8rem; cursor:pointer; font-size:0.85rem; }
.btn-danger:hover { background:#dc2626; }
