/* ==========================================================================
   KYLLIAN BOTS - UI COMPONENTS
   Toasts, Modals, Tabs, Forms, Skeleton Loaders, Accordions
   ========================================================================== */

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100% - 48px);
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: #0B1220;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    color: var(--text-white);
    font-size: 0.9rem;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.toast-success::before { background: var(--success); }
.toast.toast-error::before { background: var(--danger); }
.toast.toast-info::before { background: var(--primary); }
.toast.toast-warning::before { background: var(--warning); }

.toast-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    margin-top: 1px;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--neon); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.toast-message {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-white);
}

.toast.toast-hiding {
    animation: toastSlideOut 0.3s forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(50px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(50px) scale(0.95); }
}

/* ==========================================================================
   MODALS
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(6, 11, 22, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-backdrop.show {
    display: flex;
    opacity: 1;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 580px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-backdrop.show .modal-dialog {
    transform: scale(1) translateY(0);
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-white);
}

.modal-body {
    padding: 1.75rem;
    max-height: 75vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background: rgba(6, 11, 22, 0.4);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */

.form-group {
    margin-bottom: 1.35rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.form-control, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(6, 11, 22, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-control:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(6, 11, 22, 0.85);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-top: 0.35rem;
}

/* ==========================================================================
   TABS
   ========================================================================== */

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    list-style: none;
    overflow-x: auto;
}

.nav-tab-item {
    padding: 0.85rem 1.4rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-tab-item:hover {
    color: var(--text-white);
}

.nav-tab-item.active {
    color: var(--neon);
    border-bottom-color: var(--neon);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================
   ACCORDION (FAQ)
   ========================================== */

.accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.accordion-item:hover {
    border-color: var(--border-color-hover);
}

.accordion-header {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.05rem;
    user-select: none;
}

.accordion-icon {
    transition: transform 0.25s ease;
    color: var(--neon);
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-top: 1px solid rgba(37, 139, 255, 0.08);
    padding-top: 1rem;
}

.accordion-item.open .accordion-content {
    display: block;
}

/* ==========================================
   SKELETON LOADERS
   ========================================== */

.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text { height: 16px; margin-bottom: 8px; width: 100%; }
.skeleton-title { height: 24px; margin-bottom: 12px; width: 60%; }
.skeleton-card { height: 280px; border-radius: var(--radius-lg); }

/* ==========================================
   ALERTS
   ========================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); color: #34D399; }
.alert-error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3); color: #F87171; }
.alert-warning { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3); color: #FBBF24; }
.alert-info { background: rgba(37, 139, 255, 0.12); border: 1px solid rgba(37, 139, 255, 0.3); color: #60A5FA; }

/* ==========================================
   TABLES
   ========================================== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.table th {
    text-align: left;
    padding: 1rem 1.25rem;
    background: rgba(6, 11, 22, 0.6);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-white);
    vertical-align: middle;
}

.table tr:hover td {
    background: rgba(37, 139, 255, 0.04);
}
