:root {
    --brand-primary: #d946ef;
    --brand-primary-hover: #c026d3;
    --brand-primary-light: #e879f9;
    --brand-primary-soft: rgba(217, 70, 239, 0.14);
    --brand-danger: #dc2626;
    --brand-danger-hover: #b91c1c;
    --neutral-border: rgba(148, 163, 184, 0.45);
    --neutral-text: #475569;
    --brand-soft: rgba(253, 244, 255, 0.95);
    --bs-primary: #d946ef;
    --bs-primary-rgb: 217, 70, 239;
    --bs-link-color: var(--brand-primary);
    --bs-link-hover-color: var(--brand-primary-hover);
    --bs-link-color-rgb: 217, 70, 239;
    --bs-link-hover-color-rgb: 192, 38, 211;
    --sidebar-width: 262px;
    --sidebar-width-collapsed: 86px;
    --sidebar-bg: #0f172a;
    --sidebar-accent: #d946ef;
    --sidebar-accent-hover: #c026d3;
    --sidebar-accent-light: #e879f9;
    --shell-bg: #f3f4f6;
    --modern-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --modern-radius: 1rem;
    --modern-radius-sm: 0.75rem;
    --ui-card-border: rgba(148, 163, 184, 0.12);
    --ui-card-shadow:
        0 2px 8px rgba(15, 23, 42, 0.035),
        0 12px 36px rgba(15, 23, 42, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 0 0 1px rgba(217, 70, 239, 0.055);
    --ui-card-shadow-hover:
        0 6px 16px rgba(15, 23, 42, 0.045),
        0 22px 52px rgba(15, 23, 42, 0.085),
        0 0 0 1px rgba(217, 70, 239, 0.14),
        0 14px 42px rgba(217, 70, 239, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    --ui-card-accent-height: 3px;
    --ui-card-accent: linear-gradient(90deg, #c026d3 0%, var(--brand-primary) 50%, var(--brand-primary-light) 100%);
    --ui-transition: 0.2s ease;
    --topbar-height: 44px;
    --footer-height: 3.33rem;
}

* { box-sizing: border-box; }

body.login-body,
body.app-body {
    font-family: var(--modern-font);
    -webkit-font-smoothing: antialiased;
    color: #0f172a;
    background: var(--shell-bg);
}

.layout-modern .app-shell {
    background:
        radial-gradient(1000px 520px at 12% -8%, rgba(99, 102, 241, 0.09), transparent 58%),
        radial-gradient(900px 480px at 92% 0%, rgba(14, 165, 233, 0.07), transparent 52%),
        radial-gradient(1200px 600px at 0 -200px, rgba(239, 246, 255, 0.95) 0%, var(--shell-bg) 48%);
}

.text-primary { color: var(--brand-primary) !important; }

/* ── Bootstrap button overrides (eLibrary) ── */
.btn {
    transition: color var(--ui-transition), background-color var(--ui-transition),
        border-color var(--ui-transition), box-shadow var(--ui-transition);
}

.btn-primary {
    --bs-btn-bg: transparent;
    --bs-btn-hover-bg: transparent;
    --bs-btn-active-bg: transparent;
    --bs-btn-border-color: rgba(217, 70, 239, 0.92);
    --bs-btn-hover-border-color: var(--brand-primary-hover);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-border-color: #c026d3;
    --bs-btn-active-color: #ffffff;
    --bs-btn-disabled-bg: #a855f7;
    --bs-btn-disabled-border-color: #a855f7;
    --bs-btn-focus-shadow-rgb: 217, 70, 239;
    background-image: linear-gradient(90deg, var(--brand-primary-hover) 0%, var(--brand-primary) 42%, #e879f9 100%);
    box-shadow: 0 1px 3px rgba(217, 70, 239, 0.15);
}

.btn-primary:hover {
    background-image: linear-gradient(90deg, #b91cac 0%, var(--brand-primary-hover) 45%, #f0abfc 100%);
    box-shadow: 0 4px 14px rgba(217, 70, 239, 0.28);
    color: #fff;
}

.btn-primary:active,
.btn-primary.active {
    background-image: linear-gradient(90deg, #86198f 0%, #c026d3 48%, var(--brand-primary) 100%);
    box-shadow: 0 2px 10px rgba(217, 70, 239, 0.32);
    color: #fff;
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: var(--brand-primary);
    --bs-btn-hover-color: var(--brand-primary-hover);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
    background-image: linear-gradient(90deg, rgba(192, 38, 211, 0.22) 0%, rgba(217, 70, 239, 0.16) 48%, rgba(232, 121, 249, 0.14) 100%);
    box-shadow: 0 2px 10px rgba(217, 70, 239, 0.12);
}

.btn-outline-secondary {
    --bs-btn-color: var(--neutral-text);
    --bs-btn-border-color: #cbd5e1;
    --bs-btn-hover-bg: rgba(241, 245, 249, 0.9);
    --bs-btn-hover-border-color: #94a3b8;
    --bs-btn-hover-color: #334155;
}

.btn-secondary {
    --bs-btn-color: var(--neutral-text);
    --bs-btn-bg: #f1f5f9;
    --bs-btn-border-color: #e2e8f0;
    --bs-btn-hover-bg: #e2e8f0;
    --bs-btn-hover-border-color: #cbd5e1;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(217, 70, 239, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(217, 70, 239, 0.2);
}

.form-check-input:focus {
    border-color: rgba(217, 70, 239, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(217, 70, 239, 0.2);
}

.form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* ── Login ── */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(900px 480px at 15% -10%, rgba(217, 70, 239, 0.12), transparent 55%),
        radial-gradient(700px 420px at 95% 110%, rgba(192, 38, 211, 0.1), transparent 50%),
        linear-gradient(165deg, #fdf4ff 0%, #f8fafc 42%, #f1f5f9 100%);
}

.login-card {
    width: 100%;
    max-width: 472px;
    border: none;
    border-radius: 1.35rem;
    background: radial-gradient(145% 115% at 50% 8%, #fff 0%, #fef7ff 55%, #fae8ff 100%);
    box-shadow: 0 28px 55px -22px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255,255,255,0.85) inset;
    overflow: hidden;
}

.login-brand-bar {
    height: var(--ui-card-accent-height);
    background: var(--ui-card-accent);
}

.login-card-body { padding: 2.5rem 2rem 2rem; }

.login-brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.25rem;
}

.login-logo-circle {
    width: 9.5rem;
    height: 9.5rem;
    border-radius: 50%;
    border: 2px solid rgba(217, 70, 239, 0.22);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    box-shadow: 0 8px 24px rgba(217, 70, 239, 0.1);
    overflow: hidden;
}

.login-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.login-footer-brand {
    border-top: 1px solid rgba(217, 70, 239, 0.12);
    text-align: center;
}

.login-title { font-weight: 700; letter-spacing: -0.02em; font-size: 1.65rem; }
.login-subtitle { color: #64748b; font-size: 0.95rem; }

.login-field .form-control {
    border-radius: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-color: #e2e8f0;
}

.login-field .form-control:focus {
    border-color: rgba(217, 70, 239, 0.65);
    box-shadow: 0 0 0 0.2rem rgba(217, 70, 239, 0.22);
}

.btn-login-fancy {
    border: none;
    border-radius: 0.7rem;
    padding: 0.78rem 1rem;
    font-weight: 600;
    background-image: linear-gradient(90deg, var(--brand-primary-hover), var(--brand-primary) 42%, var(--brand-primary-light));
    box-shadow: 0 14px 30px -12px rgba(217, 70, 239, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-login-fancy:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px -14px rgba(217, 70, 239, 0.65);
    color: #fff;
}

.login-meta-brand {
    display: block;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    background-image: linear-gradient(90deg, var(--brand-primary-hover), var(--brand-primary), var(--brand-primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.login-infinicom-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-infinicom-logo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.login-infinicom-logo-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.login-infinicom-logo-btn:focus-visible {
    outline: 2px solid rgba(217, 70, 239, 0.55);
    outline-offset: 4px;
    border-radius: 6px;
}

.login-infinicom-logo {
    display: block;
    height: auto;
    max-height: 6.5rem;
    width: auto;
    max-width: min(100%, 15rem);
    object-fit: contain;
}

.login-infinicom-credit {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
    letter-spacing: 0.01em;
}

.login-infinicom-modal-trigger {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    font: inherit;
    color: var(--brand-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(217, 70, 239, 0.55);
    text-underline-offset: 2px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.login-infinicom-modal-trigger:hover {
    color: var(--brand-primary-hover);
}

.login-infinicom-modal-trigger:focus-visible {
    outline: 2px solid rgba(217, 70, 239, 0.55);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── App shell ── */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: linear-gradient(165deg, #0b1222 0%, var(--sidebar-bg) 42%, #0c1324 100%);
    color: #cbd5f5;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    overflow-y: auto;
    transition: transform 0.25s ease, width 0.25s ease;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04), 8px 0 40px rgba(15, 23, 42, 0.12);
}

.sidebar-brand {
    padding: 1rem 1rem 0.75rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    line-height: 1.2;
}

.sidebar-brand-mark {
    width: 2.375rem;
    height: 2.375rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    padding: 0.2rem;
}

.sidebar-brand-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #f8fafc;
}

.sidebar-nav {
    padding: 0.5rem 0.75rem 1rem;
    flex: 1;
}

.sidebar-link-top,
.sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.85rem;
    margin: 0.12rem 0;
    border: none;
    background: transparent;
    color: #cbd5f5;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    border-radius: var(--modern-radius-sm);
    transition: background-color var(--ui-transition), color var(--ui-transition), box-shadow var(--ui-transition);
}

.sidebar-link-top {
    margin-bottom: 0.32rem;
}

.sidebar-group-toggle {
    justify-content: flex-start;
}

.sidebar-group-toggle .sidebar-chevron {
    margin-left: auto;
}

.sidebar-link-top i,
.sidebar-group-toggle i:first-child,
.sidebar-sublink i {
    width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.875rem;
    flex-shrink: 0;
    color: var(--brand-primary-light);
    background: rgba(217, 70, 239, 0.16);
    border-radius: 0.45rem;
    transition: color var(--ui-transition), background var(--ui-transition), box-shadow var(--ui-transition);
}

.sidebar-link-top:hover,
.sidebar-group-toggle:hover {
    background: #1e293b;
    color: #f9fafb;
}

.sidebar-link-top:hover i,
.sidebar-group-toggle:hover i:first-child,
.sidebar-sublink:hover i {
    color: #fff;
    background: rgba(217, 70, 239, 0.42);
    box-shadow: 0 0 0 1px rgba(232, 121, 249, 0.25);
}

/* Only the current page/section gets the magenta gradient — not every expanded group */
.sidebar-link-top.active,
.sidebar-group-toggle.active {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(90deg, var(--brand-primary-hover) 0%, var(--brand-primary) 42%, #e879f9 100%);
    box-shadow: 0 2px 14px rgba(217, 70, 239, 0.38);
}

.sidebar-group.open .sidebar-group-toggle:not(.active) {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-group-toggle.active i,
.sidebar-link-top.active i,
.sidebar-sublink.active i {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    opacity: 1;
}

.sidebar-group.open .sidebar-group-toggle:not(.active) i:first-child {
    color: var(--brand-primary-light);
    background: rgba(217, 70, 239, 0.22);
}

.sidebar-group { margin-bottom: 0.2rem; }

.sidebar-chevron {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.85;
    color: inherit;
    transition: transform 0.2s ease;
}

.sidebar-group.open .sidebar-chevron { transform: rotate(180deg); }

.sidebar-group-toggle.active .sidebar-chevron {
    color: #fff;
}

.sidebar-subnav {
    display: none;
    margin: 0.25rem 0 0.6rem 1.75rem;
    border-left: 1px solid rgba(203, 213, 245, 0.24);
    padding-left: 0.65rem;
}

.sidebar-group.open .sidebar-subnav { display: grid; gap: 0.25rem; }

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.6rem;
    margin: 0;
    border-radius: 0.6rem;
    color: #cbd5f5;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background-color var(--ui-transition), color var(--ui-transition), box-shadow var(--ui-transition);
}

.sidebar-sublink i {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.78rem;
    border-radius: 0.4rem;
}

.sidebar-sublink:hover {
    background: #1e293b;
    color: #f9fafb;
}

.sidebar-sublink.active {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(192, 38, 211, 0.5) 0%, rgba(217, 70, 239, 0.38) 45%, rgba(232, 121, 249, 0.3) 100%);
    box-shadow: 0 0 0 1px rgba(217, 70, 239, 0.35);
}

.sidebar-sublink.active i {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.sidebar-footer {
    padding: 0.75rem 0.5rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-legacy-link { padding-left: 0.85rem !important; opacity: 0.7; font-size: 0.78rem; }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1035;
    pointer-events: none;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-width-collapsed);
}

body.sidebar-collapsed .app-main {
    margin-left: var(--sidebar-width-collapsed);
}

body.sidebar-collapsed .sidebar-brand-title,
body.sidebar-collapsed .sidebar-link-top > span,
body.sidebar-collapsed .sidebar-group-toggle > span,
body.sidebar-collapsed .sidebar-chevron,
body.sidebar-collapsed .sidebar-subnav,
body.sidebar-collapsed .sidebar-footer {
    display: none !important;
}

body.sidebar-collapsed .sidebar-brand-link {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-link-top,
body.sidebar-collapsed .sidebar-group-toggle {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

body.sidebar-collapsed .sidebar-brand {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* ── Topbar (eLibrary style) ── */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent;
    position: relative;
    transition: margin-left 0.25s ease;
}

.app-main::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(800px 400px at 50% -5%, rgba(255, 255, 255, 0.45), transparent 55%);
    opacity: 0.9;
}

.app-main > *:not(.modal) {
    position: relative;
}

.app-topbar {
    min-height: var(--topbar-height);
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 0.85rem;
    position: sticky;
    top: 0;
    z-index: 1060;
    gap: 0.25rem;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    isolation: isolate;
}

.sidebar-toggle {
    color: #334155;
    text-decoration: none;
    border: none;
    background: none;
    line-height: 1;
    padding: 0.15rem 0.25rem !important;
}

.sidebar-toggle .bi-list {
    font-size: 1.3rem;
}

.topbar-logos {
    flex-shrink: 0;
    line-height: 0;
}

.topbar-pmi-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    padding: 0;
    text-decoration: none;
    border-radius: 0.25rem;
}

.topbar-pmi-link:hover {
    opacity: 0.88;
}

.topbar-logo-sm {
    display: block;
    height: calc(var(--topbar-height) - 8px);
    max-height: calc(var(--topbar-height) - 8px);
    width: auto;
    object-fit: contain;
}

.topbar-app-title {
    font-weight: 600;
    font-size: 0.8125rem;
    padding-left: 0.45rem;
    border-left: 1px solid #e2e8f0;
    line-height: 1.2;
    background-image: linear-gradient(90deg, var(--brand-primary-hover) 0%, var(--brand-primary) 42%, var(--brand-primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.topbar-search-wrap {
    position: relative;
    max-width: min(100%, 360px);
    margin: 0 auto;
    flex: 1 1 220px;
    z-index: 120;
}

.topbar-search-wrap.is-open .topbar-search {
    border-color: rgba(217, 70, 239, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(217, 70, 239, 0.12);
    background: #fff;
}

.topbar-search-results {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    max-height: min(24rem, 70vh);
    overflow: auto;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.85rem;
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(217, 70, 239, 0.06);
    padding: 0.35rem;
}

.topbar-search-results[hidden] {
    display: none !important;
}

.topbar-search-group + .topbar-search-group {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid #f1f5f9;
}

.topbar-search-group-label {
    padding: 0.15rem 0.45rem 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.topbar-search-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.55rem;
    color: inherit;
    text-decoration: none;
    transition: background var(--ui-transition);
}

.topbar-search-item:hover {
    background: rgba(217, 70, 239, 0.08);
    color: inherit;
}

.topbar-search-item-icon {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(217, 70, 239, 0.1);
    color: var(--brand-primary);
    font-size: 0.85rem;
}

.topbar-search-item-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.topbar-search-item-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
}

.topbar-search-item-meta {
    font-size: 0.625rem;
    color: #64748b;
    line-height: 1.3;
}

.topbar-search-status,
.topbar-search-foot {
    padding: 0.55rem 0.6rem;
    font-size: 0.6875rem;
    color: #64748b;
}

.topbar-search-foot {
    border-top: 1px solid #f1f5f9;
    margin-top: 0.25rem;
}

.topbar-center {
    min-width: 0;
}

.topbar-search-wrap .bi-search {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 0.85rem;
}

.topbar-search {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.25rem 0.75rem 0.25rem 1.85rem;
    font-size: 0.75rem;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.topbar-search:focus {
    outline: none;
    border-color: rgba(217, 70, 239, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(217, 70, 239, 0.12);
    background: #fff;
}

.topbar-user-pill {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.topbar-user-menu {
    position: relative;
    z-index: 1065;
}

.topbar-user-dropdown {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    width: min(17rem, calc(100vw - 1.5rem));
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.85rem;
    box-shadow:
        0 16px 40px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(217, 70, 239, 0.06);
    overflow: hidden;
    z-index: 1066;
}

.topbar-user-trigger {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 999px;
    padding: 0.15rem 0.45rem 0.15rem 0.15rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.topbar-user-trigger:hover,
.topbar-user-menu.is-open .topbar-user-trigger {
    background: rgba(253, 244, 255, 0.95);
    border-color: rgba(217, 70, 239, 0.18);
}

.topbar-user-text {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    min-width: 0;
    max-width: 11rem;
}

.topbar-user-email {
    display: block;
    font-size: 0.625rem;
    color: #64748b;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-chevron {
    font-size: 0.65rem;
    color: #94a3b8;
    transition: transform 0.15s;
}

.topbar-user-menu.is-open .topbar-user-chevron {
    transform: rotate(180deg);
}

.topbar-user-dropdown[hidden] {
    display: none !important;
}

.topbar-user-dropdown-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    background: linear-gradient(180deg, rgba(253, 244, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-bottom: 2px solid var(--brand-primary);
}

.topbar-user-dropdown-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar-user-dropdown-meta .topbar-username {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
}

.topbar-user-dropdown-meta .topbar-user-email {
    font-size: 0.6875rem;
}

.topbar-user-dropdown-nav {
    display: flex;
    flex-direction: column;
    padding: 0.35rem;
}

.topbar-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.55rem;
    color: #334155;
    text-decoration: none;
    font-size: 0.8125rem;
    transition: background 0.12s, color 0.12s;
}

.topbar-user-dropdown-item i {
    width: 1rem;
    color: #64748b;
    font-size: 0.95rem;
}

.topbar-user-dropdown-item:hover {
    background: #fdf4ff;
    color: var(--brand-primary-hover);
}

.topbar-user-dropdown-item:hover i {
    color: var(--brand-primary);
}

.topbar-user-dropdown-item.is-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.topbar-user-dropdown-item.is-logout:hover i {
    color: #dc2626;
}

.topbar-user-dropdown-sep {
    height: 1px;
    background: #f1f5f9;
    margin: 0.25rem 0.35rem;
}

.topbar-user-dropdown-section {
    padding: 0.35rem 0.85rem 0.2rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.topbar-user-lang-block {
    padding: 0.15rem 0.5rem 0.35rem;
}

.topbar-user-lang-label {
    padding: 0.15rem 0.35rem 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

.topbar-user-lang-options {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.topbar-user-lang-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    color: #334155;
    text-decoration: none;
    font-size: 0.8125rem;
    transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

.topbar-user-lang-option:hover {
    background: #f8fafc;
    color: #334155;
}

.topbar-user-lang-option.is-active {
    background: rgba(217, 70, 239, 0.1);
    color: var(--brand-primary-hover);
    font-weight: 600;
}

.topbar-user-lang-flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.topbar-user-lang-flag img {
    display: block;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.topbar-user-lang-name {
    flex: 1 1 auto;
    min-width: 0;
}

.topbar-user-lang-check {
    margin-left: auto;
    font-size: 0.95rem;
    color: var(--brand-primary);
    opacity: 0;
}

.topbar-user-lang-option.is-active .topbar-user-lang-check {
    opacity: 1;
}

.topbar-avatar-lg {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 0.85rem;
}

.topbar-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary-hover), var(--brand-primary-light));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.72rem;
    flex-shrink: 0;
    overflow: hidden;
    line-height: 1;
}

.topbar-username {
    font-size: 0.75rem;
    font-weight: 500;
    color: #334155;
}

.btn-topbar-logout {
    border: 1px solid #e2e8f0;
    color: #64748b;
    border-radius: 0.45rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1.25;
}

.btn-topbar-logout:hover {
    border-color: rgba(217, 70, 239, 0.35);
    color: var(--brand-primary-hover);
    background: #fdf4ff;
}

/* ── Profile page ── */
.profile-v2 {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.profile-v2-sidebar-card,
.profile-v2-card {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.85rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.profile-v2-sidebar-card::before,
.profile-v2-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ui-card-accent-height, 3px);
    background: var(--ui-card-accent, linear-gradient(90deg, var(--brand-primary-hover), var(--brand-primary-light)));
}

.profile-v2-sidebar-card {
    padding: 1.35rem 1rem 1.1rem;
    text-align: center;
}

.profile-v2-avatar-lg {
    width: 88px;
    height: 88px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-primary-hover), var(--brand-primary-light));
    box-shadow: 0 0 0 4px rgba(217, 70, 239, 0.12);
    overflow: hidden;
}

.topbar-avatar-photo,
.profile-v2-avatar-lg.is-photo,
.profile-v2-photo-preview.is-photo {
    padding: 0;
    background: #f8fafc;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(217, 70, 239, 0.22);
}

.topbar-user-dropdown-head .topbar-avatar-photo,
.topbar-avatar.topbar-avatar-lg.topbar-avatar-photo {
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.16);
}

.topbar-avatar-photo img,
.profile-v2-avatar-lg.is-photo img,
.profile-v2-photo-preview.is-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 50%;
}

.profile-v2-photo-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.profile-v2-field-grow {
    min-width: 0;
}

.profile-v2-photo-preview-wrap {
    text-align: center;
}

.profile-v2-photo-preview {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    font-size: 1.5rem;
}

.profile-v2-file-input {
    font-size: 0.8125rem;
}

.profile-v2-remove-photo {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.65rem;
    font-size: 0.75rem;
    color: #64748b;
    cursor: pointer;
}

.profile-v2-remove-photo input {
    accent-color: var(--brand-primary);
}

.profile-v2-name {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.profile-v2-email {
    margin: 0 0 0.85rem;
    font-size: 0.8125rem;
    color: #64748b;
    word-break: break-word;
}

.profile-v2-meta {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #475569;
}

.profile-v2-meta i {
    color: var(--brand-primary);
    margin-right: 0.25rem;
}

.profile-v2-main {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.profile-v2-card {
    padding: 1rem 1rem 0.85rem;
}

.profile-v2-card-title {
    margin: 0 0 0.85rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.profile-v2-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.profile-v2-fields-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-v2-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

.profile-v2-field .form-control,
.profile-v2-field .form-select {
    font-size: 0.8125rem;
    border-color: #e2e8f0;
}

.profile-v2-field .form-control:focus,
.profile-v2-field .form-select:focus {
    border-color: rgba(217, 70, 239, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(217, 70, 239, 0.12);
}

.profile-v2-hint {
    margin: 0.35rem 0 0;
    font-size: 0.6875rem;
    color: #94a3b8;
}

.profile-v2-actions {
    display: flex;
    justify-content: flex-end;
}

.profile-v2-save {
    min-width: 8rem;
    border: none;
    background: linear-gradient(135deg, var(--brand-primary-hover), var(--brand-primary));
}

.profile-v2-save:hover {
    background: linear-gradient(135deg, #b021c4, var(--brand-primary-hover));
}

@media (max-width: 991.98px) {
    .profile-v2 {
        grid-template-columns: 1fr;
    }

    .profile-v2-fields,
    .profile-v2-fields-2 {
        grid-template-columns: 1fr;
    }

    .profile-v2-photo-row {
        grid-template-columns: 1fr;
    }
}

.app-alert-slot { padding: 0.75rem 1.5rem 0; }

.app-alert-slot:has(#messagespc.is-toast-migrated:empty) {
    padding: 0;
    display: none;
}

#messagespc.is-toast-migrated:empty {
    display: none !important;
}

body.layout-modern #messagespc.is-form-message-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#new_request.modern-form-card input.is-invalid,
#new_request.modern-form-card select.is-invalid,
#new_request.modern-form-card textarea.is-invalid,
.modern-admin-fs-card input.is-invalid,
.modern-sms-compose-card input.is-invalid,
.modern-sms-compose-card textarea.is-invalid,
.modern-sms-compose-card select.is-invalid {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 0.18rem rgba(248, 113, 113, 0.18) !important;
    background-color: #fffafb;
}

#new_request.modern-form-card tr.has-field-error > td[align="right"] label,
#new_request.modern-form-card .has-field-error > .app-field-label,
.modern-admin-fs-card .has-field-error > .app-field-label {
    color: #b91c1c;
}

#new_request.modern-form-card tr.has-field-error .form-required-marker,
#new_request.modern-form-card .has-field-error .form-required-marker {
    color: #ef4444;
}

.app-toast-host {
    position: fixed;
    top: calc(var(--topbar-height) + 0.5rem);
    right: 0.85rem;
    left: auto;
    z-index: 20050;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    width: min(22rem, calc(100vw - 1.25rem));
    max-width: calc(100vw - 1.25rem);
    pointer-events: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 767.98px) {
    .app-toast-host {
        top: auto;
        bottom: calc(0.85rem + env(safe-area-inset-bottom, 0));
        right: 0.65rem;
        left: 0.65rem;
        width: auto;
        max-width: none;
    }

    .app-toast {
        transform: translateY(110%);
    }

    .app-toast.is-visible {
        transform: translateY(0);
    }

    .app-toast.is-leaving {
        transform: translateY(110%);
    }
}

.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.65rem 0.7rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    pointer-events: auto;
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.app-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.app-toast.is-leaving {
    transform: translateX(110%);
    opacity: 0;
}

.app-toast-icon {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.8rem;
}

.app-toast-body {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #0f172a;
    padding-top: 0.05rem;
}

.app-toast-close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
    cursor: pointer;
}

.app-toast-close:hover {
    color: #64748b;
}

.app-toast-success .app-toast-icon {
    background: #dcfce7;
    color: #166534;
}

.app-toast-warning .app-toast-icon {
    background: #fef3c7;
    color: #b45309;
}

.app-toast-error .app-toast-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.app-toast-info .app-toast-icon {
    background: #ede9fe;
    color: #6d28d9;
}

.topbar-search-kbd {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    padding: 0.08rem 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    background: #fff;
    color: #94a3b8;
    font-size: 0.625rem;
    font-family: inherit;
    line-height: 1.2;
    pointer-events: none;
}

.topbar-search-wrap .topbar-search {
    padding-right: 3.35rem;
}

.modern-report-date-presets-wrap {
    width: 100%;
    padding: 0 0.15rem 0.35rem;
}

.modern-report-date-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.modern-date-preset-btn {
    border: 1px solid rgba(217, 70, 239, 0.22);
    background: rgba(217, 70, 239, 0.06);
    color: #7e22ce;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.modern-date-preset-btn:hover,
.modern-date-preset-btn.is-active {
    background: rgba(217, 70, 239, 0.14);
    border-color: rgba(217, 70, 239, 0.38);
    color: #6b21a8;
}

#search_request_list .filter-row-date-presets td {
    padding-top: 0 !important;
    border-bottom: none !important;
}

.app-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.page-heading {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0 0 0.65rem;
    padding: 0;
    border-bottom: none;
}

.content-inner {
    padding: 0.75rem 1rem 1.25rem;
    max-width: 100%;
    overflow-x: auto;
}

.content-inner:has(#listings.modern-report-listings:not(.modern-admin-listings)) {
    overflow-x: hidden;
}

.content-inner:has(#listings.modern-admin-listings),
.content-inner:has(.modern-list-page-stack) {
    overflow-x: visible;
}

.content-inner > br,
#main > br,
#listings > br {
    display: none !important;
}

/* ── Legacy content polish ── */
#container { width: 100% !important; max-width: none !important; margin: 0 !important; border: none !important; }
#headerlogo, #header, #subnav, .section-tabs { display: none !important; }
#main { width: 100% !important; padding-top: 0 !important; min-height: 0 !important; background: transparent !important; }

/* Hide duplicate title from legacy PHP */
#page_title {
    display: none !important;
}

/* ── Card top accent (magenta) ── */
#listings,
#new_request,
#search_request_list.modern-filter-card,
#search_request_list.modern-filter-subcard,
.modern-audio-upload-bar,
.widget_ul,
.widget_ur,
.widget_dl,
.widget_dr,
.infinicom-contact-card {
    position: relative;
}

#listings::before,
#new_request::before,
#search_request_list.modern-filter-card::before,
#search_request_list.modern-filter-subcard::before,
.modern-audio-upload-bar::before,
.widget_ul::before,
.widget_ur::before,
.widget_dl::before,
.widget_dr::before,
.infinicom-contact-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ui-card-accent-height);
    background: var(--ui-card-accent);
    border-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    pointer-events: none;
    z-index: 3;
}

#listings, #new_request {
    text-align: left !important;
    border-radius: var(--modern-radius);
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(1.12);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
    box-shadow: var(--ui-card-shadow);
    padding: 0;
    margin-bottom: 0.65rem;
    overflow: hidden;
    transition: border-color var(--ui-transition), box-shadow var(--ui-transition), transform var(--ui-transition), background-color var(--ui-transition);
}

#listings:hover, #new_request:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(217, 70, 239, 0.22);
    box-shadow: var(--ui-card-shadow-hover);
}

#listings > br,
#new_request > br,
#listings > p > br,
#new_request > p > br {
    display: none !important;
}

#listings > p {
    margin: 0;
    padding: 0.28rem 0.85rem 0.4rem;
    overflow-x: auto;
}

#listings .paging,
#listings .paging.modern-pagination,
.paging.modern-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
    margin: 0;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(0deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.92));
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    border-bottom: none;
    font-size: 0.6875rem;
    line-height: 1.1;
    text-align: right;
}

#listings .paging .pagination-page,
#listings .paging a,
.paging.modern-pagination .pagination-page,
.paging.modern-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.45rem;
    min-width: 2.1rem;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b !important;
    font-weight: 500;
    font-size: 0.625rem;
    letter-spacing: 0;
    line-height: 1.1;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition:
        background var(--ui-transition),
        border-color var(--ui-transition),
        color var(--ui-transition),
        box-shadow var(--ui-transition),
        transform var(--ui-transition);
}

#listings .paging .pagination-page:hover,
#listings .paging a:hover,
.paging.modern-pagination .pagination-page:hover,
.paging.modern-pagination a:hover {
    border-color: rgba(217, 70, 239, 0.42);
    background: #fdf4ff;
    color: var(--brand-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(217, 70, 239, 0.12);
}

#listings .paging .pagination-page.is-active,
#listings .paging b a,
#listings .paging a.is-active,
.paging.modern-pagination .pagination-page.is-active,
.paging.modern-pagination a.is-active {
    background-image: linear-gradient(90deg, var(--brand-primary-hover) 0%, var(--brand-primary) 42%, #e879f9 100%) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(217, 70, 239, 0.22);
    transform: none;
    cursor: default;
}

#listings .paging .pagination-page.is-active:hover,
#listings .paging a.is-active:hover,
.paging.modern-pagination .pagination-page.is-active:hover,
.paging.modern-pagination a.is-active:hover {
    color: #fff !important;
    transform: none;
    box-shadow: 0 3px 10px rgba(217, 70, 239, 0.22);
}

#listings .paging .pagination-ellipsis,
.paging.modern-pagination .pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0.85rem;
    padding: 0 0.05rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    user-select: none;
}

table.table_requestnew,
table.table_billslist,
table.table_lists {
    width: 100% !important;
    min-width: 1100px;
    border-collapse: collapse;
    border-spacing: 0;
    line-height: 1.15 !important;
    font-size: 0.8125rem !important;
    background: transparent;
    border: none !important;
    border-radius: 0 !important;
    margin: 0;
}

#listings.modern-admin-listings table.table_requestnew,
#listings.modern-report-listings table.table_requestnew.modern-report-table,
table.table_requestnew.modern-report-table.is-admin-log {
    min-width: 100% !important;
}

table.table_requestnew tr,
table.table_billslist tr,
table.table_lists tr,
tr.requestpar,
tr.requestnepar,
tr.listpar,
tr.listnepar {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

table.table_requestnew tr.header th,
table.table_billslist tr.header th,
table.table_lists tr.header th {
    background: rgba(248, 250, 252, 0.95);
    color: #64748b;
    font-weight: 600;
    font-size: 0.68rem !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.24rem 0.45rem !important;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    height: auto !important;
    text-indent: 0 !important;
    background-image: none !important;
    vertical-align: middle;
    line-height: 1.15 !important;
}

table.table_requestnew td,
table.table_billslist td,
table.table_lists td {
    padding: 0.1rem 0.45rem !important;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    height: auto !important;
    text-indent: 0 !important;
    font-size: 0.8125rem !important;
    line-height: 1.15 !important;
}

table.table_requestnew td font,
table.table_billslist td font,
table.table_lists td font,
table.table_requestnew td b,
table.table_billslist td b,
table.table_lists td b,
table.table_requestnew td strong,
table.table_requestnew th font {
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: inherit;
}

table.table_requestnew td b,
table.table_billslist td b,
table.table_lists td b {
    font-weight: 600;
}

tr.requestpar { background: transparent; }
tr.requestnepar { background: rgba(248, 250, 252, 0.45); }
tr.requestpar:hover, tr.requestnepar:hover { background: rgba(217, 70, 239, 0.06); }

table.table_requestnew tr.table_footer_thin,
table.table_requestnew tr.table_footer_thin td {
    background: transparent !important;
    border: none !important;
    height: 0.25rem !important;
    padding: 0 !important;
    background-image: none !important;
}

/* IDs — muted compact */
table.table_requestnew td:first-child,
table.table_requestnew td:first-child font {
    color: #64748b !important;
    font-weight: 600;
    font-size: 0.75rem !important;
}

/* Status badges — compact pills */
table.table_requestnew font[color="green"],
table.table_requestnew font[color="red"],
table.table_requestnew font[color="#ffbb33"] {
    display: inline-block;
    padding: 0.06em 0.38em;
    border-radius: 999px;
    font-size: 0.65rem !important;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}

table.table_requestnew font[color="green"] {
    background: #ecfdf5;
    color: #059669 !important;
}

table.table_requestnew font[color="#00ff00"],
table.table_requestnew font[color="#00FF00"] {
    display: inline-block;
    padding: 0.06em 0.38em;
    border-radius: 999px;
    font-size: 0.65rem !important;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    background: #ecfdf5;
    color: #059669 !important;
}

table.table_requestnew font[color="red"] {
    background: #fef2f2;
    color: #dc2626 !important;
}

table.table_requestnew font[color="#ffbb33"] {
    background: #fffbeb;
    color: #d97706 !important;
}

table.table_requestnew a:not(.button) {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem !important;
}

table.table_requestnew a:not(.button):hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

/* SMS name / legacy .button pills */
a.button,
table.table_requestnew a.button {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: 140px;
    display: inline-block !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    padding: 0.12em 0.42em !important;
    border-radius: 999px !important;
    background: #fdf4ff !important;
    background-image: none !important;
    color: var(--brand-primary-hover) !important;
    border: 1px solid rgba(217, 70, 239, 0.22) !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    text-align: center;
}

a.button:hover,
table.table_requestnew a.button:hover {
    background: var(--brand-primary) !important;
    color: #fff !important;
    border-color: var(--brand-primary) !important;
    text-decoration: none !important;
}

a.button_disabled {
    opacity: 0.55;
    pointer-events: none;
}

/* Download / action icon buttons */
#listings td[id^="caction"] {
    white-space: nowrap;
}

#listings td[id^="caction"] button,
table.table_requestnew button:not([type="submit"]) {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.35rem !important;
    padding: 0.1rem 0.25rem !important;
    margin: 0 0.05rem;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

#listings td[id^="caction"] button:hover {
    border-color: rgba(217, 70, 239, 0.35) !important;
    background: #fdf4ff !important;
}

#listings td[id^="caction"] button img,
table.table_requestnew img[alt*="SET"],
table.table_requestnew img:not([alt="download"]):not([alt="Download"]) {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    max-height: 15px !important;
    object-fit: contain;
    vertical-align: middle;
}

table.table_requestnew img[alt="download"],
table.table_requestnew img[alt="Download"],
.modern-report-download-wrap img[alt="download"],
.modern-report-download-wrap img[alt="Download"] {
    width: auto !important;
    height: 2.75rem !important;
    max-width: none !important;
    max-height: none !important;
}

table.table_requestnew input[type="text"],
table.table_requestnew input[type="password"],
table.table_requestnew input[type="email"],
table.table_requestnew input[type="tel"],
table.table_requestnew select,
table.table_requestnew textarea {
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.75rem;
    line-height: 1.15;
    min-height: 1.45rem;
}

#new_request input,
#new_request select {
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    padding: 0.22rem 0.45rem;
    font-size: 0.8125rem;
    line-height: 1.25;
    min-height: 1.75rem;
}

table.table_requestnew audio {
    display: block;
    width: 100%;
    max-width: 11.5rem;
    height: 1.5rem;
    max-height: 1.5rem;
    margin: 0;
}

table.table_requestnew button[type="submit"],
#new_request button[type="submit"],
input[type="submit"]:not(.btn-login-fancy) {
    background-image: linear-gradient(90deg, var(--brand-primary-hover) 0%, var(--brand-primary) 42%, #e879f9 100%) !important;
    background-color: transparent !important;
    color: #fff !important;
    border: 1px solid rgba(217, 70, 239, 0.92) !important;
    border-radius: 0.35rem !important;
    padding: 0.22rem 0.5rem !important;
    font-size: 0.75rem !important;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(217, 70, 239, 0.15);
    transition: box-shadow var(--ui-transition);
}

table.table_requestnew button[type="submit"]:hover,
input[type="submit"]:not(.btn-login-fancy):hover {
    background-image: linear-gradient(90deg, #b91cac 0%, var(--brand-primary-hover) 45%, #f0abfc 100%) !important;
    box-shadow: 0 4px 14px rgba(217, 70, 239, 0.28);
}

.submenulinks { display: none; }

.widget_ul, .widget_ur, .widget_dl, .widget_dr {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(1.12);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: var(--modern-radius);
    box-shadow: var(--ui-card-shadow);
    min-height: 120px;
    margin: 0.5rem;
    transition: border-color var(--ui-transition), box-shadow var(--ui-transition), transform var(--ui-transition);
}

.widget_ul:hover, .widget_ur:hover, .widget_dl:hover, .widget_dr:hover {
    transform: translateY(-2px);
    border-color: rgba(217, 70, 239, 0.22);
    box-shadow: var(--ui-card-shadow-hover);
}

#widget_und { display: none; }

/* ── Audio upload bar (#new_request on audioupload page) ── */
#new_request.audio-upload-card {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.65rem;
    overflow: hidden;
    box-sizing: border-box;
}

#new_request.audio-upload-card > p,
#new_request.audio-upload-card > br {
    display: none !important;
}

#new_request.audio-upload-card form {
    margin: 0;
    padding: 0;
}

#new_request.audio-upload-card label[for="file-upload"],
#new_request.audio-upload-card .upload-wrapper,
#new_request.audio-upload-card #uploadFileSpan,
#new_request.audio-upload-card .file-name {
    display: none !important;
}

.modern-audio-upload-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.55rem 0.85rem;
    margin: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--modern-radius-sm);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.modern-audio-upload-field {
    flex: 1 1 18rem;
    min-width: 0;
    max-width: 100%;
}

.modern-audio-upload-title {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.28rem;
    line-height: 1.15;
}

.modern-audio-upload-control {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.85rem;
    padding: 0.15rem 0.5rem 0.15rem 0.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    background: #fff;
}

.modern-audio-upload-browse {
    flex-shrink: 0;
    border-radius: 0.35rem !important;
    padding: 0.2rem 0.65rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.modern-audio-upload-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.modern-audio-upload-name.is-selected {
    color: #334155;
    font-weight: 500;
}

.modern-audio-upload-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.modern-audio-upload-submit {
    flex-shrink: 0;
    min-width: 6.25rem;
    border-radius: 999px !important;
    padding: 0.32rem 1rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

@media (max-width: 767.98px) {
    .modern-audio-upload-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
        margin: 0.5rem;
        padding: 0.55rem 0.65rem;
    }

    .modern-audio-upload-field {
        flex: 0 0 auto;
        width: 100%;
    }

    .modern-audio-upload-submit {
        width: 100%;
    }

    .content-inner:has(#new_request.audio-upload-card) {
        overflow-x: hidden;
    }

    .content-inner:has(#new_request.audio-upload-card) #listings {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-inner:has(#new_request.audio-upload-card) #listings table.table_requestnew {
        min-width: 36rem;
    }
}

#listings.modern-audio-listings {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
}

#listings.modern-audio-listings > br,
#listings.modern-audio-listings > p > br {
    display: none !important;
}

#listings.modern-audio-listings > p {
    margin: 0;
    padding: 0;
}

#listings.modern-audio-listings .modern-report-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.content-inner:has(#new_request.audio-upload-card) > br {
    display: none !important;
}

/* ── SMS compose — smartphone preview (#createsms) ── */
#new_request.modern-sms-compose-card {
    width: 100%;
    max-width: none;
    margin: 0 auto 0.65rem;
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible;
}

