:root {
    --primary: #02528E;
    --primary-dark: #013e6d;
    --accent: #F27224;
    --accent-hover: #d95f19;
    --bg: #F8FAFC;
    --text: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

/* 1. Fluid Reset & Grid Prevention */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* 2. Topbar & Header */
.topbar {
    background-color: var(--primary-dark);
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
}

.topbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.topbar-left a, .topbar-right a {
    color: #fff;
    margin-right: 15px;
}

.topbar-right a:hover {
    color: var(--accent);
}

.main-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}

.logo i {
    font-size: 24px;
    margin-right: 8px;
    color: var(--accent);
}

.logo span {
    color: var(--primary);
}

.header-menu {
    display: flex;
    align-items: center;
}

.menu-item {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    padding: 10px 15px;
    border-radius: var(--border-radius);
}

.menu-item:hover, .menu-item.active {
    color: var(--primary);
    background-color: rgba(2, 82, 142, 0.05);
}

.btn-post-job {
    background-color: var(--accent);
    color: #fff !important;
    border-radius: var(--border-radius);
    padding: 10px 20px;
    font-weight: bold;
}

.btn-post-job:hover {
    background-color: var(--accent-hover);
}

/* 3. Hero Section & Search Bar */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, #056cb7 100%);
    color: #fff;
    padding: 30px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.search-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input-group {
    flex: 2;
    position: relative;
}

.search-input-group i, .search-select-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-form input, .search-form select {
    width: 100%;
    padding: 14px 15px 14px 40px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 15px;
    color: var(--text);
    background-color: #fff;
    outline: none;
}

.search-select-group {
    flex: 1;
    position: relative;
}

