@import url('css/layout.css?v=20261009_overlay');
@import url('css/crm.css?v=20261009_overlay');
@import url('css/settings.css');
@import url('css/templates.css');
@import url('css/chat.css?v=20261008_v4');
@import url('css/composer.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fff; /* White background */
    color: #111; /* Dark text */
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.plan-expired-active {
    background: #f7f8fa;
}

body.usage-page {
    background: #f6f8fb;
    color: #111827;
}

.usage-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.usage-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.usage-header h1 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 28px;
    line-height: 1.2;
}

.usage-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.usage-refresh-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.usage-refresh-button:hover {
    background: #f8fafc;
}

.usage-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.usage-metric {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.usage-metric span {
    display: block;
    color: #64748b;
    font-size: 13px;
    line-height: 1.3;
}

.usage-metric strong {
    display: block;
    margin-top: 8px;
    color: #111827;
    font-size: 28px;
    line-height: 1;
}

.usage-section {
    margin-top: 18px;
}

.usage-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.usage-section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 17px;
    line-height: 1.3;
}

.usage-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.usage-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 14px;
}

.usage-table th,
.usage-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
}

.usage-table th {
    color: #475569;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

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

.usage-empty-cell {
    color: #64748b;
    text-align: center !important;
}

@media (max-width: 760px) {
    .usage-shell {
        width: min(100% - 20px, 1180px);
        padding-top: 18px;
    }

    .usage-header {
        align-items: stretch;
        flex-direction: column;
    }

    .usage-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .usage-metrics {
        grid-template-columns: 1fr;
    }
}

.app-container[hidden],
body.app-page:not(.subscription-active) .app-container {
    display: none !important;
}

.plan-expired-view {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f7f8fa;
}

.plan-expired-view[hidden] {
    display: none;
}

.plan-expired-panel {
    width: min(100%, 420px);
    padding: 28px 24px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
    text-align: center;
}

.plan-expired-mark {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff4e5;
    color: #b45309;
}

.plan-expired-mark svg {
    width: 30px;
    height: 30px;
}

.plan-expired-panel h1 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
}

.plan-expired-panel p {
    margin: 0;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.5;
}

.plan-expired-logout {
    margin-top: 22px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.plan-expired-logout:hover {
    background: #f9fafb;
}

:root {
    --app-navbar-height: 73px;
    --chat-view-header-height: 57px;
    --chat-ai-toggle-height: 41px;
    --chat-input-form-height: 74px;
}

@media (max-width: 640px) {
    :root {
        --app-navbar-height: 65px;
    }
}

@media (max-width: 380px) {
    :root {
        --app-navbar-height: 61px;
    }
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    border: 1px solid #25D366;
}

.login-box h1 {
    margin-bottom: 10px;
    color: #25D366;
    font-size: 24px;
}

.subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #111;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #25D366;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    color: #111;
    background-color: #fff;
}

.phone-number-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.country-code-select {
    flex: 0 0 92px;
    width: 92px;
    min-width: 92px;
    padding-left: 8px;
    padding-right: 6px;
    font-size: 13px;
    line-height: 1.2;
}

.phone-number-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #25D366;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #667781;
    font-size: 12px;
}

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

/* Button Styles */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #25D366;
    color: #000;
    border: 1.5px solid #25D366;
    letter-spacing: 0.01em;
    font-weight: 600;
}

.btn-primary:hover {
    background: #20b858;
    border-color: #20b858;
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Error Message */
.error-message {
    margin-top: 15px;
    padding: 12px;
    background-color: #fee;
    color: #c33;
    border-radius: 4px;
    font-size: 14px;
}

/* Embedded Signup & OTP Status */
.embedded-signup-status {
    margin-top: 16px;
    min-height: 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    text-align: center;
}

.embedded-signup-status.is-error {
    color: #dc2626;
    font-weight: 500;
}

.embedded-signup-status.is-success {
    color: #15803d;
    font-weight: 500;
}

.login-support-action {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.login-support-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #2563eb;
    border-radius: 6px;
    background-color: #eff6ff;
    color: #1d4ed8;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
    box-sizing: border-box;
}

.login-support-btn:hover {
    background-color: #dbeafe;
    border-color: #1d4ed8;
    color: #1e40af;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2);
}

.login-support-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    text-align: center;
}

