/* ========== FULL WIDTH ========== */
.container {
    max-width: none;
    width: 100%;
}

/* ========== TABLE ========== */
.table-wrapper {
    margin: 0 28px 20px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.table-container {
    flex: 1;
    overflow: auto;
    border-radius: 20px;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.table-container::-webkit-scrollbar { width: 8px; height: 8px; }
.table-container::-webkit-scrollbar-track { background: #f1f5f9; margin-top: 46px; }
.table-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
    min-width: 1200px;
}

th {
    position: sticky;
    top: 0;
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    padding: 12px 10px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    z-index: 10;
    cursor: pointer;
    user-select: none;
    white-space: normal;
    word-break: keep-all;
    text-align: center;
    vertical-align: middle;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    transition: background 0.2s;
}

th:hover {
    background: var(--primary-dark);
}

th.sorted-asc::after {
    content: "\f0dd";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 6px;
}

th.sorted-desc::after {
    content: "\f0de";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    margin-left: 6px;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
    white-space: nowrap;
    color: #1e293b;
    font-size: 0.82rem;
    transition: background 0.15s;
}

tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

tbody tr:nth-child(odd) {
    background-color: #fff;
}

tbody tr:hover td {
    background: rgba(var(--primary-rgb),0.06) !important;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    gap: 6px;
}

.status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.status-rejected {
    background: #fce4ec;
    color: #b71c1c;
}

.status-incoming {
    background: #dbeafe;
    color: #1e40af;
}

.status-new {
    background: #dbeafe;
    color: #1e40af;
}

/* ========== STATUS TABS (as in shifts module) ========== */
.status-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-tab {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    height: 32px;
    padding: 0 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.status-tab:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.15);
}
.status-tab.active {
    background: white;
    border-color: white;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.status-tab .count {
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    line-height: 14px;
}
.status-tab.active .count {
    background: var(--primary);
    color: white;
}

/* ========== DETAIL SIDEBAR ========== */
.ds-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 3px 14px rgba(var(--primary-rgb),0.2);
}
.ds-hero-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}
.ds-hero-info { flex: 1; min-width: 0; }
.ds-hero-info h2 {
    font-size: 1rem;
    font-weight: 800;
    color: white;
    margin: 0 0 3px 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ds-hero-info .ds-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
}
.ds-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.ds-status-badge.status-confirmed {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
}
.ds-status-badge.status-rejected {
    background: rgba(255,200,200,0.25);
    color: #ffe0e0;
    border: 1px solid rgba(255,200,200,0.3);
}
.ds-status-badge.status-incoming {
    background: rgba(100,180,255,0.25);
    color: #bfdbfe;
    border: 1px solid rgba(100,180,255,0.3);
}
.ds-section { margin-bottom: 10px; }
.ds-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ds-section-title i { font-size: 0.65rem; color: #94a3b8; }
.ds-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 1px solid #e8ecf0;
    overflow: hidden;
}
.ds-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    border-bottom: 1px solid #f0f2f5;
    gap: 10px;
    transition: background 0.15s;
}
.ds-row:hover { background: #f9fafb; }
.ds-row:last-child { border-bottom: none; }
.ds-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    min-width: 70px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ds-label i { font-size: 0.65rem; color: #94a3b8; width: 14px; }
.ds-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    word-break: break-word;
    flex: 1;
}
.ds-value.muted { color: #64748b; font-weight: 600; }

/* ========== NOTIFICATION ========== */
#exportNotification {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
#exportNotification.show { opacity: 1; }
#exportNotification.error { background: #dc2626; }
#exportNotification.warning { background: #f59e0b; color: #1e293b; }

/* ========== TABLE LOADER ========== */
.table-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.98);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    gap: 20px;
}

.table-loader .spinner {
    width: 70px;
    height: 70px;
    border: 6px solid #f3f4f6;
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.table-loader span {
    font-size: 1.2rem;
    color: #1e293b;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ========== PAGINATION ========== */
.pagination {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 300;
    display: flex;
    justify-content: flex-end;
}

.pagination-inner {
    display: flex;
    align-items: center;
    gap: 3px;
    background: white;
    padding: 5px 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    font-size: 12px;
}

.pagination-inner button {
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.15s;
    color: #475569;
    min-width: 28px;
    text-align: center;
    line-height: 1.3;
}

.pagination-inner button:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.pagination-inner button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 700;
}

.pagination-inner button:disabled {
    opacity: 0.3;
    cursor: default;
    background: transparent;
}

.pagination-inner .page-dots {
    color: #94a3b8;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 0 1px;
}

.pagination-inner .page-info {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    margin: 0 2px;
    white-space: nowrap;
}

.pagination-inner .page-size-select {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
    padding-left: 6px;
    border-left: 1px solid #e2e8f0;
    font-size: 11px;
    color: #94a3b8;
}

.pagination-inner .page-size-select i {
    font-size: 10px;
}

.pagination-inner .page-size-select select {
    padding: 2px 4px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 11px;
    background: white;
    cursor: pointer;
    color: #1e293b;
    font-weight: 500;
}

.pagination-inner .page-size-select select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========== FILTER DROPDOWN ========== */
.filter-group {
    position: relative;
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px 0;
    margin-top: 4px;
}

.filter-dropdown.open {
    display: block;
}

.filter-dropdown label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    font-size: 0.82rem;
    color: #475569;
    cursor: pointer;
    transition: background 0.1s;
}

.filter-dropdown label:hover {
    background: #f1f5f9;
}

.filter-dropdown input[type="checkbox"] {
    accent-color: var(--primary);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9rem;
    margin: 4px 0;
}