/* ============================================
   MODERN BUTTON DESIGN SYSTEM
   ============================================ */

/* Base Button Styles with Modern Design */
.btn {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 6px;
    padding: 10px 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Ripple Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Size Variations */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.125rem;
    border-radius: 6px;
}

/* Primary Button - Modern Blue Gradient */
.btn-primary {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a5ba8 0%, #14497a 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(32, 107, 196, 0.35);
}

.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #14497a 0%, #0f3757 100%);
    color: #ffffff;
}

/* Secondary Button - Modern Gray */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #ffffff;
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #4e555b 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.35);
}

/* Success Button - Modern Green Gradient */
.btn-success {
    background: linear-gradient(135deg, #2fb344 0%, #27933a 100%);
    color: #ffffff;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #27933a 0%, #1f7330 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(47, 179, 68, 0.35);
}

/* Danger Button - Modern Red Gradient */
.btn-danger {
    background: linear-gradient(135deg, #d63939 0%, #b92d2d 100%);
    color: #ffffff;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b92d2d 0%, #9b2424 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(214, 57, 57, 0.35);
}

/* Warning Button - Modern Orange Gradient */
.btn-warning {
    background: linear-gradient(135deg, #f76707 0%, #d75a05 100%);
    color: #ffffff;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d75a05 0%, #b54d04 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(247, 103, 7, 0.35);
}

/* Info Button - Modern Cyan Gradient */
.btn-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: #ffffff;
    border: none;
}

.btn-info:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.35);
}

/* Light Button - Modern Light with Border */
.btn-light {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #495057;
    border: 2px solid #e9ecef;
}

.btn-light:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #206bc4;
    border-color: #206bc4;
    box-shadow: 0 8px 25px rgba(32, 107, 196, 0.15);
}