#new_request.modern-sms-compose-card::before {
    display: none !important;
}

#new_request.modern-sms-compose-card:hover {
    transform: none;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

#new_request.modern-sms-compose-card > p,
#new_request.modern-sms-compose-card > br {
    display: none !important;
}

#new_request.modern-sms-compose-card form {
    margin: 0;
    padding: 0;
}

.modern-sms-compose {
    padding: 0;
    display: flex;
    justify-content: center;
}

.content-inner:has(#new_request.modern-sms-compose-card) {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    row-gap: 0.65rem;
}

.content-inner:has(#new_request.modern-sms-compose-card) .page-heading {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    align-self: start;
}

.content-inner:has(#new_request.modern-sms-compose-card) #new_request.modern-sms-compose-card {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    justify-self: center;
    align-self: start;
}

.content-inner:has(#new_request.modern-sms-compose-card) #listings {
    grid-column: 1 / -1;
    grid-row: 2;
}

#new_request.modern-sms-compose-card .modern-sms-compose-subtitle {
    display: none;
}

@media (max-width: 991.98px) {
    .content-inner:has(#new_request.modern-sms-compose-card) {
        grid-template-columns: 1fr;
    }

    .content-inner:has(#new_request.modern-sms-compose-card) .page-heading,
    .content-inner:has(#new_request.modern-sms-compose-card) #new_request.modern-sms-compose-card {
        grid-column: 1;
    }

    .content-inner:has(#new_request.modern-sms-compose-card) #new_request.modern-sms-compose-card {
        justify-self: center;
    }
}

.modern-sms-sr-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.modern-sms-phone-title {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0.12rem 0.2rem;
    border: none !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.25;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-sms-phone-title:focus {
    outline: none;
    border: none !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(217, 70, 239, 0.45) !important;
}

.modern-sms-phone-title::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.modern-sms-compose-submit,
.modern-sms-composer-submit,
.modern-sms-char-submit {
    border-radius: 999px !important;
    padding: 0.28rem 0.75rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    min-height: 1.45rem;
    box-shadow: 0 2px 6px rgba(217, 70, 239, 0.24);
}

.modern-sms-composer-submit,
.modern-sms-char-submit {
    flex-shrink: 0;
    margin: 0;
    border: none !important;
}

.modern-sms-compose-subtitle {
    margin: 0 0 0.55rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
    text-align: center;
}

.modern-sms-phone-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modern-sms-phone {
    width: min(100%, 24.375rem);
    min-height: 38rem;
    border-radius: 2.75rem;
    padding: 0.7rem;
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 55%, #020617 100%);
    box-shadow:
        0 24px 56px rgba(15, 23, 42, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 0 0 1px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
}

.modern-sms-phone-status {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0.5rem 0.75rem 0.25rem;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.modern-sms-phone-notch {
    width: 4.5rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #020617;
    justify-self: center;
}

.modern-sms-phone-signal {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.14rem;
    padding-right: 0.15rem;
}

.modern-sms-phone-signal i {
    display: block;
    width: 0.22rem;
    border-radius: 999px;
    background: #f8fafc;
}

.modern-sms-phone-signal i:nth-child(1) { height: 0.36rem; opacity: 0.55; }
.modern-sms-phone-signal i:nth-child(2) { height: 0.5rem; opacity: 0.75; }
.modern-sms-phone-signal i:nth-child(3) { height: 0.62rem; }

.modern-sms-phone-header {
    display: grid;
    grid-template-columns: 2rem 1fr 2rem;
    align-items: center;
    padding: 0.5rem 0.65rem 0.6rem;
    margin: 0 0.2rem;
    border-radius: 1.1rem 1.1rem 0 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    text-align: center;
    flex-shrink: 0;
}

.modern-sms-phone-contact-wrap {
    min-width: 0;
}

.modern-sms-phone-back,
.modern-sms-phone-info {
    font-size: 1.125rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1;
}

.modern-sms-phone-screen {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 24rem;
    max-height: none;
    padding: 0.75rem 0.75rem 0.85rem;
    margin: 0 0.2rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    overflow-y: auto;
}

.modern-sms-bubble {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0.85rem 0.9rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 48%, #f5d0fe 100%);
    border: 1px solid rgba(217, 70, 239, 0.18);
    box-shadow: 0 2px 8px rgba(217, 70, 239, 0.1);
}

.modern-sms-textarea {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 20rem;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: none !important;
    outline: none !important;
    resize: none;
    background: transparent !important;
    box-shadow: none !important;
    font-family: var(--modern-font);
    font-size: 1rem;
    line-height: 1.5;
    color: #0f172a;
}

.modern-sms-textarea:focus {
    border: none !important;
    box-shadow: none !important;
}

.modern-sms-textarea::placeholder {
    color: #94a3b8;
}

.modern-sms-phone-footer {
    padding: 0.28rem 0.65rem 0.32rem;
    margin: 0 0.2rem;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    flex-shrink: 0;
}

.modern-sms-phone:not(.has-keyboard) .modern-sms-phone-footer {
    margin-bottom: 0.2rem;
    border-radius: 0 0 1.1rem 1.1rem;
}

.modern-sms-phone.has-keyboard .modern-sms-phone-screen {
    min-height: 20rem;
    max-height: none;
}

.modern-sms-phone.has-keyboard .modern-sms-textarea {
    min-height: 16.5rem;
}

.modern-sms-phone-keyboard {
    flex-shrink: 0;
    padding: 0.55rem 0.45rem 0.7rem;
    margin: 0 0.2rem 0.2rem;
    border-radius: 0 0 1.1rem 1.1rem;
    background: linear-gradient(180deg, #cbd5e1 0%, #b8c4d4 100%);
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    transition: box-shadow 0.2s ease;
}

.modern-sms-phone.keyboard-active .modern-sms-phone-keyboard {
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.06);
}

.modern-sms-keyboard-row {
    display: flex;
    justify-content: center;
    gap: 0.14rem;
    margin-bottom: 0.14rem;
}

.modern-sms-keyboard-row:last-child {
    margin-bottom: 0;
}

.modern-sms-key {
    flex: 1 1 0;
    max-width: 2.05rem;
    min-height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.38rem;
    background: #fff;
    color: #0f172a;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    text-transform: lowercase;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 1px 2px rgba(15, 23, 42, 0.12);
    transition:
        background 0.08s ease,
        color 0.08s ease,
        box-shadow 0.08s ease,
        transform 0.08s ease;
    user-select: none;
}

.modern-sms-key.is-backspace {
    flex: 1.35 1 0;
    max-width: 2.9rem;
    font-size: 1rem;
}

.modern-sms-key.is-space {
    flex: 5 1 0;
    max-width: none;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    color: #64748b;
}

.modern-sms-key.is-pressed {
    background: #22c55e !important;
    color: #fff !important;
    box-shadow:
        0 0 0 1px rgba(21, 128, 61, 0.45),
        0 0 10px rgba(34, 197, 94, 0.45) !important;
    transform: scale(0.94);
}

.modern-sms-char-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.4rem;
    margin-bottom: 0;
    min-height: 0;
}

.modern-sms-char-count {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--brand-primary);
    line-height: 1;
}

.modern-sms-char-hint {
    font-size: 0.5625rem;
    color: #94a3b8;
    text-transform: lowercase;
}

.modern-sms-composer-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.modern-sms-composer-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-primary-hover), var(--brand-primary));
    box-shadow: 0 2px 6px rgba(217, 70, 239, 0.28);
}

