body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #fff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    user-select: none;
    transition: background-color 0.2s ease;
}

html.dark-mode, body.dark-mode {
    background: #23262f !important;
    color: #e0e0e0;
}

html.dark-mode {
    background: #23262f !important;
}

.container {
    max-width: 100%;
    margin: 0;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    min-height: 100vh;
    position: relative;
}

.header-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px;
    padding: 0;
}

.search-input-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.main-search-input {
    flex: 1;
    max-width: 90%;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.95rem;
    padding: 8px 14px;
    background: #fff;
    outline: none;
    cursor: pointer;
}

.main-search-input::placeholder {
    color: #888;
}

body.dark-mode .main-search-input {
    background: #181a20;
    border-color: #333;
    color: #e0e0e0;
}

body.dark-mode .main-search-input::placeholder {
    color: #b0b0b0;
}

.icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    cursor: pointer;
}

.icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.icon:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.10);
}

body.dark-mode .icon:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(144, 202, 249, 0.18);
}

.sections-container {
    flex: 1;
    overflow: hidden;
    min-width: 0;
    width: 100%;
}

.sections-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.sections-scroll::-webkit-scrollbar {
    display: none;
}

.section-tab {
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 16px;
    border-radius: 20px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    color: #222;
    transition: all 0.2s ease;
    min-width: 80px;
    max-width: 120px;
    text-align: center;
}

.section-tab:hover {
    background: #e3f2fd;
    border-color: #1976d2;
    color: #1976d2;
}

.section-tab.active {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
}

@media (min-width: 601px) {
    .sections-scroll {
        gap: 12px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 12px;
    }

    .section-tab {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        padding: 8px 20px;
        font-size: 1rem;
    }

    .sections-container {
        flex: 1 1 auto;
    }
}

@media (max-width: 600px) {
    .sections-container {
        flex: 1;
        margin-top: 0;
    }

    .sections-scroll {
        justify-content: flex-start;
        gap: 6px;
    }

    .section-tab {
        padding: 6px 10px;
        font-size: 0.9rem;
        min-width: 70px;
        max-width: 100px;
    }
}

.title-row {
    margin: 0 16px 16px 16px;
    padding: 0;
    display: flex;
    justify-content: flex-start;
}

.header-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    color: #222;
    white-space: nowrap;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-group {
    margin-bottom: 6px;
}

.group-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1976d2;
    margin: 8px 0 2px 14px;
    letter-spacing: 1px;
}

.contact-group:first-child .group-title {
    margin-top: 6px;
}

.contact-item {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.07);
    padding: 12px 16px;
    border: none;
    transition: box-shadow 0.2s, background 0.2s;
    min-height: 58px;
}

.contact-item:hover {
    background: #f5faff;
}

.contact-item.selected-contact {
    background: #e3f2fd !important;
    box-shadow: none;
    transition: background 0.2s cubic-bezier(.4, 0, .2, 1);
    border-radius: 8px 0 8px 8px !important;
}

body.dark-mode .contact-item.selected-contact {
    background: #263238 !important;
    box-shadow: none;
    transition: background 0.2s cubic-bezier(.4, 0, .2, 1);
    border-radius: 8px 0 8px 8px !important;
}

.contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-right: 20px;
    margin-left: 8px;
    flex-shrink: 0;
    color: #222;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.10);
    transition: background 0.2s;
}