/* Dark Button - Modern Dark Gradient */
.btn-dark {
    background: linear-gradient(135deg, #343a40 0%, #23272b 100%);
    color: #ffffff;
    border: none;
}

.btn-dark:hover {
    background: linear-gradient(135deg, #23272b 0%, #1d2124 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(52, 58, 64, 0.35);
}

/* Outline Buttons - Modern Outline Style */
.btn-outline-primary {
    background: transparent;
    color: #206bc4;
    border: 2px solid #206bc4;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    border-color: #206bc4;
    box-shadow: 0 8px 25px rgba(32, 107, 196, 0.25);
}

.btn-outline-secondary {
    background: transparent;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.btn-outline-secondary:hover {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #ffffff;
    border-color: #6c757d;
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.25);
}

.btn-outline-success {
    background: transparent;
    color: #2fb344;
    border: 2px solid #2fb344;
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #2fb344 0%, #27933a 100%);
    color: #ffffff;
    border-color: #2fb344;
    box-shadow: 0 8px 25px rgba(47, 179, 68, 0.25);
}

.btn-outline-danger {
    background: transparent;
    color: #d63939;
    border: 2px solid #d63939;
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #d63939 0%, #b92d2d 100%);
    color: #ffffff;
    border-color: #d63939;
    box-shadow: 0 8px 25px rgba(214, 57, 57, 0.25);
}

.btn-outline-warning {
    background: transparent;
    color: #f76707;
    border: 2px solid #f76707;
}

.btn-outline-warning:hover {
    background: linear-gradient(135deg, #f76707 0%, #d75a05 100%);
    color: #ffffff;
    border-color: #f76707;
    box-shadow: 0 8px 25px rgba(247, 103, 7, 0.25);
}

.btn-outline-info {
    background: transparent;
    color: #4299e1;
    border: 2px solid #4299e1;
}

.btn-outline-info:hover {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: #ffffff;
    border-color: #4299e1;
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.25);
}

/* Icon Buttons - Modern Circular Icons */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

.btn-icon.btn-lg {
    width: 52px;
    height: 52px;
}

/* Button Icons - Better Icon Styling */
.btn svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: scale(1.1);
}

.btn-sm svg {
    width: 18px;
    height: 18px;
}

.btn-lg svg {
    width: 24px;
    height: 24px;
}

/* Button Groups - Modern Spacing */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Loading State */
.btn.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.btn-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Disabled State */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Full Width Button */
.btn-block,
.btn.w-100 {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* ============================================
   SPECIAL BUTTONS - Card Buttons & Action Buttons
   ============================================ */

/* Modern Card Action Buttons */
.modern-card-btn {
    border-radius: 6px !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modern-btn .modern-card-btn:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18) !important;
}

.modern-btn:active .modern-card-btn {
    transform: translateY(-2px) !important;
}

.modern-secondary-btn .modern-small-btn {
    border-radius: 6px;
    border: 2px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    background: #ffffff;
}

.modern-secondary-btn:hover .modern-small-btn {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(32, 107, 196, 0.15);
    border-color: #206bc4 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
}

.modern-secondary-btn:hover svg {
    transform: scale(1.15) rotate(5deg);
    transition: transform 0.3s ease;
}

.modern-secondary-btn:active .modern-small-btn {
    transform: translateY(-1px);
}

/* ============================================
   LINK BUTTONS & ACTION ICONS
   ============================================ */

/* Modern Action Buttons - Table Actions */
.link-primary, .link-danger, .link-success, .link-info, .link-warning, .link-yellow, .link-purple, .link-cyan {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Primary - Blue */
.link-primary {
    background: #e7f3ff;
    color: #206bc4;
    border-color: #d0e7ff;
}

.link-primary:hover {
    background: #206bc4;
    color: #ffffff;
    border-color: #206bc4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.3);
}

/* Danger - Red */
.link-danger {
    background: #ffe5e5;
    color: #d63939;
    border-color: #ffd0d0;
}

.link-danger:hover {
    background: #d63939;
    color: #ffffff;
    border-color: #d63939;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214, 57, 57, 0.3);
}

/* Success - Green */
.link-success {
    background: #e6f7e9;
    color: #2fb344;
    border-color: #d0f0d6;
}

.link-success:hover {
    background: #2fb344;
    color: #ffffff;
    border-color: #2fb344;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 179, 68, 0.3);
}

/* Info - Cyan */
.link-info {
    background: #e6f7ff;
    color: #4299e1;
    border-color: #d0ebff;
}

.link-info:hover {
    background: #4299e1;
    color: #ffffff;
    border-color: #4299e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* Warning - Orange */
.link-warning {
    background: #fff3e6;
    color: #f76707;
    border-color: #ffe8d0;
}

.link-warning:hover {
    background: #f76707;
    color: #ffffff;
    border-color: #f76707;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 103, 7, 0.3);
}

/* Yellow */
.link-yellow {
    background: #fffbe6;
    color: #fab005;
    border-color: #fff7d0;
}

.link-yellow:hover {
    background: #fab005;
    color: #ffffff;
    border-color: #fab005;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 176, 5, 0.3);
}

/* Purple */
.link-purple {
    background: #f3e6ff;
    color: #ae3ec9;
    border-color: #e8d0ff;
}

.link-purple:hover {
    background: #ae3ec9;
    color: #ffffff;
    border-color: #ae3ec9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(174, 62, 201, 0.3);
}

/* Cyan */
.link-cyan {
    background: #e6fcff;
    color: #17a2b8;
    border-color: #d0f7ff;
}

.link-cyan:hover {
    background: #17a2b8;
    color: #ffffff;
    border-color: #17a2b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* Icon Sizing in Action Buttons */
.link-primary svg,
.link-danger svg,
.link-success svg,
.link-info svg,
.link-warning svg,
.link-yellow svg,
.link-purple svg,
.link-cyan svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.link-primary:hover svg,
.link-danger:hover svg,
.link-success:hover svg,
.link-info:hover svg,
.link-warning:hover svg,
.link-yellow:hover svg,
.link-purple:hover svg,
.link-cyan:hover svg {
    transform: scale(1.1);
}

/* ============================================
   MODERN FORM ELEMENTS DESIGN SYSTEM
   ============================================ */

/* Form Labels - Modern Typography */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1d2125 !important;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.form-label.required::after {
    content: '*';
    color: #d63939;
    margin-left: 4px;
    font-weight: 700;
}

/* Text Inputs - Modern Design */
.form-control {
    border-radius: 6px !important;
    border: 2px solid #e9ecef !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: #ffffff !important;
    color: #495057 !important;
    line-height: 1.5 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.form-control::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.form-control:hover {
    border-color: #ced4da;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.form-control:focus {
    outline: none;
    border-color: #206bc4;
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.12), 0 2px 8px rgba(32, 107, 196, 0.15);
    background: #ffffff;
    transform: translateY(-1px);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f8f9fa;
    opacity: 0.7;
    cursor: not-allowed;
    border-color: #e9ecef;
}

/* Textarea Specific */
textarea.form-control {
    min-height: 100px !important;
    resize: vertical !important;
    font-family: inherit !important;
    background: #ffffff !important;
    color: #495057 !important;
}

/* Select Dropdown - Modern Style */
.form-select,
select.form-control {
    border-radius: 6px !important;
    border: 2px solid #e9ecef !important;
    padding: 12px 40px 12px 16px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: #ffffff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") right 12px center/16px 12px no-repeat !important;
    appearance: none !important;
    cursor: pointer !important;
    color: #495057 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.form-select:hover,
select.form-control:hover {
    border-color: #ced4da;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.form-select:focus,
select.form-control:focus {
    outline: none;
    border-color: #206bc4;
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.12), 0 2px 8px rgba(32, 107, 196, 0.15);
    transform: translateY(-1px);
}

.form-select:disabled,
select.form-control:disabled {
    background-color: #f8f9fa;
    opacity: 0.7;
    cursor: not-allowed;
    border-color: #e9ecef;
}

/* Date, Time, and Number Inputs */
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="number"].form-control {
    padding: 11px 16px !important;
    background: #ffffff !important;
    color: #495057 !important;
}

/* Date input calendar icon */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.5);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(0.3);
}

/* ============================================
   MODERN CHECKBOX & RADIO DESIGN
   ============================================ */

/* Container for Custom Checkboxes/Radios */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-left: 0;
}

/* Hide Default Checkbox/Radio */
.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 0;
    cursor: pointer;
    position: relative;
    appearance: none;
    border: 2px solid #e9ecef;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* Checkbox Style */
.form-check-input[type="checkbox"] {
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-check-input[type="checkbox"]:hover {
    border-color: #206bc4;
    box-shadow: 0 2px 6px rgba(32, 107, 196, 0.15);
}

.form-check-input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    border-color: #206bc4;
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.3);
}

.form-check-input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.form-check-input[type="checkbox"]:focus {
    outline: none;
    border-color: #206bc4;
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.12);
}

/* Radio Style */
.form-check-input[type="radio"] {
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-check-input[type="radio"]:hover {
    border-color: #206bc4;
    box-shadow: 0 2px 6px rgba(32, 107, 196, 0.15);
}

.form-check-input[type="radio"]:checked {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    border-color: #206bc4;
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.3);
}

.form-check-input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.form-check-input[type="radio"]:focus {
    outline: none;
    border-color: #206bc4;
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.12);
}