.modern-sms-composer-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    font-size: 0.8125rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#new_request.modern-sms-compose-card.is-readonly .modern-sms-bubble {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: none;
}

#new_request.modern-sms-compose-card.is-readonly .modern-sms-textarea {
    color: #334155;
    resize: none;
}

#new_request.modern-sms-compose-card.is-readonly .modern-sms-composer-bar {
    opacity: 0.55;
}

#new_request.modern-sms-compose-card.is-readonly .modern-sms-phone-title {
    pointer-events: none;
    color: #334155;
}

#new_request[data-sms-mode="review"],
#new_request[data-sms-mode="edit"] {
    overflow: visible;
    min-height: 0;
    margin-bottom: 0.35rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#new_request[data-sms-mode="review"]:not(.modern-sms-compose-card) form,
#new_request[data-sms-mode="edit"]:not(.modern-sms-compose-card) form {
    opacity: 1;
}

.content-inner:has(#new_request.modern-sms-compose-card.is-sms-review),
.content-inner:has(#new_request.modern-sms-compose-card.is-sms-edit) {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    row-gap: 0.65rem;
}

.content-inner:has(#new_request.modern-sms-compose-card.is-sms-review) .page-heading,
.content-inner:has(#new_request.modern-sms-compose-card.is-sms-edit) .page-heading {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    max-width: none;
    text-align: left;
    margin: 0;
    align-self: start;
}

.content-inner:has(#new_request.modern-sms-compose-card.is-sms-review) #new_request.modern-sms-compose-card,
.content-inner:has(#new_request.modern-sms-compose-card.is-sms-edit) #new_request.modern-sms-compose-card {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    justify-self: center;
    align-self: start;
}

.content-inner:has(#new_request.modern-sms-compose-card.is-sms-review) #listings,
.content-inner:has(#new_request.modern-sms-compose-card.is-sms-edit) #listings {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    align-self: stretch;
}

#listings.is-sms-picker-list {
    margin-top: 0.15rem;
}

#listings.is-sms-picker-list .table_requestnew tr.is-sms-active-row {
    background: rgba(217, 70, 239, 0.1) !important;
    box-shadow: inset 3px 0 0 var(--brand-primary);
}

@media (max-width: 991.98px) {
    .content-inner:has(#new_request.modern-sms-compose-card.is-sms-review),
    .content-inner:has(#new_request.modern-sms-compose-card.is-sms-edit) {
        grid-template-columns: 1fr;
    }

    .content-inner:has(#new_request.modern-sms-compose-card.is-sms-review) .page-heading,
    .content-inner:has(#new_request.modern-sms-compose-card.is-sms-edit) .page-heading,
    .content-inner:has(#new_request.modern-sms-compose-card.is-sms-review) #new_request.modern-sms-compose-card,
    .content-inner:has(#new_request.modern-sms-compose-card.is-sms-edit) #new_request.modern-sms-compose-card {
        grid-column: 1;
    }

    .content-inner:has(#new_request.modern-sms-compose-card.is-sms-review) #new_request.modern-sms-compose-card,
    .content-inner:has(#new_request.modern-sms-compose-card.is-sms-edit) #new_request.modern-sms-compose-card {
        justify-self: center;
    }
}

a.modern-sms-phone-back.is-action {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modern-sms-phone-back.is-action {
    cursor: pointer;
    color: #6366f1;
}

.modern-sms-phone-back.is-action:hover {
    color: #4338ca;
}

#new_request.modern-sms-compose-card.is-sms-review .modern-sms-compose-subtitle {
    display: block;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 0.35rem;
}

/* Legacy filter/search rows — modern inner card */
#listings #page_title.filter-legacy-title-hidden,
#listings #page_title {
    display: none !important;
}

/* ── Shared form field typography (campaign create, filters, profile) ── */
.app-field {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
}

.app-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #334155;
    margin: 0;
    line-height: 1.25;
}

.app-field-hint {
    margin: 0.25rem 0 0;
    font-size: 0.6875rem;
    font-weight: 400;
    color: #94a3b8;
    line-height: 1.35;
}

.app-field-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

#search_request_list.modern-filter-card {
    margin: 0.55rem 0.55rem 0.45rem;
    padding: 0;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--modern-radius-sm);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    overflow: hidden;
}

#search_request_list.modern-filter-subcard {
    margin: 0 !important;
    border-radius: 0.85rem;
}

.modern-list-page-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.65rem;
    min-width: 0;
    max-width: 100%;
}

.modern-list-page-stack > #listings.modern-report-listings {
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-self: stretch;
}

.modern-filter-subcard-head {
    padding: 0.4rem 0.75rem 0.35rem;
    border-bottom: 1px solid rgba(241, 245, 249, 0.95);
    background: linear-gradient(180deg, #fafbfd 0%, #ffffff 100%);
}

.modern-filter-subcard-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
}

