[x-cloak] { display: none !important; }

/* Global loading */
.global-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    z-index: 10000;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}
.global-loading-bar.is-active {
    width: 100%;
    opacity: 1;
}
.global-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(1px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.global-loading-content {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.85);
}

/* Form elemanları dark uyumlu */
input, select, textarea, button {
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    ring: 2px;
}

/* Toast */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    max-width: 20rem;
}
.toast-success { background: #059669; color: #fff; }
.toast-error { background: #dc2626; color: #fff; }
.toast-info { background: #475569; color: #fff; }
.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}
.toast-out {
    animation: slideOut 0.3s ease-out forwards;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Loading spinner */
.loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(248, 250, 252, 0.2);
    border-top-color: #f8fafc;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton */
.skeleton-line {
    height: 1rem;
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
    animation: skeleton 1.2s ease-in-out infinite;
    border-radius: 0.25rem;
}
@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
