/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: #1e293b;
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar a {
    color: #94a3b8;
    margin-left: 15px;
}

.top-bar .btn-logout {
    color: #f87171;
}

.occ-balance {
    background: rgba(255,255,255,0.1);
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: bold;
}

/* ============================================
   HEADER
   ============================================ */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 28px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.main-nav a:hover {
    background: var(--bg);
    text-decoration: none;
}

.btn-post-job {
    background: var(--primary);
    color: #fff !important;
    padding: 10px 20px !important;
}

.btn-post-job:hover {
    background: var(--primary-dark) !important;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 10px;
}

.mobile-menu a {
    display: block;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

/* ============================================
   HERO / SEARCH
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    padding: 50px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-tabs label {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text);
    background: var(--bg);
    transition: all 0.2s;
}

.search-tabs label.active {
    background: var(--primary);
    color: #fff;
}

.search-tabs input[type="radio"] {
    display: none;
}

.search-inputs {
    display: flex;
    gap: 10px;
}

.search-inputs input,
.search-inputs select {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}

.search-inputs input {
    flex: 2;
}

.search-inputs select {
    flex: 1;
}

.search-inputs button {
    padding: 10px 25px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: bold;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    margin: 30px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--text);
}

.view-all {
    color: var(--primary);
    font-weight: 500;
}

/* ============================================
   CATEGORY GRID
   ============================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.category-icon {
    font-size: 30px;
}

.category-name {
    font-weight: 600;
    color: var(--text);
}

/* ============================================
   JOB CARDS
   ============================================ */
.job-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.job-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    position: relative;
    transition: all 0.2s;
}

.job-card:hover {
    box-shadow: var(--shadow-lg);
}

.job-urgent {
    border-left: 4px solid var(--danger);
}

.urgent-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.job-price {
    font-weight: bold;
    color: var(--secondary);
}

.job-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.job-title a {
    color: var(--text);
}

.job-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.job-description {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

/* ============================================
   WORKER CARDS
   ============================================ */
.worker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.worker-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.worker-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.worker-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    color: var(--secondary);
    font-size: 18px;
    background: #fff;
    border-radius: 50%;
}

.worker-info h3 {
    font-size: 16px;
    margin-bottom: 3px;
}

.worker-category {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.worker-rate {
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 5px;
}

.worker-stars {
    color: #f59e0b;
    margin-bottom: 10px;
}

.worker-stars span {
    color: var(--text-light);
    font-size: 13px;
}

.btn-view-worker {
    display: inline-block;
    padding: 6px 15px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-size: 13px;
}

/* ============================================
   FORMS
   ============================================ */
.form {
    max-width: 700px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    color: var(--text-light);
    font-size: 12px;
}

.form-actions {
    margin-top: 20px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-error ul {
    margin-left: 20px;
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-form {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 10px;
}

.auth-form p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 25px;
}

.form-group-checkbox {
    margin-bottom: 15px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    text-align: center;
    padding: 50px 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    margin: 30px 0;
}

.cta-section h2 {
    margin-bottom: 10px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 50px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin: 20px 0;
}

.page-header h1 {
    font-size: 24px;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #94a3b8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 24px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .search-inputs {
        flex-direction: column;
    }
    
    .job-list,
    .worker-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }


}





/* ============================================
   WORKERS PAGE - BỘ LỌC & DANH SÁCH THỢ
   ============================================ */

/* Filter Bar */
.filter-bar {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.filter-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-input,
.filter-select {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
}

.filter-input {
    flex: 1;
    min-width: 200px;
}

.filter-select {
    min-width: 160px;
    background: var(--white);
}

/* Popular Services Tags */
.popular-services {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.service-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}

.service-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.service-tag.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.tag-price {
    font-size: 11px;
    opacity: 0.8;
}

/* Price Filter Row */
.price-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.price-input {
    width: 120px !important;
    min-width: 100px !important;
}

.price-separator {
    color: var(--text-light);
}

.price-range-hint {
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
}

.filter-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
}

.filter-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

/* Price Summary Card */
.price-summary {
    margin-bottom: 20px;
}