#search_request_list.modern-filter-subcard .modern-filter-form {
    padding: 0.5rem 0.75rem 0.6rem;
}

.modern-filter-toolbar {
    width: 100%;
}

.modern-filter-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.35rem 0.65rem;
}

.modern-filter-inline-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    flex-shrink: 0;
}

.modern-filter-inline-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
}

.modern-filter-inline-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.modern-filter-inline-search .form-select {
    width: 6.75rem;
    min-width: 5.5rem;
    flex-shrink: 0;
}

.modern-filter-inline-search .form-control {
    width: 7rem;
    min-width: 4.5rem;
    max-width: 9rem;
}

.modern-filter-inline-select .form-select {
    width: 5.5rem;
    min-width: 4.5rem;
}

.modern-filter-inline-date .form-control,
.modern-filter-inline-date .filter-date-field {
    width: 7rem;
    min-width: 6rem;
}

.modern-filter-inline-dates {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
}

.modern-filter-inline-dates-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.35rem 0.65rem;
    width: auto;
    min-width: 0;
}

.modern-filter-inline-date-chip {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
    width: auto;
}

.modern-filter-inline-date-chip-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
}

.modern-filter-inline-date-chip .form-control,
.modern-filter-inline-date-chip .filter-date-field {
    width: 7rem;
    min-width: 6rem;
    max-width: none;
}

.modern-filter-inline-checkbox {
    gap: 0.3rem;
}

.modern-filter-inline-generate-report {
    margin-left: 0.15rem;
}

.modern-filter-inline-generate-report .modern-filter-inline-label {
    color: #475569;
}

.modern-filter-toolbar-actions {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.modern-filter-toolbar .form-control,
.modern-filter-toolbar .form-select,
.modern-filter-toolbar .filter-date-field {
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    min-height: 1.5rem;
    height: 1.5rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.75rem;
    line-height: 1.2;
    background: #fff;
    box-shadow: none;
}

.modern-filter-toolbar .form-control:focus,
.modern-filter-toolbar .form-select:focus,
.modern-filter-toolbar .filter-date-field:focus {
    border-color: rgba(217, 70, 239, 0.55);
    box-shadow: 0 0 0 0.12rem rgba(217, 70, 239, 0.12);
    outline: none;
}

.modern-filter-toolbar .modern-filter-submit {
    min-width: 5rem;
    padding: 0.22rem 0.75rem;
    font-size: 0.6875rem;
    min-height: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    font-weight: 600;
}

.modern-filter-toolbar input[type="checkbox"] {
    width: 0.875rem;
    height: 0.875rem;
    margin: 0;
    accent-color: var(--brand-primary);
}

@media (max-width: 991px) {
    .modern-filter-toolbar-row {
        gap: 0.4rem 0.5rem;
    }

    .modern-filter-toolbar-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
        padding-top: 0.15rem;
    }
}

.modern-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.15rem;
    align-items: start;
    width: 100%;
}

#search_request_list.modern-filter-subcard,
#search_request_list.modern-filter-subcard .modern-filter-form,
#search_request_list.modern-filter-card form.modern-filter-form {
    width: 100%;
}

#search_request_list.modern-filter-card .modern-filter-form table,
#search_request_list.modern-filter-card form.modern-filter-form table {
    width: 100%;
}

.modern-filter-field,
.modern-filter-field.app-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.modern-filter-field-controls,
.modern-filter-field .app-field-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.modern-filter-field-search .modern-filter-field-controls .form-select {
    flex: 0 1 9.5rem;
    min-width: 7rem;
}

.modern-filter-field-search .modern-filter-field-controls .form-control {
    flex: 1 1 0;
    min-width: 0;
}

.modern-filter-field:not(.modern-filter-field-search) .modern-filter-field-controls .form-select,
.modern-filter-field:not(.modern-filter-field-search) .modern-filter-field-controls .form-control {
    width: 100%;
}

.modern-filter-checkbox-wrap {
    display: flex;
    align-items: center;
    min-height: 1.65rem;
}

.modern-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.45rem;
    margin-top: 0.1rem;
    border-top: 1px solid rgba(241, 245, 249, 0.95);
}

@media (max-width: 767.98px) {
    .modern-filter-grid {
        grid-template-columns: 1fr;
    }
}

#search_request_list.modern-filter-card > table:not(:has(form)) {
    display: none;
}

#search_request_list.modern-filter-card .modern-filter-form,
#search_request_list.modern-filter-card form.modern-filter-form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.65rem 0.8rem 0.75rem;
}

#search_request_list.modern-filter-subcard .modern-filter-form,
#search_request_list.modern-filter-subcard form.modern-filter-form {
    padding: 0;
}

#search_request_list.modern-filter-card .modern-filter-form table,
#search_request_list.modern-filter-card form.modern-filter-form table {
    width: 100%;
    border: none;
    border-collapse: separate;
    border-spacing: 0;
}

#search_request_list.modern-filter-card .modern-filter-form tbody,
#search_request_list.modern-filter-card form.modern-filter-form tbody {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

#search_request_list.modern-filter-card .filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
    align-items: start;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(241, 245, 249, 0.95);
}

#search_request_list.modern-filter-card .filter-row:last-of-type,
#search_request_list.modern-filter-card .filter-row-actions {
    border-bottom: none;
}

#search_request_list.modern-filter-card .filter-row-dates {
    display: block !important;
    grid-template-columns: none !important;
    max-width: none;
}

#search_request_list.modern-filter-card .filter-dates-cell {
    display: block;
    width: 100%;
    padding: 0 !important;
}

#search_request_list.modern-filter-card .filter-row:has(.filter-label-cell:nth-child(3)),
#search_request_list.modern-filter-card .filter-row:has(.filter-checkbox-cell) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.15rem;
    align-items: start;
}

#search_request_list.modern-filter-card .filter-row-pairs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.15rem;
    align-items: start;
    border-bottom: none;
    padding: 0;
}

#search_request_list.modern-filter-card .filter-row-pairs > td,
#search_request_list.modern-filter-card .filter-row-single > td {
    display: block;
    padding: 0 !important;
    border: none !important;
}

#search_request_list.modern-filter-card .filter-row-single {
    display: block;
    max-width: calc(50% - 0.6rem);
    padding: 0;
    border-bottom: none;
}

#search_request_list.modern-filter-card .filter-row-spacer {
    display: none !important;
}

#search_request_list.modern-filter-card .filter-row-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.45rem;
    margin-top: 0.1rem;
    border-top: 1px solid rgba(241, 245, 249, 0.95);
    max-width: none;
}

#search_request_list.modern-filter-card .filter-label-cell {
    text-align: left !important;
    padding: 0 !important;
}

#search_request_list.modern-filter-card .filter-label-cell label,
#search_request_list.modern-filter-subcard .filter-label-cell label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #334155;
    margin: 0 0 0.3rem;
    line-height: 1.25;
}

#search_request_list .filter-inline-dates,
#search_request_list.modern-filter-card .filter-inline-dates,
#search_request_list.modern-filter-subcard .filter-inline-dates {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.35rem 0.65rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

#search_request_list .filter-inline-date-item,
#search_request_list.modern-filter-card .filter-inline-date-item,
#search_request_list.modern-filter-subcard .filter-inline-date-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 5.5rem;
    max-width: calc(50% - 0.35rem);
    width: auto;
}

#search_request_list.modern-filter-card .filter-inline-date-sublabel {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #334155;
    line-height: 1.25;
}

#search_request_list.modern-filter-card .filter-field-group,
#search_request_list.modern-filter-card .filter-date-cell,
#search_request_list.modern-filter-card .filter-select-cell,
#search_request_list.modern-filter-card .filter-checkbox-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    padding: 0 !important;
}

.modern-filter-field-search .modern-filter-field-controls .form-select {
    flex: 0 1 9rem;
    min-width: 5.5rem;
    width: auto !important;
    max-width: 11rem;
}

.modern-filter-field-search .modern-filter-field-controls .form-control {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    max-width: none;
}

#search_request_list .modern-filter-search-inline-controls,
#search_request_list.modern-filter-card .filter-field-group,
#search_request_list.modern-filter-subcard .modern-filter-search-inline-controls {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
}

#search_request_list .modern-filter-search-inline-controls .form-select,
#search_request_list.modern-filter-card .filter-field-group .form-select,
#search_request_list.modern-filter-subcard .modern-filter-search-inline-controls .form-select {
    flex: 0 1 8.5rem;
    min-width: 5.5rem;
    width: auto !important;
    max-width: 11rem;
}

#search_request_list .modern-filter-search-inline-controls .form-control,
#search_request_list.modern-filter-card .filter-field-group .form-control,
#search_request_list.modern-filter-subcard .modern-filter-search-inline-controls .form-control {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    max-width: none;
}

#search_request_list.modern-filter-card .filter-field-group .form-select {
    flex: 0 1 9rem;
    min-width: 7rem;
}

#search_request_list.modern-filter-card .filter-field-group .form-control {
    flex: 1 1 9rem;
    min-width: 6.5rem;
}

#search_request_list.modern-filter-card .filter-date-cell .form-control,
#search_request_list.modern-filter-card .filter-date-field,
#search_request_list.modern-filter-subcard .filter-date-cell .form-control,
#search_request_list.modern-filter-subcard .filter-date-field {
    width: 100%;
    max-width: 8.75rem;
    cursor: pointer;
}

#search_request_list .filter-inline-date-item .filter-date-field,
#search_request_list .filter-inline-date-item .form-control,
#search_request_list.modern-filter-card .filter-inline-date-item .filter-date-field,
#search_request_list.modern-filter-subcard .filter-inline-date-item .filter-date-field {
    width: 100%;
    max-width: none;
    min-width: 0;
    cursor: pointer;
}

#search_request_list.modern-filter-card .filter-select-cell .form-select {
    width: 100%;
    max-width: 11rem;
}

#search_request_list.modern-filter-card .form-control,
#search_request_list.modern-filter-card .form-select,
#search_request_list.modern-filter-card .filter-date-field,
#search_request_list.modern-filter-subcard .form-control,
#search_request_list.modern-filter-subcard .form-select,
#search_request_list.modern-filter-subcard .filter-date-field,
.modern-filter-grid .form-control,
.modern-filter-grid .form-select {
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    min-height: 1.65rem;
    height: auto;
    padding: 0.2rem 0.5rem;
    font-size: 0.8125rem;
    line-height: 1.25;
    background: #fff;
    box-shadow: none;
    transition: border-color var(--ui-transition), box-shadow var(--ui-transition);
}

#search_request_list.modern-filter-card .form-control:focus,
#search_request_list.modern-filter-card .form-select:focus,
#search_request_list.modern-filter-card .filter-date-field:focus {
    border-color: rgba(217, 70, 239, 0.55);
    box-shadow: 0 0 0 0.12rem rgba(217, 70, 239, 0.12);
    outline: none;
}

#search_request_list.modern-filter-card .modern-filter-submit {
    min-width: 6.25rem;
    padding: 0.28rem 0.95rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

#search_request_list.modern-filter-card input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--brand-primary);
}

#listings:has(#search_request_list.modern-filter-card) > p {
    margin: 0;
    padding: 0 0.85rem 0.45rem;
}

@media (max-width: 991px) {
    #search_request_list.modern-filter-card .filter-row,
    #search_request_list.modern-filter-card .filter-row:has(.filter-label-cell:nth-child(3)),
    #search_request_list.modern-filter-card .filter-row:has(.filter-checkbox-cell) {
        grid-template-columns: 1fr;
    }

    #search_request_list.modern-filter-card .filter-label-cell {
        text-align: left !important;
    }

    #search_request_list .filter-inline-dates,
    #search_request_list.modern-filter-card .filter-inline-dates,
    #search_request_list.modern-filter-subcard .filter-inline-dates {
        flex-wrap: nowrap;
    }

    #search_request_list .filter-inline-date-item,
    #search_request_list.modern-filter-card .filter-inline-date-item,
    #search_request_list.modern-filter-subcard .filter-inline-date-item {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 5.25rem;
        max-width: calc(50% - 0.35rem);
        width: auto;
    }

    #search_request_list .filter-inline-date-item .filter-date-field,
    #search_request_list .filter-inline-date-item .form-control,
    #search_request_list.modern-filter-card .filter-inline-date-item .filter-date-field,
    #search_request_list.modern-filter-card .filter-inline-date-item .form-control {
        width: 100% !important;
        max-width: none;
        min-width: 0;
    }

    #search_request_list.modern-filter-card .filter-field-group .form-select,
    #search_request_list.modern-filter-card .filter-field-group .form-control,
    #search_request_list.modern-filter-card .filter-date-cell .form-control,
    #search_request_list.modern-filter-card .filter-select-cell .form-select {
        width: 100%;
        max-width: none;
    }

    #search_request_list .modern-filter-search-inline-controls .form-select,
    #search_request_list .modern-filter-search-inline-controls .form-control,
    #search_request_list.modern-filter-card .filter-field-group:has(.form-control) .form-select,
    #search_request_list.modern-filter-card .filter-field-group:has(.form-control) .form-control {
        width: auto !important;
    }

    #search_request_list .modern-filter-search-inline-controls .form-select,
    #search_request_list.modern-filter-card .filter-field-group:has(.form-control) .form-select {
        flex: 0 1 42%;
        max-width: 11rem;
        min-width: 5.25rem;
    }

    #search_request_list .modern-filter-search-inline-controls .form-control,
    #search_request_list.modern-filter-card .filter-field-group:has(.form-control) .form-control {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }

    .modern-filter-inline-search .modern-filter-inline-controls {
        flex-wrap: nowrap;
    }

    .modern-filter-inline-search .form-select {
        flex: 0 1 42%;
        width: auto !important;
        max-width: 11rem;
        min-width: 5.25rem;
    }

    .modern-filter-inline-search .form-control {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        max-width: none;
    }
}

/* ── Campaign report redesign ── */
#listings.modern-report-listings {
    margin-top: 0.65rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.85rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

#listings.modern-report-listings > #search_request_list.modern-filter-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
}

#listings.modern-report-listings > #search_request_list.modern-filter-card::before {
    border-radius: 0;
}

.modern-report-table-wrap {
    overflow: auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    max-height: min(72vh, 920px);
    padding: 0 0.65rem 0.75rem;
    -webkit-overflow-scrolling: touch;
}

#listings.modern-report-listings > p {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.modern-report-generating {
    margin: 0.65rem 0.75rem 0.35rem;
}

.modern-report-download-wrap {
    padding: 0.5rem 0.85rem 0.25rem;
    text-align: right;
}

.modern-report-download-wrap .modern-download-link {
    display: inline-flex;
    text-decoration: none !important;
}

.modern-report-download-wrap .modern-download-btn,
table.modern-download-row .modern-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    padding: 0.55rem 1.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 999px;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.18);
}

.modern-report-meta {
    margin: 0;
    padding: 0.55rem 0.85rem 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.modern-report-hint {
    margin: 0;
    padding: 0.35rem 0.85rem 0.55rem;
    font-size: 0.72rem;
    color: #b45309;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}

.modern-report-table-wrap:has(.is-full-report) {
    overflow-x: auto;
}

.modern-report-table-wrap:has(.is-light-report),
.modern-report-table-wrap:has(.is-admin-log) {
    overflow-x: auto;
}

#listings.modern-report-listings table.table_requestnew.modern-report-table {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
}

#listings.modern-report-listings table.table_requestnew.modern-report-table:not(.is-admin-log):not(.is-light-report) {
    table-layout: fixed;
}

#listings.modern-report-listings table.table_requestnew.modern-report-table.is-admin-log,
#listings.modern-report-listings table.table_requestnew.modern-report-table.is-light-report {
    table-layout: auto;
    min-width: 100% !important;
}

table.modern-report-table {
    min-width: 0;
}

table.modern-report-table.is-light-report {
    min-width: 100% !important;
    width: 100% !important;
    font-size: 0.75rem !important;
    line-height: 1.25 !important;
}