.login-support-fallback {
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
}

/* Info Box */
.info-box {
    margin-bottom: 20px;
    padding: 12px;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 428px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
    background-color: #fff; /* White background */
    margin: 0;
    position: relative;
}

.app-container.crm-expanded {
    max-width: none;
    box-shadow: none;
    height: calc(100vh - var(--app-navbar-height));
    height: calc(100dvh - var(--app-navbar-height));
    max-height: calc(100vh - var(--app-navbar-height));
    max-height: calc(100dvh - var(--app-navbar-height));
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0;
}

.app-container.crm-expanded .app-content {
    height: 100%;
    min-height: 0;
}

.app-container.crm-expanded #crmTab {
    overflow: hidden;
}

@media (min-width: 429px) {
    .app-container {
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
}

/* Main black header */
.main-header {
    width: 100%;
    background: #000; /* Pure black for header */
    color: #fff;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid #25D366;
}

/* Responsive width for tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .app-container {
        max-width: 500px;
    }
    
    .bottom-nav {
        max-width: 500px;
    }
}

/* Workspace Panes and 3-Pane Responsive Layout styles extracted to public/css/layout.css */

/* Response Box */
.response-box {
    margin-top: 16px;
    padding: 14px 12px 14px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    background: #fafafa;
    color: #111;
    border: 1.1px solid #eee;
}

.response-box.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.response-box.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.response-box.pending {
    background-color: #eef6ff;
    color: #164b7a;
    border: 1px solid #9ecaf3;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    /* Remove max-width so it always fills mobile width */
    background: #000;
    border-top: 1.5px solid #111;
    display: flex;
    justify-content: stretch;
    align-items: stretch;
    padding: 0;
    box-shadow: 0 -2px 12px rgba(0,0,0,.24);
    z-index: 110;
    gap: 0;
}

.bottom-nav.hidden {
    display: none;
}

@media (min-width: 429px) {
    .bottom-nav {
        left: 50%;
        transform: translateX(-50%);
    }
}

.nav-tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 0 8px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    color: #8a929a;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.01em;
    min-width: 0;
    /* Remove explicit width, rely on flex */
}

.nav-tab.active {
    color: #25D366;
    border-top: 2.5px solid #25D366;
    background: transparent;
}

.nav-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
}

/* View Container */
.view-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    flex: 1;
}

