/* ========================================
   HDU Barkod & Stok - Özel Stiller
   ======================================== */

/* Toast Bildirimleri */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    font-size: 14px;
    font-weight: 500;
    min-width: 320px;
    max-width: 480px;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

.toast.toast-out {
    animation: toastSlideOut 0.3s ease-in forwards;
}

.toast-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.toast-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.toast-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.toast-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 560px;
    width: 90%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Barcode Input Focus */
.barcode-input:focus {
    box-shadow: 0 0 0 3px rgba(43, 140, 238, 0.2);
    border-color: #2b8cee;
    outline: none;
}

/* Tablo Satır Hover */
.table-row-hover:hover {
    background-color: #f8fafc;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sayfa geçiş animasyonu */
.page-content {
    animation: pageFadeIn 0.3s ease;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #ecfdf5;
    color: #065f46;
}

.badge-danger {
    background: #fef2f2;
    color: #991b1b;
}

.badge-warning {
    background: #fffbeb;
    color: #92400e;
}

/* Sepet animasyonu */
.cart-item-enter {
    animation: cartItemSlide 0.3s ease;
}

@keyframes cartItemSlide {
    from {
        transform: translateX(-16px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Inline edit */
.inline-edit {
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    width: 100%;
}

.inline-edit:hover {
    border-color: #e2e8f0;
    background: #f8fafc;
}

.inline-edit:focus {
    border-color: #2b8cee;
    background: white;
    box-shadow: 0 0 0 3px rgba(43, 140, 238, 0.1);
    outline: none;
}

/* Pulsing dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Print stili */
@media print {

    aside,
    header,
    .no-print {
        display: none !important;
    }

    main {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ========================================
   Onay Dialogu (Custom Confirm)
   ======================================== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: confirmFadeIn 0.2s ease;
}

.confirm-overlay.confirm-closing {
    animation: confirmFadeOut 0.2s ease forwards;
}

.confirm-card {
    background: white;
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: confirmSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.confirm-card.confirm-card-closing {
    animation: confirmSlideDown 0.2s ease forwards;
}

.confirm-icon-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.confirm-icon-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid;
    animation: confirmRingPulse 2s ease-in-out infinite;
}

.confirm-icon {
    font-size: 32px;
    font-variation-settings: 'FILL' 1, 'wght' 500;
}

.confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.confirm-message {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 28px;
    line-height: 1.5;
    padding: 0 8px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.confirm-btn {
    flex: 1;
    padding: 11px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.confirm-btn:focus-visible {
    outline: 2px solid #2b8cee;
    outline-offset: 2px;
}

.confirm-btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

.confirm-btn-cancel:hover {
    background: #e2e8f0;
}

.confirm-btn-confirm {
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.confirm-btn-confirm:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.confirm-btn-confirm:active {
    transform: translateY(0);
}

@keyframes confirmFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes confirmFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes confirmSlideUp {
    from {
        transform: translateY(32px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes confirmSlideDown {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    to {
        transform: translateY(16px) scale(0.97);
        opacity: 0;
    }
}

@keyframes confirmRingPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}