/* Job Roles Management Styles - Version 2.8.2 (Centered Notifications, Two Cards per Row, Smaller Cards & Buttons, Uniform Tabs, Application Notifications) */

/* Global Styles */
#jrm-ads-management {
    width: 100%;
    margin: 0;
    padding: 30px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Tabs Navigation */
.jrm-tabs-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    white-space: nowrap;
}

.jrm-tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    margin: 0 4px;
    width: 160px;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    transition: all 0.3s ease;
    visibility: visible;
    text-align: center;
    position: relative;
}

.jrm-tab-button:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.jrm-tab-button.active {
    background: #1e40af;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.3);
}

.jrm-tab-notification {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.jrm-search-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

#jrm-job-search {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 240px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

#jrm-job-search:focus {
    border-color: #1e40af;
    outline: none;
}

.jrm-sort-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.jrm-sort-btn:hover {
    background: #e2e8f0;
}

.jrm-sort-btn.asc svg {
    transform: rotate(180deg);
}

/* Tabs Content */
.jrm-tab {
    display: none;
    min-height: 200px;
    position: relative;
}

.jrm-tab.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Job Form */
#jrm-job-form {
    background: #ffffff;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 960px;
    margin: 0 auto;
}

.jrm-form-group {
    margin-bottom: 20px;
}

.jrm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}

.jrm-form-group input, .jrm-form-group select, .jrm-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.3s ease;
}

.jrm-form-group input:focus, .jrm-form-group select:focus, .jrm-form-group textarea:focus {
    border-color: #1e40af;
    outline: none;
}

.jrm-form-group textarea {
    height: 120px;
    resize: vertical;
}

.jrm-form-group .required {
    color: #dc2626;
}

.jrm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Smaller buttons in job cards */
.job-actions .jrm-btn {
    padding: 8px 16px;
    font-size: 13px;
}

.jrm-btn.submit-btn, .jrm-btn.publish-btn {
    background: #1e40af;
    color: #ffffff;
}

.jrm-btn.submit-btn:hover, .jrm-btn.publish-btn:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(30, 64, 175, 0.3);
}

.jrm-btn.edit-btn {
    background: #f59e0b;
    color: #ffffff;
}

.jrm-btn.edit-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.jrm-btn.delete-btn {
    background: #dc2626;
    color: #ffffff;
}

.jrm-btn.delete-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.jrm-btn.view-details-btn, .jrm-btn.view-draft-btn {
    background: #10b981;
    color: #ffffff;
}

.jrm-btn.view-details-btn:hover, .jrm-btn.view-draft-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.jrm-btn.apply-btn {
    background: #8b5cf6;
    color: #ffffff;
    margin-top: 16px;
}

.jrm-btn.apply-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

/* Notices */
.jrm-notice {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.jrm-notice.jrm-success {
    background: #d1fae5;
    color: #065f46;
}

.jrm-notice.jrm-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Job Cards */
.jrm-cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-width: 1280px;
    margin: 0 auto;
}

.job-card {
    background: #ffffff;
    padding: 14px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 260px;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.job-title {
    font-size: 17px;
    color: #1e40af;
    margin-bottom: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jrm-application-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.job-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.detail-item {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: #475569;
}

.posted-time {
    color: #64748b;
    font-size: 11px;
    margin-bottom: 8px;
}

.job-description {
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.days-left {
    font-weight: 600;
    font-size: 12px;
    color: #10b981;
    margin-bottom: 8px;
}

.days-left.expired {
    color: #dc2626;
}

.job-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.jrm-action-form {
    display: inline-block;
}

.jrm-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 24px 32px;
    font-size: 16px;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 10px;
    max-width: 960px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.jrm-apply-container {
    margin-top: 20px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    #jrm-ads-management {
        padding: 20px 16px;
    }
    .jrm-tabs-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }
    .jrm-tab-button {
        width: 100%;
        padding: 12px 16px;
        margin: 4px 0;
        text-align: left;
    }
    .jrm-tab-notification {
        top: 8px;
        right: 16px;
    }
    .jrm-search-container {
        width: 100%;
    }
    #jrm-job-search {
        width: 100%;
    }
    .jrm-cards-container {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    #jrm-job-form, .jrm-notice, .jrm-notification {
        max-width: 100%;
    }
    .jrm-notification {
        width: 95%;
        padding: 20px 24px;
    }
    .job-card {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    #jrm-ads-management {
        padding: 16px 12px;
    }
    .jrm-form-group input, .jrm-form-group select, .jrm-form-group textarea {
        font-size: 13px;
        padding: 8px 12px;
    }
    .jrm-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    .job-actions .jrm-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .job-card {
        padding: 10px;
    }
    .job-title {
        font-size: 15px;
    }
    .detail-item {
        font-size: 10px;
        padding: 3px 6px;
    }
    .posted-time {
        font-size: 10px;
    }
    .job-description {
        font-size: 11px;
    }
    .days-left {
        font-size: 11px;
    }
    .jrm-notification {
        font-size: 14px;
        padding: 16px 20px;
    }
    .jrm-application-count, .jrm-tab-notification {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}