.chat-list-view {
    background-color: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.view-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.view-header h2 {
    margin: 0;
    flex: 1;
}

/* Chat List Header */
.chat-list-header {
    background-color: #075E54;
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-list-header h1 {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    color: white;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
}

/* Search Container */
.chat-channel-tabs {
    background-color: #f0f2f5;
    padding: 2px 16px 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    margin-top: -2px;
}

.chat-channel-pill {
    width: 34px;
    min-height: 34px;
    border: 1px solid #d4dde3;
    border-radius: 999px;
    background: #fff;
    color: #54656f;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 6px 7px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chat-channel-pill:hover {
    border-color: #b8c6ce;
    color: #111b21;
}

.chat-channel-pill.active {
    width: auto;
    border-color: #25d366;
    background: #e7f8ee;
    color: #0b6b45;
    gap: 8px;
    padding: 6px 10px;
}

.chat-channel-label,
.chat-channel-count {
    display: none;
}

.chat-channel-pill.active .chat-channel-label,
.chat-channel-pill.active .chat-channel-count {
    display: inline-flex;
}

.chat-channel-logo {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-channel-logo svg {
    width: 18px;
    height: 18px;
    display: block;
}

.chat-channel-logo-whatsapp {
    color: #25d366;
}

.chat-channel-pill.active .chat-channel-logo-whatsapp {
    color: #128c7e;
}

.chat-channel-logo-website {
    color: #3b82f6;
}

.chat-channel-logo-template {
    color: #8b5cf6;
}

.chat-channel-logo-voice {
    color: #0f766e;
}

.chat-channel-count {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #edf2f5;
    color: #54656f;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 700;
}

.chat-channel-pill.active .chat-channel-count {
    background: #25d366;
    color: #fff;
}

.search-container {
    background-color: #f0f2f5;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.search-container.is-selection-sticky {
    position: fixed;
    top: var(--search-sticky-top, var(--app-navbar-height, 73px));
    left: var(--search-sticky-left, 0);
    width: var(--search-sticky-width, 100%);
    box-sizing: border-box;
    z-index: 1500;
    box-shadow: 0 2px 8px rgba(17, 27, 33, 0.12);
    border-bottom: 1px solid #d1d7db;
}

.search-container-spacer {
    display: none;
    width: 100%;
    flex-shrink: 0;
}

.search-box {
    background-color: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.search-filter-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #667781;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.search-filter-btn:hover,
.search-filter-btn.is-open {
    background: #e6eaee;
    color: #111b21;
}

.no-reply-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #e6eaee;
    border-radius: 16px;
    background: #fff;
    color: #667781;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.no-reply-toggle.active {
    background: #e6eaee;
    color: #111b21;
    border-color: #d1d7db;
}

.no-reply-toggle:hover {
    background: #f0f2f5;
}

.no-reply-count {
    background: #25d366;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

.no-reply-count:empty {
    display: none;
}

.select-all-control {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #c8d0d5;
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.select-all-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #25D366;
    cursor: pointer;
}

.selection-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #c8d0d5;
    background: #fff;
    color: #128c7e;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
}

.selection-action-btn svg {
    width: 16px;
    height: 16px;
}

.selection-action-btn:hover {
    background: #edfdf5;
    border-color: #25d366;
}

.selection-action-btn-archive {
    color: #0b6b45;
}

.search-icon {
    color: #667781;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: none;
    font-size: 14px;
    color: #111b21;
}

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

.chat-filter-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 16px;
    left: 16px;
    background: #fff;
    border: 1px solid #d9e1e7;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(17, 27, 33, 0.12);
    padding: 10px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 5;
}

.chat-filter-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.chat-filter-menu-title {
    font-size: 12px;
    font-weight: 600;
    color: #667781;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chat-filter-clear {
    border: none;
    background: none;
    color: #25D366;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.chat-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chat-filter-section {
    padding: 2px 0 12px;
}

.chat-filter-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #111b21;
    cursor: pointer;
}

.chat-filter-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #25D366;
    cursor: pointer;
}