.contact-name {
    font-size: 1.18rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 2px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.match-highlight {
    background: #f5faff;
    color: inherit;
    border: 1px solid #e3f2fd;
    border-radius: 6px;
    padding: 0 3px;
}

.contact-phone {
    display: none !important;
    font-size: 0.95rem;
    color: #555;
    margin-top: 2px;
    opacity: 0.95;
}

.contact-item>div[style*="flex-direction: column"] {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.contact-item .contact-position {
    font-size: 1rem;
    color: #6a6a6a;
    margin-top: 2px;
    margin-left: 0;
    font-weight: 400;
    opacity: 0.85;
}

.alphabet-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    left: auto;
    transform: translateY(-50%);
    width: 40px;
    height: auto;
    min-height: 0;
    max-height: none;
    bottom: auto;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 16px 0 0 16px;
    z-index: 9999;
    overflow: hidden;
    padding: 0;
    gap: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.alphabet-sidebar .alphabet-letter {
    margin: 0;
}

.alphabet-sidebar .alphabet-letter+.alphabet-letter {
    margin-top: 2px;
}

.alphabet-sidebar .alphabet-letter:first-child {
    margin-top: 0;
}

.alphabet-sidebar .alphabet-letter:last-child {
    margin-bottom: 0;
}

.alphabet-sidebar.many-letters {
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100vh !important;
    max-height: 100vh !important;
    transform: none;
    justify-content: flex-start !important;
    gap: 3px !important;
    padding-top: 8px;
    padding-bottom: 8px;
}

.alphabet-letter {
    font-size: 1rem;
    color: #1976d2;
    margin: 0;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.alphabet-letter:hover {
    background: #e3f2fd;
    color: #0d47a1;
}

.alphabet-letter.active {
    background: #e3f2fd;
    color: #0d47a1;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fafafa;
    z-index: 100;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(.4, 0, .2, 1), transform 0.35s cubic-bezier(.4, 0, .2, 1);
}

.search-overlay.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.search-header {
    display: flex;
    align-items: center;
    padding: 24px 16px 8px 16px;
    background: #fafafa;
}

.search-back {
    background: none;
    border: none;
    padding: 0;
    margin-right: 12px;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
}

.search-input-wrap {
    position: relative;
    flex: 0 1 calc(100% - 2cm);
    max-width: calc(100% - 2cm);
}

.search-header .search-input {
    width: 100%;
    max-width: 100%;
    padding-right: 55px;
}

.search-input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.2rem;
}

body.dark-mode .search-input-icon {
    color: #b0b0b0;
}

.search-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 1rem;
    padding: 10px 16px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #e0e0e0;
}

.search-input::placeholder {
    color: #888;
}

body.dark-mode .search-input {
    background: #181a20;
    border-color: #333;
    color: #e0e0e0;
}

body.dark-mode .search-input:focus {
    border-color: #333;
}

body.dark-mode .search-input::placeholder {
    color: #b0b0b0;
}

.search-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 16px 16px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    scrollbar-gutter: stable both-edges;
}

.search-results:hover {
    scrollbar-color: #b8d3ff transparent;
}

.search-results::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 12px;
}

.search-results::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
    border: 2px solid transparent;
}

.search-results:hover::-webkit-scrollbar-track {
    background: rgba(25, 118, 210, 0.06);
}

.search-results:hover::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cfe3ff, #b8d3ff);
    border: 2px solid #f5faff;
    box-shadow: inset 0 0 0 1px rgba(25, 118, 210, 0.12);
}

body.dark-mode .search-results:hover {
    scrollbar-color: #5b6b86 transparent;
}

body.dark-mode .search-results:hover::-webkit-scrollbar-track {
    background: rgba(144, 202, 249, 0.10);
}

body.dark-mode .search-results:hover::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3c4b63, #2f3c52);
    border: 2px solid #23262f;
    box-shadow: inset 0 0 0 1px rgba(144, 202, 249, 0.18);
}

.search-empty {
    padding: 12px 2px;
    color: #777;
    font-size: 0.95rem;
}

.search-history {
    margin: 6px 0 0 0;
    padding: 0 16px;
}

.search-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-history-item {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    color: #222;
    padding: 8px 12px;
    box-sizing: border-box;
    transition: background 0.2s, color 0.2s;
}

.search-history-item:hover {
    background: #e3f2fd;
    border-radius: 8px;
    color: #1976d2;
    background-clip: padding-box;
}

body.dark-mode .search-history-item:hover {
    background: #263238;
    color: #90caf9;
    background-clip: padding-box;
}

.search-history-clock {
    margin-right: 12px;
    opacity: 0.6;
}

.search-history-remove {
    margin-left: auto;
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    outline: none;
}

