/* Exact replica of reference design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-blue: #0EA5E9;
    --primary-blue-dark: #0284C7;
    --text-dark: #1E293B;
    --text-gray: #64748B;
    --text-light: #94A3B8;
    --bg-white: #FFFFFF;
    --bg-gray: #F8FAFC;
    --border-color: #E2E8F0;
    --success-green: #10B981;
    --warning-orange: #F59E0B;
    --active-blue: #3B82F6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gray);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-white);
    min-height: 100vh;
    position: relative;
}

/* Pages */
.page {
    display: none;
    padding-bottom: 80px;
}

.page.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.back-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 0;
}

.page-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
}

.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-gray);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Feed Header */
.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-white);
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Map Preview */
.map-preview {
    position: relative;
    height: 260px;
    margin: 0 16px 16px;
    border-radius: 16px;
    overflow: hidden;
}

.feed-map {
    width: 100%;
    height: 100%;
}

.create-map {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
}

.current-location-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-white);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Tasks Section */
.tasks-section {
    padding: 0 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.available-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
}

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card-feed {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.task-card-feed:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.task-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.task-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-gray);
}

.task-card-reward {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.reward-amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--warning-orange);
    display: flex;
    align-items: center;
    gap: 4px;
}

.reward-tag {
    background: #FEF3C7;
    color: var(--warning-orange);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 0 calc(env(safe-area-inset-bottom) + 8px);
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s;
}

.nav-btn svg {
    width: 24px;
    height: 24px;
}

.nav-btn span {
    font-size: 11px;
    font-weight: 600;
}

.nav-btn.active {
    color: var(--primary-blue);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-white);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-role {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.user-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 16px 16px;
}

.stat-box {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
}

.active-color {
    color: var(--active-blue);
}

.pending-color {
    color: var(--warning-orange);
}

.done-color {
    color: var(--success-green);
}

/* Create Task Button */
.create-task-btn {
    margin: 0 16px 20px;
    background: var(--primary-blue);
    color: var(--bg-white);
    border: none;
    border-radius: 16px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

/* Section Header Row */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 16px;
}

.section-header-row h2 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.view-all-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* Active Tasks List */
.active-tasks-list {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card-active {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    position: relative;
}

.task-status-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-progress {
    background: #DBEAFE;
    color: var(--active-blue);
}

.badge-reviewing {
    background: #FEF3C7;
    color: var(--warning-orange);
}

.badge-draft {
    background: var(--bg-gray);
    color: var(--text-gray);
}

.task-card-active h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    padding-right: 90px;
}

.task-performers {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.task-progress-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}

.progress-label {
    font-weight: 500;
    color: var(--text-gray);
}

.progress-value {
    font-weight: 700;
    color: var(--text-dark);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--bg-gray);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-inner {
    height: 100%;
    background: var(--active-blue);
    border-radius: 999px;
    transition: width 0.3s;
}

.progress-bar-inner.green {
    background: var(--success-green);
}

.review-submissions-btn {
    background: var(--bg-gray);
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Form Container */
.form-container {
    padding: 0 16px 20px;
}

.progress-line {
    height: 3px;
    background: var(--bg-gray);
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-blue);
    transition: width 0.3s;
}

.form-section-block {
    margin-bottom: 32px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-icon {
    font-size: 28px;
}

.section-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.input-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.text-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 16px;
}

.text-input::placeholder {
    color: var(--text-light);
}

.text-area {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
}

.budget-row {
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.budget-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
}

.budget-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.budget-input {
    width: 90px;
    text-align: right;
    font-size: 22px;
    font-weight: 800;
    border: none;
    background: transparent;
    color: var(--text-dark);
}

.stars-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
}

.publish-btn {
    width: 100%;
    background: var(--primary-blue);
    color: var(--bg-white);
    border: none;
    border-radius: 16px;
    padding: 18px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
    margin-bottom: 32px;
}

.requirements-section {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.requirements-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.requirements-header h3 {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
}

.items-count {
    font-size: 13px;
    color: var(--text-gray);
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-blue);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.requirement-icon {
    font-size: 20px;
}

.add-requirement-btn {
    width: 100%;
    background: var(--bg-white);
    border: 2px dashed var(--primary-blue);
    border-radius: 12px;
    padding: 16px;
    color: var(--primary-blue);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

/* Profile Page */
.profile-card-top {
    background: var(--bg-white);
    padding: 24px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid var(--primary-blue);
}

.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: 50%;
    padding: 2px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.professional-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #DBEAFE;
    color: var(--primary-blue);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.balance-card-big {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0284C7 100%);
    margin: 16px;
    padding: 24px;
    border-radius: 20px;
    color: var(--bg-white);
}

.balance-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.balance-small-label {
    font-size: 13px;
    opacity: 0.9;
    display: block;
    margin-bottom: 8px;
}

.balance-amount-big {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.balance-number {
    font-size: 36px;
    font-weight: 800;
}

.stars-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.balance-usd {
    font-size: 13px;
    opacity: 0.75;
}

.copy-balance-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.withdraw-btn {
    width: 100%;
    background: var(--bg-white);
    color: var(--primary-blue);
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.profile-stats-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    padding: 20px 16px;
    background: var(--bg-white);
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-stat-label {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.profile-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
}

.rank-value {
    color: var(--primary-blue);
}

.profile-divider {
    width: 1px;
    background: var(--border-color);
}

.transaction-history-section {
    padding: 0 16px 20px;
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.transaction-header h3 {
    font-size: 17px;
    font-weight: 700;
}

.view-all-link {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.icon-green {
    background: #D1FAE5;
}

.icon-blue {
    background: #DBEAFE;
}

.icon-gray {
    background: #F3F4F6;
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.transaction-time {
    font-size: 12px;
    color: var(--text-gray);
}

.transaction-amount {
    text-align: right;
}

.amount-value {
    font-size: 15px;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.amount-positive {
    color: var(--success-green);
}

.amount-negative {
    color: var(--text-dark);
}

.transaction-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-approved {
    color: var(--success-green);
}

.status-completed {
    color: var(--text-gray);
}