.chat-filter-chip {
    max-width: 100%;
    border: 1px solid #d9e1e7;
    border-radius: 8px;
    background: #fff;
    color: #111b21;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.chat-filter-chip-label,
.chat-filter-chip-line {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-filter-chip-line {
    margin-top: 3px;
    color: #667781;
    font-size: 11px;
}

.chat-filter-chip.active .chat-filter-chip-line {
    color: #0b6b45;
}

.chat-filter-chip:hover {
    border-color: #25D366;
    background: #f6fffa;
}

.chat-filter-chip.active {
    border-color: #25D366;
    background: #e7f8ee;
    color: #0b6b45;
}

.chat-filter-empty {
    font-size: 13px;
    color: #667781;
    padding: 6px 2px 2px;
}

.chat-filter-line-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-filter-line-title {
    font-size: 11px;
    font-weight: 700;
    color: #667781;
    text-transform: uppercase;
    letter-spacing: 0;
    padding: 2px 2px 0;
}

.chat-selected-filters {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: -2px;
}

.chat-selected-filter-tag {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #e7f8ee;
    color: #0b6b45;
    border: 1px solid #bfe8cf;
    font-size: 12px;
    line-height: 1.2;
}

.chat-selected-filter-line {
    color: #667781;
    font-size: 11px;
    margin-left: -3px;
}

.chat-selected-filter-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-selected-filter-remove {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.chat-selected-filter-remove:hover {
    background: rgba(11, 107, 69, 0.12);
}

/* Chat List Styles */
.chat-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background-color: #fff;
    padding-bottom: 84px;
}

/* Chat List Floating Action Button (New Chat) */
.chat-list-fab {
    position: absolute;
    bottom: calc(60px + 20px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: #25D366;
    color: #ffffff;
    border: none;
    outline: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(11, 107, 69, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    transition: transform 0.18s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.18s ease, background-color 0.18s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#conversationsTab:not(.active) ~ #newChatBtn {
    display: none !important;
}

@media (min-width: 900px) {
    .chat-list-fab {
        bottom: 80px;
        right: 20px;
    }
}

.chat-list-fab:hover {
    background-color: #20ba59;
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28), 0 3px 8px rgba(11, 107, 69, 0.4);
}

.chat-list-fab:active {
    transform: scale(0.94);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.chat-list-fab:focus-visible {
    outline: 2px solid #00a884;
    outline-offset: 2px;
}

.chat-list-fab svg {
    width: 26px;
    height: 26px;
    display: block;
    pointer-events: none;
}

.empty-state-plus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #25D366;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    margin: 0 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.empty-state-plus-btn:hover {
    background-color: #20ba59;
    transform: scale(1.1);
}

.chat-list-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    pointer-events: none;
    z-index: 2;
}

.chat-list-loading-overlay .chat-state {
    margin: 0;
}

.archived-chats-view {
    background: #fff;
}

.archived-chats-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #e9edef;
    background: #fff;
}

.archived-chats-header .back-btn {
    color: #111b21;
}

.archived-chats-header-copy {
    min-width: 0;
}

.archived-chats-title {
    font-size: 19px;
    font-weight: 600;
    color: #111b21;
    line-height: 1.2;
}

.archived-chats-subtitle {
    font-size: 13px;
    color: #667781;
    line-height: 1.2;
    margin-top: 2px;
}

.chat-item-shell {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e9edef;
    background: #fff;
}

.chat-item-shell:last-child {
    border-bottom: none;
}

.chat-item {
    border-bottom: none;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 12px;
    position: relative;
}

.chat-item-main {
    position: relative;
    z-index: 1;
    transition: transform 0.22s ease;
    will-change: transform;
}

.chat-item-shell.swiped .chat-item-main {
    transform: translateX(-88px);
}

.chat-item-action {
    position: absolute;
    inset: 0 0 0 auto;
    width: 88px;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: #00a884;
}

.chat-item-action-btn {
    width: 100%;
    border: none;
    background: transparent;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    touch-action: manipulation;
}

.chat-item-action-btn svg {
    width: 20px;
    height: 20px;
}

.chat-item-action-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: -2px;
}

.chat-item-shell.selection-active .chat-item-action {
    display: none;
}

.chat-item.selection-active {
    user-select: none;
}

.chat-item.selected {
    background-color: #e7f8ee;
}

.chat-item:hover {
    background-color: #f5f6f6;
}

.chat-item:active {
    background-color: #e9edef;
}

.chat-item-avatar {
    width: 49px;
    height: 49px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 17px;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
}

.chat-selection-tick {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #25D366;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.chat-selection-tick svg {
    width: 10px;
    height: 10px;
    color: #fff;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-item-name {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    font-weight: 500;
    color: #111b21;
    font-size: 17px;
    overflow: hidden;
    white-space: nowrap;
}