/* Checkbox/Radio Labels */
.form-check-label {
    cursor: pointer;
    user-select: none;
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.form-check-input:checked ~ .form-check-label {
    color: #206bc4;
    font-weight: 500;
}

/* Disabled State */
.form-check-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.form-check-input:disabled ~ .form-check-label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   SWITCH TOGGLE (Modern Toggle Switch)
   ============================================ */

.form-switch .form-check-input {
    width: 44px;
    height: 24px;
    border-radius: 24px;
    background-color: #e9ecef;
    border: 2px solid #e9ecef;
    background-image: none;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-switch .form-check-input::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-switch .form-check-input:hover {
    background-color: #ced4da;
    border-color: #ced4da;
}

.form-switch .form-check-input:checked {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    border-color: #206bc4;
}

.form-switch .form-check-input:checked::before {
    left: 22px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.12);
}

/* ============================================
   INPUT GROUPS - Modern Style
   ============================================ */

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057;
    text-align: center;
    white-space: nowrap;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-text:not(:last-child) {
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-text:not(:first-child) {
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ============================================
   VALIDATION STATES
   ============================================ */

/* Valid Input */
.form-control.is-valid,
.form-select.is-valid {
    border-color: #2fb344;
    box-shadow: 0 0 0 4px rgba(47, 179, 68, 0.1);
}

.form-control.is-valid:focus,
.form-select.is-valid:focus {
    border-color: #2fb344;
    box-shadow: 0 0 0 4px rgba(47, 179, 68, 0.15), 0 2px 8px rgba(47, 179, 68, 0.2);
}

/* Invalid Input */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #d63939;
    box-shadow: 0 0 0 4px rgba(214, 57, 57, 0.1);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #d63939;
    box-shadow: 0 0 0 4px rgba(214, 57, 57, 0.15), 0 2px 8px rgba(214, 57, 57, 0.2);
}

/* Validation Feedback */
.valid-feedback {
    display: none;
    margin-top: 6px;
    font-size: 0.875rem;
    color: #2fb344;
    font-weight: 500;
}

.invalid-feedback {
    display: none;
    margin-top: 6px;
    font-size: 0.875rem;
    color: #d63939;
    font-weight: 500;
}

.form-control.is-valid ~ .valid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* ============================================
   FILE INPUT - Modern Style
   ============================================ */

.form-control[type="file"] {
    padding: 8px 12px;
    cursor: pointer;
}

.form-control[type="file"]::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-control[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, #1a5ba8 0%, #14497a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.3);
}

/* ============================================
   RANGE SLIDER - Modern Style
   ============================================ */

.form-range {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 6px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(32, 107, 196, 0.4);
    transition: all 0.3s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.5);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(32, 107, 196, 0.4);
    transition: all 0.3s ease;
    border: none;
}

.form-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.5);
}

/* ============================================
   FLOATING LABELS - Modern Effect
   ============================================ */

.form-floating {
    position: relative;
}

.form-floating > .form-control {
    height: calc(3.5rem + 2px);
    padding: 1.625rem 0.75rem 0.625rem;
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 0.75rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: #6c757d;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #206bc4;
}

/* ============================================
   TOM-SELECT / SELECTIZE - Modern Dropdown Design
   ============================================ */

/* Main Container - No border on wrapper */
.ts-wrapper {
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    position: relative;
    z-index: 100;
}

.ts-wrapper:hover {
    /* Hover handled by control */
}

/* Focus state - handled by control */
.ts-wrapper.focus,
.ts-wrapper.dropdown-active {
    z-index: 10000;
}

/* Input Field - Match Input Styles */
.ts-wrapper .ts-control {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    min-height: 46px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-wrapper.single .ts-control {
    padding: 12px 40px 12px 16px;
}

.ts-wrapper.multi .ts-control {
    padding: 8px 12px;
}

/* Hover state for control */
.ts-wrapper:hover .ts-control {
    border-color: #ced4da;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Focus state for control - Match form-control:focus */
.ts-wrapper.focus .ts-control,
.ts-wrapper.dropdown-active .ts-control {
    outline: none;
    border-color: #206bc4;
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.12), 0 2px 8px rgba(32, 107, 196, 0.15);
    transform: translateY(-1px);
}

.ts-wrapper .ts-control input {
    font-size: 0.95rem;
    color: #495057;
    background: transparent;
}

.ts-wrapper .ts-control input::placeholder {
    color: #adb5bd;
}

.ts-wrapper .ts-control > div {
    color: #495057;
    background: transparent;
}

/* Dropdown Arrow */
.ts-wrapper.single .ts-control::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #495057;
    transition: all 0.3s ease;
    background: none;
    z-index: 2;
}

.ts-wrapper.single.dropdown-active .ts-control::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: #495057;
}

/* Dropdown Menu - Minimal Styling */
.ts-dropdown {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    background: #ffffff;
    z-index: 99999;
}

.ts-dropdown .ts-dropdown-content {
    max-height: 300px;
    padding: 4px;
    background: #ffffff;
}

/* Dropdown Items - Minimal Override */
.ts-dropdown .option {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #495057;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 2px;
    background: #ffffff;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background: #f8f9fa;
    color: #495057;
    transform: translateX(4px);
}

.ts-dropdown .option.selected {
    background: #e9ecef;
    color: #495057;
    font-weight: 600;
}

/* Multi-Select Items (Tags) - Keep blue for multi-select tags */
.ts-wrapper.multi .ts-control .item {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    margin: 2px 4px 2px 0;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(32, 107, 196, 0.2);
    transition: all 0.2s ease;
}

.ts-wrapper.multi .ts-control .item:hover {
    background: linear-gradient(135deg, #1a5ba8 0%, #14497a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(32, 107, 196, 0.3);
}

.ts-wrapper.multi .ts-control .item .remove {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 8px;
    margin-left: 8px;
    transition: opacity 0.2s ease;
}

.ts-wrapper.multi .ts-control .item .remove:hover {
    opacity: 0.7;
}

/* No Results Message */
.ts-dropdown .no-results {
    padding: 14px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
    background: #ffffff;
}

/* Disabled State - Match form-control:disabled */
.ts-wrapper.disabled .ts-control {
    cursor: not-allowed;
    background-color: #f8f9fa;
    opacity: 0.7;
    border-color: #e9ecef;
}

.ts-wrapper.disabled .ts-control * {
    cursor: not-allowed;
}

/* Force white background for TomSelect */
.ts-wrapper .ts-control,
.ts-dropdown {
    background-color: #ffffff;
    color: #495057;
}

/* TomSelect placeholder */
.ts-wrapper .ts-control .placeholder {
    color: #adb5bd !important;
}

/* TomSelect items (when option is selected in single mode) */
.ts-wrapper.single .ts-control .item {
    background: transparent;
    color: #495057;
    border: none;
    padding: 0;
}

/* When item is selected - control styles already handle it */

/* Custom Scrollbar for Dropdown */
.ts-dropdown .ts-dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.ts-dropdown .ts-dropdown-content::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 6px;
}

