/* User Dashboard Layout and Style rules */

.dashboard-container {
    min-height: 100vh;
    background-color: #f8fafc;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #fff;
}

.sidebar-logo span {
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.sidebar-item.active a, .sidebar-item a:hover {
    background-color: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.sidebar-user {
    border-top: 1px solid #1e293b;
    padding-top: 24px;
    margin-top: auto;
}

.sidebar-user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-details h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.user-details p {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Main Content Area */
.main-content {
    width: 100%;
    padding: 40px;
    overflow-y: auto;
    min-height: 100vh;
}

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

.page-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.page-title p {
    font-size: 0.95rem;
    color: #64748b;
}

/* Welcome Card & Status Card */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.welcome-card {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    color: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.15);
    position: relative;
    overflow: hidden;
}

.welcome-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.welcome-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.welcome-card p {
    color: #c7d2fe;
    font-size: 0.95rem;
    margin-bottom: 20px;
    max-width: 80%;
}

.status-card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.status-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    width: fit-content;
    margin-bottom: 16px;
}

.status-active {
    background-color: #ecfdf5;
    color: #10b981;
}

.status-inactive {
    background-color: #fef2f2;
    color: #ef4444;
}

.status-pending {
    background-color: #fffbeb;
    color: #d97706;
}

.status-card p {
    font-size: 0.85rem;
    color: #64748b;
}

/* Stats Section */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: #white;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    background-color: #e0e7ff;
}

.stat-info h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}

.stat-info p {
    font-size: 0.85rem;
    color: #64748b;
}

/* Available Jobs List & Locks */
.jobs-panel,
.withdraw-panel {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    gap: 18px;
}

.panel-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.unlock-card-header {
    justify-content: center;
    margin-bottom: 32px;
}

.unlock-card {
    position: relative;
    width: auto;
    max-width: 440px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    text-align: center;
}

.compact-card {
    padding-top: 16px;
    padding-bottom: 16px;
}

.unlock-card::before,
.unlock-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(16px);
    opacity: 0.18;
}

.unlock-card::before {
    width: 100px;
    height: 100px;
    top: -30px;
    left: -30px;
    background: rgba(99, 102, 241, 0.14);
}

.unlock-card::after {
    width: 90px;
    height: 90px;
    bottom: -25px;
    right: -25px;
    background: rgba(14, 165, 233, 0.12);
}

.unlock-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 12px;
}

.unlock-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.unlock-card-price {
    background: linear-gradient(135deg, #eef2ff, #e0f2fe);
    color: #4338ca;
    font-weight: 800;
    font-size: 1rem;
    padding: 10px 16px;
    border-radius: 999px;
    min-width: 120px;
}

.unlock-all-button {
    padding: 10px 20px;
    border-radius: 999px;
    min-width: 150px;
}

@media (max-width: 600px) {
    .unlock-card {
        max-width: 100%;
        padding: 16px 16px;
    }

    .unlock-card-title {
        font-size: 1.15rem;
    }

    .unlock-card-meta {
        flex-direction: column;
    }
}

.withdraw-panel-header {
    align-items: flex-start;
}

.panel-description {
    color: #64748b;
    margin-top: 6px;
    font-size: 0.95rem;
    max-width: 620px;
}

.withdraw-summary {
    text-align: right;
}

.withdraw-summary-label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 4px;
}

.withdraw-summary strong {
    display: block;
    font-size: 1.4rem;
    color: #0f172a;
}

.withdraw-form {
    display: grid;
    gap: 20px;
    max-width: 640px;
}

.form-row {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.payment-form-card form {
    display: grid;
    gap: 14px;
}

.payment-form-card .form-row:last-child {
    margin-bottom: 0;
}

.form-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
}

.form-input,
.form-textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 12px 14px;
    background-color: #f8fafc;
    color: #0f172a;
    font-size: 0.97rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background-color: #fff;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.form-note {
    color: #64748b;
    font-size: 0.92rem;
}

.form-note--error {
    color: #dc2626;
}

.form-note--success {
    color: #15803d;
}

.btn-full {
    width: 100%;
}

.btn-full {
    width: 100%;
}

.payment-page {
    padding: 40px;
    max-width: 1120px;
    margin: 0 auto;
}

.payment-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}


.payment-panel__intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.payment-panel__intro h1 {
    font-size: 1.6rem;
    margin: 0;
}

.payment-panel__intro p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.payment-panel__badge {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 10px 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.9rem;
}

.payment-layout {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 18px;
}

.payment-summary-card,
.payment-form-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
}

.payment-summary-card .eyebrow,
.payment-form-card .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 10px;
}

.payment-amount-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 18px;
}

.payment-methods-grid {
    display: grid;
    gap: 12px;
}

.payment-method-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
}

.payment-method-card.selected {
    border-color: #6366f1;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
    background: #eff6ff;
}

.payment-method-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.98rem;
    color: #0f172a;
}

.payment-method-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.payment-method-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #dcfce7;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
}

.btn-full {
    width: 100%;
}

@media (max-width: 900px) {
    .payment-layout {
        grid-template-columns: 1fr;
    }
}

.btn-primary {
    padding: 14px 26px;
    border-radius: 999px;
}

.job-card-db {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.job-card-db:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.job-details-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.job-details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: #475569;
}

.job-details-meta strong {
    font-weight: 700;
    color: #0f172a;
}

.job-actions-right button {
    width: 100%;
}

@media (max-width: 950px) {
    .job-card-db {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 720px) {
    .main-content {
        padding: 24px;
    }

    .withdraw-form,
    .jobs-panel {
        padding: 24px;
    }
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

/* Jobs container for unpaid blur */
.dashboard-jobs-container.locked-state {
    position: relative;
}

.locked-jobs-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px dashed #6366f1;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    max-width: 400px;
    width: 90%;
}

.locked-jobs-banner h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.locked-jobs-banner p {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 16px;
}

/* Unlocked visibility for locked jobs */
.dashboard-jobs-container.locked-state .job-card-db {
    filter: none;
    pointer-events: auto;
    user-select: auto;
    opacity: 1;
}

.job-card-db {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.job-card-db:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.job-info-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.job-details-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.job-details-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #64748b;
}

.job-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Apply Modal styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    max-width: 550px;
    width: 100%;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    position: relative;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    border: none;
    background: transparent;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 20px;
}

.job-modal-details {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.job-modal-info-item {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.job-modal-info-item:last-child {
    margin-bottom: 0;
}

.job-modal-info-item strong {
    color: #0f172a;
}

/* Payment Area Specific styling */
.payment-box {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
}

.payment-method-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-method-card.selected {
    border-color: #6366f1;
    background-color: #f5f3ff;
}

.mpesa-logo-placeholder {
    width: 60px;
    font-weight: 800;
    color: #10b981;
    font-size: 1.2rem;
    text-align: center;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 4px;
}

.mpesa-instructions {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.instruction-step {
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.instruction-step:last-child {
    margin-bottom: 0;
}

.instruction-step strong {
    color: #0f172a;
}

/* Applications Table */
.apps-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.apps-table th, .apps-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.apps-table th {
    background-color: #f8fafc;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
}

.apps-table td {
    font-size: 0.9rem;
}

/* Responsive side nav for smaller sizes */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
        align-items: center;
    }
    .sidebar-logo span, .user-details, .sidebar-logo h2, .sidebar-item-text {
        display: none;
    }
    .main-content {
        margin-left: 80px;
        padding: 24px;
    }
    .sidebar-item a {
        justify-content: center;
        padding: 12px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .quick-stats {
        grid-template-columns: 1fr;
    }
}