.chat-item-phone {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.chat-item-meta-inline {
    min-width: 0;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    color: #667781;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.chat-item-meta-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.chat-item-meta-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 3px;
    margin-right: 1px;
    color: #667781;
    cursor: help;
    flex-shrink: 0;
    font-style: normal;
    vertical-align: middle;
    transition: color 0.15s ease;
}

.chat-item-meta-info-icon:hover {
    color: #111b21;
}

.chat-item-meta-info-icon svg {
    display: block;
}

.chat-item-time-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.chat-item-teammate-tag {
    display: flex;
    align-items: center;
}

.chat-item-preview-teammate {
    display: inline-flex;
    margin-left: 6px;
    vertical-align: middle;
}

.teammate-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 17px;
    padding: 0 5px;
    border-radius: 5px;
    background: var(--teammate-tag-color, #64748b);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .04em;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .16);
}

.chat-item-time {
    font-size: 12px;
    color: #667781;
}

.unread-badge {
    background-color: #25D366;
    color: white;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    padding: 0 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.attention-required-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f44336;
    box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(244, 67, 54, 0.35);
    flex: 0 0 auto;
}

.chat-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chat-item-preview {
    font-size: 14px;
    color: #667781;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.delivery-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-right: 1px;
    line-height: 0;
    vertical-align: middle;
}

.delivery-status-icon {
    display: block;
    fill: currentColor;
    opacity: 0.82;
}

.delivery-status-icon--single {
    width: 16px;
    height: 11px;
}

.delivery-status-icon--double {
    width: 16px;
    height: 11px;
}

.delivery-status-fallback {
    display: inline-block;
    font-variant-ligatures: none;
}

.delivery-status-loader {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 1.5px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    opacity: 0.72;
    animation: chat-state-spin 0.75s linear infinite;
}

.chat-item-preview.unread {
    font-weight: 600;
    color: #111b21;
}

.settings-team-color-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667781;
    font-size: 12px;
    font-weight: 600;
    margin-left: auto;
    white-space: nowrap;
    flex: 0 0 auto;
}

.settings-team-color-control input[type="color"] {
    width: 28px;
    height: 24px;
    padding: 1px;
    border: 1px solid #d1d7db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.chat-search-new-chat {
    width: 100%;
    border: none;
    border-bottom: 1px solid #e9edef;
    background: #f5fff8;
    color: #128c7e;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease;
}

.chat-search-new-chat:hover {
    background: #ebfff2;
}

.chat-search-new-chat:active {
    background: #dcf8e7;
}

.chat-search-new-chat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.18);
}

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

.chat-search-new-chat-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-search-new-chat-title {
    font-size: 16px;
    font-weight: 600;
    color: #0b6b45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-search-new-chat-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: #25d366;
}

.chat-archive-row {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    margin: 0;
    border: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 16px;
    background: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: left;
    font: inherit;
    color: inherit;
    box-sizing: border-box;
}

.chat-archive-row:hover {
    background: #f5f6f6;
}

.chat-archive-row:active {
    background: #e9edef;
}

.chat-archive-row:focus {
    outline: none;
}

.chat-archive-row:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(37, 211, 102, 0.35);
}

.chat-archive-row-icon {
    width: 49px;
    height: 49px;
    border-radius: 50%;
    background: #f0f2f5;
    color: #00a884;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-archive-row-icon svg {
    width: 22px;
    height: 22px;
}

.chat-archive-row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chat-archive-row-title {
    font-size: 15px;
    font-weight: 500;
    color: #111b21;
}

.chat-archive-row-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.archived-empty-state {
    padding: 28px 22px;
    color: #667781;
    text-align: center;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid #e9edef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #111b21;
}