.ts-dropdown .ts-dropdown-content::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 6px;
}

.ts-dropdown .ts-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* ============================================
   CRITICAL Z-INDEX FIX FOR TOMSELECT
   ============================================ */

/* Simple Z-Index - Don't override TomSelect's internal logic */
.ts-wrapper.dropdown-active,
.ts-wrapper.focus {
    z-index: 10000;
}

.ts-dropdown {
    z-index: 99999;
}

/* Collapse animation overflow control */
.modern-filter-container .collapse.collapsing {
    overflow: hidden;
}

/* Table responsive scroll */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

/* ============================================
   CARD ENHANCEMENTS
   ============================================ */

.card {
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* ============================================
   MODERN INPUT ANIMATIONS
   ============================================ */

/* Pulse Animation for Focus - Disabled for better performance */
@keyframes input-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.12);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(32, 107, 196, 0.08);
    }
}

/* Animation disabled by default - enable if needed */
/* .form-control:focus,
.form-select:focus,
.ts-wrapper.focus {
    animation: input-pulse 2s ease-in-out infinite;
} */

/* Shimmer Effect for Loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.form-control.loading,
.form-select.loading {
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    pointer-events: none;
}

/* ============================================
   HELPER TEXT & FORM TEXT
   ============================================ */

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.form-text.text-muted {
    color: #6c757d;
}

.form-text a {
    color: #206bc4;
    text-decoration: none;
    font-weight: 500;
}

.form-text a:hover {
    text-decoration: underline;
}

/* ============================================
   INPUT SIZE VARIATIONS
   ============================================ */

/* Small Inputs */
.form-control-sm,
.form-select-sm {
    padding: 8px 12px;
    font-size: 0.875rem;
    border-radius: 6px;
}

.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text {
    padding: 8px 12px;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Large Inputs */
.form-control-lg,
.form-select-lg {
    padding: 14px 18px;
    font-size: 1.1rem;
    border-radius: 6px;
}

.input-group-lg > .form-control,
.input-group-lg > .form-select,
.input-group-lg > .input-group-text {
    padding: 14px 18px;
    font-size: 1.1rem;
    border-radius: 6px;
}

/* ============================================
   SEARCH INPUTS - Special Styling
   ============================================ */

.form-control[type="search"] {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='8'%3e%3c/circle%3e%3cpath d='m21 21-4.35-4.35'%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px 20px;
}

.form-control[type="search"]:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23206bc4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='8'%3e%3c/circle%3e%3cpath d='m21 21-4.35-4.35'%3e%3c/path%3e%3c/svg%3e");
}

/* ============================================
   PASSWORD INPUT - Toggle Icon Space
   ============================================ */

.form-control[type="password"] {
    padding-right: 40px;
}

/* ============================================
   FORM ROW & GRID IMPROVEMENTS
   ============================================ */

.row.g-2 > * {
    padding-right: 8px;
    padding-left: 8px;
}

.row.g-3 > * {
    padding-right: 12px;
    padding-left: 12px;
}

/* Form Group Spacing */
.mb-3 {
    margin-bottom: 1rem !important;
}

/* ============================================
   RESPONSIVE DESIGN - Mobile Optimizations
   ============================================ */

@media (max-width: 768px) {
    /* Buttons */
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Form Elements */
    .form-control,
    .form-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-label {
        font-size: 0.875rem;
    }
    
    /* Tom-Select */
    .ts-wrapper .ts-control {
        padding: 8px 12px;
    }
    
    .ts-dropdown .option {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    /* Input Groups */
    .input-group-text {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    /* Stack form elements on very small screens */
    .row.g-2 > *,
    .row.g-3 > * {
        padding-right: 0;
        padding-left: 0;
        margin-bottom: 12px;
    }
    
    /* Full width inputs on mobile */
    .form-control,
    .form-select,
    .ts-wrapper {
        width: 100%;
    }
    
    /* Smaller checkboxes/radios */
    .form-check-input {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional - Currently Disabled)
   ============================================ */

/* Dark mode disabled to prevent conflicts
@media (prefers-color-scheme: dark) {
    .form-control,
    .form-select {
        background-color: #1a1d23;
        color: #e9ecef;
        border-color: #343a40;
    }
    
    .form-control::placeholder {
        color: #6c757d;
    }
    
    .form-label {
        color: #e9ecef;
    }
}
*/

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .form-control,
    .form-select {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .btn {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ============================================
   PAGE LOADER - Full Page Loading Animation
   ============================================ */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Modern 3-Ring Spinner */
.spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #206bc4;
    animation-delay: -0.45s;
}

.spinner-ring:nth-child(2) {
    border-top-color: #1a5ba8;
    animation-delay: -0.3s;
    width: 85%;
    height: 85%;
    top: 7.5%;
    left: 7.5%;
}

.spinner-ring:nth-child(3) {
    border-top-color: #14497a;
    animation-delay: -0.15s;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loader Text */
.loader-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #206bc4;
    letter-spacing: 0.5px;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Alternative Dot Loader (if you prefer) */
.dot-loader {
    display: flex;
    gap: 8px;
}

.dot-loader span {
    width: 12px;
    height: 12px;
    background: #206bc4;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot-loader span:nth-child(1) {
    animation-delay: -0.32s;
}

.dot-loader span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Prevent body scroll when loader is active */
body:has(.page-loader:not(.fade-out)) {
    overflow: hidden;
}

/* ============================================
   MODERN HEADER & NAVBAR DESIGN
   ============================================ */

/* Modern Header Container */
.modern-header {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 16px 0;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.modern-header.sticky-top {
    z-index: 1000;
}

/* Logo Container */
.logo-container {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.15);
}

.logo-container:hover {
    transform: translateY(-2px) rotate(5deg);
    box-shadow: 0 6px 16px rgba(32, 107, 196, 0.25);
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Brand Text */
.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1d2125;
    letter-spacing: 0.5px;
    line-height: 1;
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6c757d;
    letter-spacing: 0.3px;
    line-height: 1;
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff3cd;
    color: #f76707;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(247, 103, 7, 0.2);
}

.theme-toggle:hover {
    background: #ffe8a1;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(247, 103, 7, 0.3);
}

/* User Profile Link */
.user-profile-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 50px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.user-profile-link:hover {
    background: #f0f7ff;
    border-color: #206bc4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.15);
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.3);
    transition: transform 0.3s ease;
}

.user-profile-link:hover .user-avatar {
    transform: scale(1.1);
}

/* User Info */
.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1d2125;
    line-height: 1;
}

.user-role {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1;
}

/* Dropdown Arrow in User Profile */
.user-profile-link .dropdown-arrow {
    transition: transform 0.3s ease;
}

.user-profile-link[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Modern Dropdown */
.modern-dropdown {
    min-width: 280px;
    padding: 8px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    animation: dropdown-slide-down 0.3s ease;
}

@keyframes dropdown-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown Header */
.dropdown-header {
    padding: 16px;
    margin: 0 -8px 8px -8px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    border-radius: 8px;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.3);
}

.dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid #e9ecef;
}

/* Logout Item */
.logout-item {
    color: #d63939;
    font-weight: 600;
}

.logout-item:hover {
    background: #ffe5e5;
    color: #d63939;
}

/* Brand/Logo Section */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1d2125;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: rotate(5deg) scale(1.1);
}

.navbar-brand a {
    color: #206bc4;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.navbar-brand a:hover {
    color: #1a5ba8;
}

/* Navigation Items */
.modern-nav .nav-item {
    position: relative !important;
    margin: 0 2px;
}

.modern-nav .nav-item.dropdown {
    position: relative !important;
}

/* Navigation Links - Modern Style */
.modern-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    white-space: nowrap;
    border: 1px solid transparent;
}

