/* GlassCAD ortak tablo standardı (TABLE_STANDARDS_GUIDE). order.css içindeki "HEROFIS / GLASSCAD TABLE STANDARDS" bloğunun (satır 1306-1858) kopyasıdır; sipariş sayfası kendi order.css'ini kullanır. */

/* ==========================================================================
   HEROFIS / GLASSCAD TABLE STANDARDS (TABLE_STANDARDS_GUIDE)
   ========================================================================== */

/* 1. Global Sayı Inputu Kuralı (Okları Engelleme) */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
input[type=number] {
    -moz-appearance: textfield !important;
}

/* 2. Table Container Height Standard (Prevents Blank White Gap) */
.glasscad-clean-wrapper {
    background: #ffffff;
    position: relative;
}

.table-responsive-container {
    max-height: calc(100vh - 310px);
    min-height: auto;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    background: #ffffff;
}

/* 3. Sticky Table Header & Modern Row Focus */
.glasscad-clean-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.glasscad-clean-table thead th {
    position: sticky;
    top: 0;
    z-index: 25;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.glasscad-clean-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.glasscad-clean-table tbody tr:hover {
    background-color: #f8fafc;
}

.glasscad-clean-table tbody td {
    padding: 8px 12px;
    vertical-align: middle;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
}

.glasscad-clean-table tbody tr.row-clicked {
    background-color: #f1f5f9;
}

.glasscad-clean-table tbody tr.row-selected {
    background-color: #eff6ff;
}

/* Çift Çizgi Standartı:
   - Checkbox tek başına: Açık mavi çizgi (#60a5fa)
   - Satır tıklaması tek başına: Koyu/normal mavi çizgi (#2563eb)
   - İkisi aynı anda: Sol kenarda 4px koyu mavi, hemen bitişiğinde 4px açık mavi çizgi
*/
.glasscad-clean-table tbody tr.row-selected td:first-child {
    box-shadow: inset 4px 0 0 0 #60a5fa !important;
}

.glasscad-clean-table tbody tr.row-clicked td:first-child {
    box-shadow: inset 4px 0 0 0 #2563eb !important;
}

.glasscad-clean-table tbody tr.row-selected.row-clicked td:first-child,
.glasscad-clean-table tbody tr.row-clicked.row-selected td:first-child {
    box-shadow: inset 4px 0 0 0 #2563eb, inset 8px 0 0 0 #60a5fa !important;
}

/* 4. Durum Parlaması & Vurgulama (Status Highlighting - Cari Vurgulama Standardı) */
.status-badge-text {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.status-badge-text.is-status-active {
    font-weight: 800 !important;
    transform: scale(1.05);
}

/* 5. Top Action Toolbar (.top-action-bar-wrapper) */
.top-action-bar-wrapper {
    padding: 0.8rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    min-height: 55px;
    background-color: #305b9f;
    border-radius: 8px 8px 0 0;
    color: whitesmoke;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #1e3a8a;
}

.top-icons-left, .top-icons-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.soft-icon {
    font-size: 20px;
    margin: 0 10px;
    opacity: 0.85;
    filter: saturate(0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.soft-icon:hover {
    opacity: 1;
    filter: saturate(1);
    transform: scale(1.15) translateY(-2px);
}

.soft-icon.disabled, .soft-icon[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.top-action-separator {
    height: 24px;
    width: 2px;
    background: rgba(255, 255, 255, 0.35);
    margin: 0 10px;
    border-radius: 2px;
    align-self: center;
}

.multi-select-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 3px 10px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
}

.multi-select-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #f8fafc;
    padding: 3px 8px;
    background: rgba(14, 165, 233, 0.25);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.multi-select-badge i {
    color: #38bdf8;
    font-size: 11px;
}

.multi-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
}

.multi-btn i {
    font-size: 14px;
}

.multi-btn-primary {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

.multi-btn-primary:hover {
    background: #d97706;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.multi-btn-info {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

.multi-btn-info:hover {
    background: #0369a1;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(2, 132, 199, 0.4);
}

.multi-btn-success {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.multi-btn-success:hover {
    background: #059669;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.multi-btn-excel {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3);
}

.multi-btn-excel:hover {
    background: #15803d;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.4);
}

.multi-btn-clear {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11.5px;
}

.multi-btn-clear:hover {
    background: rgba(239, 68, 68, 0.45) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* 6. Dynamic Tab Bar & Bucket View */
.waybill-tab-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.waybill-tab-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.waybill-tab-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.tab-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    border-radius: 10px;
    padding: 1px 6px;
}

.waybill-tab-btn.active .tab-badge {
    background: #ffffff;
    color: #2563eb;
}

.bucket-remove-btn {
    border: none;
    background: transparent;
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.bucket-remove-btn:hover {
    background: #fee2e2;
}

.selected-bucket-container {
    padding: 12px;
    background: #ffffff;
}

.selected-bucket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f1f5f9;
    border-radius: 6px;
    margin-bottom: 12px;
}

.selected-bucket-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bucket-summary {
    font-size: 13px;
    color: #475569;
}

.bucket-summary strong {
    color: #1d4ed8;
}

.tab-status-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* 7. Empty State Card */
.glasscad-empty-state {
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.empty-state-icon-box {
    width: 64px;
    height: 64px;
    background: #f1f5f9;
    color: #94a3b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 13px;
    color: #64748b;
    max-width: 360px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.empty-state-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.empty-state-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

/* 8. CustomerCheck 5-Button Pagination Controls */
.gc-pagination-bar {
    background: #ffffff;
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.gc-pagination-info {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gc-pagination-info strong {
    color: #0f172a;
}

.gc-pagination-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.gc-pagination-btn {
    width: 36px;
    height: 34px;
    border: none;
    border-right: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    outline: none;
    padding: 0;
}

.gc-pagination-btn:last-child {
    border-right: none;
}

.gc-pagination-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #2563eb;
}

.gc-pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gc-pagination-btn i {
    font-size: 12px;
}

.gc-pagination-input {
    width: 44px;
    height: 34px;
    border: none;
    border-right: 1px solid #cbd5e1;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    outline: none;
    background: #ffffff;
    padding: 0;
    margin: 0;
    transition: background 0.15s;
}

.gc-pagination-input:focus {
    background: #eff6ff;
}

.gc-pagination-input::-webkit-outer-spin-button,
.gc-pagination-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.gc-pagination-input[type=number] {
    -moz-appearance: textfield;
}

@media (max-width: 576px) {
    .gc-pagination-bar {
        justify-content: center;
        text-align: center;
    }
}
