/* Modern Enterprise Styling - Enhanced */

:root {
    --brand-color: #2c3e50;
    --brand-primary: #4a90e2;
    --brand-secondary: #f39c12;
    --panel-shadow: 0 10px 20px rgba(0,0,0,0.05);
    --panel-border: #e1e8ed;
    --bg-light: #f8f9fa;
    --text-dark: #333;
}

body {
    background-color: var(--bg-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

/* Enhanced Cards */
.enterprise-panel {
    border: none;
    border-radius: 12px;
    box-shadow: var(--panel-shadow);
    margin-top: 20px;
    margin-bottom: 20px;
    background: #fff;
    transition: transform 0.2s ease-in-out;
    overflow: hidden;
}

.enterprise-panel:hover {
    transform: translateY(-5px);
}

.enterprise-panel .panel-heading {
    background-color: #fff;
    border-bottom: 2px solid var(--bg-light);
    font-weight: 700;
    font-size: 1.2rem;
    padding: 20px;
    color: var(--brand-color);
    letter-spacing: 0.5px;
}

.enterprise-panel .panel-body {
    padding: 25px;
}

/* Enhanced Tables - Global Modernization */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.table thead th,
.table th {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    border: none;
    padding: 18px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    color: #4a5568;
    letter-spacing: 0.8px;
    border-top: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr {
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.table tbody td,
.table td {
    padding: 20px;
    border: none;
    vertical-align: middle;
    color: #2d3748;
    font-weight: 500;
    font-size: 14px;
}

.table tbody tr:hover {
    background-color: #f7fbff;
    box-shadow: 0 10px 20px -5px rgba(66, 153, 225, 0.2);
    /* Removed transform: translateY(-2px); to prevent menu flickering */
}

/* Rounded corners for first/last cells */
.table tbody tr td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.table tbody tr td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* Ensure overrides don't conflict with our custom design */
.table.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #ffffff;
}

.table.table-bordered {
    border: none !important;
}

.table.table-bordered > thead > tr > th,
.table.table-bordered > tbody > tr > td {
    border: none !important;
}

/* ===================================================
   Enhanced DataTables Sorting Arrows - Global Styling
   =================================================== */
table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > th.sorting_asc,
table.dataTable thead > tr > th.sorting_desc,
table.dataTable thead > tr > td.sorting,
table.dataTable thead > tr > td.sorting_asc,
table.dataTable thead > tr > td.sorting_desc,
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc,
.table thead th.sorting,
.table thead th.sorting_asc,
.table thead th.sorting_desc {
    padding-right: 36px !important;
    position: relative !important;
    cursor: pointer !important;
}

/* Base style for DataTables dual sorting arrows (::before = up arrow, ::after = down arrow) */
table.dataTable thead > tr > th.sorting:before,
table.dataTable thead > tr > th.sorting:after,
table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > th.sorting_asc:after,
table.dataTable thead > tr > th.sorting_desc:before,
table.dataTable thead > tr > th.sorting_desc:after,
table.dataTable thead > tr > td.sorting:before,
table.dataTable thead > tr > td.sorting:after,
table.dataTable thead > tr > td.sorting_asc:before,
table.dataTable thead > tr > td.sorting_asc:after,
table.dataTable thead > tr > td.sorting_desc:before,
table.dataTable thead > tr > td.sorting_desc:after,
table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:before,
table.dataTable thead th.sorting_desc:after,
.table thead th.sorting:before,
.table thead th.sorting:after,
.table thead th.sorting_asc:before,
.table thead th.sorting_asc:after,
.table thead th.sorting_desc:before,
.table thead th.sorting_desc:after {
    position: absolute !important;
    display: block !important;
    right: 12px !important;
    font-size: 16px !important;
    line-height: 10px !important;
    opacity: 0.45 !important;
    color: #4a5568 !important;
    transition: opacity 0.2s ease, color 0.2s ease;
}

/* Up arrow vertical positioning */
table.dataTable thead > tr > th.sorting:before,
table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > th.sorting_desc:before,
table.dataTable thead > tr > td.sorting:before,
table.dataTable thead > tr > td.sorting_asc:before,
table.dataTable thead > tr > td.sorting_desc:before,
table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_desc:before,
.table thead th.sorting:before,
.table thead th.sorting_asc:before,
.table thead th.sorting_desc:before {
    bottom: 50% !important;
    margin-bottom: 2px !important;
}

/* Down arrow vertical positioning */
table.dataTable thead > tr > th.sorting:after,
table.dataTable thead > tr > th.sorting_asc:after,
table.dataTable thead > tr > th.sorting_desc:after,
table.dataTable thead > tr > td.sorting:after,
table.dataTable thead > tr > td.sorting_asc:after,
table.dataTable thead > tr > td.sorting_desc:after,
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after,
.table thead th.sorting:after,
.table thead th.sorting_asc:after,
.table thead th.sorting_desc:after {
    top: 50% !important;
    margin-top: 2px !important;
}

/* Hover state: make sorting arrows stand out clearly on hover */
table.dataTable thead > tr > th.sorting:hover:before,
table.dataTable thead > tr > th.sorting:hover:after,
table.dataTable thead th.sorting:hover:before,
table.dataTable thead th.sorting:hover:after,
.table thead th.sorting:hover:before,
.table thead th.sorting:hover:after {
    opacity: 0.85 !important;
    color: var(--brand-color, #2c3e50) !important;
}

/* Active Sorting - Ascending: Up arrow bold & fully visible, down arrow dimmed */
table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > td.sorting_asc:before,
table.dataTable thead th.sorting_asc:before,
.table thead th.sorting_asc:before {
    opacity: 1 !important;
    color: var(--brand-color, #2c3e50) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
}
table.dataTable thead > tr > th.sorting_asc:after,
table.dataTable thead > tr > td.sorting_asc:after,
table.dataTable thead th.sorting_asc:after,
.table thead th.sorting_asc:after {
    opacity: 0.18 !important;
    color: #a0aec0 !important;
}

/* Active Sorting - Descending: Down arrow bold & fully visible, up arrow dimmed */
table.dataTable thead > tr > th.sorting_desc:after,
table.dataTable thead > tr > td.sorting_desc:after,
table.dataTable thead th.sorting_desc:after,
.table thead th.sorting_desc:after {
    opacity: 1 !important;
    color: var(--brand-color, #2c3e50) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
}
table.dataTable thead > tr > th.sorting_desc:before,
table.dataTable thead > tr > td.sorting_desc:before,
table.dataTable thead th.sorting_desc:before,
.table thead th.sorting_desc:before {
    opacity: 0.18 !important;
    color: #a0aec0 !important;
}

/* Single arrow DataTables fallback (e.g. Bootstrap styling with single ::after) */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    font-size: 16px;
}

/* Action Dropdown Styling */
.action-dots {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    background: #f0f4f8;
}

.show-actions {
    background: #fff !important;
    border: none !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
    padding: 10px 0 !important;
    min-width: 150px;
    text-align: left;
}

.show-actions ul li a {
    display: block;
    padding: 8px 20px;
    color: #333;
    font-size: 14px;
    transition: background 0.2s;
}

.show-actions ul li a:hover {
    background-color: #f1f7ff;
    color: var(--brand-primary);
    text-decoration: none;
}

/* Enhanced Scrollable Cards - Added Spacing */
.scrollable-panel {
    margin-bottom: 30px !important;
}

.scrollable-panel .panel-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 25px;
    margin-top: 10px;
}

/* Custom Scrollbar for better UI */
.scrollable-panel .panel-body::-webkit-scrollbar {
    width: 6px;
}
.scrollable-panel .panel-body::-webkit-scrollbar-thumb {
    background-color: #d1d9e6;
    border-radius: 4px;
}

/* More Attractive Notification Items */
.notification-item {
    padding: 20px;
    margin-bottom: 15px;
    background: #fdfdfd;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    transition: all 0.2s;
}

.notification-item:hover {
    border-color: var(--brand-primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.notification-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.notification-body {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}


/* Enhanced Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px;
    margin-bottom: 20px;
}
.alert-info {
    background-color: #e1f0ff;
    color: #0066cc;
}
.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Enhanced Buttons */
.btn-primary {
    background-color: var(--brand-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-primary:hover {
    background-color: #357abd;
}