.modern-nav .nav-link:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    color: #206bc4;
    border-color: #d0e7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.15);
}

.modern-nav .nav-link.active {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    border-color: #206bc4;
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.35);
}

.modern-nav .nav-link.active:hover {
    background: linear-gradient(135deg, #1a5ba8 0%, #14497a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(32, 107, 196, 0.4);
}

/* Active Indicator */
.modern-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #206bc4;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(32, 107, 196, 0.4);
}

/* Navigation Icons */
.modern-nav .nav-link svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modern-nav .nav-link:hover svg {
    transform: scale(1.15) rotate(5deg);
}

.modern-nav .nav-link.active svg {
    filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.3));
}

/* Navigation Link Title */
.nav-link-title {
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Better Icon Alignment */
.modern-nav .nav-link {
    align-items: center;
    justify-content: flex-start;
}

.dropdown-item span {
    white-space: nowrap;
}

/* Dropdown Toggle Arrow */
.nav-link.dropdown-toggle::after {
    margin-left: 4px;
    border-top-color: currentColor;
    transition: transform 0.3s ease;
}

.nav-link.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Modern Dropdown Menu */
.dropdown-menu {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    padding: 12px;
    margin-top: 8px !important;
    background: #ffffff;
    backdrop-filter: blur(10px);
    min-width: 240px;
    z-index: 1050;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    transform-origin: top center;
    animation: dropdown-fade-in 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform, opacity;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dropdown Parent Item - Force Relative Position */
.nav-item.dropdown {
    position: relative !important;
}

.modern-nav .nav-item.dropdown {
    position: relative !important;
}

/* Dropdown Menu Display Control */
.navbar-nav .dropdown-menu {
    max-height: 70vh;
    overflow-y: auto;
    display: none;
    position: absolute !important;
    inset: unset !important;
    transform: none !important;
}

.navbar-nav .dropdown-menu.show {
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* Override Bootstrap Popper Positioning */
.dropdown-menu[data-bs-popper] {
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 8px !important;
    transform: none !important;
    inset: unset !important;
}

/* Force Dropdown Position */
.modern-nav .dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    transform: translateY(0) !important;
}

.modern-nav .dropdown-menu.show {
    top: calc(100% + 8px) !important;
    left: 0 !important;
}

.dropdown-menu-columns {
    display: flex;
    gap: 12px;
}

.dropdown-menu-column {
    min-width: 200px;
}

/* Modern Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    margin-bottom: 4px;
    border: 1px solid transparent;
    position: relative;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #206bc4;
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    color: #206bc4;
    border-color: #d0e7ff;
    transform: translateX(6px);
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.12);
}

.dropdown-item:hover::before {
    height: 70%;
}

.dropdown-item.active {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    font-weight: 600;
    border-color: #206bc4;
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.3);
}

.dropdown-item.active::before {
    height: 0;
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.dropdown-item:hover svg {
    transform: scale(1.15) rotate(8deg);
}

.dropdown-item.active svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Dropdown Divider Enhancement */
.dropdown-divider {
    height: 0;
    margin: 12px 0;
    overflow: hidden;
    border-top: 1px solid #e9ecef;
}

/* Mega Menu Support */
.dropdown-menu.mega-menu {
    min-width: 600px;
    padding: 20px;
}

.mega-menu .dropdown-menu-columns {
    min-width: 100%;
}

/* Dropdown Scrollbar */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 6px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 6px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* User Dropdown */
.nav-item.dropdown .nav-link {
    padding: 8px 12px;
}

.nav-item.dropdown .nav-link svg {
    width: 32px;
    height: 32px;
}

.nav-item.dropdown .dropdown-menu-arrow {
    min-width: 150px;
}

.nav-item.dropdown .dropdown-menu-arrow .dropdown-item {
    padding: 10px 16px;
    font-weight: 600;
}

/* User Info Display */
.nav-link .ps-2 {
    line-height: 1.2;
}

.nav-link .fw-bold {
    font-size: 0.95rem;
    color: #1d2125;
}

/* Mobile Menu Toggle Button */
.navbar-toggler {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 14px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.navbar-toggler:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    border-color: #206bc4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.2);
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.15);
    border-color: #206bc4;
}

.navbar-toggler-icon {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23206bc4' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23d63939' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M6 6l18 18M6 24L24 6'/%3e%3c/svg%3e");
}

/* Modern Navbar Container */
.modern-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
}