table.modern-report-table.is-light-report tr.header th,
table.modern-report-table.is-light-report td {
    padding: 0.35rem 0.5rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

table.modern-report-table.is-light-report tr.header th {
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #64748b;
    font-weight: 600;
    background: #f8fafc;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 rgba(226, 232, 240, 0.95);
}

table.modern-report-table.is-light-report .report-cause-cell {
    min-width: 0;
    max-width: none;
    width: auto;
}

table.modern-report-table.is-light-report .report-cause-pill {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

table.modern-report-table.is-light-report th:nth-child(1),
table.modern-report-table.is-light-report td:nth-child(1) { width: 3.5rem; min-width: 3rem; }

table.modern-report-table.is-light-report th:nth-child(2),
table.modern-report-table.is-light-report td:nth-child(2),
table.modern-report-table.is-light-report th:nth-child(3),
table.modern-report-table.is-light-report td:nth-child(3) { width: 8%; min-width: 5.5rem; }

table.modern-report-table.is-light-report th:nth-child(4),
table.modern-report-table.is-light-report td:nth-child(4) { width: 14%; min-width: 6.5rem; }

table.modern-report-table.is-light-report th:nth-child(5),
table.modern-report-table.is-light-report td:nth-child(5) { width: 12%; min-width: 6rem; }

table.modern-report-table.is-light-report th:nth-child(6),
table.modern-report-table.is-light-report td:nth-child(6) { width: 5%; min-width: 3rem; }

table.modern-report-table.is-light-report th:nth-child(7),
table.modern-report-table.is-light-report td:nth-child(7) { width: 5%; min-width: 2.5rem; }

table.modern-report-table.is-light-report th:nth-child(8),
table.modern-report-table.is-light-report td:nth-child(8) { width: 11%; min-width: 6rem; }

table.modern-report-table.is-light-report th:nth-child(9),
table.modern-report-table.is-light-report td:nth-child(9),
table.modern-report-table.is-light-report .report-cause-cell { width: 16%; min-width: 7rem; }

table.modern-report-table.is-light-report th:nth-child(10),
table.modern-report-table.is-light-report td:nth-child(10),
table.modern-report-table.is-light-report .report-status-cell { width: 5.5rem; min-width: 4.5rem; text-align: center; }

table.modern-report-table.is-sms-report {
    min-width: 58rem !important;
}

table.modern-report-table.is-sms-report th:nth-child(1),
table.modern-report-table.is-sms-report td:nth-child(1) { width: 3.25rem; min-width: 2.75rem; }

table.modern-report-table.is-sms-report th:nth-child(2),
table.modern-report-table.is-sms-report td:nth-child(2),
table.modern-report-table.is-sms-report th:nth-child(3),
table.modern-report-table.is-sms-report td:nth-child(3) { width: 7%; min-width: 5rem; }

table.modern-report-table.is-sms-report th:nth-child(4),
table.modern-report-table.is-sms-report td:nth-child(4) { width: 14%; min-width: 6rem; max-width: 12rem; }

table.modern-report-table.is-sms-report th:nth-child(5),
table.modern-report-table.is-sms-report td:nth-child(5) { width: 2.75rem; min-width: 2.5rem; text-align: center; }

table.modern-report-table.is-sms-report th:nth-child(6),
table.modern-report-table.is-sms-report td:nth-child(6) { width: 12%; min-width: 5.5rem; max-width: 10rem; }

table.modern-report-table.is-sms-report th:nth-child(7),
table.modern-report-table.is-sms-report td:nth-child(7),
table.modern-report-table.is-sms-report th:nth-child(8),
table.modern-report-table.is-sms-report td:nth-child(8) { width: 3.5rem; min-width: 2.75rem; text-align: center; }

table.modern-report-table.is-sms-report th:nth-child(9),
table.modern-report-table.is-sms-report td:nth-child(9) { width: 9%; min-width: 6.5rem; }

table.modern-report-table.is-sms-report th:nth-child(10),
table.modern-report-table.is-sms-report td:nth-child(10),
table.modern-report-table.is-sms-report .report-status-cell { width: 5.5rem; min-width: 4.5rem; text-align: center; }

table.modern-report-table .report-flag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

table.modern-report-table .report-flag-badge.is-yes {
    color: #166534;
    background: #dcfce7;
}

table.modern-report-table .report-flag-badge.is-no {
    color: #991b1b;
    background: #fee2e2;
}

table.modern-report-table .report-num-cell {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

table.modern-report-table.is-full-report {
    min-width: 100% !important;
    width: 100% !important;
    font-size: 0.6875rem !important;
    line-height: 1.1 !important;
    table-layout: fixed;
}

table.modern-report-table.is-full-report tr.header th,
table.modern-report-table.is-full-report td {
    padding: 0.32rem 0.45rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

table.modern-report-table.is-full-report tr.header th {
    font-size: 0.625rem !important;
    letter-spacing: 0.02em;
    white-space: normal;
    line-height: 1.15 !important;
    hyphens: auto;
}

table.modern-report-table .report-cell-clamp {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

table.modern-report-table.is-full-report th:nth-child(1),
table.modern-report-table.is-full-report td:nth-child(1) { width: 3.5%; min-width: 2.5rem; }

table.modern-report-table.is-full-report th:nth-child(2),
table.modern-report-table.is-full-report td:nth-child(2),
table.modern-report-table.is-full-report th:nth-child(3),
table.modern-report-table.is-full-report td:nth-child(3) { width: 6.5%; min-width: 4.5rem; }

table.modern-report-table.is-full-report th:nth-child(4),
table.modern-report-table.is-full-report td:nth-child(4) { width: 11%; min-width: 5.5rem; }

table.modern-report-table.is-full-report th:nth-child(5),
table.modern-report-table.is-full-report td:nth-child(5),
table.modern-report-table.is-full-report th:nth-child(7),
table.modern-report-table.is-full-report td:nth-child(7),
table.modern-report-table.is-full-report th:nth-child(12),
table.modern-report-table.is-full-report td:nth-child(12) { width: 4%; min-width: 2.25rem; }

table.modern-report-table.is-full-report th:nth-child(6),
table.modern-report-table.is-full-report td:nth-child(6) { width: 8%; min-width: 4rem; }

table.modern-report-table.is-full-report th:nth-child(8),
table.modern-report-table.is-full-report td:nth-child(8),
table.modern-report-table.is-full-report th:nth-child(9),
table.modern-report-table.is-full-report td:nth-child(9),
table.modern-report-table.is-full-report th:nth-child(10),
table.modern-report-table.is-full-report td:nth-child(10),
table.modern-report-table.is-full-report th:nth-child(11),
table.modern-report-table.is-full-report td:nth-child(11) { width: 7.5%; min-width: 4.5rem; }

table.modern-report-table.is-full-report th:nth-child(13),
table.modern-report-table.is-full-report td:nth-child(13),
table.modern-report-table.is-full-report .report-hangup-cell { width: 10%; min-width: 5rem; }

table.modern-report-table.is-full-report th:nth-child(14),
table.modern-report-table.is-full-report td:nth-child(14) { width: 6%; min-width: 3.5rem; }

table.modern-report-table.is-full-report th:nth-child(15),
table.modern-report-table.is-full-report td:nth-child(15),
table.modern-report-table.is-full-report .report-status-cell { width: 3.5%; min-width: 2rem; }

table.modern-report-table .report-empty-cell {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
}

table.modern-report-table .report-cause-cell {
    min-width: 0;
    max-width: none;
}

table.modern-report-table.is-full-report .report-cause-cell {
    min-width: 0;
    max-width: none;
}

table.modern-report-table .report-cause-pill {
    display: inline-block;
    max-width: 100%;
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem !important;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

table.modern-report-table .report-cause-pill.is-success {
    background: #ecfdf5;
    color: #059669;
}

table.modern-report-table .report-cause-pill.is-fail {
    background: #fef2f2;
    color: #dc2626;
}

table.modern-report-table .report-status-cell {
    width: 2.4rem;
    text-align: center;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

table.modern-report-table .report-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 2.35rem;
    height: 1.45rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    font-size: 0.625rem !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
}

table.modern-report-table .report-status-badge .bi {
    font-size: 0.72rem;
    line-height: 1;
}

table.modern-report-table .report-status-badge .report-status-text {
    text-transform: lowercase;
}

table.modern-report-table .report-status-badge.is-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

table.modern-report-table .report-status-badge.is-fail {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

#listings.modern-report-listings > .paging.modern-pagination {
    margin: 0 0.85rem 0.85rem;
}

#listings.modern-report-listings > p:empty {
    display: none;
}

/* ── Campaign / SMS list quick filter ── */
#listings.modern-campaign-listings,
#listings.modern-sms-listings {
    margin-top: 0.65rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.85rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.content-inner:has(#new_request.modern-sms-compose-card) #listings.modern-sms-listings {
    margin-top: 0;
}

#listings.modern-campaign-listings > br,
#listings.modern-campaign-listings > p > br,
#listings.modern-sms-listings > br,
#listings.modern-sms-listings > p > br {
    display: none !important;
}

.content-inner:has(#listings.modern-campaign-listings) #page_title {
    display: none !important;
}

.content-inner:has(#new_request.modern-sms-compose-card) #page_title {
    display: none !important;
}

.modern-campaign-list-filter,
.modern-sms-list-filter {
    margin: 0;
    padding: 0.45rem 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(241, 245, 249, 0.95);
    background: linear-gradient(180deg, #fafbfd 0%, #ffffff 100%);
}

.modern-campaign-list-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.modern-campaign-list-filter-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 11rem;
    min-width: 0;
    margin: 0;
    color: #94a3b8;
}

.modern-campaign-list-filter-search-wrap .bi-search {
    flex-shrink: 0;
    font-size: 0.85rem;
}

.modern-campaign-list-filter-search {
    min-height: 1.85rem;
    height: 1.85rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    font-size: 0.8125rem;
    border-radius: 0.45rem;
    border-color: #e2e8f0;
}

.modern-campaign-list-filter-search:focus {
    border-color: rgba(217, 70, 239, 0.45);
    box-shadow: 0 0 0 0.12rem rgba(217, 70, 239, 0.12);
}

.modern-campaign-list-filter-status {
    flex: 0 1 8.5rem;
    min-width: 7rem;
    max-width: 10rem;
    min-height: 1.85rem;
    height: 1.85rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    font-size: 0.8125rem;
    border-radius: 0.45rem;
    border-color: #e2e8f0;
}

.modern-campaign-list-filter-clear {
    flex: 0 0 auto;
    min-height: 1.85rem;
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    border-radius: 999px;
}

.modern-campaign-list-filter-count {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.modern-campaign-list-filter-empty {
    margin-top: 0.35rem;
    padding: 0.35rem 0.45rem;
    border-radius: 0.45rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
    font-size: 0.75rem;
    line-height: 1.35;
}

.modern-campaign-table-wrap,
.modern-sms-table-wrap {
    max-height: none;
    padding: 0 0.65rem 0.75rem;
}

#listings.modern-campaign-listings .paging,
#listings.modern-campaign-listings .paging.modern-pagination,
#listings.modern-sms-listings .paging,
#listings.modern-sms-listings .paging.modern-pagination {
    margin: 0;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    border-bottom: none;
}

@media (max-width: 767.98px) {
    .modern-campaign-list-filter-row,
    .modern-sms-list-filter .modern-campaign-list-filter-row {
        gap: 0.35rem;
    }

    .modern-campaign-list-filter-search-wrap {
        flex: 1 1 100%;
    }

    .modern-campaign-list-filter-status {
        flex: 1 1 calc(50% - 0.2rem);
        min-width: 0;
        max-width: none;
    }

    .modern-campaign-list-filter-clear {
        flex: 1 1 calc(50% - 0.2rem);
    }

    .modern-campaign-list-filter-count {
        flex: 1 1 100%;
        margin-left: 0;
        text-align: right;
    }

    .modern-campaign-table-wrap,
    .modern-sms-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #listings.modern-campaign-listings table.modern-campaign-table {
        min-width: 920px;
    }

    #listings.modern-sms-listings table.modern-sms-table {
        min-width: 760px;
    }
}

#listings form,
#new_request form {
    padding: 0.35rem 0.65rem 0;
}

#listings form table,
#new_request form table {
    width: 100%;
    border: none;
}

#listings form td,
#new_request form td {
    padding: 0.15rem 0.3rem;
    vertical-align: middle;
    font-size: 0.8125rem;
}

#listings form label,
#new_request form label {
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 0.05rem;
}

#requestSearchField,
#requestSearchTextfield,
#requestSearchTextfield_2 {
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    padding: 0.22rem 0.45rem;
    font-size: 0.8125rem;
    min-height: 1.75rem;
}

/* ── Modern legacy create/edit forms (#new_request) ── */
.content-inner.is-campaign-create-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.content-inner:has(#new_request.modern-form-card.is-campaign-create-only) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.content-inner.is-campaign-create-layout .page-heading,
.content-inner:has(#new_request.modern-form-card.is-campaign-create-only) .page-heading,
.content-inner.is-campaign-create-layout #new_request.modern-form-card.is-campaign-create-only:not(.audio-upload-card),
.content-inner:has(#new_request.modern-form-card.is-campaign-create-only) #new_request.modern-form-card.is-campaign-create-only:not(.audio-upload-card) {
    width: 100%;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    box-sizing: border-box;
}

#new_request.modern-form-card:not(.audio-upload-card):not(.modern-admin-fs-card) {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

#new_request.modern-form-card.is-campaign-create-only:not(.audio-upload-card) {
    overflow: hidden;
}

#new_request.modern-form-card.audio-upload-card {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

/* Edit campaign: form stays compact, listings table uses full content width */
.content-inner:has(#new_request.modern-form-card) #listings {
    width: 100%;
    max-width: none;
    overflow-x: auto;
}

#new_request.modern-form-card > p {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

#new_request.modern-form-card form {
    padding: 0.75rem 1rem 0.85rem !important;
    max-width: none;
    width: 100%;
}

#new_request.modern-form-card form table,
#new_request.modern-form-card form tbody {
    display: block;
    width: 100%;
    max-width: 100%;
    border: none;
    box-sizing: border-box;
}

#new_request.modern-form-card form tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.45rem;
    padding: 0.22rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.55);
}

#new_request.modern-form-card form tr.form-row-spacer {
    display: none;
}

#new_request.modern-form-card form tr.form-row-actions {
    display: flex;
    justify-content: flex-end;
    border-bottom: none;
    padding-top: 0.45rem;
    margin-top: 0.1rem;
}

#new_request.modern-form-card form tr.form-row-actions th {
    width: 100%;
    text-align: right;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

#new_request.modern-form-card form td,
#new_request.modern-form-card form th {
    display: block;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    vertical-align: middle;
}

#new_request.modern-form-card form td[align="right"] {
    flex: 0 0 min(9.5rem, 32%);
    text-align: left !important;
}

#new_request.modern-form-card form tr > td:nth-child(2):not([colspan]) {
    flex: 0 0 auto;
    width: auto;
}

#new_request.modern-form-card form tr > td:nth-child(2)[colspan],
#new_request.modern-form-card form tr > td:nth-child(3),
#new_request.modern-form-card form tr > td:nth-child(2):has(select),
#new_request.modern-form-card form tr > td:nth-child(2):has(input),
#new_request.modern-form-card form tr > td:nth-child(2):has(font) {
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 100%;
}

#new_request.modern-form-card form tr > td:nth-child(4) {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    font-size: 0.75rem;
    color: #64748b;
}

#new_request.modern-form-card form tr.form-row-active-period {
    flex-wrap: nowrap !important;
    align-items: center;
}

#new_request.modern-form-card form tr.form-row-active-period > td:nth-child(4) {
    display: none !important;
}

#new_request.modern-form-card form tr.form-row-active-period > td.form-field-with-required,
#new_request.modern-form-card form tr.form-row-active-period > td:nth-child(3):not(.form-row-merged-hidden) {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.15rem 0.25rem;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

#new_request.modern-form-card .form-row-active-period-inline {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.15rem 0.25rem;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

#new_request.modern-form-card .form-active-period-sep {
    flex: 0 0 auto;
    color: #64748b;
    font-weight: 600;
    line-height: 1;
    padding: 0 0.05rem;
}

#new_request.modern-form-card .form-row-active-period-inline #active_start_time,
#new_request.modern-form-card .form-row-active-period-inline #active_end_time,
#new_request.modern-form-card .form-row-active-period-inline #cmp_astart_time,
#new_request.modern-form-card .form-row-active-period-inline #cmp_aend_time,
#new_request.modern-form-card form tr.form-row-active-period #active_start_time,
#new_request.modern-form-card form tr.form-row-active-period #active_end_time,
#new_request.modern-form-card form tr.form-row-active-period #cmp_astart_time,
#new_request.modern-form-card form tr.form-row-active-period #cmp_aend_time {
    width: 5.5rem !important;
    max-width: 5.5rem !important;
    min-width: 4.75rem !important;
    flex: 0 0 5.5rem !important;
}

#new_request.modern-form-card .form-row-active-period-inline input[type="checkbox"] {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto;
    margin: 0 0.05rem 0 0.15rem;
}

#new_request.modern-form-card form select#retry_timeout,
#new_request.modern-form-card form select#audiofile,
#new_request.modern-form-card form select#smstext,
#new_request.modern-form-card form select#ctatus,
#new_request.modern-form-card form select#cid {
    max-width: 22rem;
}

#new_request.modern-form-card form label {
    display: block;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: #334155 !important;
    margin: 0 !important;
    line-height: 1.25 !important;
}

#new_request.modern-form-card form font[color="#ff0000"],
#new_request.modern-form-card form font[color="red"] {
    color: #ef4444 !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    line-height: 1;
}

#new_request.modern-form-card form input[type="text"],
#new_request.modern-form-card form input[type="password"],
#new_request.modern-form-card form select,
#new_request.modern-form-card form textarea,
#new_request.modern-form-card .form-control,
#new_request.modern-form-card .form-select {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 1.65rem !important;
    height: auto !important;
    padding: 0.2rem 0.5rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.25 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.4rem !important;
    background: #fff !important;
    box-shadow: none;
    transition: border-color var(--ui-transition), box-shadow var(--ui-transition);
}

#new_request.modern-form-card form input[type="text"]:focus,
#new_request.modern-form-card form select:focus,
#new_request.modern-form-card form textarea:focus,
#new_request.modern-form-card .form-control:focus,
#new_request.modern-form-card .form-select:focus {
    border-color: rgba(217, 70, 239, 0.55) !important;
    box-shadow: 0 0 0 0.15rem rgba(217, 70, 239, 0.12) !important;
    outline: none;
}

#new_request.modern-form-card input.timepicker-field,
#new_request.modern-form-card input[id*="time"],
#new_request.modern-form-card input[id*="date"] {
    cursor: pointer;
    max-width: 10.5rem;
}

#new_request.modern-form-card input.timepicker-field[readonly] {
    background-color: #fff !important;
}

#new_request.modern-form-card .form-row-merged-hidden {
    display: none !important;
}

#new_request.modern-form-card .form-required-marker {
    display: inline-flex;
    align-items: center;
    align-self: center;
    margin: 0;
    line-height: 1;
    flex: 0 0 auto;
}

#new_request.modern-form-card form tr > td:nth-child(2):not([colspan]):not(.form-row-merged-hidden) {
    display: flex;
    align-items: center;
    align-self: center;
    justify-content: center;
}

#new_request.modern-form-card form td.form-field-with-required {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.25rem;
}

#new_request.modern-form-card form td.form-field-with-required > .form-control,
#new_request.modern-form-card form td.form-field-with-required > .form-select,
#new_request.modern-form-card form td.form-field-with-required > select,
#new_request.modern-form-card form td.form-field-with-required > input:not([type="checkbox"]):not([type="file"]),
#new_request.modern-form-card form td.form-field-with-required > textarea {
    flex: 1 1 12rem;
    min-width: 0;
    width: auto !important;
    max-width: 100% !important;
}

