/* assets/css/style.css */

/* --- JOB LIST STYLES --- */

/* Membuat Job Card dapat diklik secara keseluruhan */
.job-card-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Penting untuk membuat link menutupi seluruh card */
    margin-bottom: 15px;
}

/* --- JOB DETAIL PAGE STYLES --- */
.job-detail-page {
    padding: 15px 15px 80px 15px; /* Beri padding bawah untuk sticky footer */
}

.detail-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.job-detail-label {
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 5px;
    color: var(--white);
    display: inline-block;
    margin-bottom: 10px;
}

.job-detail-label.new { background-color: var(--primary-color); }
.job-detail-label.expired { background-color: #dc3545; }

.detail-title {
    font-size: 24px;
    color: var(--text-color);
    margin: 5px 0;
}

.detail-company, .detail-location {
    font-size: 16px;
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.detail-section {
    margin-bottom: 25px;
    line-height: 1.6;
}

.detail-section h3 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.detail-section i {
    margin-right: 5px;
}

.safety-tip {
    padding: 15px;
    background-color: #fff3cd; /* Warna kuning muda */
    border-left: 5px solid var(--primary-color);
    border-radius: 4px;
    font-size: 14px;
    color: #856404;
}

.alert-info {
    padding: 15px;
    background-color: #e2f1ff;
    border-left: 5px solid #007bff;
    border-radius: 4px;
    margin-top: 15px;
}

/* --- STICKY FOOTER BUTTON --- */
.apply-sticky-footer {
    position: fixed;
    bottom: 60px; /* Di atas bottom-nav */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px; 
    padding: 10px 15px;
    background-color: var(--white);
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
    z-index: 150;
}

.apply-button {
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* BASE & MOBILE-FIRST RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

:root {
    --primary-color: #FF8C00; /* Default Orange */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --dark-gray: #555;
    --white: #fff;
}

body {
    background-color: var(--light-gray);
    color: var(--text-color);
}

/* ---------------------------------------------------- */
/* MOBILE WRAPPER (Memaksa Tampilan HP di Desktop) */
/* ---------------------------------------------------- */
.main-content-wrapper {
    max-width: 480px; /* Lebar maksimal seperti HP */
    margin: 0 auto; /* Tengah di desktop */
    background-color: var(--white);
    min-height: 100vh;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 60px; /* Ruang untuk bottom-nav */
}

/* ---------------------------------------------------- */
/* APP HEADER (Top Nav) */
/* ---------------------------------------------------- */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--white);
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-small {
    height: 30px; /* Ukuran logo */
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-location {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    border: none;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.btn-icon {
    color: var(--dark-gray);
    font-size: 18px;
}


/* --- AUTENTIKASI (LOGIN/REGISTER) STYLES --- */
.auth-page {
    padding: 30px 20px;
    text-align: center;
}

.auth-page h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
}

.form-group {
    text-align: left;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #e67e22; /* Sedikit lebih gelap */
}

.full-width {
    width: 100%;
}

.auth-switch {
    margin-top: 20px;
    font-size: 14px;
}

.auth-switch a, .auth-admin a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    text-align: left;
}

.message.error {
    background-color: #fdd;
    color: #d9534f;
    border: 1px solid #d9534f;
}

.message.success {
    background-color: #dfd;
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

/* ---------------------------------------------------- */
/* BOTTOM NAVIGATION BAR */
/* ---------------------------------------------------- */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px; /* Sesuai wrapper */
    height: 60px;
    background-color: var(--white);
    border-top: 1px solid #eee;
    z-index: 200;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--dark-gray);
    font-size: 12px;
    padding: 5px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

/* ---------------------------------------------------- */
/* CONTENT & JOB LIST STYLE */
/* ---------------------------------------------------- */
.content {
    padding: 10px 15px;
}

.tab-filter {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 15px;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.tab-filter::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.tab {
    text-decoration: none;
    padding: 8px 15px;
    margin-right: 10px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--dark-gray);
    background-color: var(--light-gray);
    transition: all 0.2s;
}

.tab.active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: bold;
}

.job-card {
    background-color: var(--white);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ddd; /* Border tipis untuk pemisah */
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.job-label {
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 5px;
    color: var(--white);
}

.job-label.hot { background-color: #d9534f; } /* Merah */
.job-label.new { background-color: var(--primary-color); } /* Orange */

.btn-bookmark {
    background: none;
    border: none;
    color: var(--dark-gray);
    cursor: pointer;
    font-size: 18px;
}

.job-title {
    font-size: 16px;
    color: var(--primary-color);
    margin: 5px 0;
}

.job-company, .job-location {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 3px;
}

.job-meta {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.job-salary {
    display: block;
    margin-top: 8px;
    font-weight: bold;
    color: #4CAF50; /* Hijau untuk gaji */
}

.job-time {
    display: block;
    font-size: 10px;
    color: #aaa;
    text-align: right;
}

/* ---------------------------------------------------- */
/* APP FOOTER (Copyright) */
/* ---------------------------------------------------- */
.app-footer {
    padding: 15px 10px;
    text-align: center;
    font-size: 10px;
    color: #999;
    position: absolute;
    bottom: -40px; /* Posisikan di bawah wrapper utama */
    width: 100%;
    max-width: 480px;
}

/* --- PROFILE PAGE STYLES --- */
.profile-page {
    padding: 15px;
}

.profile-header-card {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.profile-header-card h2 {
    font-size: 22px;
    margin-bottom: 10px;
}
.profile-header-card p {
    font-size: 14px;
    margin-bottom: 3px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 20px;
    background: #fcfcfc;
    border: 1px solid #eee;
    padding: 10px 0;
    border-radius: 8px;
}

.stat-box span {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
}
.stat-box small {
    font-size: 12px;
    color: var(--dark-gray);
}

.update-btn {
    margin-bottom: 30px;
}

.menu-title {
    font-size: 16px;
    color: var(--dark-gray);
    margin: 15px 0 10px 0;
    font-weight: bold;
}

.profile-menu-list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid #f5f5f5;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item i {
    color: var(--dark-gray);
}

.menu-item.highlight {
    background-color: #fff9e6; /* Sedikit latar belakang kuning untuk premium */
    font-weight: bold;
    color: var(--primary-color);
}

.menu-item.logout {
    color: #dc3545;
}
/* --- PREFERENSI KERJA / TAGS STYLES --- */

.text-muted {
    color: #888;
    font-size: 0.9em;
}

.selection-area {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fcfcfc;
}

.selection-area h4 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1em;
}

.suggestion-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap; /* Penting untuk mobile */
}

/* Style untuk tag saran (chips) */
.suggestion-tag {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    border: 1px solid #ccc;
}

.suggestion-tag:hover {
    background-color: #eee;
}

/* Style untuk tag yang sudah dipilih */
.selected-tag {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    border: 1px solid var(--primary-color);
}

.remove-icon {
    margin-left: 8px;
    font-size: 0.9em;
    cursor: pointer;
}

#selected-tags-container {
    display: flex;
    flex-wrap: wrap;
    min-height: 40px;
    gap: 8px;
    padding: 5px 0;
    align-items: center;
}

.btn-add-manual {
    background-color: #4CAF50 !important;
    border-color: #4CAF50 !important;
}
/* --- DASHBOARD CARDS --- */

.dashboard-stats-grid {
    display: grid;
    /* Tampilkan 2 kolom di mobile, 3+ di desktop */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.dashboard-card {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    text-decoration: none; /* Untuk link card */
    color: #333;
    transition: transform 0.2s, box-shadow 0.2s;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.card-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    margin-right: 15px;
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-value {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.card-label {
    font-size: 0.85em;
    color: #888;
    line-height: 1.2;
}

.preference-display {
    /* Untuk memastikan teks preferensi tidak terlalu panjang */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px; /* Batasi lebar tampilan teks */
}

/* --- APP PROFILE STYLES (Mobile Friendly) --- */

.profile-page-app {
    padding: 15px;
    background-color: #f7f9fc; /* Latar belakang abu-abu muda */
    min-height: calc(100vh - 60px); /* Penuh layar kecuali bottom nav */
}

/* 1. Header Profil Singkat */
.profile-header-app {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.user-avatar i {
    font-size: 40px;
    color: var(--dark-gray);
    margin-right: 15px;
}

.user-info-app h3 {
    font-size: 18px;
    margin: 0;
    color: var(--text-color);
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 4px;
}

.status-badge.status-lengkap {
    background-color: #e6ffed;
    color: #00874c;
}

.status-badge.status-perlu-diperbarui {
    background-color: #fff4e5;
    color: #ff9800;
}

.edit-link {
    margin-left: auto;
    color: var(--dark-gray);
    font-size: 18px;
    padding: 10px;
}

/* 2. Kartu Statistik */
.stats-grid-app {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.stat-card-app {
    flex: 1;
    background-color: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
}

.stat-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85em;
    color: #888;
    margin-top: 2px;
}

/* 3. Menu Navigasi */
.menu-header-app {
    font-size: 14px;
    color: #666;
    margin-top: 15px;
    margin-bottom: 8px;
    font-weight: 600;
    padding-left: 5px;
}

.menu-list-app {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* Menyembunyikan border di sudut */
    margin-bottom: 25px;
}

.menu-item-app {
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
}

.menu-item-app:last-child {
    border-bottom: none;
}

.menu-item-app:hover {
    background-color: #f8f8f8;
}

.menu-icon {
    font-size: 18px;
    width: 30px;
    text-align: center;
    color: var(--primary-color);
}

.menu-text {
    flex-grow: 1;
    margin-left: 10px;
    font-size: 16px;
}

.arrow-icon {
    color: #ccc;
    font-size: 14px;
}

/* Menu Khusus */
.premium-item {
    color: #5d4037; /* Cokelat tua untuk premium */
    font-weight: bold;
}
.premium-item .menu-icon i {
    color: #ffc107; /* Kuning emas */
}
.premium-badge {
    background-color: #ffc107;
    color: #333;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    margin-left: auto;
    margin-right: 10px;
}

.logout-item {
    color: #dc3545;
}
.logout-item .menu-icon i {
    color: #dc3545;
}

/* --- USER MANAGEMENT (Card View & Controls) --- */

.user-controls-bar {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.search-form-admin {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-input-admin {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-search-admin {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-clear-admin {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

/* --- Card View Styles --- */
.user-list-container {
    display: grid;
    /* Grid 1 kolom di mobile, 2 kolom di tablet/desktop */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px;
}

.user-card-admin {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.user-main-info {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 15px;
}

.user-avatar-icon {
    font-size: 36px;
    color: var(--dark-gray);
    margin-right: 15px;
}

.user-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    display: block;
}

.user-email {
    font-size: 0.9em;
    color: #6c757d;
    display: block;
}

.user-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.meta-item {
    font-size: 0.9em;
    color: #555;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
}

.meta-item i {
    margin-right: 5px;
    color: var(--primary-color);
}

.status-badge-admin {
    color: white !important;
    font-weight: bold;
}

.user-actions {
    margin-top: auto; /* Push actions to the bottom */
    display: flex;
    gap: 10px;
}

.user-actions .btn-action {
    flex: 1;
    text-align: center;
    font-size: 0.9em;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.user-actions .btn-action i {
    margin-right: 5px;
}

.user-actions .delete {
    background-color: #dc3545;
    color: white;
}

.user-actions .primary {
    background-color: #007bff;
    color: white;
}

.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .user-list-container {
        grid-template-columns: 1fr; /* Stack cards vertically on small screens */
    }
}