.navbar-content {
    background: #ffffff;
    position: relative;
}

.modern-nav {
    display: flex;
    gap: 2px;
    align-items: center;
    padding: 8px 0;
    position: relative;
}

/* Navbar Collapse */
.navbar-collapse {
    background: #ffffff;
    border-radius: 8px;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .navbar-collapse {
        background: transparent;
        box-shadow: none;
        margin-top: 0;
    }
    
    .modern-nav {
        padding: 0;
    }
}

/* Notification Badge (if needed) */
.nav-item .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 20px;
    height: 20px;
    padding: 4px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #d63939 0%, #b92d2d 100%);
    color: #ffffff;
    border-radius: 10px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(214, 57, 57, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Separator in Navbar */
.navbar-nav .nav-separator {
    width: 1px;
    height: 24px;
    background: #e9ecef;
    margin: 0 8px;
}

/* Glassmorphism Effect (Optional Premium Look) */
.modern-header.glassmorphism {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
}

.modern-navbar.glassmorphism {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px) saturate(170%);
    -webkit-backdrop-filter: blur(15px) saturate(170%);
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
}

/* Theme Toggle Button */
.hide-theme-light {
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hide-theme-light:hover {
    background: #fff3cd;
    transform: rotate(20deg) scale(1.1);
}

/* Hover States for Dropdown Parent */
.modern-nav .nav-item.dropdown:hover > .nav-link {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    color: #206bc4;
}

/* Dropdown Open State */
.modern-nav .nav-item.dropdown > .nav-link[aria-expanded="true"] {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    color: #206bc4;
    border-color: #d0e7ff;
}

/* Dropdown Menu Columns */
.dropdown-menu-columns {
    display: flex;
    gap: 20px;
    min-width: 480px;
}

.dropdown-menu-column {
    flex: 1;
    min-width: 220px;
}

/* Wide Dropdown Menu */
.dropdown-menu-wide {
    min-width: 500px;
}

/* Critical: Override all Bootstrap Popper positioning */
.modern-nav .dropdown-menu,
.modern-nav .dropdown-menu[style] {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    inset: unset !important;
    margin: 0 !important;
    margin-top: 8px !important;
}

.modern-nav .dropdown-menu.show,
.modern-nav .dropdown-menu.show[style] {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    inset: unset !important;
}

/* Dropdown Header/Section Title */
.dropdown-menu .dropdown-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: #206bc4;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 16px 8px;
    margin: 8px 0 4px 0;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    border-radius: 6px;
    border-left: 3px solid #206bc4;
}

.dropdown-menu .dropdown-header:first-child {
    margin-top: 0;
}

/* Responsive Mobile Menu */
@media (max-width: 767px) {
    .modern-nav {
        padding: 12px;
        flex-direction: column;
        gap: 4px;
    }
    
    .modern-nav .nav-link {
        width: 100%;
        padding: 14px 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 24px;
        margin-top: 8px;
        background: #f8f9fa;
    }
    
    .dropdown-menu-columns {
        flex-direction: column;
        min-width: 100%;
    }
    
    .dropend .dropdown-menu {
        left: 0;
        margin-left: 24px;
        margin-top: 8px;
    }
    
    .logo-container {
        width: 38px;
        height: 38px;
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
}

/* ============================================
   MODERN FILTER SYSTEM
   ============================================ */

/* Filter Container */
.modern-filter-container {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.modern-filter-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Filter Header */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1d2125;
}

.filter-title svg {
    width: 22px;
    height: 22px;
    color: #206bc4;
}

/* Filter Toggle Button */
.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    border: 2px solid #d0e7ff;
    border-radius: 6px;
    color: #206bc4;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.filter-toggle-btn:hover {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    border-color: #206bc4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.25);
}

.filter-toggle-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-toggle-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.filter-toggle-btn[aria-expanded="true"] {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    border-color: #206bc4;
}

/* Active Filter Badge */
.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(32, 107, 196, 0.3);
    animation: badge-pop 0.3s ease;
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Filter Content - Smooth Bootstrap Collapse Override */
.modern-filter-container .collapse {
    transition: height 0.35s ease;
}

.modern-filter-container .collapse:not(.show) {
    display: none;
}

.modern-filter-container .collapse.collapsing {
    overflow: hidden;
    transition: height 0.35s ease;
}

.modern-filter-container .collapse.show {
    overflow: visible;
}

/* Simple fade for content - no complex animations */