#new_request.modern-form-card form td.form-field-with-required > input[type="range"] {
    flex: 1 1 8rem;
    width: auto !important;
    max-width: calc(100% - 2.5rem) !important;
    min-width: 4.5rem;
}

#new_request.modern-form-card form td.form-field-with-required > output {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none !important;
}

#new_request.modern-form-card form tr.form-row-active-period > td.form-field-with-required .form-required-marker {
    flex: 0 0 auto;
    margin: 0;
}

#new_request.modern-form-card form tr.form-row-meta,
#new_request.modern-form-card form tr.form-row-readonly {
    align-items: center;
}

#new_request.modern-form-card form tr.form-row-meta > td[align="right"],
#new_request.modern-form-card form tr.form-row-readonly > td[align="right"] {
    flex: 0 0 min(9.5rem, 32%);
}

#new_request.modern-form-card form .form-row-meta-value,
#new_request.modern-form-card form td.form-field-readonly {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ef4444;
}

#new_request.modern-form-card form tr:has(.form-inline-datetime) {
    padding-top: 0.28rem;
}

#new_request.modern-form-card .form-inline-datetime {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.35rem 0.65rem;
    width: 100%;
    max-width: 100%;
}

#new_request.modern-form-card .form-inline-datetime-item {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
    max-width: calc(50% - 0.35rem);
}

#new_request.modern-form-card .form-inline-datetime-sublabel {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #334155;
    line-height: 1.25;
}

#new_request.modern-form-card input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 180px;
    height: 0.3rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(217, 70, 239, 0.35), #e2e8f0);
    cursor: pointer;
}

#new_request.modern-form-card form tr > td:has(#no_retries) {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
}

#new_request.modern-form-card form tr > td:has(#no_retries) input[type="range"] {
    flex: 1 1 auto;
    width: auto !important;
    max-width: 11rem;
    min-width: 4.5rem;
    margin: 0;
}

#new_request.modern-form-card form tr > td:has(#no_retries) output {
    flex: 0 0 auto;
    margin-left: 0;
}

#new_request.modern-form-card input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    border: 2px solid #fff;
    background: linear-gradient(135deg, var(--brand-primary-hover), var(--brand-primary));
    box-shadow: 0 1px 4px rgba(217, 70, 239, 0.4);
}

#new_request.modern-form-card input[type="range"]::-moz-range-thumb {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    border: 2px solid #fff;
    background: linear-gradient(135deg, var(--brand-primary-hover), var(--brand-primary));
    box-shadow: 0 1px 4px rgba(217, 70, 239, 0.4);
}

#new_request.modern-form-card output {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0.05rem 0.35rem;
    margin-left: 0.25rem;
    border-radius: 999px;
    background: #fdf4ff;
    color: var(--brand-primary-hover);
    font-weight: 700;
    font-size: 0.6875rem;
    border: 1px solid rgba(217, 70, 239, 0.18);
}

#new_request.modern-form-card input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--brand-primary);
    cursor: not-allowed;
}

#new_request.modern-form-card input[type="file"] {
    width: 100%;
    font-size: 0.75rem;
    color: #64748b;
}

#new_request.modern-form-card form tr:has(#filename[type="file"]) > td.form-field-with-required,
#new_request.modern-form-card form tr:has(#filename[type="file"]) > td[colspan]:not(.form-row-merged-hidden) {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.15rem 0.25rem;
    flex: 1 1 12rem;
    min-width: 0;
}

#new_request.modern-form-card form tr:has(#filename[type="file"]) .form-required-marker {
    flex: 0 0 auto;
    margin: 0;
    align-self: center;
}

#new_request.modern-form-card form tr:has(#filename[type="file"]) input[type="file"]#filename {
    display: inline-block !important;
    position: static !important;
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
}

#new_request.modern-form-card input[type="file"]::file-selector-button {
    margin-right: 0.5rem;
    border: 1px solid rgba(217, 70, 239, 0.35);
    border-radius: 0.35rem;
    background: #fdf4ff;
    color: var(--brand-primary-hover);
    padding: 0.22rem 0.55rem;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background var(--ui-transition), border-color var(--ui-transition);
}

#new_request.modern-form-card input[type="file"]::file-selector-button:hover {
    background: #fae8ff;
    border-color: rgba(217, 70, 239, 0.55);
}

#new_request.modern-form-card #submitReqBtn,
#new_request.modern-form-card input[type="button"]#submitReqBtn {
    min-width: 7rem;
    padding: 0.32rem 0.85rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    border-radius: 0.4rem !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(217, 70, 239, 0.22);
}

#new_request.modern-form-card #submitReqBtn:hover {
    box-shadow: 0 3px 10px rgba(217, 70, 239, 0.32);
}

@media (max-width: 767.98px) {
    .content-inner.is-campaign-create-layout,
    .content-inner:has(#new_request.modern-form-card.is-campaign-create-only) {
        align-items: stretch;
        overflow-x: hidden;
    }

    .content-inner.is-campaign-create-layout .page-heading,
    .content-inner:has(#new_request.modern-form-card.is-campaign-create-only) .page-heading,
    .content-inner.is-campaign-create-layout #new_request.modern-form-card.is-campaign-create-only:not(.audio-upload-card),
    .content-inner:has(#new_request.modern-form-card.is-campaign-create-only) #new_request.modern-form-card.is-campaign-create-only:not(.audio-upload-card) {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        align-self: stretch;
    }

    #new_request.modern-form-card.is-campaign-create-only > p,
    #new_request.modern-form-card.is-campaign-create-only form,
    #new_request.modern-form-card.is-campaign-create-only form table,
    #new_request.modern-form-card.is-campaign-create-only form tbody {
        width: 100%;
        max-width: 100%;
    }

    #new_request.modern-form-card form {
        padding: 0.45rem 0.6rem 0.55rem !important;
    }

    #new_request.modern-form-card form tr:not(.form-row-actions):not(.form-row-spacer) {
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        padding: 0.28rem 0;
    }

    #new_request.modern-form-card form td[align="right"],
    #new_request.modern-form-card form tr > td:nth-child(3),
    #new_request.modern-form-card form tr > td[colspan]:not(.form-row-merged-hidden) {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
    }

    #new_request.modern-form-card .form-inline-datetime {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-end;
        gap: 0.35rem;
        max-width: none;
        width: 100%;
    }

    #new_request.modern-form-card .form-inline-datetime-item {
        flex: 1 1 calc(50% - 0.2rem);
        min-width: 0;
        max-width: calc(50% - 0.2rem);
        width: auto;
    }

    #new_request.modern-form-card .form-inline-datetime input.timepicker-field,
    #new_request.modern-form-card .form-inline-datetime input[id*="time"],
    #new_request.modern-form-card .form-inline-datetime input[id*="date"] {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    #new_request.modern-form-card form select#cid {
        max-width: none;
    }

    #new_request.modern-form-card form tr.form-row-compact:not(.form-row-actions):not(.form-row-spacer),
    #new_request.modern-form-card form tr.form-row-active-period:not(.form-row-actions):not(.form-row-spacer),
    #new_request.modern-form-card form tr.form-row-wide:has(#audiofile):not(.form-row-actions):not(.form-row-spacer),
    #new_request.modern-form-card form tr.form-row-wide:has(#smstext):not(.form-row-actions):not(.form-row-spacer),
    #new_request.modern-form-card form tr.form-row-wide:has(#filename):not(.form-row-actions):not(.form-row-spacer),
    #new_request.modern-form-card form tr.form-row-wide:has(#cid):not(.form-row-actions):not(.form-row-spacer),
    #new_request.modern-form-card form tr:has(#retry_timeout):not(.form-row-actions):not(.form-row-spacer),
    #new_request.modern-form-card form tr:has(#filename):not(.form-row-actions):not(.form-row-spacer) {
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.2rem 0.3rem;
    }

    #new_request.modern-form-card form tr.form-row-compact td[align="right"],
    #new_request.modern-form-card form tr.form-row-active-period td[align="right"],
    #new_request.modern-form-card form tr.form-row-wide:has(#audiofile) td[align="right"],
    #new_request.modern-form-card form tr.form-row-wide:has(#smstext) td[align="right"],
    #new_request.modern-form-card form tr.form-row-wide:has(#filename) td[align="right"],
    #new_request.modern-form-card form tr.form-row-wide:has(#cid) td[align="right"] {
        flex: 0 0 auto;
        width: auto !important;
        max-width: 8.25rem;
        min-width: 0;
    }

    #new_request.modern-form-card form tr.form-row-compact td[align="right"] label,
    #new_request.modern-form-card form tr.form-row-active-period td[align="right"] label,
    #new_request.modern-form-card form tr.form-row-wide:has(#audiofile) td[align="right"] label,
    #new_request.modern-form-card form tr.form-row-wide:has(#smstext) td[align="right"] label,
    #new_request.modern-form-card form tr.form-row-wide:has(#filename) td[align="right"] label,
    #new_request.modern-form-card form tr.form-row-wide:has(#cid) td[align="right"] label {
        white-space: nowrap;
        font-size: 0.68rem !important;
    }

    #new_request.modern-form-card form tr.form-row-compact > td.form-field-with-required,
    #new_request.modern-form-card form tr.form-row-compact > td[colspan]:not(.form-row-merged-hidden),
    #new_request.modern-form-card form tr.form-row-wide:has(#audiofile) > td.form-field-with-required,
    #new_request.modern-form-card form tr.form-row-wide:has(#audiofile) > td[colspan]:not(.form-row-merged-hidden),
    #new_request.modern-form-card form tr.form-row-wide:has(#smstext) > td.form-field-with-required,
    #new_request.modern-form-card form tr.form-row-wide:has(#smstext) > td[colspan]:not(.form-row-merged-hidden),
    #new_request.modern-form-card form tr.form-row-wide:has(#filename) > td.form-field-with-required,
    #new_request.modern-form-card form tr.form-row-wide:has(#filename) > td[colspan]:not(.form-row-merged-hidden),
    #new_request.modern-form-card form tr.form-row-wide:has(#cid) > td.form-field-with-required,
    #new_request.modern-form-card form tr.form-row-wide:has(#cid) > td[colspan]:not(.form-row-merged-hidden) {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        max-width: none;
        display: flex;
        align-items: center;
        gap: 0.12rem;
    }

    #new_request.modern-form-card form tr.form-row-compact .form-required-marker,
    #new_request.modern-form-card form tr.form-row-wide:has(#audiofile) .form-required-marker,
    #new_request.modern-form-card form tr.form-row-wide:has(#smstext) .form-required-marker,
    #new_request.modern-form-card form tr.form-row-wide:has(#filename) .form-required-marker,
    #new_request.modern-form-card form tr.form-row-wide:has(#cid) .form-required-marker {
        flex: 0 0 auto;
        margin-left: 0;
    }

    #new_request.modern-form-card form tr.form-row-compact:has(#retry_timeout) td[align="right"] {
        max-width: 7.35rem;
    }

    #new_request.modern-form-card form tr.form-row-compact:has(#retry_timeout) > td.form-field-with-required,
    #new_request.modern-form-card form tr.form-row-compact:has(#retry_timeout) > td[colspan]:not(.form-row-merged-hidden) {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        display: flex !important;
        align-items: center;
        gap: 0.12rem;
    }

    #new_request.modern-form-card form tr.form-row-compact select#retry_timeout,
    #new_request.modern-form-card form tr:has(#retry_timeout) select#retry_timeout {
        flex: 0 1 4.25rem;
        min-width: 0;
        width: auto !important;
        max-width: 4.25rem !important;
    }

    #new_request.modern-form-card form tr.form-row-wide:has(#audiofile) select#audiofile,
    #new_request.modern-form-card form tr.form-row-wide:has(#smstext) select#smstext,
    #new_request.modern-form-card form tr.form-row-wide:has(#cid) select#cid {
        flex: 1 1 auto;
        min-width: 0;
        width: auto !important;
        max-width: 100% !important;
    }

    #new_request.modern-form-card form tr.form-row-active-period td[align="right"] {
        max-width: 7rem;
    }

    #new_request.modern-form-card form tr.form-row-active-period .form-row-active-period-inline #active_start_time,
    #new_request.modern-form-card form tr.form-row-active-period .form-row-active-period-inline #active_end_time,
    #new_request.modern-form-card form tr.form-row-active-period .form-row-active-period-inline #cmp_astart_time,
    #new_request.modern-form-card form tr.form-row-active-period .form-row-active-period-inline #cmp_aend_time,
    #new_request.modern-form-card form tr.form-row-active-period #active_start_time,
    #new_request.modern-form-card form tr.form-row-active-period #active_end_time,
    #new_request.modern-form-card form tr.form-row-active-period #cmp_astart_time,
    #new_request.modern-form-card form tr.form-row-active-period #cmp_aend_time {
        width: 4.35rem !important;
        max-width: 4.35rem !important;
        min-width: 3.75rem !important;
        flex: 0 0 4.35rem !important;
        padding-left: 0.3rem !important;
        padding-right: 0.3rem !important;
    }

    #new_request.modern-form-card form tr.form-row-compact:has(#no_retries) input[type="range"] {
        flex: 1 1 auto;
        width: auto !important;
        max-width: calc(100% - 1.65rem);
        min-width: 3.25rem;
    }

    #new_request.modern-form-card form tr.form-row-compact:has(#no_retries) output {
        flex: 0 0 auto;
        width: auto !important;
        min-width: 1.25rem;
        font-size: 0.75rem;
    }

    #new_request.modern-form-card form tr.form-row-wide:has(#smstext) td[align="right"] {
        max-width: 6rem;
    }

    #new_request.modern-form-card form tr.form-row-wide:has(#filename) td[align="right"] {
        max-width: 6.35rem;
    }

    #new_request.modern-form-card form tr.form-row-meta,
    #new_request.modern-form-card form tr.form-row-readonly {
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.2rem 0.3rem;
    }

    #new_request.modern-form-card form tr.form-row-meta > td[align="right"],
    #new_request.modern-form-card form tr.form-row-readonly > td[align="right"] {
        flex: 0 0 auto;
        width: auto !important;
        max-width: 8.25rem;
    }

    #new_request.modern-form-card form tr.form-row-meta .form-row-meta-value,
    #new_request.modern-form-card form tr.form-row-readonly > td[colspan]:not(.form-row-merged-hidden) {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
    }

    #new_request.modern-form-card.is-sms-campaign-form form tr.form-row-wide:has(#ctatus):not(.form-row-actions):not(.form-row-spacer) {
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: center;
    }

    #new_request.modern-form-card form tr.form-row-wide:has(#filename) > td.form-field-with-required,
    #new_request.modern-form-card form tr.form-row-wide:has(#filename) > td:nth-child(3):not(.form-row-merged-hidden),
    #new_request.modern-form-card form tr.form-row-wide:has(#filename) > td[colspan]:not(.form-row-merged-hidden) {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        max-width: none;
        display: flex !important;
        align-items: center;
        gap: 0.12rem;
    }

    #new_request.modern-form-card form tr.form-row-wide:has(#filename) .form-required-marker {
        flex: 0 0 auto;
        margin-left: 0;
        align-self: center;
    }

    #new_request.modern-form-card form tr.form-row-wide:has(#filename) input[type="file"] {
        flex: 1 1 auto;
        min-width: 0;
        width: auto !important;
        max-width: 100% !important;
        font-size: 0.68rem;
    }

    #new_request.modern-form-card form tr.form-row-wide:has(#filename) input[type="file"]::file-selector-button {
        padding: 0.18rem 0.45rem;
        font-size: 0.68rem;
    }

    #new_request.modern-form-card input[type="range"] {
        width: 100% !important;
        max-width: none;
    }

    #new_request.modern-form-card form tr.form-row-actions {
        padding-top: 0.25rem;
    }

    #new_request.modern-form-card form tr.form-row-actions .modern-form-submit,
    #new_request.modern-form-card #submitReqBtn {
        width: 100%;
    }
}

/* ── jQuery UI date/time pickers — solid overlay above form card ── */
#ui-datepicker-div {
    z-index: 10060 !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.55rem !important;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.16) !important;
    padding: 0.35rem !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#ui-datepicker-div.ui-datepicker {
    width: 17em;
}

#ui-datepicker-div .ui-widget-header {
    position: relative;
    background: linear-gradient(90deg, var(--brand-primary-hover) 0%, var(--brand-primary) 100%) !important;
    background-image: linear-gradient(90deg, var(--brand-primary-hover) 0%, var(--brand-primary) 100%) !important;
    border: none !important;
    border-radius: 0.4rem 0.4rem 0 0 !important;
    color: #fff !important;
    padding: 0.45rem 2.35rem !important;
    min-height: 2.15rem;
}

#ui-datepicker-div .ui-datepicker-title {
    margin: 0 !important;
    line-height: 1.35rem !important;
    font-weight: 600;
    font-size: 0.875rem;
}

#ui-datepicker-div .ui-datepicker-prev,
#ui-datepicker-div .ui-datepicker-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 0.35rem;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    text-decoration: none !important;
}

#ui-datepicker-div .ui-datepicker-prev {
    left: 0.35rem;
}

#ui-datepicker-div .ui-datepicker-next {
    right: 0.35rem;
}

#ui-datepicker-div .ui-datepicker-prev span,
#ui-datepicker-div .ui-datepicker-next span {
    display: none !important;
}

#ui-datepicker-div .ui-datepicker-prev::before,
#ui-datepicker-div .ui-datepicker-next::before {
    content: "";
    width: 0.42rem;
    height: 0.42rem;
    border-style: solid;
    border-color: #fff;
    border-width: 0 2px 2px 0;
    display: block;
}

#ui-datepicker-div .ui-datepicker-prev::before {
    transform: rotate(135deg);
    margin-left: 0.12rem;
}

#ui-datepicker-div .ui-datepicker-next::before {
    transform: rotate(-45deg);
    margin-right: 0.12rem;
}

