/* Datei: /assets/css/app.css */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap");

:root {
    --page-bg: #f3eee7;
    --page-bg-2: #fffaf4;

    --panel-bg: rgba(255, 252, 247, 0.86);
    --panel-bg-strong: rgba(255, 250, 243, 0.96);
    --panel-line: rgba(92, 66, 46, 0.18);

    --text: #2b211a;
    --text-soft: #7c6d62;
    --text-faint: #a08d7d;

    --accent: #8f613f;
    --accent-2: #c99668;
    --accent-soft: rgba(143, 97, 63, 0.13);
    --accent-soft-2: rgba(143, 97, 63, 0.08);

    --btn-bg: #9a6a48;
    --btn-text: #fff8f0;

    --shadow: 0 16px 36px rgba(82, 56, 38, 0.13);
    --shadow-soft: 0 10px 24px rgba(82, 56, 38, 0.09);

    --radius-xl: 20px;
    --radius-lg: 14px;
    --radius-md: 10px;

    --row-height: 40px;
    --table-font-size: 13px;
    --cell-pad-y: 5px;
    --cell-pad-x: 14px;
}

body[data-theme="dark"] {
    --page-bg: #19110d;
    --page-bg-2: #3b2a20;

    --panel-bg: rgba(45, 32, 24, 0.88);
    --panel-bg-strong: rgba(55, 39, 29, 0.96);
    --panel-line: rgba(219, 180, 142, 0.18);

    --text: #f7eadc;
    --text-soft: #cbb4a1;
    --text-faint: #9d806c;

    --accent: #d1a06f;
    --accent-2: #b77d50;
    --accent-soft: rgba(209, 160, 111, 0.16);
    --accent-soft-2: rgba(209, 160, 111, 0.08);

    --btn-bg: #b77d50;
    --btn-text: #fff4e7;

    --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.24);
}

body[data-density="compact"] {
    --row-height: 36px;
    --table-font-size: 12.5px;
    --cell-pad-y: 4px;
    --cell-pad-x: 13px;
}

body[data-density="normal"] {
    --row-height: 43px;
    --table-font-size: 13.5px;
    --cell-pad-y: 6px;
    --cell-pad-x: 14px;
}

body[data-density="comfort"] {
    --row-height: 52px;
    --table-font-size: 14.5px;
    --cell-pad-y: 8px;
    --cell-pad-x: 16px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 12% 7%, rgba(201, 151, 104, 0.22), transparent 28%),
        radial-gradient(circle at 88% 0%, rgba(130, 85, 55, 0.14), transparent 24%),
        linear-gradient(180deg, var(--page-bg-2), var(--page-bg));
}