.modal-close {
    color: #667781;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px;
    border-top: 1px solid #e9edef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn {
    width: auto;
    min-width: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.form-actions .btn {
    flex: 1;
}

/* Chat View, Conversation Feed, and Messages subsystem styles extracted to public/css/chat.css */

/* Composer, Slash Menu, and Message Input Form styles extracted to public/css/composer.css */

/* Template Builder and Template Catalog subsystem styles extracted to public/css/templates.css */

/* Navbar Styles */
#navbarMount {
    height: var(--app-navbar-height);
    min-height: var(--app-navbar-height);
}

.navbar {
    width: 100%;
    background: #000; /* Pure black for navbar (matches other project) */
    border-bottom: 1px solid #25D366;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.clustal-landing-logo {
    height: 40px;
    width: auto;
    display: block;
}

@media (max-width: 640px) {
    .clustal-landing-logo {
        height: 32px;
    }
}

@media (max-width: 380px) {
    .clustal-landing-logo {
        height: 28px;
    }
}

.navbar-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

@media (min-width: 768px) {
    .navbar-right {
        flex-direction: row;
        align-items: center;
        gap: 32px;
    }
}

.navbar-product-nav {
    display: flex;
    order: 2;
}

@media (min-width: 768px) {
    .navbar-product-nav {
        order: 1;
    }
}

.navbar-auth-group {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 1;
}

@media (min-width: 768px) {
    .navbar-auth-group {
        order: 2;
        gap: 16px;
    }
}

.navbar-route-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.navbar-route-switcher[hidden],
.navbar-link-button[hidden],
.navbar-phone-number-group[hidden],
.navbar-bridge-status[hidden],
.navbar-overflow-group[hidden],
.navbar-overflow-menu[hidden],
.navbar-phone-number-menu[hidden] {
    display: none !important;
}

.navbar-bridge-status {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}

.navbar-bridge-status:hover,
.navbar-bridge-status:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
}

.navbar-bridge-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #9ca3af;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* Online State */
.navbar-bridge-status.is-online {
    background: rgba(37, 211, 102, 0.12);
    border-color: rgba(37, 211, 102, 0.4);
    color: #25D366;
}

.navbar-bridge-status.is-online:hover,
.navbar-bridge-status.is-online:focus-visible {
    background: rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.6);
}

.navbar-bridge-status.is-online .navbar-bridge-status-dot {
    background: #25D366;
    box-shadow: 0 0 6px rgba(37, 211, 102, 0.7);
}

/* Offline State */
.navbar-bridge-status.is-offline {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.45);
    color: #f87171;
}

.navbar-bridge-status.is-offline:hover,
.navbar-bridge-status.is-offline:focus-visible {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.65);
}

.navbar-bridge-status.is-offline .navbar-bridge-status-dot {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}

/* Checking State */
.navbar-bridge-status.is-checking {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.navbar-bridge-status.is-checking .navbar-bridge-status-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
    animation: navbarBridgePulse 1.2s infinite ease-in-out;
}

@keyframes navbarBridgePulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.85);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

