/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
    padding-top: 70px;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .brand-link {
    text-decoration: none;
    color: #333;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: #764ba2; /*linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-color {
    color: #764ba2;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.nav-link.active .nav-link.active {
    color: #667eea;
    border-bottom: 0;
}

.nav-link i {
    margin-right: 0.15rem;
}

.brand-name {
    color: #333;
    font-weight: 600;
}

/* User menu. */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 500;
    color: #333;
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* Dropdown Menu */
.dropdown-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.dropdown-menu:hover {
    background: rgba(102, 126, 234, 0.1);
}

.dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #666;
    transition: transform 0.3s ease;
}

.dropdown-arrow.inline {
    display: inline-block;
    vertical-align: middle;
}

.dropdown-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    background: white;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-wrap: nowrap;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* Main Content Layouts */
.main-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid {
    border-color: #e74c3c;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.form-icon-view {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-icon-view i {
    color: #666;
    font-size: 0.9rem;
}

.form-icon-view a:hover i {
    color: #764ba2;
}

.form-icon-view a:active i {
    transform: translateY(1px);
}

.form-icon,
.form-icon {
    color: #666;
    font-size: 0.9rem;
    margin-right: 0.15rem;
}

.form-icon-s {
    color: #666;
    font-size: 0.75rem;
    margin-right: 0.15rem;
}

.dashboard-header {
    padding: 0.75rem 2rem;
    margin-bottom: 0.75rem;
    display: flex;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background: transparent;
    color: #3a3;
}

.status-pending {
    background: transparent;
    color: #f97316;
}

.status-inactive {
    background: transparent;
    color: #6b7280;
}

.status-text {
    background: transparent;
    font-weight: 600;
}

.status-failed {
    background: transparent;
    color: #d75b5b;
}

.status-success {
    background: transparent;
    color: #3a3;
}

.section-header {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 1.25rem 2rem;
    margin-bottom: 1rem;
}
.section-header > h1,
.section-header > .page-tabs-bar {
    margin: 0;
}
.section-header > nav.navigation-top {
    width: 100%;
    margin-bottom: 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

/* Tooltips */
.tooltip {
    position: fixed;
    z-index: 99;
    font-size: 12px;
    line-height: 12px;
    padding: 6px;
    background: rgba(102, 126, 234, 0.2);
    color: #333;
    border-radius: 5px;
    font-family: sans-serif;
    box-sizing: border-box;
    transition: opacity 0.4s, visibility 0s;
    visibility: hidden;
    opacity: 0;
}
.tooltip-arrow {
    position: absolute;
    top: -4px;
    width: 7px;
    height: 7px;
    background: inherit;
    transform: rotate(45deg);
}

/* Settings Specific */
.settings-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 1.25rem 2rem 0 2rem;
}
.settings-title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}
.settings-subtitle {
    color: #333;
    font-size: 1rem;
}
.settings-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.25rem;
}
.settings-sidebar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    height: fit-content;
}
.settings-nav {
    list-style: none;
}
.settings-nav-item {
    margin-bottom: 0.5rem;
}
.settings-nav-link,
.settings-nav-link-danger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}
.settings-nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}
.settings-nav-link.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: 600;
}
.settings-nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}
.settings-nav-link-danger {
    color: #d75b5b;
}
.settings-nav-link-danger:hover {
    background: #fee2e2;
    color: #ef4444;
}
.settings-section {
    margin-bottom: 2.5rem;
}
.settings-section:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 0.5rem;
    }
}

.nobr,
.table-nobr td,
.table-nobr th {
    white-space: nowrap;
}