#ui-datepicker-div .ui-datepicker-prev-hover,
#ui-datepicker-div .ui-datepicker-next-hover {
    background: rgba(255, 255, 255, 0.28) !important;
    top: 50%;
}

#ui-datepicker-div table,
#ui-datepicker-div thead,
#ui-datepicker-div tbody,
#ui-datepicker-div tr,
#ui-datepicker-div th,
#ui-datepicker-div td {
    background: #fff !important;
}

#ui-datepicker-div td span,
#ui-datepicker-div td a {
    border-radius: 0.3rem;
    text-decoration: none !important;
}

/* Selectable / enabled days — soft green */
#ui-datepicker-div td:not(.ui-datepicker-unselectable):not(.ui-state-disabled) a.ui-state-default {
    background: #ecfdf5 !important;
    background-image: none !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
    font-weight: 500;
}

#ui-datepicker-div td.ui-datepicker-unselectable span,
#ui-datepicker-div td.ui-datepicker-unselectable a,
#ui-datepicker-div td.ui-state-disabled span,
#ui-datepicker-div td.ui-state-disabled a {
    background: #f8fafc !important;
    background-image: none !important;
    border: 1px solid #eef2f7 !important;
    color: #94a3b8 !important;
    opacity: 0.7;
    cursor: default;
}

#ui-datepicker-div .ui-state-hover,
#ui-datepicker-div .ui-state-focus {
    background: #d1fae5 !important;
    background-image: none !important;
    border-color: #86efac !important;
    color: #15803d !important;
}

#ui-datepicker-div td:not(.ui-datepicker-unselectable) a.ui-state-active {
    background: #22c55e !important;
    background-image: none !important;
    border-color: #16a34a !important;
    color: #fff !important;
    font-weight: 600;
}

#ui-datepicker-div td:not(.ui-datepicker-unselectable) a.ui-state-highlight:not(.ui-state-active) {
    background: #dcfce7 !important;
    background-image: none !important;
    border-color: #4ade80 !important;
    color: #15803d !important;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.ui-timepicker-container,
.ui-timepicker-wrapper {
    z-index: 10060 !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.45rem !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14) !important;
    overflow: visible !important;
}

.ui-timepicker-container:not(.ui-timepicker-hidden):not(.ui-helper-hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.ui-timepicker-container .ui-timepicker,
.ui-timepicker-container .ui-timepicker-viewport {
    height: 205px !important;
    max-height: 205px !important;
}

.ui-timepicker-container .ui-timepicker-viewport {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

.ui-timepicker-container .ui-menu-item a {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
}

.ui-timepicker-standard {
    background-color: #fff !important;
}

/* ── Footer (eLibrary style) ── */
.app-footer {
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(241, 243, 245, 0.9) 100%);
    color: #5c6670;
    border-top: 1px solid rgba(217, 70, 239, 0.12);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.6) inset;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.65rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: var(--footer-height);
    min-height: var(--footer-height);
    box-sizing: border-box;
    padding: 0 1rem;
    text-align: center;
    line-height: 1.15;
    overflow: hidden;
}

.app-footer-logo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.app-footer-logo-btn:focus-visible {
    outline: 2px solid rgba(217, 70, 239, 0.55);
    outline-offset: 3px;
    border-radius: 4px;
}

.app-footer-logo-btn:active {
    transform: scale(0.97);
}

.app-footer-logo {
    display: block;
    height: var(--footer-height);
    max-height: var(--footer-height);
    width: auto;
    max-width: min(52vw, 14rem);
    object-fit: contain;
    transform: scale(1.18);
    transform-origin: center center;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.14));
}

.app-footer-sep {
    display: none;
}

.app-footer-copy {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    line-height: 1.2;
    color: #6b7580;
    margin: 0;
    min-width: 0;
    max-width: 100%;
    text-align: center;
}

@media (min-width: 768px) {
    .app-footer-inner {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .app-footer-copy {
        text-align: left;
        border-left: 1px solid rgba(47, 58, 69, 0.22);
        padding-left: 0.65rem;
    }
}

.app-footer-brand-btn {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    color: var(--brand-primary);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(217, 70, 239, 0.55);
    text-underline-offset: 2px;
}

.app-footer-brand-btn:hover {
    color: var(--brand-primary-hover);
}

.app-footer-brand-btn:focus-visible {
    outline: 2px solid rgba(217, 70, 239, 0.55);
    outline-offset: 2px;
    border-radius: 2px;
}

.infinicom-modal-content {
    background: linear-gradient(180deg, #fff 0%, #fdf4ff 100%);
}

.modern-welcome-dialog {
    max-width: min(100vw - 1.5rem, 32rem);
}

.modern-welcome-modal {
    position: relative;
    overflow: hidden;
    border-radius: 1rem !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(253, 244, 255, 0.96) 100%);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.modern-welcome-modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ui-card-accent-height);
    background: var(--ui-card-accent);
    pointer-events: none;
}

.modern-welcome-body {
    position: relative;
    padding: 1.35rem 1.35rem 0.85rem;
}

.modern-welcome-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
}

.modern-welcome-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    margin-bottom: 0.65rem;
    border-radius: 999px;
    background: rgba(217, 70, 239, 0.1);
    color: var(--brand-primary-hover);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.modern-welcome-title {
    margin: 0 0 0.65rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #0f172a;
    padding-right: 1.5rem;
}

.modern-welcome-lead,
.modern-welcome-copy {
    margin: 0 0 0.65rem;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.55;
}

.modern-welcome-infinicom-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0.85rem 0 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.82);
}

.modern-welcome-logo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 4.5rem;
    height: 3rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.65rem;
    background: #fff;
    cursor: pointer;
    transition: border-color var(--ui-transition), box-shadow var(--ui-transition), transform var(--ui-transition);
}

.modern-welcome-logo-btn:hover {
    border-color: rgba(217, 70, 239, 0.35);
    box-shadow: 0 8px 18px rgba(217, 70, 239, 0.12);
    transform: translateY(-1px);
}

.modern-welcome-logo-btn:focus-visible {
    outline: 2px solid rgba(217, 70, 239, 0.55);
    outline-offset: 2px;
}

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

.modern-welcome-infinicom-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.modern-welcome-infinicom-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
}

.modern-welcome-contact-link {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--brand-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.modern-welcome-contact-link:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

.modern-welcome-contact-link:focus-visible {
    outline: 2px solid rgba(217, 70, 239, 0.55);
    outline-offset: 2px;
    border-radius: 0.2rem;
}

.modern-welcome-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.modern-welcome-tip-icon {
    flex-shrink: 0;
    color: #64748b;
    font-size: 1.15rem;
    line-height: 1;
    margin-top: 0.05rem;
}

.modern-welcome-tip-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    color: var(--brand-primary);
}

.modern-welcome-tip-text {
    margin: 0;
    color: #475569;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.modern-welcome-footer {
    padding: 0 1.35rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
}

.modern-welcome-opt-out {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.modern-welcome-opt-out input[type="checkbox"] {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0.1rem 0 0;
    flex-shrink: 0;
    accent-color: var(--brand-primary);
    cursor: pointer;
}

.modern-welcome-opt-out span {
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.modern-welcome-continue {
    width: 100%;
    min-height: 2.5rem;
    border-radius: 999px;
    font-weight: 600;
}

#modernWelcomeModal.modal {
    z-index: 1065;
}

.infinicom-modal-logo {
    height: auto;
    max-height: 7rem;
    width: auto;
    max-width: min(100%, 16rem);
    object-fit: contain;
}

.infinicom-modal-tagline {
    color: var(--brand-primary-hover);
    font-weight: 600;
    font-size: 0.95rem;
}

.infinicom-modal-about {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.55;
}

.infinicom-info-box {
    background: rgba(253, 244, 255, 0.85);
    border: 1px solid rgba(217, 70, 239, 0.12);
    border-radius: 0.75rem;
    padding: 0.75rem 0.85rem;
}

.infinicom-info-label {
    color: var(--brand-primary-hover);
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 0.65rem;
}

.infinicom-info-link,
.infinicom-info-text {
    color: var(--brand-primary);
    font-size: 0.875rem;
    font-weight: 500;
    word-break: break-word;
}

.infinicom-info-link {
    text-decoration: none;
}

.infinicom-info-link:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

.infinicom-chat-btn {
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 0.85rem;
}

.infinicom-chat-btn-whatsapp {
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.35);
    background: #fff;
}

.infinicom-chat-btn-whatsapp:hover {
    background: #f0fdf4;
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.55);
}

.infinicom-chat-btn-viber {
    color: var(--brand-primary-hover);
    border: 1px solid rgba(217, 70, 239, 0.35);
    background: #fff;
}

.infinicom-chat-btn-viber:hover {
    background: #fdf4ff;
    color: var(--brand-primary-hover);
    border-color: rgba(217, 70, 239, 0.55);
}

.infinicom-chat-btn-bot {
    color: #0284c7;
    border: 1px solid rgba(2, 132, 199, 0.35);
    background: #fff;
}

.infinicom-chat-btn-bot:hover,
.infinicom-chat-btn-bot[aria-expanded="true"] {
    background: #f0f9ff;
    color: #0369a1;
    border-color: rgba(2, 132, 199, 0.55);
}

.infinicom-chat-panel {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 1rem;
    background: #0f172a;
    color: #e2e8f0;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.infinicom-chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.98);
}

.infinicom-chat-panel-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

.infinicom-chat-panel-subtitle {
    font-size: 0.72rem;
    color: rgba(226, 232, 240, 0.72);
}

.infinicom-chat-panel-close {
    color: rgba(255, 255, 255, 0.82);
    border: 0;
    background: transparent;
    line-height: 1;
    padding: 0.15rem 0.35rem;
}

.infinicom-chat-panel-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.infinicom-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 10rem;
    max-height: 14rem;
    overflow-y: auto;
    padding: 0.85rem;
}

.infinicom-chat-bubble {
    max-width: 88%;
    padding: 0.45rem 0.65rem;
    border-radius: 0.85rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.infinicom-chat-bubble-user {
    align-self: flex-end;
    background: rgba(217, 70, 239, 0.92);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.infinicom-chat-bubble-bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-bottom-left-radius: 0.25rem;
}

.infinicom-chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 0.85rem 0.65rem;
}

.infinicom-chat-quick-replies:empty {
    display: none;
}

.infinicom-chat-quick-reply {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    border-radius: 999px;
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
}

.infinicom-chat-quick-reply:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.infinicom-chat-form {
    display: flex;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.98);
}

.infinicom-chat-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 0.8125rem;
    padding: 0.35rem 0.55rem;
}

.infinicom-chat-input:focus {
    border-color: rgba(217, 70, 239, 0.55);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    box-shadow: 0 0 0 0.15rem rgba(217, 70, 239, 0.12);
}

.infinicom-contact-card {
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid #e2e8f0;
    padding: 1rem 1.1rem;
}

.infinicom-form-label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.25rem;
}

#infinicomCompanyModal.modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
}

#infinicomCompanyModal .modal-dialog {
    max-height: calc(100vh - 2rem);
    margin: 1rem auto;
}

#infinicomCompanyModal .modal-content {
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#infinicomCompanyModal .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
}

#infinicomCompanyModal .modal-header,
#infinicomCompanyModal .modal-footer {
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    }

    body.sidebar-collapsed .app-sidebar {
        width: var(--sidebar-width);
    }

    body.sidebar-collapsed .app-main {
        margin-left: 0;
    }

    body.sidebar-collapsed .sidebar-brand-title,
    body.sidebar-collapsed .sidebar-link-top > span,
    body.sidebar-collapsed .sidebar-group-toggle > span,
    body.sidebar-collapsed .sidebar-chevron,
    body.sidebar-collapsed .sidebar-subnav,
    body.sidebar-collapsed .sidebar-footer {
        display: revert !important;
    }

    .app-main { margin-left: 0; }
}

@media (max-width: 575.98px) {
    .content-inner {
        padding: 0.75rem 0.65rem 1rem;
    }

    .page-heading {
        font-size: 1.15rem;
    }
}

/* ── Mobile responsive polish ── */
@media (max-width: 767.98px) {
    .app-topbar {
        flex-wrap: wrap;
        align-items: center;
        height: auto;
        min-height: var(--topbar-height);
        padding: 0.4rem 0.55rem 0.45rem;
        padding-top: max(0.4rem, env(safe-area-inset-top, 0));
        gap: 0.35rem;
    }

    .topbar-left {
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar-logo-sm {
        height: calc(var(--topbar-height) - 8px);
        max-height: calc(var(--topbar-height) - 8px);
    }

    .topbar-center {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        padding: 0 !important;
    }

    .topbar-search-wrap {
        max-width: none;
        flex: 1 1 100%;
    }

    .topbar-search-kbd {
        display: none;
    }

    .topbar-search-wrap .topbar-search {
        padding-right: 0.75rem;
    }

    .topbar-search {
        font-size: 16px;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .topbar-right {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .modern-filter-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .modern-filter-inline-item,
    .modern-filter-inline-search,
    .modern-filter-inline-date,
    .modern-filter-inline-dates,
    .modern-filter-inline-select,
    .modern-filter-inline-checkbox,
    .modern-filter-inline-generate-report {
        width: 100%;
    }

    .modern-filter-inline-search {
        width: 100%;
    }

    .modern-filter-inline-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .modern-filter-inline-search .modern-filter-inline-controls {
        flex-wrap: nowrap;
    }

    .modern-filter-inline-search .form-select,
    .modern-filter-inline-search .form-control {
        width: auto !important;
        max-width: none;
        min-width: 0;
        flex: 1 1 auto;
    }

    .modern-filter-inline-search .form-select {
        flex: 0 1 42%;
        max-width: 11rem;
        min-width: 5.25rem;
    }

    .modern-filter-inline-date .form-control,
    .modern-filter-inline-date .filter-date-field,
    .modern-filter-inline-select .form-select {
        width: 100%;
        max-width: none;
        min-width: 0;
        flex: 1 1 100%;
    }

    .modern-filter-inline-dates {
        width: 100%;
    }

    .modern-filter-inline-dates-group {
        flex-wrap: nowrap;
        width: 100%;
    }

    .modern-filter-inline-date-chip {
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 5.25rem;
        max-width: calc(50% - 0.35rem);
    }

    .modern-filter-inline-date-chip .form-control,
    .modern-filter-inline-date-chip .filter-date-field {
        width: 100% !important;
        min-width: 0;
        max-width: none;
    }

    #search_request_list .modern-filter-search-inline-controls {
        flex-wrap: nowrap;
    }

    #search_request_list .modern-filter-search-inline-controls .form-select {
        flex: 0 1 42%;
        width: auto !important;
        max-width: 11rem;
        min-width: 5.25rem;
    }

    #search_request_list .modern-filter-search-inline-controls .form-control {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        max-width: none;
    }

    .modern-filter-toolbar-actions {
        width: 100%;
        justify-content: stretch;
        padding-top: 0.25rem;
    }

    .modern-filter-toolbar-actions .modern-filter-submit,
    .modern-filter-toolbar-actions .btn {
        width: 100%;
    }

    .content-inner:has(#listings.modern-report-listings:not(.modern-admin-listings)) {
        overflow-x: hidden;
    }

    .modern-report-table-wrap {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        max-height: none;
        max-width: 100%;
        width: 100%;
        padding-bottom: 0.5rem;
    }

    #listings.modern-report-listings table.table_requestnew.modern-report-table,
    #listings.modern-report-listings table.table_requestnew.modern-report-table.is-light-report,
    #listings.modern-report-listings table.table_requestnew.modern-report-table.is-sms-report,
    #listings.modern-report-listings table.table_requestnew.modern-report-table.is-admin-log {
        width: auto !important;
        max-width: none !important;
        min-width: 640px !important;
        table-layout: auto !important;
    }

    #listings.modern-report-listings table.table_requestnew.modern-report-table.is-full-report {
        min-width: 720px !important;
    }

    #listings.modern-report-listings table.table_requestnew.modern-report-table.is-admin-log {
        min-width: 680px !important;
    }

    table.modern-report-table.is-light-report,
    table.modern-report-table.is-sms-report {
        width: auto !important;
        min-width: 640px !important;
    }

    table.modern-report-table.is-full-report {
        width: auto !important;
        min-width: 720px !important;
    }

    #listings.modern-report-listings > p:has(table.table_requestnew) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .modern-report-download-wrap {
        width: 100%;
        text-align: center;
    }

    .modern-report-download-wrap .modern-download-link {
        width: 100%;
        justify-content: center;
    }

    .modern-report-download-wrap .modern-download-btn,
    table.modern-download-row .modern-download-btn {
        width: 100%;
        justify-content: center;
    }

    #listings .paging,
    #listings .paging.modern-pagination,
    .paging.modern-pagination {
        justify-content: center;
        gap: 0.15rem;
    }

    .content-inner.is-fs-log-page,
    .content-inner:has(#new_request.modern-admin-fs-card) {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .content-inner.is-fs-log-page #new_request.modern-admin-fs-card,
    #new_request.modern-admin-fs-card {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .content-inner.is-fs-log-page #new_request.modern-admin-fs-card form.modern-fs-log-form,
    .content-inner.is-fs-log-page #new_request.modern-admin-fs-card form.modern-filter-form,
    #new_request.modern-admin-fs-card form.modern-fs-log-form,
    #new_request.modern-admin-fs-card form.modern-filter-form {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 0.75rem 0.8rem 0.9rem !important;
        box-sizing: border-box;
    }

    .modern-fs-log-toolbar {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        min-width: 0;
        gap: 0.5rem;
    }

    #new_request.modern-admin-fs-card .modern-fs-log-field {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        align-items: flex-start;
        text-align: left;
    }

    #new_request.modern-admin-fs-card .modern-fs-log-field .app-field-label {
        display: block;
        width: 100%;
        text-align: left;
        font-size: 0.68rem !important;
        line-height: 1.2;
    }

    #new_request.modern-admin-fs-card .modern-fs-log-field-patterns .modern-fs-log-patterns {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        width: 100%;
        gap: 0.4rem;
    }

    #new_request.modern-admin-fs-card .modern-fs-log-patterns .form-control {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 2rem;
        height: 2rem;
        padding: 0.2rem 0.45rem;
        font-size: 0.8125rem;
    }

    #new_request.modern-admin-fs-card .modern-fs-log-field-timeout .modern-fs-log-range-wrap {
        width: 100%;
    }

    #new_request.modern-admin-fs-card .modern-fs-log-range-wrap input[type="range"] {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }

    .modern-fs-log-range-wrap output {
        flex: 0 0 2rem;
        min-width: 2rem;
        height: 2rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        border: 1px solid rgba(217, 70, 239, 0.28);
        background: rgba(217, 70, 239, 0.08);
        color: #7e22ce;
    }

    .modern-fs-log-actions {
        margin-left: 0;
        width: 100%;
    }

    .modern-fs-log-actions .modern-filter-submit {
        width: 100%;
    }

    .modern-fs-log-output-wrap {
        width: 100%;
        max-width: 100%;
    }

    .dashboard-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-tabs {
        display: flex;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .dashboard-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .modern-sms-phone {
        min-height: 32rem;
        border-radius: 2rem;
    }

    #listings.modern-admin-listings .modern-report-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-link-top,
    .sidebar-group-toggle,
    .sidebar-sublink {
        min-height: 2.75rem;
    }

    .modern-list-page-stack {
        gap: 0.5rem;
    }

    #search_request_list.modern-filter-card .filter-row-single,
    #search_request_list.modern-filter-card .filter-row-pairs {
        max-width: none;
        grid-template-columns: 1fr;
    }

    #infinicomCompanyModal .modal-dialog {
        margin: 0.65rem;
        max-width: calc(100vw - 1.3rem);
    }

    .app-footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 0.45rem 0.75rem;
        padding-bottom: max(0.45rem, env(safe-area-inset-bottom, 0));
    }

    .app-footer-logo {
        height: var(--footer-height);
        max-height: var(--footer-height);
        max-width: min(72vw, 10.5rem);
    }

    .app-footer-copy {
        border-left: none;
        padding-left: 0;
        text-align: center;
        font-size: 0.68rem;
        line-height: 1.35;
        text-wrap: balance;
    }

    .app-footer-copy-year,
    .app-footer-copy-rights {
        display: block;
    }

    .app-footer-copy-rights {
        margin-top: 0.08rem;
    }
}

