/* ===== Global Styles ===== */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== RTL Support ===== */
[dir="rtl"] {
    text-align: right;
}

    [dir="rtl"] .me-auto {
        margin-right: 0 !important;
        margin-left: auto !important;
    }

    [dir="rtl"] .ms-auto {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    [dir="rtl"] .me-1, [dir="rtl"] .me-2, [dir="rtl"] .me-3 {
        margin-right: 0 !important;
    }

    [dir="rtl"] .ms-1, [dir="rtl"] .ms-2, [dir="rtl"] .ms-3 {
        margin-left: 0 !important;
    }

/* ===== Form Styles ===== */
.form-control:focus,
.form-select:focus {
    border-color: #4f85ff;
    box-shadow: 0 0 0 0.2rem rgba(30, 60, 255, 0.15);
}

.form-label {
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
}

/* ===== Validation Styles ===== */
.validation-message {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.invalid {
    border-color: #dc2626 !important;
}

/* ===== Loading Spinner ===== */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

    .loading-spinner.dark {
        border-color: rgba(0, 0, 0, 0.1);
        border-top-color: #1e3cff;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Alert Styles ===== */
.alert-custom {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

    .alert-custom.success {
        background: #d1fae5;
        color: #065f46;
    }

    .alert-custom.error {
        background: #fee2e2;
        color: #991b1b;
    }

    .alert-custom.warning {
        background: #fef3c7;
        color: #92400e;
    }

    .alert-custom.info {
        background: #dbeafe;
        color: #1e40af;
    }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

    /* Change this selector */
    .empty-state > i {
        font-size: 4rem;
        opacity: 0.5;
        margin-bottom: 1rem;
    }

    .empty-state h4 {
        color: #334155;
        margin-bottom: 0.5rem;
    }

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 1.5rem;
}

    .page-header h2 {
        font-weight: 700;
        color: #1e293b;
        margin: 0;
    }

    .page-header p {
        color: #dde0e5;
        margin: 0.5rem 0 0;
    }

/* ===== Breadcrumb ===== */
.breadcrumb-custom {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

    .breadcrumb-custom a {
        color: #6366f1;
        text-decoration: none;
    }

        .breadcrumb-custom a:hover {
            text-decoration: underline;
        }

/* ===== File Upload ===== */
.file-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .file-upload-zone:hover {
        border-color: #6366f1;
        background: #f8fafc;
    }

    .file-upload-zone.dragover {
        border-color: #6366f1;
        background: #eef2ff;
    }

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-item-icon {
    width: 40px;
    height: 40px;
    background: #e0e7ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 0.8rem;
    color: #64748b;
}

.file-item-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0.25rem;
}

/* ===== Action Buttons ===== */
/*.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .action-btn.view {
        background: #dbeafe;
        color: #2563eb;
    }

        .action-btn.view:hover {
            background: #2563eb;
            color: #fff;
        }

    .action-btn.edit {
        background: #fef3c7;
        color: #d97706;
    }

        .action-btn.edit:hover {
            background: #d97706;
            color: #fff;
        }

    .action-btn.delete {
        background: #fee2e2;
        color: #dc2626;
    }

        .action-btn.delete:hover {
            background: #dc2626;
            color: #fff;
        }*/

/* ===== Pagination ===== */
.pagination-custom {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

    .pagination-custom .page-btn {
        min-width: 36px;
        height: 36px;
        border: 1px solid #e2e8f0;
        background: #fff;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

        .pagination-custom .page-btn:hover {
            border-color: #6366f1;
            color: #6366f1;
        }

        .pagination-custom .page-btn.active {
            background: #6366f1;
            border-color: #6366f1;
            color: #fff;
        }