/* Margins */
.ms-0, .mx-0, .m-0 {
    margin-left: 0 !important;
}
.ms-1, .mx-1, .m-1 {
    margin-left: 0.25rem !important;
}
.ms-2, .mx-2, .m-2 {
    margin-left: 0.5rem !important;
}
.ms-3, .mx-3, .m-3 {
    margin-left: 0.75rem !important;
}
.ms-4, .mx-4, .m-4 {
    margin-left: 1rem !important;
}
.ms-5, .mx-5, .m-5 {
    margin-left: 1.25rem !important;
}
.ms-6, .mx-6, .m-6 {
    margin-left: 1.5rem !important;
}
.me-0, .mx-0, .m-0 {
    margin-right: 0 !important;
}
.me-1, .mx-1, .m-1 {
    margin-right: 0.25rem !important;
}
.me-2, .mx-2, .m-2 {
    margin-right: 0.5rem !important;
}
.me-3, .mx-3, .m-3 {
    margin-right: 0.75rem !important;
}
.me-4, .mx-4, .m-4 {
    margin-right: 1rem !important;
}
.me-5, .mx-5, .m-5 {
    margin-right: 1.25rem !important;
}
.me-6, .mx-6, .m-6 {
    margin-right: 1.5rem !important;
}
.mt-0, .my-0, .m-0 {
    margin-top: 0 !important;
}
.mt-1, .my-1, .m-1 {
    margin-top: 0.25rem !important;
}
.mt-2, .my-2, .m-2 {
    margin-top: 0.5rem !important;
}
.mt-3, .my-3, .m-3 {
    margin-top: 0.75rem !important;
}
.mt-4, .my-4, .m-4 {
    margin-top: 1rem !important;
}
.mt-5, .my-5, .m-5 {
    margin-top: 1.25rem !important;
}
.mt-6, .my-6, .m-6 {
    margin-top: 1.5rem !important;
}
.mb-0, .my-0, .m-0 {
    margin-bottom: 0 !important;
}
.mb-1, .my-1, .m-1 {
    margin-bottom: 0.25rem !important;
}
.mb-2, .my-2, .m-2 {
    margin-bottom: 0.5rem !important;
}
.mb-3, .my-3, .m-3 {
    margin-bottom: 0.75rem !important;
}
.mb-4, .my-4, .m-4 {
    margin-bottom: 1rem !important;
}
.mb-5, .my-5, .m-5 {
    margin-bottom: 1.25rem !important;
}
.mb-6, .my-6, .m-6 {
    margin-bottom: 1.5rem !important;
}

/* Paddings */
.ps-0, .px-0, .p-0 {
    padding-left: 0 !important;
}
.ps-1, .px-1, .p-1 {
    padding-left: 0.25rem !important;
}
.ps-2, .px-2, .p-2 {
    padding-left: 0.5rem !important;
}
.ps-3, .px-3, .p-3 {
    padding-left: 0.75rem !important;
}
.ps-4, .px-4, .p-4 {
    padding-left: 1rem !important;
}
.ps-5, .px-5, .p-5 {
    padding-left: 1.25rem !important;
}
.ps-6, .px-6, .p-6 {
    padding-left: 1.5rem !important;
}
.pe-0, .px-0, .p-0 {
    padding-right: 0 !important;
}
.pe-1, .px-1, .p-1 {
    padding-right: 0.25rem !important;
}
.pe-2, .px-2, .p-2 {
    padding-right: 0.5rem !important;
}
.pe-3, .px-3, .p-3 {
    padding-right: 0.75rem !important;
}
.pe-4, .px-4, .p-4 {
    padding-right: 1rem !important;
}
.pe-5, .px-5, .p-5 {
    padding-right: 1.25rem !important;
}
.pe-6, .px-6, .p-6 {
    padding-right: 1.5rem !important;
}
.pt-0, .py-0, .p-0 {
    padding-top: 0 !important;
}
.pt-1, .py-1, .p-1 {
    padding-top: 0.25rem !important;
}
.pt-2, .py-2, .p-2 {
    padding-top: 0.5rem !important;
}
.pt-3, .py-3, .p-3 {
    padding-top: 0.75rem !important;
}
.pt-4, .py-4, .p-4 {
    padding-top: 1rem !important;
}
.pt-5, .py-5, .p-5 {
    padding-top: 1.25rem !important;
}
.pt-6, .py-6, .p-6 {
    padding-top: 1.5rem !important;
}
.pb-0, .py-0, .p-0 {
    padding-bottom: 0 !important;
}
.pb-1, .py-1, .p-1 {
    padding-bottom: 0.25rem !important;
}
.pb-2, .py-2, .p-2 {
    padding-bottom: 0.5rem !important;
}
.pb-3, .py-3, .p-3 {
    padding-bottom: 0.75rem !important;
}
.pb-4, .py-4, .p-4 {
    padding-bottom: 1rem !important;
}
.pb-5, .py-5, .p-5 {
    padding-bottom: 1.25rem !important;
}
.pb-6, .py-6, .p-6 {
    padding-bottom: 1.5rem !important;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    font-size: 0.9rem;
}