body[data-theme="dark"] {
    background:
        radial-gradient(circle at 12% 6%, rgba(124, 79, 49, 0.38), transparent 26%),
        radial-gradient(circle at 82% 2%, rgba(209, 160, 111, 0.12), transparent 25%),
        linear-gradient(180deg, #2c1f18 0%, #17100c 100%);
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button:disabled,
input:disabled {
    cursor: not-allowed;
}

a {
    color: inherit;
}

.app-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 40px auto 28px;
    position: relative;
}

.mode-tab {
    position: absolute;
    top: -28px;
    left: 0;
    height: 32px;
    min-width: 74px;
    padding: 8px 17px 7px;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(135deg, var(--btn-bg), var(--accent-2));
    color: var(--btn-text);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    box-shadow: var(--shadow-soft);
    z-index: 3;
}

body[data-theme="dark"] .mode-tab {
    background: #211712;
    color: #f7eadc;
    border: 1px solid var(--panel-line);
    border-bottom: 0;
}

.app-panel {
    border: 1px solid var(--panel-line);
    border-radius: var(--radius-xl);
    background: var(--panel-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.app-header {
    min-height: 92px;
    padding: 16px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

/* Header-Logo */

.brand-line {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    min-width: 0;
}

.brand-line--compact {
    max-width: 720px;
}

.brand-t-icon {
    width: clamp(48px, 4.1vw, 56px);
    height: clamp(48px, 4.1vw, 56px);
    flex: 0 0 auto;
    border-radius: 14px;
    background: linear-gradient(180deg, #48e348 0%, #05b83f 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: clamp(30px, 3vw, 38px);
    font-weight: 900;
    line-height: 1;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 8px 18px rgba(0, 0, 0, 0.18);
}

.brand-text-stack {
    display: grid;
    gap: 3px;
    min-width: 0;
    line-height: 1;
    transform: translateY(1px);
}

.brand-main {
    font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
    font-size: clamp(30px, 2.8vw, 42px);
    line-height: 0.95;
    color: var(--text);
    font-weight: 500;
    letter-spacing: -0.045em;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}

.brand-sub {
    display: block;
    color: var(--text-soft);
    font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
    font-size: clamp(8px, 0.78vw, 11px);
    font-weight: 600;
    letter-spacing: 0.36em;
    line-height: 1.1;
    white-space: nowrap;
    text-transform: uppercase;
    padding-left: 3px;
    margin-top: 2px;
}

body[data-theme="dark"] .brand-main {
    color: #f7eadc;
}

body[data-theme="dark"] .brand-sub {
    color: #d8c4b3;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    flex-wrap: wrap;
}

.setting-field {
    display: grid;
    gap: 5px;
    color: var(--text-soft);
    font-size: 12px;
}

.setting-field select {
    min-width: 128px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--panel-line);
    border-radius: 11px;
    background: var(--panel-bg-strong);
    color: var(--text);
    outline: none;
}

.setting-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.account-box {
    min-width: 138px;
    min-height: 54px;
    padding: 8px 12px;
    border: 1px solid var(--panel-line);
    border-radius: 14px;
    background: var(--accent-soft-2);
    display: grid;
    align-content: center;
    gap: 3px;
}

.account-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
}

.account-icon {
    font-size: 14px;
}

.account-caret {
    color: var(--text-soft);
}

.account-name {
    text-align: right;
    color: var(--text-soft);
    font-size: 12px;
}

.app-main {
    margin-top: 16px;
}

/* Suche + Benutzer-Anrufliste */

.search-panel {
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(360px, 430px) 1fr;
    align-items: start;
    gap: 16px;
}

.search-row {
    grid-column: 2;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(320px, 520px) 1fr;
    gap: 6px 12px;
    justify-self: end;
    align-items: start;
}

.search-row > .btn,
.search-row > button.btn,
.search-row > a.btn {
    display: none !important;
}

.search-box {
    grid-column: 1 / -1;
    height: 42px;
    border: 1px solid var(--panel-line);
    border-radius: 12px;
    background: var(--panel-bg-strong);
    box-shadow:
        inset 0 0 0 1px var(--accent-soft),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px 0 15px;
}

.search-icon {
    font-size: 25px;
    line-height: 1;
    color: var(--accent);
    transform: translateY(-3px);
}

.search-box input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    padding-right: 4px;
}

.search-box input::placeholder {
    color: var(--text-faint);
}

.search-clear,
.search-row .search-clear,
.search-box .search-clear {
    position: relative !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    border: 1px solid rgba(210, 105, 105, 0.42) !important;
    background: rgba(190, 80, 80, 0.18) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    display: none !important;
    flex: 0 0 28px !important;
    cursor: pointer !important;
    transform: none !important;
    overflow: hidden !important;
}

body[data-theme="dark"] .search-clear,
body[data-theme="dark"] .search-row .search-clear,
body[data-theme="dark"] .search-box .search-clear {
    border-color: rgba(230, 120, 120, 0.42) !important;
    background: rgba(210, 90, 90, 0.20) !important;
}

.search-box.has-value .search-clear {
    display: inline-block !important;
}

.search-clear::before,
.search-clear::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: rgba(190, 75, 75, 0.95);
    transform-origin: center;
}

.search-clear::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.search-clear::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

body[data-theme="dark"] .search-clear::before,
body[data-theme="dark"] .search-clear::after {
    background: rgba(255, 180, 180, 0.95);
}

.search-clear:hover {
    background: rgba(205, 90, 90, 0.30) !important;
    border-color: rgba(220, 105, 105, 0.66) !important;
}

.search-clear:hover::before,
.search-clear:hover::after {
    background: #ffffff;
}

/* Connector-Status rechts unter der Suche */

.connector-status-box {
    grid-column: 2;
    justify-self: end;
    align-self: center;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    color: var(--text-soft);
}

.connector-status-main {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-height: 20px;
}

.connector-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
    border: 1px solid var(--panel-line);
    flex: 0 0 auto;
}

