@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-light: #64748b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

.app-footer {
    background: #e8eff7;
    border-top: 1px solid #d6e0ec;
    margin-top: 2rem;
}

.app-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 1rem;
    text-align: center;
    color: #334155;
    font-size: 1.15rem;
    font-weight: 500;
}

/* Smooth sticky header shrink effect */
.app-header {
    opacity: 0.72;
    transition: opacity 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.app-header .app-header-inner {
    transition: padding 0.25s ease;
}

.app-header.is-scrolled .app-header-inner {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
}

.app-header.is-scrolled {
    opacity: 1;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.25rem;
}

.login-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Navbar */
.navbar {
    background: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand h2 {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.navbar-brand-link {
    color: inherit;
    text-decoration: none;
}

.navbar-brand-link:hover,
.navbar-brand-link:focus {
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.desktop-account-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.username {
    color: var(--text-color);
    font-weight: 500;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

.sidebar-account-actions {
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
    display: none;
}

.mobile-user-welcome {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.625rem;
}

.mobile-link-btn {
    display: block;
    width: 100%;
    text-align: left;
    margin-top: 0.5rem;
    padding: 0.7rem 0.9rem;
}

.mobile-logout-btn {
    padding: 0.8rem 0.95rem;
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.mobile-logout-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-manage-users {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

.btn-manage-users:hover {
    background: #cbd5e1;
    border-color: #94a3b8;
}

.sidebar .btn-manage-users {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.sidebar .btn-manage-users:hover {
    background: #bfdbfe;
    border-color: #93c5fd;
}

/* Container and Layout */
.container {
    display: flex;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    box-shadow: var(--shadow);
    padding: 1.5rem 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    position: sticky;
    top: 68px;
    align-self: flex-start;
    max-height: calc(100vh - 68px);
}

.main-menu {
    list-style: none;
}

.main-menu-item {
    margin-bottom: 0.25rem;
}

.main-menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.main-menu-link:hover,
.main-menu-item.active > .main-menu-link {
    background: #f8fafc;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.menu-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.main-menu-item.active .menu-arrow {
    transform: rotate(180deg);
}

.sub-menu {
    list-style: none;
    display: none;
    background: white;
}


.sub-menu li a {
    display: block;
    padding: 0.625rem 1.5rem 0.625rem 3rem;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sub-menu li a:hover,
.sub-menu li a.active {
    background: #eff6ff;
    color: #1d4ed8;
    border-left-color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}

.welcome-message {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.welcome-message h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.quick-guide {
    text-align: left;
}

.quick-guide .quick-guide-intro {
    text-align: left;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.quick-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.quick-guide-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.quick-guide-card h3 {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.quick-guide-card ul {
    margin: 0;
    padding-left: 1.1rem;
}

.quick-guide-card li {
    margin-bottom: 0.35rem;
}

.site-tour-list {
    list-style: none;
    padding-left: 0;
}

.site-tour-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.tour-step {
    display: inline-block;
    min-width: 56px;
    text-align: center;
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
}

/* Table Styles */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-header h2 {
    color: var(--text-color);
    font-size: 1.5rem;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.table-wrapper {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light-color);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--light-color);
}

.text-center {
    text-align: center;
}

.actions {
    white-space: nowrap;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-edit {
    color: var(--primary-color);
}

.btn-delete {
    color: var(--danger-color);
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.required {
    color: var(--danger-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Confirm dialog (above record/bulk modals) */
.modal-confirm {
    z-index: 3000;
}

.modal-confirm-content {
    max-width: 420px;
}

.modal-confirm-content .modal-body p {
    margin: 0;
    color: var(--text-color);
    line-height: 1.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 2rem auto;
    max-width: 600px;
    width: 90%;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
}

.close {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        height: auto;
        max-height: none;
        transform: none;
        width: 100%;
        box-shadow: none;
        border-bottom: 1px solid var(--border-color);
    }

    .main-content {
        padding: 1rem;
        margin-left: 0;
        width: 100%;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions {
        width: 100%;
    }

    .table-actions .btn {
        flex: 1;
    }

    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }

    .modal-body {
        max-height: 70vh;
    }

    .quick-guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }

    .login-box {
        padding: 1.5rem;
    }

    .data-table {
        font-size: 0.75rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .app-footer-inner {
        font-size: 0.95rem;
        padding: 0.75rem 0.75rem;
    }
}

/* Utility Classes */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Desktop hover dropdown behavior */
@media (min-width: 769px) {
    .desktop-account-actions {
        display: flex;
    }

    .sidebar-account-actions {
        display: none;
    }

    .main-menu-item {
        position: relative;
    }

    .sub-menu {
        display: none;
    }

    .main-menu-item:hover > .sub-menu {
        display: block;
    }
}
/* Mobile click dropdown behavior */
@media (max-width: 768px) {
    .sub-menu {
        display: none;
    }

    .sub-menu.open {
        display: block;
    }
}

/* ==========================================
   Table Filters & Metrics – Modern Clean Look
   ========================================== */

/* Main filter bar – acts as a card */
.filters-bar {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #edf2f7;
}

.filter-form-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.filter-toolbar-left {
    flex: 1 1 240px;
    min-width: 0;
}

.filter-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-hint {
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
    margin: 0 0 6px 0;
}

.filter-active-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
}

.column-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 16px;
    padding-top: 4px;
    border-top: 1px solid #f1f5f9;
}

.filter-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.filter-field input[type="text"],
.filter-field input[type="number"],
.filter-field input[type="date"],
.filter-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #fafbfc;
    transition: border 0.15s ease, box-shadow 0.15s ease;
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.date-range-inputs input[type="date"] {
    flex: 1 1 120px;
    min-width: 0;
}

.date-range-sep {
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.three-slot-toolbar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 12px;
}

.filter-slot {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    flex: 1 1 240px;
}

.filter-slot label {
    font-size: 12px;
    color: #475569;
    margin-bottom: 6px;
    font-weight: 600;
}

.filter-slot select,
.filter-slot input[type="text"] {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.filter-slot-search {
    min-width: 280px;
}

.choices {
    margin-bottom: 0;
}

.choices__inner {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    min-height: 40px;
    background: #fff;
}

.choices__list--multiple .choices__item {
    background: #2563eb;
    border: 1px solid #1d4ed8;
    font-size: 12px;
}

/* Search box group */
.search-box {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 1 1 300px;
}

.search-box input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    transition: border 0.15s ease, box-shadow 0.15s ease;
    background: #fafbfc;
}

.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box .btn {
    border-radius: 0 8px 8px 0;
    padding: 0 18px;
    font-weight: 500;
    border: 1px solid #3b82f6;
    background: #3b82f6;
    color: white;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.search-box .btn:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.search-box .btn-secondary {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #1e293b;
    margin-left: 8px;
    border-radius: 8px;
}

.search-box .btn-secondary:hover {
    background: #e2e8f0;
}

/* Per‑page dropdown */
.per-page {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #334155;
    background: #f8fafc;
    padding: 5px 12px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
}

.per-page label {
    font-weight: 500;
}

.per-page select {
    padding: 6px 28px 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 13px;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23475569" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat right 8px center;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
    transition: border 0.15s ease, box-shadow 0.15s ease;
}

.per-page select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Metrics bar – subtle background */
.table-metrics {
    background: #f1f4f9;
    padding: 12px 20px;
    border-radius: 30px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1e293b;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.table-metrics strong {
    font-weight: 600;
    color: #0f172a;
}

.table-metrics span {
    background: white;
    padding: 4px 12px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
}

/* Table styling – light and airy */
.table-wrapper {
    background: white;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
    transition: background 0.1s ease;
}

.data-table .actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.1s ease, transform 0.1s ease;
}

.btn-icon:hover {
    background: #f1f5f9;
    transform: scale(1.1);
}

/* Pagination – pill style */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.pagination .btn {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #334155;
    text-decoration: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.pagination .btn:hover:not(.disabled):not(.active) {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination .btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination .btn.disabled {
    color: #94a3b8;
    background: #f1f5f9;
    border-color: #e2e8f0;
    pointer-events: none;
    opacity: 0.7;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
    border: 1px solid transparent;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.toast-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.toast-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

/* ==========================================
   Filter Bar Polish (TomSelect + Responsive)
   ========================================== */
.three-slot-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
}

.filter-slot {
    min-width: 0;
    flex: 1 1 0;
}

.filter-slot-search {
    flex: 1.2 1 0;
}

.filter-slot select,
.filter-slot input[type="text"],
.ts-wrapper.form-control,
.ts-control {
    min-height: 42px;
}

.filter-slot select,
.filter-slot input[type="text"] {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 8px 12px;
    font-size: 14px;
}

.filter-slot input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.ts-wrapper.multi .ts-control {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: none;
    padding: 6px 8px;
    min-height: 42px;
}

.ts-wrapper {
    width: 100%;
}

.ts-wrapper.multi.focus .ts-control {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.ts-wrapper .ts-control > div {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
}

.ts-wrapper .ts-control > input {
    font-size: 14px;
}

.ts-dropdown {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    overflow: hidden;
    z-index: 50;
    max-width: 100%;
}

.filter-slot-actions {
    flex: 0 0 auto;
    min-width: 210px;
}

.filter-actions-label {
    visibility: hidden;
    margin-bottom: 6px;
}

.filter-actions-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-actions-row .btn {
    height: 42px;
    justify-content: center;
}

@media (max-width: 992px) {
    .three-slot-toolbar {
        flex-wrap: wrap;
    }

    .filter-slot {
        flex: 1 1 calc(50% - 6px);
    }

    .filter-slot-actions {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .three-slot-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-slot,
    .filter-slot-search,
    .filter-slot-actions {
        width: 100%;
        flex: 1 1 100%;
    }

    .filter-actions-label {
        display: none;
    }

    .filter-actions-row {
        width: 100%;
    }

    .filter-actions-row .btn {
        flex: 1 1 50%;
    }

    .ts-dropdown,
    .ts-wrapper {
        max-width: 100%;
    }
}
