/* Modern Professional Manage Jobs Design */

/* Override component max-width for job modal */
.modal-container {
    max-width: 800px !important;
}

.form-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

.status-group {
    min-width: 220px;
}

body {
    background-color: #f8fafc;
}

.hero-section {
    padding: 30px 40px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.hero-logo img {
    height: 110px;
    width: auto;
    object-fit: contain;
}

.hero-text {
    flex-grow: 1;
    min-width: 280px;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.hero-section p {
    font-size: 1.1rem;
    color: #64748b;
    margin-top: 8px;
    font-weight: 500;
}

.dashboard-container {
    max-width: 1200px;
    margin: 20px auto 60px;
    padding: 0 16px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 1.75rem;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-header .btn {
    padding: 14px 28px;
    font-weight: 750;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-header .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.card-body {
    padding: 30px;
}

/* Rich Text Editor */
.rich-text-editor {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rich-text-editor:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rte-toolbar button:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
    border-color: #3b82f6;
}

.rte-content {
    padding: 16px;
    min-height: 200px;
    outline: none;
    color: #1e293b !important;
    font-size: 1rem;
    background-color: #ffffff !important;
    line-height: 1.6;
}

.rte-content:focus {
    background-color: #ffffff !important;
}

/* Ensure no weird selection artifacts */
.rte-content *,
.table-cell .text-secondary * {
    background-color: transparent !important;
    color: inherit !important;
}

.job-desc-container {
    max-width: 400px;
}

.job-desc-text {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    display: block;
}

.read-more-hint {
    color: #3b82f6;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-block;
}

.read-more-hint:hover {
    color: #2563eb;
    background-color: rgba(59, 130, 246, 0.1);
    text-decoration: underline;
}

.read-more-hint:active {
    transform: scale(0.95);
}

.radio-group {
    display: flex;
    gap: 32px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    transition: color 0.2s;
}

.radio-label:hover {
    color: #1e293b;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.modal-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.modal-footer-actions .btn {
    padding: 12px 32px;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.modal-footer-actions #cancel-job-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.modal-footer-actions #cancel-job-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.modal-footer-actions button[type="submit"] {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

.modal-footer-actions button[type="submit"]:hover {
    background: #2563eb;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

/* Table Layout Optimization */
.table-container {
    width: 100%;
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
}

.table {
    width: 100% !important;
    border-collapse: collapse;
    table-layout: auto;
}

.table th,
.table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

/* Column Widths (6-column layout) */
.table th:nth-child(1),
.table td:nth-child(1) {
    width: 60px;
    text-align: center;
}

/* ID */
.table th:nth-child(2),
.table td:nth-child(2) {
    width: 200px;
}

/* Job Title */
.table th:nth-child(3),
.table td:nth-child(3) {
    width: auto;
}

/* Description (Flexible) */
.table th:nth-child(4),
.table td:nth-child(4) {
    width: 140px;
    text-align: center;
}

/* Created Date */
.table th:nth-child(5),
.table td:nth-child(5) {
    width: 120px;
    text-align: center;
}

/* Status */
.table th:nth-child(6),
.table td:nth-child(6) {
    width: 220px;
    text-align: center;
}

/* Actions */

/* Table Enhancements */
.table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

.badge {
    padding: 6px 12px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.7rem;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

/* Action Buttons in Table */
.table .btn {
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.2s;
}

.table .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table .btn-ghost {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.table .btn-ghost:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.table .btn-danger {
    background: #ef4444;
    color: #ffffff;
    border: none;
}

.table .btn-danger:hover {
    background: #dc2626;
}

/* Job Management Specific Styles */

/* Component Library Inlined */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    gap: var(--spacing-2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: var(--color-white);
    border-color: var(--color-gray-300);
    color: var(--color-gray-700);
}

.btn-danger {
    background-color: var(--color-error);
    color: var(--color-white);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-gray-600);
}

.btn-ghost:hover:not(:disabled) {
    background-color: var(--color-gray-100);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.input-field {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--color-primary);
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    font-size: 1.25rem;
}

.badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background: #f8fafc;
    padding: 16px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
}

.table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    transform: translateY(20px);
    transition: 0.3s;
}

.modal-overlay.open .modal-container {
    transform: translateY(0);
}

.modal-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3b82f6;
    min-width: 300px;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Table (Cards) for Job Management */
@media (max-width: 1024px) {
    .table-container {
        overflow-x: hidden;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100% !important;
    }

    .table tr.table-row {
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        margin-bottom: 24px;
        padding: 24px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    }

    .table td.table-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 0;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
        font-size: 1.05rem;
    }

    .table td.table-cell:last-child {
        border-bottom: none;
        padding-top: 20px;
        justify-content: center;
        gap: 12px;
    }

    .table td.table-cell::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        color: #64748b;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-right: 20px;
    }

    .table td[data-label="ID"] {
        display: none;
        /* Hide internal ID on mobile card */
    }

    .table td[data-label="Job Title"] {
        font-size: 1.25rem;
        font-weight: 800;
        color: #0f172a;
        justify-content: center;
        text-align: center;
        padding-bottom: 16px;
        border-bottom: 2px solid #f1f5f9;
    }

    .table td[data-label="Job Title"]::before {
        display: none;
    }

    .table td[data-label="Description"] {
        display: block;
        text-align: left;
        background: #f8fafc;
        border-radius: 12px;
        padding: 16px !important;
        margin: 12px 0;
        border: 1px solid #e2e8f0;
    }

    .table td[data-label="Description"]::before {
        display: block;
        margin-bottom: 8px;
        font-size: 0.75rem;
        color: #1e293b;
    }

    .job-desc-container {
        max-width: 100%;
    }

    .job-desc-text {
        font-size: 0.9rem;
        color: #1e293b;
        font-weight: 500;
    }

    .table td[data-label="Actions"] {
        flex-direction: row;
        border-top: 2px solid #f1f5f9;
        margin-top: 12px;
        padding-bottom: 0;
    }

    .table .btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 24px 16px;
    }

    .hero-content {
        justify-content: center;
    }

    .hero-logo img {
        height: 80px;
    }

    .hero-section h1 {
        font-size: 1.85rem;
    }

    .hero-section .btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-container {
        margin: 10px 10px 40px;
        padding: 0 8px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        text-align: center;
    }

    .page-header .btn {
        width: 100%;
        justify-content: center;
    }

    .card-body {
        padding: 16px;
    }

    .status-group {
        width: 100%;
        min-width: 0;
    }

    /* Form improvements for mobile modal */
    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .modal-footer-actions {
        flex-direction: row;
        gap: 12px;
        justify-content: center;
    }

    .modal-footer-actions .btn {
        flex: 1;
        max-width: 200px;
    }
}

/* Premium Notifications & Modals */
.toast {
    padding: 18px 28px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    border-left: 6px solid #3b82f6;
    min-width: 320px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2000;
}

.toast-success {
    border-left-color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-message {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

/* Premium Confirm Modal */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.confirm-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.confirm-container {
    background: #ffffff;
    border-radius: 24px;
    width: 90%;
    max-width: 440px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.confirm-overlay.open .confirm-container {
    transform: scale(1);
}

.confirm-icon {
    width: 64px;
    height: 64px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.confirm-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 12px;
}

.confirm-text {
    font-size: 1.05rem;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.5;
    font-weight: 500;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-actions .btn {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
}

.btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: none;
}

.btn-cancel:hover {
    background: #e2e8f0;
}