.btn-primary,
.login-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: auto;
    /*padding: 0.75rem 1.5rem;*/
    /*border-radius: 6px;*/
    font-size: 1rem;
    /*font-weight: 600;*/
    /*cursor: pointer;*/
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover,
.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-primary:active,
.login-button:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: #333;
    border: 2px solid #e1e5e9;
}
.btn-secondary:hover {
    border-color: #667eea;
    color: #667eea;
}

.btn-danger {
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid #fee2e2;
    font-size: 1rem;
}
.btn-danger:hover {
    background: #fecaca;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 186, 186, 0.4);
}

.btn-success {
    background: #198754;
    color: #edfdd3;/*#dcfce7;*/
    font-size: 1rem;
    /*border: 1px solid #16a34a;*/
    /*box-shadow: 0 5px 15px rgba(134, 239, 172, 0.4);*/
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(134, 239, 172, 0.4);
}
.btn-success:active {
    transform: translateY(0);
}

.btn-warning {
    background: #ffc107;
    color: #333;
    font-size: 1rem;
    /*border: 1px solid #16a34a;*/
    /*box-shadow: 0 5px 15px rgba(134, 239, 172, 0.4);*/
}
.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(134, 239, 172, 0.4);
}
.btn-warning:active {
    transform: translateY(0);
}

.btn-inline {
    color: #333;
    font-weight: 600;
    text-decoration: none;
    padding: 0 2px;
}

.login-button {
    width: 100%;
    padding: 0.75rem;
}

a.btn {
    width: auto;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
}

/* Search result */
.search-result {
    margin-top: 1.75rem;
}
.search-result h2 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.search-result-table {
    width: 100%;
    border-collapse: collapse;
}
.search-result-table th,
.search-result-table td {
    padding: 0.25rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    white-space: nowrap;
}
.search-result-table.dashboard th,
.search-result-table.dashboard td {
    text-align: right;
}
.search-result-table.dashboard th:nth-child(1),
.search-result-table.dashboard td:nth-child(1) {
    text-align: left;
}
.search-result-table.dashboard.name th:nth-child(2),
.search-result-table.dashboard.name td:nth-child(2) {
    text-align: left;
}
.search-result-table th {
    background: #f8f5fc;
    font-weight: 600;
    color: #764ba2;
}
.search-result-table th:nth-child(1) {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}
.search-result-table th:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}
.search-result-table td {
    color: #333;
}

