/* DNSip control-center theme */
:root {
    color-scheme: dark;
    --bg-primary: #040812;
    --bg-secondary: #081321;
    --bg-tertiary: #0b192a;
    --bg-elevated: #0e1e31;
    --bg-card: rgba(10, 23, 39, 0.94);
    --bg-card-solid: #0a1727;
    --text-primary: #f2f7ff;
    --text-secondary: #a9b9cc;
    --text-muted: #71839a;
    --border-color: rgba(126, 174, 219, 0.16);
    --border-strong: rgba(91, 174, 255, 0.34);
    --accent-primary: #168cff;
    --accent-hover: #36a4ff;
    --accent-secondary: #15c7e8;
    --accent-deep: #075bbb;
    --success: #25c47a;
    --danger: #f05262;
    --warning: #f5ad42;
    --info: #32b8ed;
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;

    /* Fluent UI consumes these custom properties directly. */
    --accent-fill-rest: var(--accent-primary);
    --accent-fill-hover: var(--accent-hover);
    --neutral-fill-rest: var(--bg-card-solid);
    --neutral-fill-hover: rgba(49, 143, 229, 0.1);
    --neutral-fill-stealth-rest: transparent;
    --neutral-fill-stealth-hover: rgba(49, 143, 229, 0.1);
    --neutral-fill-input-rest: #071522;
    --neutral-fill-input-hover: #0a1e31;
    --neutral-fill-input-active: #0c2740;
    --neutral-foreground-rest: var(--text-primary);
    --neutral-foreground-hint: var(--text-muted);
    --neutral-stroke-rest: var(--border-color);
    --neutral-stroke-input-rest: rgba(96, 157, 211, 0.25);
    --neutral-stroke-input-hover: rgba(73, 168, 241, 0.48);
    --neutral-stroke-input-active: var(--accent-primary);
    --neutral-stroke-divider-rest: var(--border-color);
    --neutral-layer-1: #06101c;
    --neutral-layer-2: #091827;
    --neutral-layer-3: #10263d;
    --neutral-layer-4: #020810;
    --neutral-layer-floating: #0a192a;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--bg-primary);
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background:
        radial-gradient(circle at 88% -10%, rgba(22, 140, 255, 0.15), transparent 32rem),
        radial-gradient(circle at 18% 92%, rgba(21, 199, 232, 0.07), transparent 35rem),
        linear-gradient(145deg, #040812 0%, #06101d 48%, #02050b 100%);
}

::selection {
    color: #fff;
    background: rgba(22, 140, 255, 0.55);
}

a {
    color: #61b5ff;
    text-underline-offset: 3px;
}

a:hover {
    color: #92d5ff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.container-fluid > h1,
.container-fluid > h2,
.container-fluid > .d-flex h1,
.container-fluid > .d-flex h2 {
    margin-bottom: 0;
    background: linear-gradient(105deg, #ffffff 8%, #a9d8ff 55%, #43c9eb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.container-fluid > h1 i,
.container-fluid > h2 i,
.container-fluid > .d-flex h1 i,
.container-fluid > .d-flex h2 i {
    color: var(--accent-primary);
    -webkit-text-fill-color: var(--accent-primary);
}

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

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

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

.text-success {
    color: #41d995 !important;
}

.text-danger {
    color: #ff7581 !important;
}

.text-warning {
    color: #ffc66d !important;
}

.text-info {
    color: #68d7f3 !important;
}

/* Buttons */
.btn {
    min-height: 40px;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 650;
    letter-spacing: 0.005em;
    box-shadow: none;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease,
        box-shadow 160ms ease, transform 160ms ease;
    touch-action: manipulation;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: 2px solid #7fc6ff;
    outline-offset: 2px;
    box-shadow: none;
}

.btn-primary {
    color: #fff;
    border: 1px solid rgba(105, 190, 255, 0.34);
    background: linear-gradient(135deg, #0872dc 0%, #168cff 58%, #14acd0 100%);
    box-shadow: 0 8px 22px rgba(8, 114, 220, 0.22);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    color: #fff;
    border-color: rgba(145, 213, 255, 0.65);
    background: linear-gradient(135deg, #0b7eeb 0%, #2d9dff 58%, #24badb 100%);
    box-shadow: 0 10px 28px rgba(8, 114, 220, 0.32);
}

.btn-secondary,
.btn-outline-secondary {
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background: linear-gradient(145deg, rgba(17, 36, 57, 0.94), rgba(8, 20, 34, 0.94));
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: linear-gradient(145deg, #122d49, #0b1c2e);
}

.btn-danger {
    color: #fff;
    border-color: rgba(255, 127, 139, 0.34);
    background: linear-gradient(135deg, #c92f43, var(--danger));
}

.btn-danger:hover {
    color: #fff;
    background: linear-gradient(135deg, #dd354b, #fa6474);
}

.btn-success {
    color: #03140d;
    border-color: rgba(104, 239, 173, 0.3);
    background: linear-gradient(135deg, #19a963, #35d68a);
}

.btn-success:hover {
    color: #02130c;
    background: linear-gradient(135deg, #24bd72, #4be29c);
}

.btn-warning {
    color: #171005;
    border-color: rgba(255, 211, 137, 0.3);
    background: linear-gradient(135deg, #e69727, #ffc263);
}

.btn-info {
    color: #031117;
    border-color: rgba(107, 222, 250, 0.32);
    background: linear-gradient(135deg, #1899cf, #52d3ed);
}

.btn-outline-primary {
    color: #63b8ff;
    border-color: rgba(61, 162, 255, 0.48);
    background: rgba(11, 91, 166, 0.08);
}

.btn-outline-primary:hover {
    color: #fff;
    border-color: #2c9dff;
    background: linear-gradient(135deg, #0872dc, #168cff);
}

.btn-outline-danger {
    color: #ff7581;
    border-color: rgba(240, 82, 98, 0.48);
    background: rgba(240, 82, 98, 0.05);
}

.btn-outline-danger:hover {
    color: #fff;
    border-color: #f46a78;
    background: linear-gradient(135deg, #bd2d40, #ed4d60);
}

.btn-sm {
    min-height: 34px;
    padding: 0.38rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label,
.form-group label {
    color: #c7d4e3;
    font-size: 0.86rem;
    font-weight: 650;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 44px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(12, 29, 48, 0.96), rgba(6, 17, 30, 0.96));
}

.form-control,
.form-select {
    padding: 0.65rem 0.8rem;
    font-size: 1rem;
}

.form-control::placeholder {
    color: #65778e;
}

.form-control:focus,
.form-select:focus {
    color: var(--text-primary);
    border-color: #319dea;
    background: #0b1c2e;
    box-shadow: 0 0 0 3px rgba(22, 140, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.2);
}

.form-select option {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.form-check-input {
    border-color: var(--border-strong);
    background-color: #081522;
}

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

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

.input-group-text {
    color: var(--text-secondary);
}

/* Cards and content surfaces */
.card {
    overflow: hidden;
    padding: 0;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(14, 32, 53, 0.86), rgba(7, 17, 29, 0.96)),
        var(--bg-card-solid);
    box-shadow: var(--shadow-sm);
}

.card-header {
    min-height: 54px;
    padding: 0.9rem 1.15rem;
    margin: 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(100deg, rgba(17, 52, 84, 0.74), rgba(8, 24, 42, 0.48));
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    margin: 0;
}

.card-body {
    padding: 1.15rem;
    color: var(--text-primary);
}

.card-footer {
    padding: 0.9rem 1.15rem;
    border-top-color: var(--border-color);
    background: rgba(4, 13, 23, 0.55);
}

.list-group-item {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: rgba(8, 21, 36, 0.68);
}

/* Bootstrap tables */
.table-responsive {
    position: relative;
    overflow: auto;
    max-width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(6, 16, 28, 0.76);
    box-shadow: var(--shadow-sm);
    scrollbar-color: #174c76 #06101c;
    -webkit-overflow-scrolling: touch;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-striped-bg: rgba(23, 63, 98, 0.13);
    --bs-table-striped-color: var(--text-primary);
    --bs-table-hover-bg: rgba(34, 123, 202, 0.1);
    --bs-table-hover-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
    width: 100%;
    margin: 0;
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: 0.82rem 1rem;
    color: var(--text-primary);
    border-bottom-color: var(--border-color);
    background-color: transparent;
    box-shadow: none;
}

.table > thead {
    background: linear-gradient(100deg, #0d2943, #0a1d31 65%, #0d263d);
}

.table > thead > tr > th {
    height: 46px;
    color: #bcd5ec;
    border-bottom: 1px solid rgba(77, 167, 242, 0.28);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table > tbody > tr {
    background: rgba(8, 20, 34, 0.54);
    transition: background-color 150ms ease;
}

.table > tbody > tr:nth-child(even) {
    background: rgba(13, 31, 51, 0.58);
}

.table > tbody > tr:hover {
    background: rgba(26, 91, 146, 0.18) !important;
}

.table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.table td {
    color: #d9e4f1;
    font-size: 0.88rem;
}

/* Fluent UI cards and data grids */
fluent-card {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    background: linear-gradient(145deg, rgba(13, 30, 50, 0.94), rgba(6, 16, 28, 0.98)) !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Fluent DataGrid renders as a scoped table, not a fluent-data-grid element. */
.fluent-data-grid {
    --neutral-fill-rest: transparent;
    --neutral-fill-hover: rgba(34, 123, 202, 0.1);
    --neutral-fill-stealth-rest: transparent;
    --neutral-fill-stealth-hover: rgba(34, 123, 202, 0.11);
    --neutral-fill-input-rest: #071522;
    --neutral-fill-input-hover: #0a1e31;
    --neutral-fill-input-active: #0c2740;
    --neutral-foreground-rest: var(--text-primary);
    --neutral-foreground-hint: var(--text-muted);
    --neutral-stroke-rest: var(--border-color);
    --neutral-stroke-divider-rest: var(--border-color);
    --neutral-stroke-input-rest: rgba(96, 157, 211, 0.25);
    --neutral-stroke-input-hover: rgba(73, 168, 241, 0.48);
    --neutral-stroke-input-active: var(--accent-primary);
    --neutral-layer-1: #06101c;
    --neutral-layer-2: #091827;
    --neutral-layer-3: #10263d;
    --neutral-layer-4: #020810;
    --neutral-layer-floating: #0a192a;
    max-width: 100%;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: var(--radius-md) !important;
    background: rgba(6, 16, 28, 0.82) !important;
    scrollbar-color: #174c76 #06101c;
}

.fluent-data-grid th.column-header {
    min-width: 0;
    height: 44px;
    padding: 4px 5px !important;
    color: #c4ddf4 !important;
    border-bottom: 1px solid rgba(77, 167, 242, 0.32) !important;
    background: linear-gradient(100deg, #0d2943, #0a1d31 65%, #0d263d) !important;
    font-size: 0.72rem;
    font-weight: 750 !important;
    letter-spacing: 0.055em;
    text-align: left;
    text-transform: uppercase;
}

.fluent-data-grid th.column-header:first-child {
    border-top-left-radius: 11px;
}

.fluent-data-grid th.column-header:last-child {
    border-top-right-radius: 11px;
}

.fluent-data-grid th.column-header .col-title {
    padding: 0 0.55rem !important;
    color: #c4ddf4 !important;
    font-size: 0.7rem;
    font-weight: 750 !important;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.fluent-data-grid td {
    min-width: 0;
    height: 42px;
    padding: 0.6rem 0.8rem !important;
    color: #d9e4f1 !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: rgba(8, 20, 34, 0.7) !important;
    font-size: 0.82rem;
    line-height: 1.35 !important;
}

.fluent-data-grid tbody tr:nth-child(even) td {
    background: rgba(13, 31, 51, 0.72) !important;
}

.fluent-data-grid tbody tr:hover td,
.fluent-data-grid tbody tr .hover {
    background: rgba(26, 91, 146, 0.22) !important;
}

.fluent-data-grid th.column-header .col-sort-button,
.fluent-data-grid th.column-header .col-options-button {
    --neutral-fill-rest: transparent;
    --neutral-fill-hover: rgba(41, 132, 208, 0.16);
    --neutral-fill-active: rgba(41, 132, 208, 0.24);
    --neutral-fill-focus: rgba(41, 132, 208, 0.12);
    --neutral-fill-stealth-rest: transparent;
    --neutral-fill-stealth-hover: rgba(41, 132, 208, 0.16);
    --neutral-foreground-rest: #c4ddf4;
    --neutral-foreground-hover: #ffffff;
    --neutral-foreground-active: #ffffff;
    height: 32px;
    color: #c4ddf4 !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font-size: 0.7rem;
    font-weight: 750 !important;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.fluent-data-grid th.column-header .col-sort-button {
    width: calc(100% - 27px) !important;
}

.fluent-data-grid th.column-header .col-options-button {
    width: 27px !important;
    min-width: 27px !important;
    padding: 0 !important;
}

.fluent-data-grid th.column-header .col-sort-button::part(control),
.fluent-data-grid th.column-header .col-options-button::part(control) {
    min-width: 0;
    min-height: 30px;
    height: 30px;
    padding: 0 0.5rem;
    color: #c4ddf4 !important;
    border: 1px solid transparent !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.fluent-data-grid th.column-header .col-options-button::part(control) {
    width: 27px;
    padding: 0 !important;
}

.fluent-data-grid th.column-header .col-sort-button:hover::part(control),
.fluent-data-grid th.column-header .col-options-button:hover::part(control),
.fluent-data-grid th.column-header .col-sort-button:focus-visible::part(control),
.fluent-data-grid th.column-header .col-options-button:focus-visible::part(control) {
    color: #fff !important;
    border-color: rgba(76, 169, 241, 0.25) !important;
    background: rgba(32, 116, 184, 0.2) !important;
}

.fluent-data-grid th.column-header .col-sort-button::part(content) {
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
}

.fluent-data-grid th.column-header .col-sort-button::part(start),
.fluent-data-grid th.column-header .col-sort-button::part(end),
.fluent-data-grid th.column-header .col-options-button::part(start),
.fluent-data-grid th.column-header .col-options-button::part(end) {
    color: #71bff6 !important;
    fill: currentColor !important;
}

.fluent-data-grid .col-options {
    min-width: 230px !important;
    top: 2.45rem !important;
    padding: 0.7rem !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(77, 168, 239, 0.3) !important;
    border-radius: 11px !important;
    background: linear-gradient(145deg, #0d2136, #07131f) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5) !important;
}

.fluent-data-grid .search-box {
    width: 100%;
    padding: 0;
}

.fluent-data-grid fluent-search,
.fluent-data-grid fluent-text-field {
    --neutral-fill-input-rest: #071522;
    --neutral-fill-input-hover: #0a1e31;
    --neutral-fill-input-active: #0c2740;
    --neutral-fill-input-focus: #0c2740;
    --neutral-foreground-rest: var(--text-primary);
    --neutral-foreground-hint: #6f849a;
    --neutral-stroke-input-rest: rgba(96, 157, 211, 0.28);
    --neutral-stroke-input-hover: rgba(73, 168, 241, 0.52);
    --neutral-stroke-input-active: var(--accent-primary);
    width: 100%;
    color: var(--text-primary) !important;
}

.fluent-data-grid fluent-search::part(root),
.fluent-data-grid fluent-text-field::part(root),
.fluent-data-grid fluent-search::part(input-wrapper),
.fluent-data-grid fluent-text-field::part(input-wrapper) {
    color: var(--text-primary) !important;
    border-color: rgba(96, 157, 211, 0.28) !important;
    background: #071522 !important;
    box-shadow: none !important;
}

.fluent-data-grid fluent-search:focus-within::part(root),
.fluent-data-grid fluent-text-field:focus-within::part(root),
.fluent-data-grid fluent-search:focus-within::part(input-wrapper),
.fluent-data-grid fluent-text-field:focus-within::part(input-wrapper) {
    border-color: var(--accent-primary) !important;
    background: #0a1e31 !important;
    box-shadow: 0 0 0 2px rgba(22, 140, 255, 0.14) !important;
}

.fluent-data-grid fluent-search::part(control),
.fluent-data-grid fluent-text-field::part(control) {
    color: var(--text-primary) !important;
    background: transparent !important;
    caret-color: #65bdff;
}

.fluent-data-grid fluent-search::part(control)::placeholder,
.fluent-data-grid fluent-text-field::part(control)::placeholder {
    color: #6f849a !important;
    opacity: 1;
}

.fluent-data-grid fluent-search::part(clear-button) {
    color: #7890a7 !important;
    fill: currentColor !important;
    background: transparent !important;
}

/* Compact, readable actions shared by all data grids. */
.grid-action-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.grid-action-button {
    display: inline-flex;
    min-width: 0;
    min-height: 32px;
    padding: 0.35rem 0.62rem;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #b8c9da;
    border: 1px solid rgba(96, 157, 211, 0.25);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(14, 35, 57, 0.96), rgba(7, 20, 34, 0.98));
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.grid-action-button:hover {
    color: #fff;
    border-color: rgba(74, 174, 251, 0.55);
    background: linear-gradient(145deg, #104878, #0b2947);
}

.grid-action-button.primary {
    color: #a8d8ff;
    border-color: rgba(22, 140, 255, 0.38);
    background: rgba(22, 140, 255, 0.1);
}

.grid-action-button.danger {
    color: #ff8994;
    border-color: rgba(240, 82, 98, 0.28);
    background: rgba(240, 82, 98, 0.07);
}

.grid-action-button.danger:hover {
    color: #fff;
    border-color: rgba(255, 113, 127, 0.55);
    background: rgba(202, 48, 66, 0.48);
}

.grid-action-button.icon-only {
    width: 32px;
    padding: 0;
}

.grid-action-button:focus-visible {
    outline: 2px solid #72c2ff;
    outline-offset: 2px;
}

/* Inline call-recording detail rows shared by the Recordings and CDR grids. */
.fluent-data-grid tbody tr.inline-player-row td {
    height: auto !important;
    min-height: 0;
    border-top: 1px solid rgba(54, 157, 237, 0.36) !important;
    border-bottom: 1px solid rgba(54, 157, 237, 0.36) !important;
    background: linear-gradient(110deg, rgba(11, 43, 70, 0.98), rgba(5, 18, 31, 0.99)) !important;
}

.fluent-data-grid tbody tr.inline-player-row td:first-child {
    grid-column: 1 / -1;
    padding: 0 !important;
    overflow: visible;
}

.fluent-data-grid tbody tr.inline-player-row td:not(:first-child) {
    display: none;
}

.fluent-data-grid tbody tr.inline-player-row:hover td {
    background: linear-gradient(110deg, rgba(11, 43, 70, 0.98), rgba(5, 18, 31, 0.99)) !important;
}

/* Bootstrap voicemail table uses the same expandable player treatment. */
.table > tbody > tr.voicemail-message-playing > td {
    border-bottom-color: rgba(54, 157, 237, 0.36);
    background: rgba(27, 99, 158, 0.13);
}

.table > tbody > tr.voicemail-player-row,
.table > tbody > tr.voicemail-player-row:nth-child(even),
.table > tbody > tr.voicemail-player-row:hover {
    background: linear-gradient(110deg, rgba(11, 43, 70, 0.98), rgba(5, 18, 31, 0.99)) !important;
}

.table > tbody > tr.voicemail-player-row > td {
    padding: 0 !important;
    border-top: 0;
    border-bottom: 1px solid rgba(54, 157, 237, 0.36);
    background: transparent !important;
}

.inline-recording-player {
    position: sticky;
    left: 0;
    display: grid;
    width: min(920px, calc(100vw - 3rem));
    max-width: 100%;
    gap: 0.7rem;
    padding: 0.9rem 1rem 1rem;
    color: #dceaf7;
    border-left: 3px solid #2b9df1;
    background: linear-gradient(135deg, rgba(15, 55, 88, 0.95), rgba(6, 23, 39, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.inline-recording-player-header {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.inline-recording-player-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.45rem;
    color: #80cbff;
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.inline-recording-player-title strong {
    overflow: hidden;
    color: #f3f8fd;
    font-size: 0.86rem;
    letter-spacing: 0;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.inline-recording-player-meta {
    display: flex;
    min-width: 0;
    margin-top: 0.32rem;
    flex-wrap: wrap;
    gap: 0.3rem 0.85rem;
    color: #8fa7bd;
    font-size: 0.72rem;
}

.inline-recording-call-id {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inline-recording-player audio {
    display: block;
    width: 100%;
    height: 40px;
    color-scheme: dark;
}

.recording-unavailable {
    color: #71869b;
    font-size: 0.72rem;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .inline-recording-player {
        width: calc(100vw - 2rem);
        gap: 0.6rem;
        padding: 0.75rem;
    }

    .inline-recording-player-title {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .inline-recording-player-title strong {
        width: 100%;
    }

    .inline-recording-player-meta {
        display: grid;
        gap: 0.18rem;
    }

    .inline-recording-call-id {
        max-width: calc(100vw - 6rem);
    }
}

/* Badges */
.badge {
    padding: 0.42em 0.68em;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.015em;
}

.badge.bg-success,
.badge-success {
    color: #9af4c5 !important;
    border-color: rgba(37, 196, 122, 0.3);
    background: rgba(37, 196, 122, 0.14) !important;
}

.badge.bg-danger,
.badge-danger {
    color: #ff9aa4 !important;
    border-color: rgba(240, 82, 98, 0.3);
    background: rgba(240, 82, 98, 0.14) !important;
}

.badge.bg-warning,
.badge-warning {
    color: #ffd38a !important;
    border-color: rgba(245, 173, 66, 0.3);
    background: rgba(245, 173, 66, 0.14) !important;
}

.badge.bg-info,
.badge-info {
    color: #9be9fb !important;
    border-color: rgba(50, 184, 237, 0.3);
    background: rgba(50, 184, 237, 0.14) !important;
}

.badge.bg-primary,
.badge-primary {
    color: #a8d6ff !important;
    border-color: rgba(22, 140, 255, 0.3);
    background: rgba(22, 140, 255, 0.14) !important;
}

.badge.bg-secondary,
.badge-secondary {
    color: #b7c6d7 !important;
    border-color: var(--border-color);
    background: rgba(113, 131, 154, 0.13) !important;
}

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(8, 20, 34, 0.84);
    box-shadow: var(--shadow-sm);
}

.alert-success {
    color: #89edb9;
    border-color: rgba(37, 196, 122, 0.34);
    background: rgba(37, 196, 122, 0.1);
}

.alert-danger {
    color: #ff929d;
    border-color: rgba(240, 82, 98, 0.34);
    background: rgba(240, 82, 98, 0.1);
}

.alert-warning {
    color: #ffd081;
    border-color: rgba(245, 173, 66, 0.34);
    background: rgba(245, 173, 66, 0.1);
}

.alert-info {
    color: #8ce1f6;
    border-color: rgba(50, 184, 237, 0.34);
    background: rgba(50, 184, 237, 0.1);
}

/* Modals */
.modal.show {
    display: block;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 4, 10, 0.8);
    backdrop-filter: blur(4px);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    color: var(--text-primary);
    pointer-events: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    outline: 0;
    background: linear-gradient(145deg, #0e2137, #07121f);
    background-clip: padding-box;
    box-shadow: var(--shadow-lg);
}

.modal-header,
.modal-footer {
    border-color: var(--border-color);
}

.modal-open {
    overflow: hidden;
}

.dropdown-menu {
    color: var(--text-primary);
    border-color: var(--border-color);
    border-radius: var(--radius-md);
    background: #0a192a;
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: var(--text-secondary);
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--text-primary);
    background: rgba(22, 140, 255, 0.12);
}

.page-link {
    color: #7bc4ff;
    border-color: var(--border-color);
    background: #091827;
}

.page-link:hover {
    color: #fff;
    border-color: var(--border-strong);
    background: #0d2943;
}

.spinner-border.text-primary {
    color: var(--accent-primary) !important;
}

.border-success { border-color: var(--success) !important; }
.border-danger { border-color: var(--danger) !important; }
.border-warning { border-color: var(--warning) !important; }
.border-info { border-color: var(--info) !important; }
.border-primary { border-color: var(--accent-primary) !important; }
.border-secondary { border-color: var(--border-color) !important; }

hr {
    margin: 1rem 0;
    color: var(--border-color);
    border-color: var(--border-color);
    opacity: 1;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #050d17;
}

::-webkit-scrollbar-thumb {
    border: 2px solid #050d17;
    border-radius: 999px;
    background: #174c76;
}

::-webkit-scrollbar-thumb:hover {
    background: #20689f;
}

@media (max-width: 768px) {
    .container-fluid {
        padding-right: 0;
        padding-left: 0;
    }

    .container-fluid > .d-flex.justify-content-between {
        align-items: stretch !important;
        flex-direction: column;
        gap: 0.8rem;
    }

    .container-fluid > .d-flex.justify-content-between > .btn,
    .container-fluid > .d-flex.justify-content-between > a.btn {
        width: 100%;
    }

    h1 { font-size: clamp(1.5rem, 7vw, 1.85rem); }
    h2 { font-size: clamp(1.35rem, 6vw, 1.65rem); }
    h3 { font-size: 1.2rem; }

    .card {
        border-radius: 14px;
    }

    .card-header {
        min-height: 48px;
        padding: 0.75rem 0.85rem;
    }

    .card-body {
        padding: 0.85rem;
    }

    .table-responsive {
        margin-right: -2px;
        border-radius: 11px;
    }

    .table {
        min-width: 660px;
    }

    .table > :not(caption) > * > * {
        padding: 0.7rem 0.78rem;
    }

    .table > thead > tr > th {
        height: 42px;
        font-size: 0.68rem;
    }

    .fluent-data-grid {
        min-width: 100%;
        border-radius: 11px;
        -webkit-overflow-scrolling: touch;
    }

    .fluent-data-grid th.column-header {
        height: 40px;
    }

    .fluent-data-grid td {
        height: 40px;
        padding: 0.52rem 0.65rem !important;
    }

    .fluent-data-grid .col-options {
        max-width: calc(100vw - 1.5rem);
    }

    .modal-dialog {
        max-width: calc(100% - 1rem);
        margin: 0.5rem auto;
    }

    .modal-body {
        padding: 0.85rem;
    }

    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
    }

    .btn-group-mobile .btn {
        width: 100%;
    }

    .hide-mobile-text {
        display: none;
    }
}

@media (pointer: coarse) {
    .btn,
    .nav-link,
    .form-control,
    .form-select {
        min-height: 44px;
        touch-action: manipulation;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