/* Legacy filter-content class */
.filter-content {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

.filter-content.show {
    max-height: 1000px;
    opacity: 1;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.filter-actions .btn {
    flex: 1;
}

/* Quick Filter Pills */
.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.quick-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.quick-filter-pill:hover {
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.quick-filter-pill.active {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    border-color: #206bc4;
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.3);
}

.quick-filter-pill .remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.quick-filter-pill .remove:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Compact Filter Row */
.filter-row-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.filter-row-compact > * {
    flex: 1;
    min-width: 150px;
}

/* Filter Clear Button */
.filter-clear-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff3e6;
    border: 2px solid #ffe8d0;
    border-radius: 6px;
    color: #f76707;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-clear-btn:hover {
    background: #f76707;
    color: #ffffff;
    border-color: #f76707;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 103, 7, 0.3);
}

/* Mobile Filter Optimizations */
@media (max-width: 768px) {
    .filter-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .filter-toggle-btn {
        width: 100%;
        justify-content: center;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-row-compact {
        flex-direction: column;
    }
    
    .filter-row-compact > * {
        width: 100%;
        min-width: 100%;
    }
}

/* ============================================
   MODERN TABLE DESIGN SYSTEM
   ============================================ */

/* Table Container Card */
.table-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.table-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Table Card Body - allow overflow for dropdowns */
.table-card .card-body {
    overflow: visible !important;
}

/* Table Wrapper */
.table-responsive {
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

/* Modern Table Base */
.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Table Header */
.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
    color: #1d2125;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 14px;
    border: none;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
    vertical-align: middle;
    position: relative;
}

.table thead th:first-child {
    padding-left: 20px;
    border-top-left-radius: 8px;
}

.table thead th:last-child {
    padding-right: 20px;
    border-top-right-radius: 8px;
}

/* Modern Header with Sort Indicator */
.table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.table thead th.sortable:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #206bc4;
}

.table thead th.sortable::after {
    content: '⇅';
    margin-left: 8px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.table thead th.sortable:hover::after {
    opacity: 0.7;
}

/* Table Body */
.table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    transform: scale(1.002);
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.08);
}

.table tbody tr:active {
    transform: scale(0.998);
}

.table tbody td {
    padding: 14px 14px;
    color: #495057;
    font-size: 0.9rem;
    vertical-align: middle;
    border: none;
    transition: all 0.3s ease;
}

.table tbody td:first-child {
    padding-left: 20px;
    font-weight: 600;
    color: #1d2125;
}

.table tbody td:last-child {
    padding-right: 20px;
}

/* Table Striped - Modern */
.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(248, 249, 250, 0.5);
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
}

/* Table Footer */
.table tfoot tr {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
    border-top: 2px solid #e9ecef;
}

.table tfoot td,
.table tfoot th {
    padding: 14px 14px;
    font-weight: 700;
    color: #1d2125;
    font-size: 0.95rem;
}

.table tfoot td:first-child,
.table tfoot th:first-child {
    padding-left: 20px;
}

.table tfoot td:last-child,
.table tfoot th:last-child {
    padding-right: 20px;
}

/* Small Table Variant */
.table-sm thead th {
    padding: 12px 12px;
    font-size: 0.8rem;
}

.table-sm tbody td {
    padding: 10px 12px;
    font-size: 0.85rem;
}

.table-sm tbody td:first-child {
    padding-left: 16px;
}

.table-sm thead th:first-child {
    padding-left: 16px;
}

/* Bordered Table - Modern */
.table-bordered {
    border: 2px solid #e9ecef;
}

.table-bordered thead th,
.table-bordered tbody td {
    border: 1px solid #f0f0f0;
}

/* Cell Border Variant */
.table.cell-border tbody td {
    border-right: 1px solid #f0f0f0;
}

.table.cell-border tbody td:last-child {
    border-right: none;
}

/* Status Badges in Tables */
.table .badge {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: #d4f4dd;
    color: #2fb344;
    border: 1px solid #b8eac5;
}

.badge-danger {
    background: #ffe5e5;
    color: #d63939;
    border: 1px solid #ffd0d0;
}

.badge-warning {
    background: #fff3e6;
    color: #f76707;
    border: 1px solid #ffe8d0;
}

.badge-info {
    background: #e6f7ff;
    color: #4299e1;
    border: 1px solid #d0ebff;
}