/* Table Styles */
.table-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th,
.data-table td {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.data-table th {
    font-weight: 600;
    color: #333;
    background: #f8fafc;
}
.data-table td {
    color: #333;
}

/* Tables with <div> */
.div-table {
    display: table;
    width: auto;
    border-spacing: 0 16px;
    font-size: 0.9rem;
}
.div-table-small {
    border-spacing: 0 8px;
}
.div-table-row {
    display: table-row;
    width: auto;
    clear: both;
}
.div-table-col {
    float: left;
    display: table-column;
    width: auto;
    color: #333;
}
.div-table-w1 {
    width: 1rem;
}
.div-table-w2 {
    width: 2rem;
}
.div-table-w3 {
    width: 3rem;
}
.div-table-w4 {
    width: 4rem;
}
.div-table-w5 {
    width: 5rem;
}
.div-table-w6 {
    width: 6rem;
}
.div-table-w7 {
    width: 7rem;
}
.div-table-w8 {
    width: 8rem;
}
.div-table-head {
    float: left;
    display: table-column;
    width: 16rem;
    color: #333;
}
.div-table-head-s {
    float: left;
    display: table-column;
    width: 12rem;
    color: #333;
}
.div-table-head-l {
    float: left;
    display: table-column;
    width: 20rem;
    color: #333;
}
.div-table-head label {
    font-weight: 500;
    font-size: 1rem;
}

.record-details {
    padding: 8px 16px;
}
.record-details.div-table-head,
.record-details.div-table-head-s,
.record-details.div-table-head-l {
    font-weight: 600;
}

/* Toggle Switches */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /*background-color: #e1e5e9;*/
    background-color: #b4c2f5;
    transition: .4s;
    border-radius: 24px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
input:checked + .toggle-slider:before {
    transform: translateX(26px);
}
input:disabled + .toggle-slider {
    cursor: not-allowed;
    pointer-events: none;
}
input:disabled:checked + .toggle-slider {
    background: linear-gradient(135deg, #acabc0 0%, #764ba2 100%);
}
.toggle-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.toggle-option:last-child {
    border-bottom: none;
}
.toggle-label {
    font-weight: 500;
    color: #333;
}
.toggle-description {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}
.toggle-container {
    margin-left: 1rem;
}

.disabled {
    opacity: 0.5;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.display-none {
    display: none;
}

.fa-asterisk {
    vertical-align: super;
    font-size: 0.5rem;
    font-weight: 600;
    color: #764ba2;
}

.log-icon {
    width: 0.75rem;
    font-size: 0.75rem !important;
}
.log-icon a {
    color: #333;
    text-decoration: none;
}

.index-column {
    width: 1.5rem;
}

.table-card {
    padding: 1rem 2rem 1rem 2rem;
    margin-bottom: 1rem;
}

#events-count,
#requests-count,
.summary-count {
    font-weight: 600;
}

.notification-circle {
    vertical-align: middle;
}
.notification-circle-link {
    text-decoration: none;
}

input.readonly {
    background-color: #eee;
}

.hidden-link {
    color: #333;
    text-decoration: none;
}

/* Password functionality */
.password-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}
.password-wrapper input {
    padding-right: 30px;
}
.password-wrapper .toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    color: gray;
}

/* Notifications */
.notifications-container {
    margin-left: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0 !important;
}
.notifications-container .notifications-item {
    min-width: 6rem;
}
.notifications-container .notifications-item:nth-child(1),
.notifications-container .notifications-item:nth-child(2) {
    min-width: 3rem;
}

/* Icon Legend */
.icon-legend {
    display: flex;
    justify-content: center;
    align-items: center;
}
.icon-legend-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
}
.icon-legend-item .label {
    font-size: 0.9rem;
    writing-mode: vertical-lr;
    height: 5rem;
    transform: rotate(180deg);
}
.icon-legend i {
    margin-left: 0.25rem;
}

/* Report Filters */
.report-filter-form {
    margin-bottom: 0.75rem;
}
.report-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.report-filter-field label {
    /*display: block;*/
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-filter-field .fa {
    font-size: 60%;
    cursor: pointer;
}

.report-filter-field input,
.report-filter-field select {
    width: 100%;
    padding: 0.35rem 0.6rem;
    border: 1px solid #d0c8e0;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.report-filter-field input:focus,
.report-filter-field select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 2px rgba(118, 75, 162, 0.15);
}
.report-filter-field--wide {
    grid-column: span 2;
}
.report-filter-field input.excluded,
.report-filter-field select.excluded {
    border-color: #f0f0f0;
    background-color: #f0f0f0;
}
.report-filter-field input:disabled,
.report-filter-field select:disabled {
    background-color: #e8e8e8;
    color: #999;
    cursor: not-allowed;
}
.report-filter-range {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.report-filter-range input {
    flex: 1;
}
.report-filter-range span {
    color: #999;
    flex-shrink: 0;
}
.report-filter-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.report-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0.75rem 0 0.25rem;
    min-height: 2rem;
}
.report-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid #d0c8e0;
    border-radius: 5px;
    font-size: 0.85rem;
    color: #764ba2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.report-pagination a:hover {
    background: #f0ebf8;
}
.report-pagination a.active {
    background: #764ba2;
    color: white;
    border-color: #764ba2;
    cursor: default;
    pointer-events: none;
}
.report-pagination a.disabled {
    color: #bbb;
    border-color: #e8e8e8;
    cursor: default;
    pointer-events: none;
}
.report-pagination .ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 0 0.25rem;
    color: #999;
    font-size: 0.85rem;
}
.report-pagination .pagination-goto {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 1.25rem;
}
.report-pagination .pagination-goto-input {
    width: 3.5rem;
    height: 2rem;
    padding: 0 0.4rem;
    border: 1px solid #b89ed4;
    border-radius: 5px;
    font-size: 0.85rem;
    color: #374151;
    text-align: center;
    outline: none;
    transition: border-color 0.14s, box-shadow 0.14s;
}
.report-pagination .pagination-goto-input:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.12);
}
.report-pagination .pagination-goto-total {
    font-size: 0.85rem;
    color: #999;
    white-space: nowrap;
}