.price-summary-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.price-summary-card h3 {
    margin-bottom: 15px;
}

.price-summary-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.price-stat {
    text-align: center;
}

.price-stat-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}

.price-stat-label {
    font-size: 12px;
    color: var(--text-light);
}

/* Workers Count */
.workers-count {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 14px;
}

/* Worker List Advanced */
.worker-list-advanced {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.worker-card-advanced {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: all 0.2s;
}

.worker-card-advanced:hover {
    box-shadow: var(--shadow-lg);
}

.worker-card-left {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex: 1;
}

.worker-card-right {
    text-align: right;
    flex-shrink: 0;
}

.worker-service-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    margin-bottom: 10px;
}

.service-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.service-price {
    font-size: 22px;
    font-weight: bold;
    color: var(--secondary);
}

.service-price small {
    font-size: 12px;
    color: var(--text-light);
    font-weight: normal;
}

.service-time {
    font-size: 12px;
    color: var(--text-light);
}

.worker-bio-preview {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 5px;
}

.separator {
    margin: 0 5px;
    color: var(--border);
}

/* Badge for service price type */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .worker-card-advanced {
        flex-direction: column;
        align-items: stretch;
    }
    
    .worker-card-right {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .worker-service-price {
        align-items: flex-start;
    }
    
    .price-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-inputs {
        flex-direction: column;
    }
    
    .filter-input,
    .filter-select {
        width: 100%;
    }
}



/* ============================================
   MOBILE COMPACT - BỘ LỌC & TAGS
   ============================================ */
@media (max-width: 768px) {
    /* Dịch vụ phổ biến - cuộn ngang 1 hàng */
    .service-tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .service-tag {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .tag-price {
        font-size: 10px;
    }
    
    /* Filter inputs - 2 cột gọn */
    .filter-inputs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .filter-inputs input,
    .filter-inputs select {
        width: 100%;
        min-width: 0;
    }
    
    /* Price filter row - gọn thành 2 hàng */
    .price-filter-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: center;
    }
    
    .price-filter-row .filter-label {
        grid-column: 1 / -1;
        font-size: 12px;
    }
    
    .price-input {
        width: 100% !important;
        min-width: 0 !important;
    }
    
    .price-separator {
        display: none;
    }
    
    /* Nút Lọc full width */
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Ẩn bớt text thừa */
    .price-range-hint {
        display: none;
    }
}


/* ============================================
   FILTER SIÊU GỌN - MOBILE FIRST
   ============================================ */

.filter-bar {
    background: var(--white);
    padding: 12px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

.filter-main-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.search-input-wrap input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg);
}

.filter-select-compact {
    padding: 10px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg);
    min-width: 50px;
    text-align: center;
}

.btn-search {
    padding: 10px 16px;
    white-space: nowrap;
}

.btn-filter-toggle {
    padding: 10px 12px;
    white-space: nowrap;
}

/* DỊCH VỤ PHỔ BIẾN - 1 hàng cuộn ngang */
.popular-services-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.popular-services-row::-webkit-scrollbar {
    display: none;
}

.service-tag-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--text);
}

.service-tag-mini span {
    font-size: 10px;
    color: var(--text-light);
}

.service-tag-mini.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.service-tag-mini.active span {
    color: rgba(255,255,255,0.8);
}

/* BỘ LỌC NÂNG CAO */
.advanced-filter {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.filter-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.price-input-mini {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    min-width: 0;
}

.dash {
    color: var(--text-light);
    font-size: 14px;
}

.btn-clear {
    font-size: 12px;
    color: #ef4444;
    text-decoration: none;
    white-space: nowrap;
    padding: 8px;
}

/* KẾT QUẢ TÌM KIẾM */
.price-summary {
    margin-bottom: 10px;
}

.price-summary-card {
    background: #eff6ff;
    padding: 10px 14px;
    border-radius: var(--radius);
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 13px;
    flex-wrap: wrap;
}

.price-summary-card h3 {
    font-size: 14px;
    margin: 0;
}

.price-summary-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.workers-count {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .btn-text {
        display: none;
    }
    
    .btn-search,
    .btn-filter-toggle {
        padding: 10px;
    }
}

