/**
 * Project Custom Styles
 * Use this file for project-specific overrides and extensions.
 */

/* Table Styles */
.table-custom {
    vertical-align: middle;
}

.table-custom thead th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1.5px solid #e2e8f0;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #334155;
}

.table-custom tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.75);
}

/* Badges */
.badge-soft-success {
    background-color: #dcfce7;
    color: #15803d;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-soft-secondary {
    background-color: #f1f5f9;
    color: #64748b;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-soft-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-soft-primary {
    background-color: #e0e7ff;
    color: #4338ca;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
}

.badge-soft-warning {
    background-color: #fef3c7;
    color: #b45309;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
}

.badge-soft-info {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.35em 0.75em;
    font-size: 0.75rem;
}

/* Sidebar Submenu */
.sidebar-nav-item.has-submenu .sidebar-nav-link {
    cursor: pointer;
    user-select: none;
}

.sidebar-nav-item.has-submenu .submenu-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.sidebar-nav-item.has-submenu .sidebar-nav-link:not(.collapsed) .submenu-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 0.35rem 0 0.35rem 1.6rem;
    margin: 0;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.375rem;
    color: #94a3b8;
    font-size: 0.835rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-sublink i {
    font-size: 0.75rem;
    width: 14px;
    text-align: center;
    opacity: 0.8;
}

.sidebar-sublink:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

.sidebar-sublink.active {
    color: #ffffff;
    background-color: rgba(99, 102, 241, 0.25);
    font-weight: 600;
}

.sidebar-sublink.active i {
    color: #818cf8;
}

/* Form Styles & Required Indicator */
.required-star {
    color: #ef4444;
    font-weight: bold;
    margin-left: 2px;
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #334155;
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    border-color: #cbd5e1;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    padding: 0.55rem 0.85rem;
}

.form-control:focus, .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Step Wizard Cards in Import */
.step-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #ffffff;
    padding: 1.25rem;
    height: 100%;
    position: relative;
    transition: all 0.2s ease;
}

.step-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e0e7ff;
    color: #4f46e5;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.upload-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 0.75rem;
    padding: 2.25rem 1.5rem;
    text-align: center;
    background-color: #f8fafc;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.upload-dropzone:hover {
    border-color: #6366f1;
    background-color: #f5f3ff;
}

.upload-dropzone.drag-over {
    border-color: #4f46e5 !important;
    border-style: solid !important;
    background-color: #eef2ff !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.22) !important;
    transform: scale(1.008);
}

.upload-dropzone.has-file {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.upload-dropzone #dropzoneEmptyState,
.upload-dropzone #dropzoneEmptyState * {
    pointer-events: none;
}

/* ==========================================================================
   Responsive Overrides for Laptop, Tablet, & Mobile
   ========================================================================== */

/* Page Header Action Toolbar */
.page-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 991.98px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    .page-header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .page-header-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .page-header-actions .btn {
        width: 100%;
        text-align: center;
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
    }

    .page-title {
        font-size: 1.25rem !important;
    }

    .page-subtitle {
        font-size: 0.8rem !important;
    }
}

/* Table Responsive Horizontal Scroll Styling */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
    border-radius: inherit;
}

.table-responsive::-webkit-scrollbar {
    height: 7px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f8fafc;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Form Responsiveness on Mobile */
@media (max-width: 767.98px) {
    .admin-card-header {
        padding: 0.85rem 1rem !important;
    }

    .admin-card-body {
        padding: 1rem !important;
    }

    .stat-card-value {
        font-size: 1.4rem !important;
    }
}

/* Sidebar Dark Theme Scrollbar Overrides */
.admin-sidebar,
.admin-sidebar * {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.admin-sidebar::-webkit-scrollbar,
.admin-sidebar *::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.admin-sidebar::-webkit-scrollbar-track,
.admin-sidebar *::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb,
.admin-sidebar *::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover,
.admin-sidebar *::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.38);
}