.navbar-phone-number-group {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.navbar-phone-number-selector {
    width: clamp(148px, 22vw, 240px);
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.navbar-phone-number-selector:hover,
.navbar-phone-number-selector:focus-visible,
.navbar-phone-number-selector[aria-expanded="true"] {
    border-color: rgba(37, 211, 102, 0.45);
    background: rgba(37, 211, 102, 0.12);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.14);
}

.navbar-phone-number-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.navbar-phone-number-title,
.navbar-phone-number-meta {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-phone-number-title {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.navbar-phone-number-meta {
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 10px;
    font-weight: 500;
}

.navbar-phone-number-chevron {
    width: 8px;
    height: 8px;
    border-right: 1.6px solid rgba(255, 255, 255, 0.72);
    border-bottom: 1.6px solid rgba(255, 255, 255, 0.72);
    transform: rotate(45deg) translateY(-1px);
    flex: 0 0 auto;
}

.navbar-phone-number-selector[aria-expanded="true"] .navbar-phone-number-chevron {
    transform: rotate(-135deg) translateY(-1px);
}

.navbar-phone-number-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(280px, calc(100vw - 32px));
    max-height: min(320px, calc(100vh - var(--app-navbar-height) - 24px));
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(17, 27, 33, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    z-index: 45;
}

.navbar-phone-number-option {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.navbar-phone-number-option:hover,
.navbar-phone-number-option:focus-visible {
    background: rgba(37, 211, 102, 0.14);
    outline: none;
}

.navbar-phone-number-option.is-selected {
    background: rgba(37, 211, 102, 0.2);
    color: #25D366;
}

.navbar-phone-number-option-title,
.navbar-phone-number-option-meta {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-phone-number-option-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.navbar-phone-number-option-meta {
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .navbar-auth-group {
        gap: 6px;
    }

    .navbar-phone-number-selector {
        width: min(42vw, 164px);
        min-height: 34px;
        padding-inline: 10px 8px;
    }

    .navbar-phone-number-title {
        font-size: 11px;
    }

    .navbar-phone-number-meta {
        display: none;
    }

    .navbar-bridge-status {
        min-height: 30px;
        padding: 4px 9px;
        font-size: 11px;
        gap: 5px;
    }
}

.navbar-overflow-group {
    position: relative;
    display: flex;
    align-items: center;
}

.navbar-overflow-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: #f0f7f3;
    color: #128c4a;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(17, 27, 33, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.navbar-overflow-btn:hover,
.navbar-overflow-btn[aria-expanded="true"] {
    border-color: rgba(37, 211, 102, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}

.navbar-overflow-btn:active {
    transform: scale(0.98);
}

.navbar-profile-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.navbar-profile-avatar-image[hidden] {
    display: none;
}

.navbar-profile-avatar-fallback {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

.navbar-overflow-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(17, 27, 33, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    z-index: 40;
}

.navbar-account-info {
    display: grid;
    gap: 8px;
    margin: 2px 2px 6px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-account-info[hidden] {
    display: none;
}

.navbar-account-info-row {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.navbar-account-info-row[hidden] {
    display: none !important;
}

.navbar-account-info-label {
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.navbar-account-info-value {
    max-width: 100%;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-overflow-menu-item {
    width: 100%;
    display: block;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    background: transparent;
    color: #fff;
    text-align: left;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-overflow-menu-item:hover {
    background: rgba(37, 211, 102, 0.14);
    color: #25D366;
}

.navbar-link {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
    white-space: nowrap;
}

.navbar-link-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 8px 14px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
}

@media (min-width: 640px) {
    .navbar-link {
        font-size: 14px;
    }
}

.navbar-link:hover {
    color: #25D366;
}

.navbar-link-button:hover,
.navbar-link-button.is-active {
    border-color: rgba(37, 211, 102, 0.45);
    background: rgba(37, 211, 102, 0.12);
}

.navbar-link-button.is-active {
    color: #25D366;
}

.navbar-button {
    background-color: #25D366;
    color: #000;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

@media (min-width: 640px) {
    .navbar-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

.navbar-button:hover {
    background-color: #20b858;
}

/* CRM subsystem styles extracted to public/css/crm.css */

.hidden {
    display: none !important;
}

.navbar-product-button {
    background: transparent;
    color: #fff;
    border: 1px solid transparent;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

@media (min-width: 640px) {
    .navbar-product-button {
        font-size: 14px;
        padding: 4px 12px;
    }
}

.navbar-product-button:hover {
    color: #25D366;
    background-color: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
}

/* Mobile Responsive - App is always mobile-first */
@media (max-width: 428px) {
    .app-container {
        max-width: 100%;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    }
    
/* Prevent zoom on iOS inputs */
    .form-group input,
    .form-group textarea,
    .form-group select {
    font-size: 16px;
}

/* Settings & Billing subsystem styles extracted to public/css/settings.css */