.btn-search {
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    padding: 0 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.btn-search:hover {
    background-color: var(--accent-hover);
}

/* Quick search links */
.quick-search-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.quick-search-btn {
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.quick-search-btn:hover {
    background: #fff;
    color: var(--primary);
}

/* 4. Dashboard Icon Cards */
.quick-cards-section {
    max-width: 1200px;
    margin: -30px auto 40px;
    padding: 0 15px;
    position: relative;
    z-index: 10;
}

.quick-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.quick-card {
    display: block;
    text-decoration: none;
    color: var(--text);
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border-bottom: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.quick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.quick-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}

.quick-card h3 {
    font-size: 16px;
    color: var(--text);
    font-weight: bold;
}

/* 5. Main Layout Grid */
.main-wrapper {
    max-width: 1200px;
    margin: 30px auto 50px;
    padding: 0 15px;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
}

/* Direct grid child resets */
.main-content-col {
    min-width: 0;
}

.sidebar-col {
    min-width: 0;
}

/* 6. Tabs Panel */
.tabs-container {
    background-color: #fff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background-color: var(--primary);
    color: #fff;
    height: 48px;
    box-sizing: border-box;
}

.tab-btn, .tab-btn-link {
    flex: 1;
    height: 100%;
    padding: 0 15px;
    font-size: 15px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
    background: none;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

.tab-btn.active, .tab-btn-link.active {
    background-color: var(--accent);
}

.tab-btn:hover, .tab-btn-link:hover {
    background-color: rgba(255,255,255,0.1);
}
.tab-btn.active:hover, .tab-btn-link.active:hover {
    background-color: var(--accent-hover);
}

/* 7. Job/Candidate List Cards */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
}

.job-card {
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(2, 82, 142, 0.2);
}

.job-card:hover .job-title {
    color: var(--primary);
}

.job-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    background-color: #e2e8f0;
    color: var(--primary);
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.job-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.job-details {
    flex-grow: 1;
    min-width: 0;
}

.job-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-title:hover {
    color: var(--primary);
}

.job-company {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: #f1f5f9;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge.badge-location {
    color: var(--primary);
    background-color: rgba(2, 82, 142, 0.05);
}

.badge.badge-time {
    color: #475569;
}

.job-right {
    text-align: right;
    flex-shrink: 0;
}

.job-salary {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
}

.btn-view-job {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: bold;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 20px;
}

.btn-view-job:hover {
    background-color: var(--primary);
    color: #fff;
}

/* 8. Highlighted Category Grid */
.categories-section {
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 15px;
}

.section-title-box {
    border-bottom: 2px solid var(--primary);
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.category-card {
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.category-card i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 8px;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

/* 9. Sidebar Hot Jobs list */
.sidebar-panel {
    background-color: #fff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 25px;
}

.sidebar-panel-header {
    background-color: var(--primary);
    color: #fff;
    height: 48px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 15px;
    box-sizing: border-box;
}

.hot-jobs-list {
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 15px;
}

.hot-job-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.hot-job-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hot-job-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 4px;
}

.hot-job-title:hover {
    color: var(--primary);
}

.hot-job-salary {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

/* 10. Sticky Bottom Contact Bar (Mobile-only) */
.sticky-contact-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.sticky-contact-container {
    display: flex;
    width: 100%;
}

.sticky-btn {
    flex: 1;
    text-align: center;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Touch Target vertical padding */
}

.sticky-btn-phone {
    background-color: var(--accent);
}

.sticky-btn-phone:hover {
    background-color: var(--accent-hover);
}

.sticky-btn-zalo {
    background-color: #0068ff; /* Zalo Blue */
}

.sticky-btn-zalo:hover {
    background-color: #0056d6;
}

/* 11. Footer */
.main-footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 50px 0 20px;
    font-size: 14px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding: 0 15px 40px;
    border-bottom: 1px solid #1e293b;
}

.footer-col h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 16px;
    text-transform: uppercase;
}

.footer-col p {
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-icons a {
    color: #94a3b8;
    font-size: 20px;
    margin-left: 15px;
}

.social-icons a:hover {
    color: #fff;
}

/* 12. Mobile responsive overrides */
@media (max-width: 980px) {
    .header-menu {
        display: none; /* Sẽ điều khiển qua menu mobile drawer */
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
    }
    
    .hero-section {
        padding: 30px 0 40px;
    }
    
    .hero-content h1 {
        font-size: 22px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .btn-search {
        padding: 12px;
    }
    
    .quick-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .layout-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sticky-contact-bar {
        display: block;
    }
    
    /* Thiết kế Responsive Siêu Tinh Gọn cho thẻ Việc làm trên Mobile */
    .job-card {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px;
    }
    
    .job-logo {
        width: 48px;
        height: 48px;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .job-details {
        flex-grow: 1;
        min-width: 0;
    }
    
    .job-title {
        font-size: 14px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
        margin-bottom: 0;
    }
    
    .job-company {
        display: none !important;
    }
    
    .job-badges {
        display: block !important;
        margin-top: 4px;
    }
    
    .badge {
        display: none !important;
    }
    
    .badge.badge-time {
        display: inline-block !important;
        background: none !important;
        padding: 0 !important;
        color: var(--text-muted) !important;
        font-size: 11px !important;
        border-radius: 0 !important;
    }
    
    .job-right {
        flex-shrink: 0;
        text-align: right;
        border-top: none !important;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    .job-salary {
        margin-bottom: 0;
        font-size: 13px;
        font-weight: 700;
        color: var(--accent);
    }
}

/* 11. CSS Styling for Protected Contact and Mobile Sticky Footer Reveal Phone */
.phone-reveal-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.phone-masked {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.btn-reveal-phone {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: background-color 0.2s;
}

.btn-reveal-phone:hover {
    background-color: var(--accent);
}

.phone-link {
    display: inline-block;
    color: #fff;
    background-color: var(--accent);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none;
}

@media (max-width: 992px) {
    .sticky-contact-bar {
        display: block !important;
    }
    
    .sticky-contact-bar .phone-reveal-wrapper {
        width: 100%;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .sticky-contact-bar .btn-reveal-phone,
    .sticky-contact-bar .phone-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background-color: var(--accent) !important;
        color: #fff !important;
        font-weight: bold;
        padding: 10px 20px;
        border-radius: var(--border-radius);
        font-size: 15px;
        text-decoration: none;
        border: none;
        width: auto;
        min-width: 150px;
        box-shadow: var(--shadow);
    }
    
    .sticky-contact-bar .phone-masked {
        font-size: 16px;
        font-weight: 800;
        color: var(--text);
    }
}

@media (max-width: 768px) {
    .tab-btn, .tab-btn-link {
        font-size: 13px !important;
        padding: 12px 6px !important;
        gap: 4px !important;
    }
    .tab-btn i, .tab-btn-link i {
        display: none !important;
    }
}