/* ============================================
   JOB CONNECT - COMPLETE STYLESHEET
   Mobile-First & Responsive
   ============================================ */

/* ---- CSS Reset ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    color: #1e293b;
    line-height: 1.6;
}

/* ---- Container ---- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ---- Links ---- */
a {
    text-decoration: none;
    color: #0f2b4b;
}

a:hover {
    color: #facc15;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-align: center;
}

.btn-primary {
    background: #facc15;
    color: #0f2b4b;
}

.btn-primary:hover {
    background: #eab308;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(250, 204, 21, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #facc15;
    color: #facc15;
}

.btn-outline:hover {
    background: #facc15;
    color: #0f2b4b;
}

.btn-light {
    background: white;
    color: #0f2b4b;
}

.btn-light:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}

.btn-large {
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

/* ---- Navbar ---- */
.navbar {
    background: rgba(15, 43, 75, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.8rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar .logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
}

.navbar .logo i {
    color: #facc15;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.navbar .nav-links a {
    color: #e2e8f0;
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.95rem;
}

.navbar .nav-links a:hover {
    color: #facc15;
}

/* ---- Badge ---- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
}

/* ---- Utilities ---- */
.text-center {
    text-align: center;
}

.text-muted {
    color: #94a3b8;
}

.mt-1 {
    margin-top: 0.5rem;
}
.mt-2 {
    margin-top: 1rem;
}
.mt-3 {
    margin-top: 1.5rem;
}
.mt-4 {
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

/* ---- Alert ---- */
.alert {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ---- Auth Pages (Login/Register) ---- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 420px;
}

.auth-card .logo {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #0f2b4b;
    margin-bottom: 0.2rem;
}

.auth-card .logo i {
    color: #facc15;
}

.auth-card h2 {
    text-align: center;
    font-weight: 400;
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* ---- Form Styles (Shared) ---- */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
    margin-bottom: 0.2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.2rem;
    border: none;
    border-bottom: 2px solid #d1d9e6;
    background: transparent;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    border-radius: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: #facc15;
}

.form-group textarea {
    border: 2px solid #d1d9e6;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    min-height: 80px;
    background: white;
}

.form-group textarea:focus {
    border-color: #facc15;
}

.form-group .help-text {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input {
    width: auto;
    border-bottom: none;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

/* ============================================
   RESPONSIVE (Mobile-First)
   ============================================ */

/* --- Tablet and below --- */
@media (max-width: 992px) {
    .packages-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    /* Navbar */
    .navbar .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .navbar .nav-links {
        justify-content: center;
        gap: 0.5rem;
    }

    .navbar .nav-links a {
        font-size: 0.8rem;
    }

    /* Hero */
    .hero h1 {
        font-size: 2.2rem !important;
    }

    .hero .row {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .hero .hero-buttons {
        justify-content: center;
    }

    .hero .hero-buttons .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }

    .stats-grid .stat-item .number {
        font-size: 1.8rem !important;
    }

    /* How It Works */
    .steps-grid {
        grid-template-columns: 1fr !important;
    }

    /* Packages */
    .packages-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.8rem !important;
    }

    .package-card {
        padding: 1rem !important;
    }

    .package-card .price {
        font-size: 1.4rem !important;
    }

    /* Jobs */
    .jobs-grid {
        grid-template-columns: 1fr !important;
    }

    /* CTA */
    .cta-section h2 {
        font-size: 1.6rem !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }

    /* Auth forms */
    .auth-card {
        padding: 1.5rem !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    /* Dashboard */
    .welcome-banner {
        flex-direction: column !important;
        text-align: center !important;
        padding: 1.2rem !important;
    }

    .welcome-banner h2 {
        font-size: 1.3rem !important;
    }

    .stat-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .packages-grid-small {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    .guarantor-grid {
        grid-template-columns: 1fr !important;
    }

    /* Admin */
    .admin-sidebar {
        width: 100% !important;
        position: relative !important;
        height: auto !important;
    }

    .admin-sidebar .sidebar-nav ul {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .admin-sidebar .sidebar-nav ul li a {
        padding: 0.3rem 0.8rem !important;
        font-size: 0.75rem !important;
    }

    .admin-main {
        margin-left: 0 !important;
        padding: 0.8rem !important;
    }

    .admin-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .admin-header h1 {
        font-size: 1.2rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .table-container {
        overflow-x: auto !important;
    }

    .admin-table {
        min-width: 600px !important;
        font-size: 0.8rem !important;
    }

    /* Connections */
    .connection-cards {
        grid-template-columns: 1fr !important;
    }

    .applicant-header {
        flex-direction: column !important;
    }

    .detail-grid {
        grid-template-columns: 1fr !important;
    }

    /* Checkout */
    .checkout-grid {
        grid-template-columns: 1fr !important;
    }

    /* Job items */
    .job-item {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .quick-actions {
        flex-direction: column !important;
    }

    .quick-actions a {
        text-align: center !important;
    }

    /* Guarantor boxes */
    .guarantor-grid {
        grid-template-columns: 1fr !important;
    }

    /* Buttons on mobile */
    .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }

    .btn-large {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.95rem !important;
    }
}

/* --- Very Small Screens (under 400px) --- */
@media (max-width: 400px) {
    .packages-grid {
        grid-template-columns: 1fr !important;
    }

    .packages-grid-small {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .navbar .nav-links a {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }

    .hero h1 {
        font-size: 1.8rem !important;
    }

    .stat-row {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* --- Tablet specific (769px - 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
    .packages-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .jobs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1.5fr !important;
    }

    .admin-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* --- Print styles --- */
@media print {
    .navbar,
    .footer,
    .hero-buttons,
    .btn,
    .card-actions,
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
}