/* Empty State */
.table-empty {
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.table-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.table-empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.table-empty-text {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Table Loading State */
.table-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Row Selection */
.table tbody tr.selected {
    background: linear-gradient(135deg, #e6f2ff 0%, #d0e7ff 100%);
    border-left: 3px solid #206bc4;
}

.table tbody tr.selected td:first-child {
    padding-left: 17px;
}

/* Checkbox in Table */
.table .form-check-input {
    margin: 0;
}

/* Responsive Table Text */
@media (max-width: 768px) {
    .table thead th {
        font-size: 0.75rem;
        padding: 12px 10px;
    }
    
    .table tbody td {
        font-size: 0.8rem;
        padding: 10px 10px;
    }
    
    .table tbody td:first-child,
    .table thead th:first-child {
        padding-left: 12px;
    }
    
    .table tbody td:last-child,
    .table thead th:last-child {
        padding-right: 12px;
    }
}

/* DataTables Enhancements */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 16px 20px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-weight: 600;
    color: #495057;
}

.dataTables_wrapper .dataTables_length select {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 32px 6px 12px;
    margin: 0 8px;
    background: #ffffff;
}

.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 16px 20px;
    color: #6c757d;
    font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 8px 14px;
    margin: 0 4px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: #ffffff;
    color: #495057;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    border-color: #206bc4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.25);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%);
    color: #ffffff;
    border-color: #206bc4;
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   MODERN SWEETALERT2 (SWAL) DESIGN
   ============================================ */

/* Swal Container */
.swal2-container {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.6) !important;
}

/* Swal Popup */
.swal2-popup {
    border-radius: 16px !important;
    padding: 32px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25) !important;
    border: 2px solid #e9ecef !important;
    animation: swal-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes swal-slide-in {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Swal Icons */
.swal2-icon {
    border-width: 3px !important;
    width: 80px !important;
    height: 80px !important;
    margin: 24px auto 20px !important;
}

/* Success Icon */
.swal2-icon.swal2-success {
    border-color: #2fb344 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(47, 179, 68, 0.3) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: #2fb344 !important;
}

/* Error Icon */
.swal2-icon.swal2-error {
    border-color: #d63939 !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: #d63939 !important;
}

/* Warning Icon */
.swal2-icon.swal2-warning {
    border-color: #f76707 !important;
    color: #f76707 !important;
    font-size: 56px !important;
}

/* Info Icon */
.swal2-icon.swal2-info {
    border-color: #4299e1 !important;
    color: #4299e1 !important;
}

/* Question Icon */
.swal2-icon.swal2-question {
    border-color: #206bc4 !important;
    color: #206bc4 !important;
}

/* Swal Title */
.swal2-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #1d2125 !important;
    margin: 16px 0 12px !important;
    line-height: 1.3 !important;
    letter-spacing: -0.3px !important;
}

/* Swal Text */
.swal2-html-container {
    font-size: 1rem !important;
    color: #6c757d !important;
    margin: 12px 0 24px !important;
    line-height: 1.6 !important;
    font-weight: 500 !important;
}

/* Swal Actions Container */
.swal2-actions {
    gap: 12px !important;
    margin-top: 24px !important;
    flex-wrap: nowrap !important;
}

.swal2-actions button {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

/* Swal Confirm Button */
.swal2-confirm {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 120px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.swal2-confirm:hover {
    background: linear-gradient(135deg, #1a5ba8 0%, #14497a 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(32, 107, 196, 0.4) !important;
}

.swal2-confirm:active {
    transform: translateY(0) !important;
}

.swal2-confirm:focus {
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.2), 0 4px 12px rgba(32, 107, 196, 0.3) !important;
    outline: none !important;
}

/* Swal Deny Button */
.swal2-deny {
    background: linear-gradient(135deg, #d63939 0%, #b92d2d 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 4px 12px rgba(214, 57, 57, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 120px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.swal2-deny:hover {
    background: linear-gradient(135deg, #b92d2d 0%, #9b2424 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(214, 57, 57, 0.4) !important;
}

.swal2-deny:active {
    transform: translateY(0) !important;
}

.swal2-deny:focus {
    box-shadow: 0 0 0 4px rgba(214, 57, 57, 0.2), 0 4px 12px rgba(214, 57, 57, 0.3) !important;
    outline: none !important;
}

/* Swal Cancel Button */
.swal2-cancel {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 32px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    min-width: 120px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.swal2-cancel:hover {
    background: linear-gradient(135deg, #5a6268 0%, #4e555b 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.4) !important;
}

.swal2-cancel:active {
    transform: translateY(0) !important;
}

.swal2-cancel:focus {
    box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.2), 0 4px 12px rgba(108, 117, 125, 0.3) !important;
    outline: none !important;
}

/* Swal Input */
.swal2-input,
.swal2-textarea {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    color: #495057 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
    border-color: #206bc4 !important;
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.12), 0 2px 8px rgba(32, 107, 196, 0.15) !important;
    outline: none !important;
}

/* Swal Select */
.swal2-select {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    color: #495057 !important;
    transition: all 0.3s ease !important;
}

.swal2-select:focus {
    border-color: #206bc4 !important;
    box-shadow: 0 0 0 4px rgba(32, 107, 196, 0.12) !important;
}

/* Swal Validation Message */
.swal2-validation-message {
    background: #ffe5e5 !important;
    color: #d63939 !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    font-weight: 600 !important;
    border: 2px solid #ffd0d0 !important;
}

/* Swal Progress Steps */
.swal2-progress-steps {
    margin: 20px 0 !important;
}

.swal2-progress-steps .swal2-progress-step {
    background: #e9ecef !important;
    color: #6c757d !important;
    font-weight: 600 !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    transition: all 0.3s ease !important;
}

.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step {
    background: linear-gradient(135deg, #206bc4 0%, #1a5ba8 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(32, 107, 196, 0.4) !important;
}

.swal2-progress-steps .swal2-progress-step-line {
    background: #e9ecef !important;
}

/* Swal Close Button */
.swal2-close {
    font-size: 32px !important;
    color: #6c757d !important;
    transition: all 0.3s ease !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    border-radius: 50% !important;
    right: 16px !important;
    top: 16px !important;
}

.swal2-close:hover {
    color: #d63939 !important;
    background: #ffe5e5 !important;
    transform: rotate(90deg) !important;
}

/* Swal Timer Progress Bar */
.swal2-timer-progress-bar {
    background: linear-gradient(90deg, #206bc4 0%, #1a5ba8 100%) !important;
    height: 4px !important;
}

/* Swal Footer */
.swal2-footer {
    border-top: 1px solid #e9ecef !important;
    padding-top: 20px !important;
    margin-top: 20px !important;
    color: #6c757d !important;
    font-size: 0.9rem !important;
}

/* Toast Variant */
.swal2-toast {
    border-radius: 12px !important;
    padding: 16px 20px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.swal2-toast .swal2-title {
    font-size: 1rem !important;
    margin: 0 !important;
}

.swal2-toast .swal2-icon {
    width: 32px !important;
    height: 32px !important;
    margin: 0 12px 0 0 !important;
}

/* Loading State */
.swal2-loader {
    border-color: #206bc4 transparent #206bc4 transparent !important;
    border-width: 3px !important;
}

/* Swal Image */
.swal2-image {
    border-radius: 12px !important;
    margin: 20px auto !important;
}

/* Custom Class for Different Alert Types */
.swal-modern-success .swal2-popup {
    border-top: 4px solid #2fb344 !important;
}

.swal-modern-error .swal2-popup {
    border-top: 4px solid #d63939 !important;
}

.swal-modern-warning .swal2-popup {
    border-top: 4px solid #f76707 !important;
}

.swal-modern-info .swal2-popup {
    border-top: 4px solid #4299e1 !important;
}

.swal-modern-question .swal2-popup {
    border-top: 4px solid #206bc4 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .swal2-popup {
        padding: 24px !important;
        margin: 16px !important;
        width: calc(100% - 32px) !important;
    }
    
    .swal2-title {
        font-size: 1.4rem !important;
    }
    
    .swal2-html-container {
        font-size: 0.95rem !important;
    }
    
    .swal2-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .swal2-confirm,
    .swal2-cancel,
    .swal2-deny {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.cursor-pointer {
    cursor: pointer;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* Smooth transitions for all interactive elements */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