@media (max-width: 575.98px) {
    .login-shell {
        padding: 1rem 0.75rem;
        padding-top: max(1rem, env(safe-area-inset-top, 0));
        align-items: flex-start;
    }

    .login-card-body {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .modern-sms-phone {
        min-height: 28rem;
        padding: 0.55rem;
    }

    .dashboard-kpi-card {
        min-height: 0;
        padding: 0.65rem 0.7rem;
    }

    .dashboard-kpi-value {
        font-size: 1.25rem;
    }

    .modern-admin-config-table {
        min-width: 640px;
    }
}

/* ── Modern dashboard (#dashboard-modern) ── */
.dashboard-modern {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.65rem;
}

.dashboard-kpi-card,
.dashboard-card {
    position: relative;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px) saturate(1.12);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: var(--modern-radius);
    box-shadow: var(--ui-card-shadow);
    overflow: hidden;
}

.dashboard-kpi-card::before,
.dashboard-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ui-card-accent-height);
    background: var(--ui-card-accent);
    border-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    pointer-events: none;
    z-index: 1;
}

.dashboard-kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0.8rem 0.8rem;
    min-height: 5.5rem;
}

a.dashboard-kpi-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--ui-transition), box-shadow var(--ui-transition), transform var(--ui-transition);
}

a.dashboard-kpi-link:hover {
    border-color: rgba(217, 70, 239, 0.28);
    box-shadow: var(--ui-card-shadow-hover);
    transform: translateY(-1px);
}

a.dashboard-kpi-link:focus-visible {
    outline: 2px solid rgba(217, 70, 239, 0.45);
    outline-offset: 2px;
}

.dashboard-kpi-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    background: rgba(217, 70, 239, 0.1);
    font-size: 1rem;
}

.dashboard-kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.05;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.dashboard-kpi-label {
    margin-top: 0.12rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
    color: #334155;
}

.dashboard-kpi-hint {
    margin-top: 0.12rem;
    font-size: 0.625rem;
    color: #94a3b8;
    line-height: 1.2;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.85fr);
    gap: 0.65rem;
    align-items: start;
}

.dashboard-side-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dashboard-card {
    padding: 0.75rem 0.85rem 0.85rem;
}

.dashboard-card-wide {
    min-width: 0;
}

.dashboard-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.85rem;
    margin-bottom: 0.65rem;
}

.dashboard-card-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.dashboard-tabs {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.15rem;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.dashboard-tab {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.1;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--ui-transition), color var(--ui-transition), box-shadow var(--ui-transition);
}

.dashboard-tab.is-active {
    background: linear-gradient(90deg, var(--brand-primary-hover) 0%, var(--brand-primary) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(217, 70, 239, 0.22);
}

.dashboard-tab-panel {
    display: none;
}

.dashboard-tab-panel.is-active {
    display: block;
}

.dashboard-table-wrap {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    line-height: 1.25;
}

.dashboard-table th {
    padding: 0.35rem 0.45rem;
    text-align: left;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.dashboard-table td {
    padding: 0.45rem 0.45rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    color: #334155;
}

.dashboard-table tbody tr:hover {
    background: rgba(217, 70, 239, 0.04);
}

.dashboard-empty {
    text-align: center;
    color: #94a3b8;
    padding: 1.25rem 0.75rem !important;
}

.dashboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.dashboard-empty-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(217, 70, 239, 0.1);
    border: 1px solid rgba(217, 70, 239, 0.22);
    color: var(--brand-primary-hover);
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.dashboard-empty-cta:hover {
    background: rgba(217, 70, 239, 0.16);
    border-color: rgba(217, 70, 239, 0.35);
    color: var(--brand-primary);
}

.dashboard-link {
    color: var(--brand-primary-hover);
    font-weight: 600;
    text-decoration: none;
}

.dashboard-link:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.dashboard-status {
    display: inline-flex;
    align-items: center;
    padding: 0.12em 0.45em;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.dashboard-status-is-active {
    background: #ecfdf5;
    color: #059669;
}

.dashboard-status-is-onhold {
    background: #fffbeb;
    color: #d97706;
}

.dashboard-status-is-finished {
    background: #f1f5f9;
    color: #64748b;
}

.dashboard-progress-cell {
    min-width: 9rem;
}

.dashboard-progress-wrap {
    min-width: 8.5rem;
}

.dashboard-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.625rem;
    color: #64748b;
    margin-bottom: 0.18rem;
}

.dashboard-progress-track {
    height: 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.dashboard-progress-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-primary-hover), var(--brand-primary-light));
}

.dashboard-substat {
    display: block;
    margin-top: 0.18rem;
    font-size: 0.625rem;
    color: #94a3b8;
}

.dashboard-card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(241, 245, 249, 0.95);
}

.dashboard-foot-link {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--brand-primary-hover);
    text-decoration: none;
}

.dashboard-foot-link:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
}

.dashboard-action {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.88);
    color: #334155;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: border-color var(--ui-transition), background var(--ui-transition), transform var(--ui-transition);
}

.dashboard-action i {
    color: var(--brand-primary);
    font-size: 0.95rem;
}

.dashboard-action:hover {
    border-color: rgba(217, 70, 239, 0.28);
    background: #fdf4ff;
    color: var(--brand-primary-hover);
    transform: translateY(-1px);
}

.dashboard-alerts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dashboard-alert {
    padding: 0.45rem 0.55rem;
    border-radius: 0.5rem;
    font-size: 0.6875rem;
    line-height: 1.35;
    border: 1px solid transparent;
}

.dashboard-alert a {
    color: inherit;
    text-decoration: none;
}

.dashboard-alert a:hover {
    text-decoration: underline;
}

.dashboard-alert-warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.dashboard-alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.dashboard-alert-ok {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.dashboard-card-activity {
    padding-bottom: 0.95rem;
}

.dashboard-activity-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.55rem;
    align-items: end;
    min-height: 10rem;
    padding: 0.35rem 0.15rem 0;
}

.dashboard-activity-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.dashboard-activity-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.18rem;
    width: 100%;
    height: 8rem;
}

.dashboard-activity-bar {
    width: 0.55rem;
    min-height: 0.25rem;
    border-radius: 999px 999px 0.15rem 0.15rem;
    transition: height 0.2s ease;
}

.dashboard-activity-bar.is-voice {
    background: rgba(217, 70, 239, 0.45);
}

.dashboard-activity-bar.is-answered {
    background: #22c55e;
}

.dashboard-activity-bar.is-sms {
    background: #38bdf8;
}

.dashboard-activity-label {
    font-size: 0.625rem;
    color: #64748b;
    font-weight: 600;
}

.dashboard-activity-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.625rem;
    color: #64748b;
}

.dashboard-activity-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.dashboard-legend-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    display: inline-block;
}

.dashboard-legend-dot.is-voice {
    background: rgba(217, 70, 239, 0.65);
}

.dashboard-legend-dot.is-answered {
    background: #22c55e;
}

.dashboard-legend-dot.is-sms {
    background: #38bdf8;
}

@media (max-width: 1199.98px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-activity-bars {
        height: 6rem;
    }
}

/* ── Administrator section redesign ── */
#listings.modern-admin-listings {
    margin-top: 0.65rem;
}

table.modern-download-row {
    width: auto !important;
    min-width: 0 !important;
    margin: 0.65rem 0.85rem 0 !important;
    border: none !important;
    background: transparent !important;
}

table.modern-download-row td {
    padding: 0 !important;
    border: none !important;
    text-align: right !important;
}

.modern-download-link {
    display: inline-flex;
    text-decoration: none !important;
}

.modern-download-btn {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.modern-download-btn .bi {
    font-size: 1rem;
}

table.modern-report-table.is-admin-log {
    font-size: 0.75rem !important;
    line-height: 1.25 !important;
    width: 100% !important;
    min-width: 100% !important;
    table-layout: auto !important;
}

table.modern-report-table.is-admin-log tr.header th,
table.modern-report-table.is-admin-log td {
    padding: 0.35rem 0.55rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

table.modern-report-table.is-admin-log tr.header th {
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #64748b;
    font-weight: 600;
    background: #f8fafc;
    white-space: nowrap;
}

table.modern-report-table.is-admin-log .report-empty-cell {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
}

table.modern-report-table.is-admin-log th:nth-child(1),
table.modern-report-table.is-admin-log td:nth-child(1) { width: 4%; min-width: 3rem; }

table.modern-report-table.is-admin-log th:nth-child(2),
table.modern-report-table.is-admin-log td:nth-child(2) { width: 9%; min-width: 5.5rem; }

table.modern-report-table.is-admin-log th:nth-child(3),
table.modern-report-table.is-admin-log td:nth-child(3) { width: 13%; min-width: 6.5rem; }

table.modern-report-table.is-admin-log th:nth-child(4),
table.modern-report-table.is-admin-log td:nth-child(4) { width: 12%; min-width: 6rem; }

table.modern-report-table.is-admin-log th:nth-child(5),
table.modern-report-table.is-admin-log td:nth-child(5) { width: 11%; min-width: 6rem; }

table.modern-report-table.is-admin-log th:nth-child(6),
table.modern-report-table.is-admin-log td:nth-child(6) { width: 5%; min-width: 2.5rem; }

table.modern-report-table.is-admin-log th:nth-child(7),
table.modern-report-table.is-admin-log td:nth-child(7) { width: 12%; min-width: 5rem; }

table.modern-report-table.is-admin-log th:nth-child(8),
table.modern-report-table.is-admin-log td:nth-child(8) { width: 11%; min-width: 5rem; }

table.modern-report-table.is-admin-log th:nth-child(9),
table.modern-report-table.is-admin-log td:nth-child(9) { width: 13%; min-width: 6rem; }

#listings.modern-admin-listings > p,
#listings.modern-admin-listings .modern-report-table-wrap {
    width: 100%;
    max-width: 100%;
}

#listings.modern-admin-listings > p {
    padding: 0;
    overflow: visible;
}

#listings.modern-admin-config-listings {
    margin-top: 0.35rem;
    overflow-x: auto;
}

#listings.modern-admin-config-listings > p {
    margin: 0;
    padding: 0.15rem 0.35rem 0.35rem;
}

table.modern-admin-config-table {
    width: 100% !important;
    min-width: 680px !important;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.75rem;
    table-layout: fixed;
}

table.modern-admin-config-table tr.header th {
    font-size: 0.68rem;
    letter-spacing: 0;
    text-transform: none;
    color: #334155;
    font-weight: 600;
    background: #f8fafc;
    padding: 0.18rem 0.3rem !important;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
    line-height: 1.1 !important;
}

table.modern-admin-config-table tr.listnepar,
table.modern-admin-config-table tr.listpar {
    background: #fff;
}

table.modern-admin-config-table tr.listpar {
    background: #fafbfd;
}

table.modern-admin-config-table tr.modern-admin-config-add-row {
    background: #f8fafc;
}

table.modern-admin-config-table td {
    padding: 0.05rem 0.25rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.1 !important;
}

table.modern-admin-config-table .modern-admin-config-input {
    width: 100%;
    max-width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    padding: 0.06rem 0.3rem;
    font-size: 0.75rem;
    min-height: 1.25rem;
    line-height: 1.1;
    background: #fff;
}

table.modern-admin-config-table select.modern-admin-config-input {
    min-width: 2.5rem;
    padding-right: 1.1rem;
}

table.modern-admin-config-table input[type="submit"].btn {
    min-width: 4rem;
    padding: 0.08rem 0.35rem !important;
    font-size: 0.68rem !important;
    line-height: 1.1 !important;
    border-radius: 0.25rem !important;
    white-space: nowrap;
}

table.modern-admin-config-table th:nth-child(1),
table.modern-admin-config-table td:nth-child(1) {
    width: 2.25rem;
}

table.modern-admin-config-table th:nth-child(2),
table.modern-admin-config-table td:nth-child(2) {
    width: 3.5rem;
}

table.modern-admin-config-table th:nth-child(6),
table.modern-admin-config-table td:nth-child(6) {
    width: 3rem;
}

table.modern-admin-config-table th:nth-child(7),
table.modern-admin-config-table td:nth-child(7),
table.modern-admin-config-table th:nth-child(8),
table.modern-admin-config-table td:nth-child(8),
table.modern-admin-config-table th:nth-child(9),
table.modern-admin-config-table td:nth-child(9) {
    width: 4.25rem;
}

#new_request.modern-admin-fs-card {
    width: 100%;
    max-width: 720px;
    margin: 0.65rem auto 0;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.85rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    box-sizing: border-box;
}

#new_request.modern-admin-fs-card form.modern-fs-log-form,
#new_request.modern-admin-fs-card form.modern-filter-form {
    padding: 0.85rem 1rem 1rem !important;
}

.modern-fs-log-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
    width: 100%;
}

.modern-fs-log-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.modern-fs-log-field-patterns {
    flex: 1 1 18rem;
}

.modern-fs-log-field-timeout {
    flex: 0 0 11rem;
}

.modern-fs-log-patterns {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.modern-fs-log-patterns .form-control {
    flex: 1 1 8rem;
    min-width: 0;
}

.modern-fs-log-range-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.65rem;
}

.modern-fs-log-range-wrap input[type="range"] {
    flex: 1 1 auto;
    min-width: 5rem;
    accent-color: var(--brand-primary);
}

.modern-fs-log-range-wrap output {
    min-width: 1.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
}

.modern-fs-log-actions {
    margin-left: auto;
    flex: 0 0 auto;
}

.modern-fs-required {
    color: #ef4444;
}

.modern-fs-log-output-wrap {
    width: fit-content;
    max-width: 100%;
    margin-top: 0.75rem;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

#new_request.modern-admin-fs-card form table.modern-fs-log-output,
#new_request.modern-admin-fs-card form table.modern-fs-log-output tbody {
    display: table !important;
    width: auto !important;
    max-width: none !important;
}

#new_request.modern-admin-fs-card form table.modern-fs-log-output tr {
    display: table-row !important;
    flex-wrap: unset !important;
    gap: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
}

#new_request.modern-admin-fs-card form table.modern-fs-log-output td {
    display: table-cell !important;
}

.modern-fs-log-output-wrap table.modern-fs-log-output {
    margin-top: 0;
}

#new_request.modern-admin-fs-card > p {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

#new_request.modern-admin-fs-card form label,
#new_request.modern-admin-fs-card .app-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
    line-height: 1.25;
}

#new_request.modern-admin-fs-card .modern-admin-config-input,
#new_request.modern-admin-fs-card .form-control,
#new_request.modern-admin-fs-card .form-select {
    font-size: 0.8125rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    padding: 0.2rem 0.5rem;
    min-height: 1.65rem;
}

table.modern-fs-log-output {
    width: auto !important;
    max-width: 100%;
    min-width: 0 !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.55rem;
    background: #0f172a !important;
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.35;
}

table.modern-fs-log-output td {
    padding: 0.22rem 0.55rem !important;
    border: none !important;
    white-space: pre-wrap;
    word-break: break-word;
    vertical-align: top !important;
}

table.modern-fs-log-output tr.modern-fs-log-summary td {
    padding: 0.18rem 0.45rem !important;
    white-space: normal;
}

.modern-fs-log-ended-badge,
.modern-fs-log-total-badge {
    display: inline-block;
    font-size: 0.6875rem;
    line-height: 1.25;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
    white-space: normal;
}

.modern-fs-log-ended-badge {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

.modern-fs-log-total-badge {
    background: rgba(217, 70, 239, 0.14);
    color: #f0abfc;
}

table.modern-fs-log-output h3 {
    font-size: 0.75rem !important;
    font-weight: 600;
    margin: 0 !important;
    line-height: 1.3;
}

table.modern-fs-log-output tr.table_footer_thin {
    display: none;
}