/* Site modal */
.site-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-modal[hidden] {
    display: none;
}
.site-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}
.site-modal-card {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    padding: 1.75rem 2rem;
    max-width: 420px;
    width: calc(100% - 2rem);
}
.site-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #764ba2;
    margin: 0 0 0.75rem;
}
.site-modal-title--danger {
    color: #ef4444;
}
.site-modal-message {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
    margin: 0 0 1.5rem;
}
.site-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}
.site-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.6;
}
.site-modal-close:hover {
    opacity: 1;
}

/* Placeholder */
::placeholder {
  color: #ccc;
  opacity: 1; /* Fixes Firefox default lower opacity */
}
::-moz-placeholder {
  color: #ccc;
  opacity: 1;
}
:-ms-input-placeholder {
  color: #ccc;
}
::-webkit-input-placeholder {
  color: #ccc;
}

/* Records table */
.records-table-container {
    margin: 1.25rem -2rem -1.25rem;
    border-radius: 0 0 15px 15px;
    padding: 0 1rem;
}
.records-thead-wrapper {
    overflow: hidden;
}
.records-top-scrollbar {
    overflow-x: auto;
    overflow-y: hidden;
    height: 12px;
}
.records-tbody-wrapper {
    overflow-x: auto;
    overflow-y: auto;
}
.records-table {
    min-width: max-content;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.records-table th,
.records-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    white-space: nowrap;
    border-top: 1px solid #e9ecef;
}
.records-table thead th {
    background: #f8f5fc;
    font-weight: 600;
    color: #764ba2;
    white-space: pre-line;
    text-align: center;
}
.records-table tbody tr:hover {
    background: #faf8fd;
}

.page-tabs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Call direction switch */
.call-direction-switch {
    display: flex;
}
.call-direction-btn {
    padding: 0.35rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1.5px solid #764ba2;
    background: transparent;
    color: #764ba2;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}
.call-direction-btn:first-child {
    border-radius: 6px 0 0 6px;
    border-right: none;
}
.call-direction-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: 1.5px solid #764ba2;
}
.call-direction-btn.active {
    background: #764ba2;
    color: white;
}
.call-direction-btn:not(.active):hover {
    background: #f0ebf8;
}

/* Page tabs */
.page-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0d6f0;
}
.page-tab {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    color: #764ba2;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    border-radius: 8px 8px 0 0;
    background-color: transparent !important;
}
.page-tab:hover {
    color: #5a3480;
    border-bottom-color: #a07bc0;
}
.page-tab.active {
    color: #764ba2;
    border-bottom-color: #764ba2;
    cursor: default;
}

/* Time and step filters */
.time-filter,
.step-filter {
    margin: 0.5rem 0 1.5rem;
}
.time-filter a,
.step-filter a {
    color: #764ba2;
    display: inline-block;
    margin-right: 0.75rem;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    padding: 0.2rem 0.4rem 0.4rem 0.4rem;
    border-radius: 4px;
    transition: background 0.2s;
}
.time-filter a:hover,
.step-filter a:hover {
    background: rgba(0, 123, 255, 0.1);
}
.time-filter a:active,
.step-filter a:active {
    color: #a07bc0;
}
.time-filter a.active,
.step-filter a.active {
    background: #764ba2;
    color: white;
    cursor: default;
}
.time-filter span,
.step-filter span {
    display: inline-block;
    font-weight: 500;
    padding: 0.2rem 0.4rem 0.4rem 0.4rem;
}

.header-with-button {
    display: flex;
    align-items: center;
    gap: 0.8em;
}

.user-link-style {
    color: #764ba2;
    font-weight: 600;
}
.user-link-style.deleted {
    color: #888;
    font-weight: 600;
}

