.warehouse-v2-layout {
    display: flex;
    gap: 0;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

/* Fix Topbar alignment within warehouse */
.topbar .page-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    margin-right: 8px;
    display: none;
    /* Hide by default, show if needed or follow system loader */
}

/* Ensure sidebar compatibility */
.app-layout .main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-layout.sidebar-hidden .main-content {
    margin-left: 0;
}

/* Common Layout Elements */
.content-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-card.full-height {
    height: 100%;
}

.mb-4 {
    margin-bottom: 24px;
}

/* Left Column: Orders Sidebar */
.orders-column {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    background: #f8fafc;
    z-index: 10;
}

.orders-column .content-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.card-header {
    padding: 20px 24px;
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
}

.header-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-main h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.badge-count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.job-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Job Item V2 */
.job-card {
    padding: 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.job-card.active {
    background: #f0f7ff;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.job-card.urgent {
    border-left: 5px solid #ef4444 !important;
    background: #fff1f2 !important;
    position: relative;
}

.job-card.urgent::after {
    content: 'ACİL';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.job-card.urgent .imalat-no {
    color: #b91c1c;
}

.job-card.done {
    opacity: 0.8;
    background: #f0fdf4 !important;
    /* Light Green */
    border-color: #22c55e !important;
}

.job-card.done .imalat-no {
    color: #15803d;
    text-decoration: line-through;
    opacity: 0.7;
}

.job-card {
    position: relative;
    padding-right: 45px;
    /* Space for the toggle */
}

/* Inline Selection Toggle */
.job-done-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
    opacity: 0.3;
    /* Soluk görünüm */
}

.job-done-toggle:hover {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.job-done-toggle.is-done {
    color: #22c55e;
    opacity: 1;
    /* Tamamlandığında parlak */
}

.job-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.imalat-no {
    font-weight: 800;
    font-size: 14px;
    color: var(--text-main);
}

.job-date {
    font-size: 11px;
    color: var(--text-muted);
}

.client-name {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right Column: Details Content */
.details-column {
    flex: 1;
    overflow-y: auto;
    background: #f1f5f9;
    padding: 24px 32px;
}

/* Welcome Hero & Global Upload */
.welcome-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 80px 40px;
    background: radial-gradient(circle at top right, #f8fafc 0%, #ffffff 100%);
    min-height: 100%;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: var(--primary);
    opacity: 0.03;
    border-radius: 50%;
}

.hero-icon {
    width: 100px !important;
    height: 100px !important;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white !important;
    border-radius: 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px !important;
    margin: 0 auto 30px !important;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.3);
}

.welcome-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.welcome-content p {
    color: #64748b;
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.global-upload-section {
    width: 100%;
    max-width: 900px;
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid #e2e8f0;
}

.global-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    text-align: left;
}

.upload-box h3,
.projects-box h3 {
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-area {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    background-image: radial-gradient(#f1f5f9 1px, transparent 1px);
    background-size: 20px 20px;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: #f0f7ff;
    transform: scale(1.02);
}

.upload-area i {
    color: var(--primary);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.upload-area:hover i {
    transform: translateY(-5px);
}

.project-list-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    max-height: 450px;
    overflow-y: auto;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.project-item {
    padding: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.project-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateX(5px);
}

.project-item .name {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 2px;
}

.project-item .date {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-actions {
    display: flex;
    align-items: center;
}

.delete-project-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-project-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Detail Header - Compact V2 */
.detail-header-card {
    padding: 16px 32px;
    /* Reduced height */
    background: white;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #eef2f6;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.detail-header-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: var(--primary);
    opacity: 0.8;
}

.order-branding {
    display: flex;
    align-items: center;
    gap: 16px;
    /* Reduced gap */
}

.order-icon {
    width: 44px;
    /* Reduced size */
    height: 44px;
    /* Reduced size */
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.order-title-group h2 {
    margin: 0;
    font-size: 18px;
    /* Reduced font size */
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.order-title-group p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

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

.action-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: #64748b;
    font-size: 16px;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

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

/* Slots Grid */
.slots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-bottom: 24px;
}

.slot-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.slot-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
}

.slot-header.production {
    background: #f0f7ff;
    color: var(--primary);
}

.slot-header.supplier {
    background: #fffbeb;
    color: #d97706;
}

.slot-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
}

.approve-all-slot-btn {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.approve-all-slot-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.production .approve-all-slot-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.supplier .approve-all-slot-btn:hover {
    color: #d97706;
    border-color: #d97706;
}

.material-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
}

.empty-materials {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
}

.empty-materials i {
    font-size: 24px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-materials p {
    font-size: 13px;
    margin: 0;
}

/* Material Card V2 */
.mat-card-v2 {
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.mat-card-v2:hover {
    background: #f1f5f9;
}

.mat-card-v2.approved {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.mat-main {
    flex: 1;
}

.mat-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
}

.mat-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.mat-qty-badge {
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 12px;
    border: 1px solid var(--border-color);
    margin: 0 12px;
}

.check-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
}

.check-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.approved .check-btn {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-box {
    background: white;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.close-modal {
    border: none;
    background: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.upload-area:hover,
.upload-area.active {
    border-color: var(--primary);
    background: #f0f7ff;
}

.upload-area i {
    font-size: 40px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.upload-area p {
    margin: 0;
    color: var(--text-muted);
    font-weight: 500;
}

.upload-area label {
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.excel-preview {
    margin-top: 24px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.excel-preview h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 700;
}

.slot-selector-group {
    margin-top: 24px;
}

.slot-selector-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.radio-group {
    display: flex;
    gap: 16px;
}

.radio-item {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-item:has(input:checked) {
    border-color: var(--primary);
    background: #f0f7ff;
}

.radio-item input {
    margin: 0;
}

.radio-item span {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 600;
    display: none;
    z-index: 3000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
    }

    to {
        transform: translateY(0);
    }
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary-outline {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

/* --- MODERN ERP LOGS SYSTEM --- */
.logs-container-v2 {
    background: #ffffff;
    border-radius: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease-out;
}

.logs-header-v2 {
    padding: 24px 32px;
    background: linear-gradient(to right, #ffffff, #f8fafc);
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 24px 24px 0 0;
}

.logs-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logs-title i {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #d97706;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.1);
}

.logs-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.logs-title p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.logs-content-v2 {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.logs-premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.logs-premium-table th {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: left;
}

.logs-premium-table tr {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.logs-premium-table tr:hover {
    transform: scale(1.002) translateX(4px);
}

.logs-premium-table td {
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.logs-premium-table td:first-child {
    border-left: 1px solid #f1f5f9;
    border-radius: 16px 0 0 16px;
}

.logs-premium-table td:last-child {
    border-right: 1px solid #f1f5f9;
    border-radius: 0 16px 16px 0;
}

/* Log Specific Widgets */
.log-time-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.log-date {
    font-weight: 700;
    color: #1e293b;
    font-size: 13.5px;
}

.log-hour {
    font-size: 11.5px;
    color: #94a3b8;
    font-weight: 500;
}

.log-imalat-no {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: #2563eb;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: 1px solid #dbeafe;
}

.log-mat-info {
    display: flex;
    flex-direction: column;
}

.log-mat-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 14.5px;
}

.log-mat-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.log-person-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-person-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-weight: 800;
    font-size: 12px;
    border: 1px solid #cbd5e1;
}

.log-status-badge {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.log-status-approved {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.log-status-revoked {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* --- MODERN ERP LOGS SYSTEM --- */
.logs-container-v2 {
    background: #ffffff;
    border-radius: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease-out;
}

.logs-header-v2 {
    padding: 24px 32px;
    background: linear-gradient(to right, #ffffff, #f8fafc);
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 24px 24px 0 0;
}

.logs-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logs-title i {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #d97706;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.1);
}

.logs-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.logs-title p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.logs-content-v2 {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.logs-premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.logs-premium-table th {
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: left;
}

.logs-premium-table td {
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shortage Specifics */
.shortage-filters {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
}

.filter-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

.order-group-header td {
    background: #f8fafc !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    border-top: 1px solid #e2e8f0;
}

.order-item-row td {
    padding-left: 40px !important;
    background: white;
}

/* ═══════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════ */

/* ─── Tablet & Below: Sidebar margin reset ─── */
@media (max-width: 992px) {
    .app-layout .main-content {
        margin-left: 0 !important;
    }
}

/* ─── Mobile: Full responsive overrides ─── */
@media (max-width: 768px) {

    /* Layout: Stack columns vertically */
    .warehouse-v2-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    /* Orders column: horizontal strip at top */
    .orders-column {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 280px;
        overflow-y: auto;
    }

    /* Details column: full width */
    .details-column {
        padding: 16px;
        overflow-y: visible;
    }

    /* ─── Topbar ─── */
    .topbar {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
        padding: 12px 16px !important;
        height: auto !important;
    }

    .topbar .page-title {
        width: 100%;
        gap: 10px;
    }

    .topbar .page-title h1 {
        font-size: 16px;
    }

    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .topbar-actions .search-box {
        flex: 1;
        min-width: 140px;
    }

    .topbar-actions .search-box input {
        width: 100%;
    }

    .topbar-actions .btn-primary {
        padding: 6px 12px !important;
        font-size: 11px !important;
        height: auto !important;
    }

    .topbar-actions .current-date {
        font-size: 11px;
    }

    /* ─── Welcome Card ─── */
    .welcome-card {
        padding: 40px 20px;
    }

    .hero-icon {
        width: 70px !important;
        height: 70px !important;
        font-size: 28px !important;
        margin-bottom: 20px !important;
    }

    .welcome-content h2 {
        font-size: 22px;
    }

    .welcome-content p {
        font-size: 14px;
    }

    /* Upload Grid: Stack vertically */
    .global-upload-section {
        margin-top: 30px;
        padding-top: 30px;
    }

    .global-upload-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* ─── Detail Header Card ─── */
    .detail-header-card {
        padding: 14px 16px;
        border-radius: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .order-branding {
        flex-wrap: wrap;
        gap: 10px;
    }

    .order-title-group h2 {
        font-size: 16px;
    }

    /* ─── Slots Grid: Single column ─── */
    .slots-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ─── Material Cards ─── */
    .mat-card-v2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .mat-qty-badge {
        margin: 0;
    }

    /* ─── Project Selector ─── */
    #projectSelector div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* ─── Modals ─── */
    .modal-box {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    /* ─── Logs Panel ─── */
    .logs-container-v2 {
        border-radius: 14px;
    }

    .logs-header-v2 {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        border-radius: 14px 14px 0 0;
    }

    .logs-content-v2 {
        padding: 12px;
    }

    .logs-premium-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .logs-premium-table th,
    .logs-premium-table td {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* ─── Shortages Panel ─── */
    .shortage-filters {
        flex-wrap: wrap;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }

    /* ─── Toast ─── */
    .toast-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
        text-align: center;
    }

    /* ─── Job Card tweaks ─── */
    .job-list-container {
        padding: 10px;
        gap: 8px;
    }

    .job-card {
        padding: 12px;
        padding-right: 40px;
    }

    .card-header {
        padding: 14px 16px;
    }
}

/* ─── Very small screens ─── */
@media (max-width: 480px) {
    .topbar .page-title h1 {
        font-size: 14px;
    }

    .topbar-actions .btn-primary .btn-label,
    .topbar-actions .btn-primary span:not(i) {
        display: none;
    }

    .orders-column {
        max-height: 220px;
    }

    .welcome-content h2 {
        font-size: 18px;
    }

    .detail-header-card {
        padding: 12px;
    }

    .order-branding .btn-primary {
        padding: 8px 12px !important;
        font-size: 12px;
    }

    .slot-header {
        padding: 12px 14px;
    }

    .slot-title {
        font-size: 12px;
    }
}