.connector-status-box--online .connector-status-dot {
    background: #22c55e;
}

.connector-status-box--offline .connector-status-dot {
    background: #ef4444;
}

.connector-status-title {
    color: var(--text-soft);
}

.connector-status-main strong {
    color: var(--text);
    font-weight: 600;
}

.connector-status-muted {
    color: var(--text-soft);
    white-space: nowrap;
}

/* Kleine Benutzer-Anrufliste links neben der Suche */

.user-call-list-box {
    grid-column: 1;
    align-self: start;
    border: 1px solid var(--panel-line);
    border-radius: 12px;
    background: var(--panel-bg-strong);
    padding: 8px 10px;
    min-height: 0;
    max-height: 132px;
}

.user-call-list-head {
    margin: 0 0 5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.user-call-list {
    max-height: 78px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.user-call-list::-webkit-scrollbar {
    width: 6px;
}

.user-call-list::-webkit-scrollbar-track {
    background: transparent;
}

.user-call-list::-webkit-scrollbar-thumb {
    background: var(--accent-soft);
    border-radius: 999px;
}

.user-call-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.user-call-item {
    min-height: 26px;
    display: grid;
    grid-template-columns: 18px 58px 38px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    border-bottom: 1px solid var(--panel-line);
    font-size: 12px;
    line-height: 1.15;
    color: var(--text);
}

.user-call-item:last-child {
    border-bottom: 0;
}

.user-call-dir {
    width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.user-call-dir--incoming {
    color: #22c55e;
}

.user-call-dir--outgoing {
    color: var(--accent);
}

.user-call-dir--missed {
    color: #ef4444;
}

.user-call-date,
.user-call-time {
    color: var(--text-soft);
    white-space: nowrap;
}

.user-call-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-call-status {
    color: var(--text-soft);
    white-space: nowrap;
}

.user-call-empty {
    min-height: 26px;
    display: flex;
    align-items: center;
    color: var(--text-soft);
    font-size: 12px;
}

/* Aktiver Anruf unter der Suchleiste */

.active-call-widget {
    grid-column: 1;
    width: 100%;
    max-width: 520px;
    align-self: start;
    border: 1px solid var(--panel-line);
    border-radius: 12px;
    background: var(--accent-soft-2);
    padding: 7px 10px;
    margin: 2px 0 0;
    color: var(--text);
    font-size: 12px;
}

.search-row .active-call-widget {
    grid-column: 1;
}

.active-call-widget--empty {
    display: none !important;
}

.active-call-widget__main {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    min-height: 22px;
}

.active-call-widget__dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid var(--panel-line);
    background: #f59e0b;
}

.active-call-widget--connected .active-call-widget__dot {
    background: #22c55e;
}

.active-call-widget--warning .active-call-widget__dot {
    background: #ef4444;
}

.active-call-widget__label {
    color: var(--text-soft);
    white-space: nowrap;
}

.active-call-widget__main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.active-call-widget__time {
    color: var(--text-soft);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.active-call-widget__sub {
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Buttons allgemein */

.btn {
    height: 30px;
    border: 1px solid var(--panel-line);
    border-radius: 10px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.btn-filter {
    background: var(--panel-bg-strong);
    color: var(--text-soft);
}

.btn-call-main {
    min-width: 96px;
    background: linear-gradient(135deg, var(--btn-bg), var(--accent-2));
    color: var(--btn-text);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(130, 85, 55, 0.18);
}

.btn:disabled {
    opacity: 0.88;
}

/* Kontakte */

.contacts-panel {
    margin-top: 16px;
    padding: 16px;
}

.contacts-table-wrap {
    border: 1px solid var(--panel-line);
    border-radius: 12px;
    overflow: auto;
    background: var(--panel-bg-strong);
}

.contacts-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    font-size: var(--table-font-size);
}

.contacts-table th,
.contacts-table td {
    height: var(--row-height);
    padding: var(--cell-pad-y) var(--cell-pad-x);
    border-bottom: 1px solid var(--panel-line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.contacts-table th {
    height: 39px;
    color: var(--text);
    font-size: 13px;
    font-weight: 400;
    background: var(--accent-soft);
}

body[data-theme="dark"] .contacts-table th {
    background: rgba(209, 160, 111, 0.13);
}

.contacts-table tbody tr {
    transition: background 0.15s ease;
}

.contacts-table tbody tr:hover {
    background: var(--accent-soft-2);
}

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

.demo-row td {
    color: var(--text);
}

.mobile-head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mobile-symbol {
    font-size: 16px;
    line-height: 1;
    color: var(--accent);
    font-weight: 900;
    display: inline-block;
    transform: translateY(-1px);
}

.actions-col {
    width: 150px;
    text-align: right !important;
}

.actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.icon-btn,
.more-btn {
    border: 0;
    height: 28px;
    min-width: 28px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-grid;
    place-items: center;
    font-weight: 800;
    line-height: 1;
}

.icon-btn {
    font-size: 15px;
}

.more-btn {
    background: transparent;
    color: var(--text-soft);
    font-size: 24px;
    font-weight: 300;
}

.table-footer {
    min-height: 58px;
    padding: 13px 2px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--text-soft);
    font-size: 13px;
}

.pager {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pager button {
    min-width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
}

.pager button.active {
    background: linear-gradient(135deg, var(--btn-bg), var(--accent-2));
    color: var(--btn-text);
    box-shadow: 0 7px 14px rgba(130, 85, 55, 0.17);
}

.pager span {
    color: var(--text-soft);
}

/* Navigation */

.bottom-nav {
    min-height: 68px;
    margin-top: 0;
    padding: 0 26px 10px;
    border: 1px solid var(--panel-line);
    border-top: 0;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    background: linear-gradient(180deg, transparent, var(--panel-bg));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: end;
    gap: 8px;
    backdrop-filter: blur(12px);
}

.bottom-nav__item {
    min-height: 52px;
    padding: 12px 6px 9px;
    color: var(--text-soft);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    position: relative;
    font-size: 14px;
}

.bottom-nav__item span {
    color: var(--accent);
    font-size: 18px;
}

.bottom-nav__item strong {
    font-weight: 500;
}

.bottom-nav__item.active {
    color: var(--accent);
}

.bottom-nav__item.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 82px;
    height: 2px;
    border-radius: 99px;
    background: var(--accent);
    transform: translateX(-50%);
}

.bottom-nav__item.is-disabled {
    opacity: 0.78;
}

/* Login / Installation */

.login-screen {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-wrap {
    width: min(440px, 100%);
}

.auth-card {
    border: 1px solid var(--panel-line);
    border-radius: var(--radius-xl);
    background: var(--panel-bg);
    box-shadow: var(--shadow);
    padding: 22px;
    backdrop-filter: blur(12px);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff8ef;
    font-weight: 800;
    letter-spacing: 0.03em;
    box-shadow: 0 10px 22px rgba(122, 82, 55, 0.26);
}

.auth-brand h1 {
    margin: 0;
    font-size: clamp(22px, 3vw, 31px);
    letter-spacing: -0.03em;
}

.auth-brand p {
    margin: 3px 0 0;
    color: var(--text-soft);
    font-size: 14px;
}

.auth-form {
    margin-top: 18px;
    display: grid;
    gap: 13px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--text-soft);
    font-size: 14px;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    border: 1px solid var(--panel-line);
    border-radius: 14px;
    background: var(--panel-bg-strong);
    color: var(--text);
    padding: 12px 13px;
    font-size: 16px;
    outline: none;
}

.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.check-line {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 9px !important;
}

.check-line input {
    width: 17px;
    height: 17px;
}

.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--btn-bg), var(--accent-2));
    color: var(--btn-text);
    text-decoration: none;
    width: 100%;
    font-weight: 800;
}

.notice {
    margin: 16px 0;
    padding: 12px 13px;
    border-radius: 14px;
    border: 1px solid var(--panel-line);
    font-size: 14px;
}

.notice-error {
    background: rgba(159, 61, 50, 0.12);
    color: #b14b3e;
}

.notice-ok {
    background: rgba(71, 115, 90, 0.12);
    color: #47735a;
}

.notice-warn {
    background: rgba(169, 113, 42, 0.12);
    color: #a9712a;
}

body[data-theme="dark"] .notice-error {
    color: #e38b7e;
}

body[data-theme="dark"] .notice-ok {
    color: #91c7a5;
}

body[data-theme="dark"] .notice-warn {
    color: #e5b46f;
}

/* Pagination-Links */

.pager-link {
    min-width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.pager-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* Responsive */

@media (max-width: 900px) {
    .app-shell {
        width: min(100% - 20px, 720px);
        margin-top: 34px;
    }

    .app-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .brand-line {
        flex-wrap: nowrap;
    }

    .header-right {
        width: 100%;
        justify-content: stretch;
    }

    .setting-field {
        flex: 1 1 130px;
    }

    .setting-field select {
        width: 100%;
    }

    .account-box {
        flex: 1 1 160px;
    }

    .btn {
        width: 100%;
    }

    .table-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .bottom-nav {
        grid-template-columns: repeat(4, 1fr);
        padding: 0 8px 8px;
    }

    .bottom-nav__item {
        flex-direction: column;
        gap: 3px;
        font-size: 11px;
    }

    .bottom-nav__item.active::after {
        width: 46px;
    }
}

@media (max-width: 760px) {
    .search-panel {
        display: block;
    }

    .search-row {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .search-box {
        grid-column: auto;
        margin-top: 12px;
    }

    .search-row .active-call-widget,
    .search-row .incoming-call-widget {
        grid-column: 1;
        max-width: none;
        margin-top: 8px;
        margin-bottom: 0;
    }

    .connector-status-box {
        grid-column: 1;
        justify-self: start;
        margin-top: 6px;
    }

    .user-call-list-box {
        margin-bottom: 12px;
        max-height: 132px;
    }

    .user-call-list {
        max-height: 78px;
    }
}

@media (max-width: 560px) {
    .brand-line {
        gap: 10px;
    }

    .brand-t-icon {
        width: 42px;
        height: 42px;
        border-radius: 11px;
        font-size: 27px;
    }

    .brand-main {
        font-size: 29px;
        line-height: 0.95;
    }

    .brand-sub {
        font-size: 7.5px;
        letter-spacing: 0.24em;
        margin-top: 2px;
    }

    .app-header,
    .search-panel,
    .contacts-panel {
        border-radius: 15px;
    }
}

/* Connector-Offline-Hinweis */

.connector-offline-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(5px);
}

.connector-offline-modal__card {
    width: min(420px, 100%);
    border: 1px solid var(--panel-line);
    border-radius: 18px;
    background: var(--panel-bg-strong);
    box-shadow: var(--shadow);
    padding: 18px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 13px;
    color: var(--text);
}

.connector-offline-modal__dot {
    width: 12px;
    height: 12px;
    margin-top: 7px;
    border-radius: 999px;
    background: #ef4444;
    border: 1px solid var(--panel-line);
}

.connector-offline-modal__content h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.connector-offline-modal__content p {
    margin: 4px 0;
    color: var(--text-soft);
    font-size: 14px;
}

.connector-offline-modal__btn {
    margin-top: 14px;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--panel-line);
    background: var(--panel-bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.connector-offline-modal__btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

/* Eingehender Anruf unter der Suchleiste */

.incoming-call-widget {
    grid-column: 1;
    width: 100%;
    max-width: 520px;
    align-self: start;
    border: 1px solid var(--panel-line);
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.10);
    padding: 7px 10px;
    margin: 2px 0 0;
    color: var(--text);
    font-size: 12px;
}

.incoming-call-widget--empty {
    display: none !important;
}

.incoming-call-widget__main {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    min-height: 22px;
}

.incoming-call-widget__dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid var(--panel-line);
    background: #f59e0b;
}

.incoming-call-widget--connected .incoming-call-widget__dot {
    background: #22c55e;
}

.incoming-call-widget__label {
    color: var(--text-soft);
    white-space: nowrap;
}

.incoming-call-widget__main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.incoming-call-widget__time {
    color: var(--text-soft);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.incoming-call-widget__sub {
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-t-icon--online {
    background: linear-gradient(180deg, #48e348 0%, #05b83f 100%);
}

.brand-t-icon--offline {
    background: linear-gradient(180deg, #ff5b5b 0%, #c8192e 100%);
}
/* Mobile-Fix Telefonbuch */
@media (max-width: 560px) {
    body .app-shell {
        width: calc(100% - 14px) !important;
        margin: 8px auto 18px !important;
    }

    body .app-header {
        min-height: auto !important;
        padding: 14px !important;
        align-items: stretch !important;
        gap: 14px !important;
    }

    body .brand {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    body .brand-line,
    body .brand-line--compact {
        width: 100%;
        max-width: 100%;
        gap: 10px !important;
        align-items: center;
        overflow: hidden;
    }

    body .brand-t-icon {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        border-radius: 11px !important;
        font-size: 27px !important;
    }

    body .brand-text-stack {
        min-width: 0;
        max-width: calc(100vw - 88px);
        overflow: hidden;
    }

    body .brand-main {
        font-size: clamp(27px, 8vw, 34px) !important;
        line-height: 1 !important;
        letter-spacing: -0.045em !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body .brand-sub {
        font-size: 7.5px !important;
        letter-spacing: 0.23em !important;
        margin-top: 2px !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body .header-right {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px !important;
        padding-top: 0 !important;
        align-items: end !important;
    }

    body .session-badge {
        position: static !important;
        grid-column: 1 / -1;
        width: 100%;
        text-align: right;
        font-size: 10.5px;
        margin: 0 0 2px;
    }

    body .setting-field {
        min-width: 0;
        width: 100%;
    }

    body .setting-field select {
        width: 100%;
        min-width: 0 !important;
        height: 36px !important;
    }

    body .search-panel {
        display: block !important;
        padding: 14px !important;
    }

    body .user-call-list-box {
        width: 100%;
        max-height: 126px;
        margin-bottom: 12px;
    }

    body .user-call-list {
        max-height: 76px;
    }

    body .search-row {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    body .search-box {
        width: 100%;
        min-width: 0;
        margin-top: 0 !important;
        grid-column: 1 !important;
    }

    body .search-box input {
        min-width: 0;
        font-size: 14px;
    }

    body .connector-status-box {
        grid-column: 1 !important;
        justify-self: start !important;
        margin-top: 2px !important;
    }

    body .contacts-panel {
        padding: 12px !important;
    }

    body .contacts-table {
        min-width: 680px;
    }

    body .contacts-table th,
    body .contacts-table td {
        padding-left: 10px;
        padding-right: 10px;
    }

    body .table-footer {
        gap: 10px;
        font-size: 12px;
    }

    body .pager {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }
}
/* Mobile: Kontaktzeile antippbar */
@media (max-width: 760px) {
    .contacts-table tbody tr {
        cursor: pointer;
    }

    .contacts-table tbody tr:active {
        background: var(--accent-soft);
    }

    .contacts-table .actions-col {
        width: 42px;
    }

    .contacts-table .actions-cell {
        justify-content: center;
    }

    .contacts-table .call-action-btn {
        min-width: 28px;
        width: 28px;
        height: 28px;
        padding: 0;
        border-radius: 8px;
    }

    .contacts-table .call-action-btn span {
        display: none;
    }

    .contacts-table .call-action-btn .pb-action-icon {
        width: 15px;
        height: 15px;
    }
}