/* spinner */
.spinner {
    display: none;
    width: 12px;
    height: 12px;
    border: 2px solid #333;
    border-top: 2px solid var(--spinner-color-active);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 4px;
    margin-top: -2px;
}
.spinner.active {
    display: inline-block;
}
@keyframes spin {
    0% {  transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Phone icons */
:root {
    --mask-diy-phone-incoming: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.68.68 0 0 0 .178.643l2.457 2.457a.68.68 0 0 0 .644.178l2.189-.547a1.75 1.75 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.6 18.6 0 0 1-7.01-4.42 18.6 18.6 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877zM15.854.146a.5.5 0 0 1 0 .708L11.707 5H14.5a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 1 0v2.793L15.146.146a.5.5 0 0 1 .708 0'/%3E%3C/svg%3E");
    --mask-diy-phone-outgoing: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.68.68 0 0 0 .178.643l2.457 2.457a.68.68 0 0 0 .644.178l2.189-.547a1.75 1.75 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.6 18.6 0 0 1-7.01-4.42 18.6 18.6 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877zM11 .5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V1.707l-4.146 4.147a.5.5 0 0 1-.708-.708L14.293 1H11.5a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E");
}

/* DIY icons */
.fa-diy::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    background-color: black;
}
.nav-link:hover .fa-diy::before,
.nav-link.active .fa-diy::before {
    background-color: #667eea;
}
.fa-diy-m::before {
    content: "";
    display: inline-block;
    width: 32px;
    height: 32px;
    vertical-align: middle;
    background-color: black;
}
.fa-diy-phone-incoming::before {
    -webkit-mask: var(--mask-diy-phone-incoming) center/contain no-repeat;
    mask: var(--mask-diy-phone-incoming) center/contain no-repeat;
}
.fa-diy-phone-outgoing::before {
    -webkit-mask: var(--mask-diy-phone-outgoing) center/contain no-repeat;
    mask: var(--mask-diy-phone-outgoing) center/contain no-repeat;
}

/* Voice Firewall links */
.vf-list-link {
    color: #764ba2;
    font-size: 0.875rem;
    text-decoration: none;
}
.vf-list-delete-link {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.875rem;
}

/* TTL */
.edit-ttl-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.edit-ttl-container .edit-ttl-select {
    height: 28px;
    padding: 2px 6px;
    font-size: 0.85rem;
}
.ttl-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ttl-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-wrap: nowrap;
}
.ttl-checkbox-wrapper input[type="checkbox"] {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
}
.ttl-checkbox-wrapper label {
    margin: 0 !important;
    padding: 0 !important;
}
.ttl-select {
    width: 100%;
}

.call-direction-flag {
    font-size: 80%;
    margin-left: 0.4rem;
    padding: 0rem 0.4rem 0.4rem 0.4rem;
    vertical-align: text-bottom;
    border-radius: 4px;
    background: #764ba2;
    color: white;
}

/* Navbar icons */
.navbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-weight: 600;
    font-size: 1.6rem;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    padding-left: 1px;
}
.navbar-icon .badge {
    position: absolute;
    top: 2px;
    right: 0px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: #b4c2f5;
    color: #764ba2;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.navbar-icon.warning {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.2);
}
.navbar-icon.notifications {
    color: #764ba2;
    background-color: #f0ebf8;
}
.navbar-icon.hidden {
    display: none;
}

.fetch-failed {
    color: #ef4444;
}

.no-scrollbar {
    scrollbar-width: none;
}

/* Reports/alerts icon for decision. */
#alerts-table-container .st-table .st-th:nth-child(1),
#report-table-container .st-table .st-th:nth-child(1) {
    border-right: 0;
}
#alerts-table-container .st-table .st-th:nth-child(1) .st-rz,
#report-table-container .st-table .st-th:nth-child(1) .st-rz {
    display: none;
}
#alerts-table-container .st-table .st-td:nth-child(1),
#report-table-container .st-table .st-td:nth-child(1) {
    text-overflow: clip;
    padding: 2px 0 0 8px;
}
.decision-continue {
    color: #4caf50;
}
.decision-release {
    color: #e53935;
}
.decision-redirect {
    color: #babafe;
}
.decision-continue.fa-circle,
.decision-release.fa-circle,
.decision-redirect.fa-circle {
    font-size: 0.65rem;
    padding-left: 3px;
}

.import-row-error td {
    color: #e53935;
    /*font-weight: 500;*/
    font-style: italic;
}