:root {
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-light: #ecfdf5;
    --text-main: #111827;
    --text-muted: #6b7280;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

body { background-color: var(--bg-main); min-height: 100vh; display: flex; flex-direction: column; color: var(--text-main); line-height: 1.5; }

.container { max-width: 1400px; margin: 0 auto; width: 100%; padding: 1rem; flex-grow: 1; display: flex; flex-direction: column; }
@media (min-width: 768px) { .container { padding: 1.5rem; } }

header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; background: var(--bg-card); padding: 1rem 1.25rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }

h1 { font-size: 1.125rem; font-weight: 700; color: var(--text-main); letter-spacing: -0.025em; display: flex; align-items: center; gap: 0.5rem; }
@media (min-width: 768px) { h1 { font-size: 1.25rem; } }

h1::before { 
    content: ''; 
    display: inline-block; 
    width: 28px; 
    height: 28px; 
    background-image: url('../icon-192.png'); 
    background-size: contain; 
    background-repeat: no-repeat; 
}

.header-actions { display: flex; gap: 0.5rem; align-items: center; width: 100%; justify-content: stretch; }
@media (min-width: 640px) { .header-actions { width: auto; justify-content: flex-end; gap: 0.75rem; } }

.btn-green { background-color: var(--primary); color: white; padding: 0.625rem 1rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.875rem; border: none; cursor: pointer; text-decoration: none; transition: all 0.2s ease; box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; flex: 1; }
@media (min-width: 640px) { .btn-green { flex: unset; padding: 0.625rem 1.25rem; } }
.btn-green:hover { background-color: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline { background-color: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-color); padding: 0.625rem 1rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; box-shadow: var(--shadow-sm); flex: 1; }
@media (min-width: 640px) { .btn-outline { flex: unset; padding: 0.625rem 1.25rem; } }
.btn-outline:hover { background-color: var(--bg-main); border-color: #cbd5e1; }

.grid-layout { display: flex; flex-direction: column; gap: 1.25rem; flex-grow: 1; }
@media (min-width: 1024px) { .grid-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; } }

.card { background: var(--bg-card); padding: 1rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); display: flex; flex-direction: column; }
@media (min-width: 768px) { .card { padding: 1.25rem; } }
.card h2 { font-size: 1rem; font-weight: 600; color: var(--text-main); margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; }

#map, #pickerMap { border-radius: var(--radius-sm); z-index: 10; width: 100%; border: 1px solid var(--border-color); }
#map { flex-grow: 1; min-height: 350px; }
@media (min-width: 1024px) { #map { min-height: 480px; } }

.filter-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-direction: column; }
@media (min-width: 640px) { .filter-bar { flex-direction: row; gap: 0.75rem; } }
.filter-bar select { flex-grow: 1; padding: 0.5rem 0.75rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 0.875rem; outline: none; background: var(--bg-card); color: var(--text-main); font-weight: 500; min-width: 140px; transition: border-color 0.2s; }
.filter-bar select:focus { border-color: var(--primary); }

.task-list { max-height: 450px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; padding-right: 0.125rem; }
@media (min-width: 1024px) { .task-list { max-height: 520px; gap: 0.875rem; } }
.task-list::-webkit-scrollbar { width: 6px; }
.task-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.task-item { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 0.875rem; cursor: pointer; transition: all 0.2s ease; position: relative; background: var(--bg-card); box-shadow: var(--shadow-sm); }
.task-item.sponsored-card {
    border: 2px solid #ef4444;
    background-color: #fef2f2;
}
body.dark-mode .task-item.sponsored-card {
    background-color: #450a0a;
}
@media (min-width: 768px) { .task-item { padding: 1rem; } }
.task-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }

.badge-viber { background-color: #f3e8ff; color: #7e22ce; padding: 0.2rem 0.625rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-whatsapp { background-color: var(--primary-light); color: #29af89; padding: 0.2rem 0.625rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-small { background-color: #ffedd5; color: #c2410c; padding: 0.2rem 0.5rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; margin-right: 0.375rem; }
.badge-services { background-color: #dbeafe; color: #1e40af; padding: 0.2rem 0.5rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; margin-right: 0.375rem; }
.badge-jobseeker { background-color: #ecfdf5; color: #047857; padding: 0.2rem 0.5rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; margin-right: 0.375rem; }
.badge-hiring { background-color: #fef3c7; color: #b45309; padding: 0.2rem 0.5rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; margin-right: 0.375rem; }
.badge-distance { background-color: #eff6ff; color: #1d4ed8; padding: 0.2rem 0.625rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; margin-left: 0.375rem; }

.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 0.75rem; }
.modal.hidden { display: none; }
.modal-content { background: var(--bg-card); border-radius: var(--radius-lg); max-width: 500px; width: 100%; padding: 1.25rem; position: relative; max-height: 95vh; overflow-y: auto; box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); }
@media (min-width: 768px) { .modal-content { padding: 2rem; } }

.form-group { margin-bottom: 1rem; }
@media (min-width: 768px) { .form-group { margin-bottom: 1.25rem; } }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-main); margin-bottom: 0.375rem; }

.form-control { width: 100%; border: 1px solid var(--border-color); padding: 0.625rem 0.875rem; border-radius: var(--radius-sm); font-size: 0.875rem; outline: none; background: var(--bg-card); color: var(--text-main); transition: border-color 0.2s; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.location-item { padding: 0.625rem 0.875rem; cursor: pointer; border-bottom: 1px solid var(--border-color); font-size: 0.875rem; }
.location-item:hover { background-color: #f1f5f9; }
body.dark-mode .location-item:hover { background-color: #374151; }

.phone-input-group { display: flex; align-items: stretch; }
.phone-prefix { background-color: #f1f5f9; border: 1px solid var(--border-color); border-right: none; padding: 0.625rem 0.875rem; border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; }
.phone-input-group input { border-top-left-radius: 0; border-bottom-left-radius: 0; }

.close-btn { position: absolute; top: 1rem; right: 1rem; background: var(--bg-main); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1.25rem; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.close-btn:hover { background: var(--border-color); color: var(--text-main); }

.delete-btn-card { color: #dc2626; font-size: 0.75rem; font-weight: 600; text-decoration: none; padding: 0.25rem 0.5rem; border: 1px solid #fecaca; border-radius: var(--radius-sm); background: #fef2f2; display: inline-flex; align-items: center; gap: 0.25rem; cursor: pointer; transition: background 0.2s; }
.delete-btn-card:hover { background: #fee2e2; }

.header-tagline {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0 5px;
    line-height: 1.4;
}
.header-tagline .tag-cat {
    font-weight: 700;
    color: var(--text-main);
}
@media (min-width: 768px) {
    .header-tagline {
        font-size: 0.85rem; 
        flex: 1;
        margin: 0;
        text-align: left;
        padding-left: 1rem;
    }
}

.partners-banner img {
    filter: grayscale(20%);
    opacity: 0.8;
    transition: all 0.2s ease;
}
.partners-banner img:hover {
    filter: grayscale(0%);
    opacity: 1;
}
@media (max-width: 768px) {
    .partners-banner {
        justify-content: flex-start !important;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
}

#darkModeBtn { flex: 0 !important; padding: 0.625rem 0.75rem !important; min-width: 40px; }

body.dark-mode {
    --primary: #34d399;
    --primary-hover: #10b981;
    --primary-light: #064e3b;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --bg-main: #111827;
    --bg-card: #1f2937;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}