/* SAP GATE PASS STYLES — ALIGNED WITH ASSET MASTER */

/* --- Toolbar --- */
.sgp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    animation: dash-fadeIn 0.5s ease-out;
}

.sgp-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sgp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sgp-select-wrapper {
    position: relative;
}

.sgp-filter-select {
    padding: 0.6rem 2rem 0.6rem 0.85rem;
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius-sm);
    background: var(--dash-surface);
    color: var(--dash-text);
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: all 0.3s ease;
    min-width: 240px;
}

.sgp-filter-select:focus {
    outline: none;
    border-color: var(--dash-primary);
    box-shadow: 0 0 0 3px var(--dash-primary-light);
}

/* --- Buttons --- */
.sgp-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--dash-radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.sgp-btn svg {
    width: 16px;
    height: 16px;
}

.sgp-btn-dry {
    background: var(--dash-primary);
    color: #fff;
    box-shadow: 0 4px 16px var(--dash-primary-glow);
}

.sgp-btn-dry:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--dash-primary-glow);
}

.sgp-btn-sync {
    background: var(--dash-success);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.sgp-btn-sync:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.35);
}

.sgp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* --- Table & Row Actions --- */
.sgp-panel {
    position: relative;
    overflow: hidden;
}

.sgp-row-actions {
    display: flex;
    gap: 0.4rem;
}

.sgp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--dash-border);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--dash-surface-2);
    color: var(--dash-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sgp-action-btn svg {
    width: 13px;
    height: 13px;
}

.sgp-action-btn.sync:hover:not(:disabled) {
    background: var(--dash-success-light);
    border-color: var(--dash-success);
    color: var(--dash-success);
}

.sgp-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sgp-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sgp-badge-truck {
    background: var(--dash-primary-light);
    color: var(--dash-primary);
}

.sgp-badge-driver {
    background: var(--dash-violet-light);
    color: var(--dash-violet);
}

.sgp-badge-doc {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

/* --- Loading --- */
.sgp-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 100;
    background: rgba(10, 10, 26, 0.7);
    backdrop-filter: blur(4px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-radius: var(--dash-radius);
}

.sgp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--dash-primary);
    border-radius: 50%;
    animation: dash-spin 0.8s linear infinite;
}

.sgp-loading-text {
    font-size: 0.82rem;
    color: var(--dash-text-secondary);
    font-weight: 500;
}

/* --- Empty State --- */
.sgp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.sgp-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--dash-surface-2);
    color: var(--dash-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.sgp-empty-icon svg {
    width: 32px;
    height: 32px;
}

.sgp-empty-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dash-text);
    margin-bottom: 0.3rem;
}

.sgp-empty-desc {
    font-size: 0.82rem;
    color: var(--dash-text-muted);
}

/* --- Row Status --- */
.sgp-row-synced {
    background: rgba(16, 185, 129, 0.05) !important;
}

.sgp-row-error {
    background: rgba(239, 68, 68, 0.05) !important;
}

.sgp-sync-status {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 2px;
}

.sgp-sync-status.success {
    color: var(--dash-success);
}

.sgp-sync-status.error {
    color: var(--dash-danger);
}

.sgp-sync-status.pending {
    color: var(--dash-info);
}

/* --- Toast --- */
.sgp-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    background: var(--dash-surface);
    color: var(--dash-text);
    border: 1px solid var(--dash-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
}

.sgp-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.sgp-toast.success {
    border-left: 4px solid var(--dash-success);
}

.sgp-toast.error {
    border-left: 4px solid var(--dash-danger);
}

.sgp-toast.info {
    border-left: 4px solid var(--dash-info);
}