.search-history-clear {
    text-align: center;
    color: #888;
    font-size: 1rem;
    margin: 24px 0 0 0;
    cursor: pointer;
    display: inline-block;
    min-width: 90px;
    padding: 6px 18px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.search-history-clear:hover {
    color: #1976d2;
    background: #e3f2fd;
    text-decoration: none;
}

body.dark-mode .search-history-clear:hover {
    color: #90caf9;
    background: #263238;
    text-decoration: none;
}

.alphabet-popup {
    position: fixed;
    right: 56px;
    top: 50%;
    transform: translateY(-50%) scale(0.7);
    width: 64px;
    height: 64px;
    background: #fff;
    color: #1976d2;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    z-index: 99;
    transition: opacity 0.25s, transform 0.25s;
}

.alphabet-popup.active {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    animation: popup-bounce 0.5s;
}

@keyframes popup-bounce {
    0% {
        transform: translateY(-50%) scale(0.7);
        opacity: 0;
    }

    60% {
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }

    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .header-row {
        margin: 12px 12px 8px 12px;
        gap: 8px;
        flex-wrap: nowrap;
    }

    .title-row {
        margin: 0 12px 12px 12px;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .search-settings {
        gap: 12px;
    }

    .search-settings .icon {
        width: 36px;
        height: 36px;
        padding: 4px;
    }

    .search-settings .icon svg {
        width: 20px;
        height: 20px;
    }

    .contact-avatar {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }

    .contact-item {
        padding: 10px 14px;
        min-height: 52px;
    }

    .group-title {
        margin: 8px 0 2px 14px;
    }

    .main-search-input {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .search-input {
        padding: 8px 16px;
        font-size: 0.95rem;
    }

    .search-input-icon {
        right: 14px;
        font-size: 1.1rem;
    }
}

.phone-call-icon {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #1976d2;
    background: #e3f2fd;
    border: none;
    opacity: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    transition: background 0.2s, color 0.2s;
}

.phone-call-icon:hover {
    background: #1976d2;
    color: #fff;
}

body.dark-mode .container {
    background: #23262f;
}

body.dark-mode .header-title,
body.dark-mode .group-title {
    color: #90caf9;
}

body.dark-mode .section-tab {
    background: #333;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .section-tab:hover {
    background: #263238;
    border-color: #90caf9;
    color: #90caf9;
}

body.dark-mode .section-tab.active {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
}

body.dark-mode .contact-item {
    background: #23262f;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.04);
}

body.dark-mode .contact-item:hover {
    background: #1a1c23;
}

body.dark-mode .contact-avatar {
    background: #181a20;
    color: #90caf9;
    border: 1px solid #333;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}

body.dark-mode .contact-name {
    color: #e0e0e0;
}

body.dark-mode .contact-item .contact-position {
    color: #b0b0b0;
}

body.dark-mode .alphabet-sidebar {
    background: #23262f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

body.dark-mode .alphabet-letter {
    color: #90caf9;
}

body.dark-mode .alphabet-letter:hover {
    background: #263238;
    color: #fff;
}

body.dark-mode .alphabet-letter.active {
    background: #263238;
    color: #fff;
}

body.dark-mode .search-overlay {
    background: #181a20;
}

body.dark-mode .search-header {
    background: #181a20;
}

body.dark-mode .search-history-item {
    color: #e0e0e0;
}

body.dark-mode .search-history-clock {
    color: #90caf9;
}

body.dark-mode .search-history-remove {
    color: #b0b0b0;
}

body.dark-mode .search-history-clear {
    color: #b0b0b0;
}

body.dark-mode .alphabet-popup {
    background: #23262f;
    color: #90caf9;
}

body.dark-mode .phone-call-icon {
    background: #23262f;
    color: #90caf9;
}

body.dark-mode .phone-call-icon:hover {
    background: #1976d2;
    color: #fff;
}

.settings-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 101;
    background: #fff;
    box-shadow: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(.4, 0, .2, 1), transform 0.35s cubic-bezier(.4, 0, .2, 1);
}

.settings-page.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    animation: fadeIn 0.4s;
}

.settings-header {
    display: flex;
    align-items: center;
    padding: 32px 32px 16px 32px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.settings-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1976d2;
}

.settings-body {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow-y: auto;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.08rem;
    background: #f7f9fc;
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid #e0e0e0;
    transition: background 0.2s;
}

.settings-item:hover {
    background: #e3f2fd;
}

.settings-label {
    font-weight: 500;
    color: #222;
    letter-spacing: 0.2px;
    font-size: 1.08rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-back {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1976d2;
    cursor: pointer;
    margin-right: 16px;
    outline: none;
    display: flex;
    align-items: center;
}

.switch {
    --button-width: 3.5em;
    --button-height: 2em;
    --toggle-diameter: 1.5em;
    --button-toggle-offset: calc((var(--button-height) - var(--toggle-diameter)) / 2);
    --toggle-shadow-offset: 10px;
    --toggle-wider: 3em;
    --color-grey: #cccccc;
    --color-green: #4296f4;
    position: relative;
    display: inline-block;
}

.slider {
    display: inline-block;
    width: var(--button-width);
    height: var(--button-height);
    background-color: var(--color-grey);
    border-radius: calc(var(--button-height) / 2);
    position: relative;
    transition: 0.3s all ease-in-out;
}

.slider::after {
    content: "";
    display: inline-block;
    width: var(--toggle-diameter);
    height: var(--toggle-diameter);
    background-color: #fff;
    border-radius: calc(var(--toggle-diameter) / 2);
    position: absolute;
    top: var(--button-toggle-offset);
    transform: translateX(var(--button-toggle-offset));
    box-shadow: var(--toggle-shadow-offset) 0 calc(var(--toggle-shadow-offset) * 4) rgba(0, 0, 0, 0.1);
    transition: 0.3s all ease-in-out;
}

.switch input[type="checkbox"]:checked+.slider {
    background-color: var(--color-green);
}

.switch input[type="checkbox"]:checked+.slider::after {
    transform: translateX(calc(var(--button-width) - var(--toggle-diameter) - var(--button-toggle-offset)));
    box-shadow: calc(var(--toggle-shadow-offset) * -1) 0 calc(var(--toggle-shadow-offset) * 4) rgba(0, 0, 0, 0.1);
}

.switch input[type="checkbox"] {
    display: none;
}

.switch input[type="checkbox"]:active+.slider::after {
    width: var(--toggle-wider);
}

.switch input[type="checkbox"]:checked:active+.slider::after {
    transform: translateX(calc(var(--button-width) - var(--toggle-wider) - var(--button-toggle-offset)));
}

body.dark-mode .switch {
    --color-grey: #444;
    --color-green: #4296f4;
}

body.dark-mode .slider {
    background-color: var(--color-grey);
}

body.dark-mode .slider::after {
    background-color: #fff !important;
}

body.dark-mode .switch input[type="checkbox"]:checked+.slider {
    background-color: var(--color-green);
}

body.dark-mode .switch input[type="checkbox"]:checked+.slider::after {
    background-color: #fff !important;
}

@media (max-width: 600px) {
    .settings-page {
        padding: 0;
    }

    .settings-header,
    .settings-body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .settings-header {
        padding-top: 18px;
        padding-bottom: 8px;
    }

    .settings-body {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .settings-item {
        padding: 12px 8px;
    }
}

body.dark-mode .settings-page {
    background: #23262f;
    color: #e0e0e0;
}

body.dark-mode .settings-header {
    background: #23262f;
    border-bottom: 1px solid #333;
}

body.dark-mode .settings-title {
    color: #90caf9;
}

body.dark-mode .settings-label {
    color: #e0e0e0;
}

body.dark-mode .settings-body {
    background: #23262f;
}

body.dark-mode .settings-item {
    background: #23262f;
    border: 1px solid #333;
}

body.dark-mode .settings-item:hover {
    background: #263238;
}

body.dark-mode .switch .slider {
    background: #333;
}

body.dark-mode .switch input:checked+.slider {
    background: linear-gradient(90deg, #1976d2 60%, #90caf9 100%);
}

body.dark-mode .slider:before {
    background: #23262f;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.18);
}

body.dark-mode .switch input:checked+.slider:before {
    background: #1976d2;
}

body.dark-mode .settings-back {
    color: #90caf9;
}

body.large-font {
    font-size: 1.35em;
}

body.large-font .header-title,
body.large-font h1,
body.large-font .group-title,
body.large-font .settings-title {
    font-size: 2.2rem;
}

body.large-font .settings-label,
body.large-font .settings-item {
    font-size: 1.35rem;
}

body.large-font .contact-name {
    font-size: 1.45rem;
    max-width: 100vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 600px) {
    body.large-font .contact-name {
        max-width: calc(11ch + 12px);
    }
}

body.large-font .contact-position {
    font-size: 1.18rem;
}

body.large-font .search-input {
    font-size: 1.25rem;
}

body.large-font .search-history-item {
    font-size: 1.25rem;
}

body.large-font .alphabet-letter {
    font-size: 1.25rem;
}

.contact-details-collapse {
    background: #f8fafd;
    border-radius: 0 0 16px 16px;
    margin-left: 72px;
    margin-right: 0;
    margin-bottom: 0;
    box-shadow: none;
    transition: max-height 0.18s cubic-bezier(.4, 0, .2, 1), padding 0.18s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
    max-height: 0;
    padding: 0 0;
    position: static;
}

.contact-details-inner {
    padding: 10px 0 10px 0;
    color: #222;
    font-size: 1.08rem;
}

.contact-details-inner b {
    color: #1976d2;
    font-weight: 600;
    margin-right: 8px;
}

.contact-item.open {
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.10);
    border-radius: 18px 18px 0 0;
}

.contact-details-collapse>div {
    padding: 0 0 0 0;
}

body.dark-mode .contact-details-collapse {
    background: #23262f;
}

body.dark-mode .contact-details-inner {
    color: #e0e0e0;
}

body.dark-mode .contact-details-inner b {
    color: #90caf9;
}

body.dark-mode .match-highlight {
    background: rgba(144, 202, 249, 0.12);
    color: #d7eaff;
    border: 1px solid rgba(144, 202, 249, 0.22);
}

.empty-state {
    padding: 24px 12px;
    text-align: center;
    color: #666;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    margin: 6px auto 10px;
    border-radius: 50%;
    background: #e3f2fd;
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.10);
}

.empty-state-text {
    font-size: 1.02rem;
    font-weight: 500;
}

body.dark-mode .empty-state {
    color: #b0b0b0;
}

body.dark-mode .empty-state-icon {
    background: #263238;
    color: #90caf9;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}

::-webkit-scrollbar {
    width: 10px;
    background: #f4f4f4;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #757575 40%, #bdbdbd 100%);
    border-radius: 8px;
    border: 2px solid #f4f4f4;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #616161 40%, #757575 100%);
}

::-webkit-scrollbar-track {
    background: #eeeeee;
    border-radius: 8px;
}

html {
    scrollbar-width: thin;
    scrollbar-color: #757575 #eeeeee;
}

body {
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

.job-title {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

.contact-name {
    font-size: 0.95rem;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    font-weight: 500;
}

.search-back,
.settings-back {
    border: none;
    background: none;
    padding: 6px;
    border-radius: 50%;
    transition: background 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-back:hover,
.settings-back:hover {
    background: #f0f0f0;
}

.settings-page {
    display: none;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.35s, transform 0.35s;
}

.settings-page.active {
    display: block;
    opacity: 1;
    transform: scale(1);
}

.contact-item {
    min-height: 60px;
}

body.no-animations *,
body.no-animations *:before,
body.no-animations *:after {
    transition: none !important;
    animation: none !important;
}

body.no-animations .search-overlay,
body.no-animations .search-overlay.active,
body.no-animations .settings-page,
body.no-animations .settings-page.active,
body.no-animations .alphabet-popup,
body.no-animations .alphabet-popup.active,
body.no-animations .contact-details-collapse {
    transition: none !important;
    animation: none !important;
}

.loader {
    position: fixed;
    left: 0;
    right: 0;
    top: -48px;
    width: 100vw;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    background: transparent;
    transition: opacity 0.25s, transform 0.35s cubic-bezier(.4, 0, .2, 1);
}

.loader.active {
    display: flex !important;
    opacity: 1;
    pointer-events: none;
}

.loader-inner {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-inner div {
    width: 8%;
    height: 24%;
    background: rgb(128, 128, 128);
    position: absolute;
    left: 50%;
    top: 30%;
    opacity: 0;
    border-radius: 50px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
    animation: fade458 1s linear infinite;
}

@keyframes fade458 {
    from { opacity: 1; }
    to { opacity: 0.25; }
}

.loader .bar1 { transform: rotate(0deg) translate(0, -130%); animation-delay: 0s; }
.loader .bar2 { transform: rotate(30deg) translate(0, -130%); animation-delay: -1.1s; }
.loader .bar3 { transform: rotate(60deg) translate(0, -130%); animation-delay: -1s; }
.loader .bar4 { transform: rotate(90deg) translate(0, -130%); animation-delay: -0.9s; }
.loader .bar5 { transform: rotate(120deg) translate(0, -130%); animation-delay: -0.8s; }
.loader .bar6 { transform: rotate(150deg) translate(0, -130%); animation-delay: -0.7s; }
.loader .bar7 { transform: rotate(180deg) translate(0, -130%); animation-delay: -0.6s; }
.loader .bar8 { transform: rotate(210deg) translate(0, -130%); animation-delay: -0.5s; }
.loader .bar9 { transform: rotate(240deg) translate(0, -130%); animation-delay: -0.4s; }
.loader .bar10 { transform: rotate(270deg) translate(0, -130%); animation-delay: -0.3s; }
.loader .bar11 { transform: rotate(300deg) translate(0, -130%); animation-delay: -0.2s; }
.loader .bar12 { transform: rotate(330deg) translate(0, -130%); animation-delay: -0.1s; }

#pull-loader { display: none; }

.header-row, h1 {
    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1);
}

.alphabet-sidebar {
    position: absolute;
    right: 0;
    top: 50%;
    left: auto;
    width: 40px;
    height: auto;
    min-height: 0;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 16px 0 0 16px;
    z-index: 9999;
    will-change: transform;
    pointer-events: auto;
    overflow: hidden;
    gap: 14px;
    padding: 16px 0;
    transform: translateY(-50%);
}

.alphabet-sidebar.many-letters {
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100vh !important;
    max-height: 100vh !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    padding-top: 8px;
    padding-bottom: 8px;
}

.alphabet-sidebar:not(.many-letters) {
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    --alpha-gap: 14px;
    gap: var(--alpha-gap) !important;
    padding-top: calc(var(--alpha-gap) / 2) !important;
    padding-bottom: calc(var(--alpha-gap) / 2) !important;
    justify-content: center !important;
}

.alphabet-sidebar:not(.many-letters) .alphabet-letter {
    margin: 0 !important;
}

@media (max-width: 412px) {
    .alphabet-sidebar:not(.many-letters) {
        position: fixed !important;
        right: 0 !important;
        left: auto !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        height: auto !important;
        max-height: calc(100vh - 24px) !important;
        --alpha-gap: 14px;
        gap: var(--alpha-gap) !important;
        padding-top: calc(var(--alpha-gap) / 2) !important;
        padding-bottom: calc(var(--alpha-gap) / 2) !important;
        justify-content: center !important;
        overflow-y: auto !important;
    }

    .alphabet-sidebar:not(.many-letters) .alphabet-letter {
        margin: 0 !important;
    }
}

@media (max-width: 375px) {
    .alphabet-sidebar:not(.many-letters) {
        position: fixed !important;
        right: 0 !important;
        left: auto !important;
        top: 100px !important;
        bottom: auto !important;
        transform: none !important;
        height: auto !important;
        max-height: calc(100vh - 120px) !important;
        --alpha-gap: 4px;
        gap: var(--alpha-gap) !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
    }

    .alphabet-sidebar:not(.many-letters) .alphabet-letter {
        margin: 0 !important;
    }
}

.alphabet-sidebar.many-letters {
    position: fixed !important;
    right: 0 !important;
    left: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    height: auto !important;
    max-height: calc(100vh - 24px) !important;
    overflow-y: auto !important;
    gap: 3px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    justify-content: flex-start !important;
}

@media (max-width: 412px) {
    .alphabet-sidebar.many-letters {
        top: 50% !important;
        transform: translateY(-50%) !important;
        max-height: calc(100vh - 24px) !important;
        gap: 3px !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
}

@media (max-width: 375px) {
    .alphabet-sidebar.many-letters {
        top: 100px !important;
        transform: none !important;
        max-height: calc(100vh - 120px) !important;
        gap: 2px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

.alphabet-sidebar.many-letters::before,
.alphabet-sidebar.many-letters::after {
    content: none !important;
    flex: 0 0 auto !important;
}

.large-font,
.large-font h1,
.large-font .settings-label,
.large-font .search-input,
.large-font .contact-list,
.large-font .search-history-list,
.large-font .search-empty,
.large-font .contact-name,
.large-font .contact-lavozim,
.large-font .error-message,
.large-font .alert,
.large-font .modal-title,
.large-font .modal-body,
.large-font .form-label,
.large-font .form-control,
.large-font .form-select {
    font-size: 1.25em !important;
}

.large-font .switch,
.large-font .slider,
.large-font input[type="checkbox"],
.large-font select {
    font-size: initial !important;
}

.alphabet-sidebar.hidden {
    display: none !important;
}

.search-summary {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    margin: 8px 16px 4px 20px;
    min-height: 1.25em;
    line-height: 1.25;
    color: #222;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
}

body.dark-mode .search-summary {
    color: #e0e0e0;
}

@media (max-width: 600px) {
    .search-summary {
        margin: 8px 8px 4px 16px;
        font-size: 0.98rem;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (hover: none) and (pointer: coarse) {
    .alphabet-letter:hover {
        background: none !important;
        color: #1976d2 !important;
    }

    .alphabet-letter.tapped,
    .alphabet-letter.active {
        color: #1976d2 !important;
        background: #e3f2fd !important;
    }

    body.dark-mode .alphabet-letter:hover {
        background: none !important;
        color: #90caf9 !important;
    }

    body.dark-mode .alphabet-letter.tapped,
    body.dark-mode .alphabet-letter.active {
        color: #90caf9 !important;
        background: #263238 !important;
    }
}