/* Modern CSS for JobShop Official Numbers */

/* ===== IMPORTS & ROOT VARIABLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #22c55e;
    --success-light: #dcfce7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== PAGE CONTAINER ===== */
.jobshop-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 24px 32px;
    max-width: 1440px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease-out;
}

/* ===== PAGE HEADER ===== */
.jobshop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 24px 32px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    animation: slideDown 0.5s ease-out;
}

.jobshop-header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    letter-spacing: -0.5px;
}

.jobshop-header-left p {
    font-size: 14px;
    color: var(--gray-500);
    margin: 4px 0 0 0;
}

.jobshop-header-right {
    display: flex;
    gap: 12px;
}

/* ===== BUTTONS ===== */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-primary-custom i {
    font-size: 16px;
}

/* ===== TABLE CONTAINER ===== */
.jobshop-table-wrapper {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.jobshop-table-wrapper .table-header {
    padding: 20px 24px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.jobshop-table-wrapper .table-header .table-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-700);
}

/* ===== TABLE STYLES ===== */
.jobshop-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.jobshop-table thead {
    background: var(--gray-50);
}

.jobshop-table thead th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
    position: sticky;
    top: 0;
    background: var(--gray-50);
}

.jobshop-table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-100);
}

.jobshop-table tbody tr:hover {
    background: var(--gray-50);
    transform: scale(1.002);
}

.jobshop-table tbody tr:last-child {
    border-bottom: none;
}

.jobshop-table tbody td {
    padding: 14px 20px;
    color: var(--gray-700);
    vertical-align: middle;
}

/* ===== STATUS BADGE ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    transition: var(--transition);
}

.status-badge.assigned {
    background: var(--success-light);
    color: var(--success);
}

.status-badge.unassigned {
    background: var(--warning-light);
    color: var(--warning);
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-badge.assigned .dot {
    background: var(--success);
}

.status-badge.unassigned .dot {
    background: var(--warning);
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.action-btn.assign {
    background: var(--primary-light);
    color: var(--primary);
}

.action-btn.assign:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.action-btn.delete {
    background: var(--danger-light);
    color: var(--danger);
}

.action-btn.delete:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.action-btn i {
    font-size: 14px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--gray-300);
}

.empty-state h3 {
    font-size: 20px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

/* ===== MODAL STYLES ===== */
.custom-modal .modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

.custom-modal .modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 20px 28px;
    border: none;
}

.custom-modal .modal-header .modal-title {
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.custom-modal .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.custom-modal .modal-header .btn-close:hover {
    opacity: 1;
}

.custom-modal .modal-body {
    padding: 28px;
}

.custom-modal .modal-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ===== FORM STYLES ===== */
.custom-form .form-group {
    margin-bottom: 20px;
}

.custom-form .form-label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

.custom-form .form-control,
.custom-form .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--gray-800);
    transition: var(--transition);
    background: white;
}

.custom-form .form-control:focus,
.custom-form .form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-light);
}

.custom-form .form-control::placeholder {
    color: var(--gray-400);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .jobshop-container {
        padding: 16px;
    }

    .jobshop-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .jobshop-header-right {
        width: 100%;
    }

    .jobshop-header-right .btn-primary-custom {
        width: 100%;
        justify-content: center;
    }

    .jobshop-table-wrapper .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .jobshop-table thead th {
        padding: 10px 12px;
        font-size: 11px;
    }

    .jobshop-table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }

    .action-btn {
        justify-content: center;
    }

    .custom-modal .modal-body {
        padding: 20px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== LOADING SHIMMER ===== */
.shimmer-loading {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===== TOOLTIP ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 6px 12px;
    background: var(--gray-900);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

[data-tooltip]:hover:before {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* ===== COUNT BADGE ===== */
.count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}