:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.08);
    --bg: #f8f9fa;
    --text: #111827;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --card-bg: #ffffff;
    --success: #059669;
    --success-light: rgba(5, 150, 105, 0.08);
    --danger: #dc2626;
    --danger-light: rgba(220, 38, 38, 0.08);
    --warning: #d97706;
    --warning-light: rgba(217, 119, 6, 0.08);
}

* {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

body.dashboard-body {
    height: 100vh;
    overflow: hidden;
}

/* ============ BUTTONS ============ */

.btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 10px 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

.btn-primary:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.btn-outline-primary {
    color: var(--primary);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 10px 20px;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-danger {
    border-radius: 10px;
    font-weight: 500;
    border-width: 1.5px;
    transition: all 0.2s ease;
}

.btn-outline-danger:hover {
    transform: translateY(-1px);
}

/* ============ CARDS ============ */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.01);
}

/* ============ FORMS ============ */

.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text);
    margin-bottom: 6px;
}

.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text);
    background-color: #fafbfc;
    transition: all 0.2s ease;
}

.form-control:hover, .form-select:hover {
    border-color: #d1d5db;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.form-control::placeholder {
    color: #b8bcc4;
}

/* ============ BADGES ============ */

.badge-online {
    background: var(--success-light);
    color: var(--success);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-online::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
}

.tag-input-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: text;
    min-height: 42px;
    transition: border-color 0.15s;
}
.tag-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}
.tag-input-field {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.84rem;
    flex: 1;
    min-width: 80px;
    padding: 2px 0;
}
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #EEF2FF;
    color: #4F46E5;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tag-chip-remove {
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.tag-chip-remove:hover {
    opacity: 1;
}

.badge-offline {
    background: var(--danger-light);
    color: var(--danger);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-offline::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-block;
    text-transform: capitalize;
}
.status-sent { background: var(--primary-light); color: var(--primary); }
.status-delivered { background: var(--success-light); color: var(--success); }
.status-failed { background: var(--danger-light); color: var(--danger); }
.status-pending, .status-queued, .status-sending, .status-received { background: var(--warning-light); color: var(--warning); }

/* ============ SIDEBAR ============ */

.sidebar {
    width: 240px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid var(--border-light);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.sidebar-nav {
    padding: 8px 10px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 16px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.15s ease;
    margin-bottom: 1px;
}

.sidebar-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-user.ready {
    opacity: 1;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout {
    color: var(--text-light);
    font-size: 1rem;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.sidebar-logout:hover {
    color: var(--danger);
    background: var(--danger-light);
}

/* ============ LAYOUT ============ */

.topbar {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    padding: 16px 32px;
    height: 56px;
    background: white;
    border-bottom: 1px solid var(--border-light);
}

.page-loader {
    position: fixed;
    top: 56px;
    left: 240px;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

.page-loader-icon {
    animation: loaderPulse 1s ease-in-out infinite;
    border-radius: 10px;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.main-content {
    margin-left: 240px;
    margin-top: 56px;
    padding: 24px 32px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.main-content.ready {
    opacity: 1;
}

/* ============ STATS ============ */

.stat-card {
    padding: 18px 20px;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-card .stat-info {
    flex: 1;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.stat-icon-blue { background: var(--primary-light); color: var(--primary); }
.stat-icon-green { background: var(--success-light); color: var(--success); }
.stat-icon-red { background: var(--danger-light); color: var(--danger); }
.stat-icon-amber { background: var(--warning-light); color: var(--warning); }

/* Device breakdown rows */
.device-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.device-row:last-child {
    border-bottom: none;
}

.device-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.device-dot.online {
    background: var(--success);
    box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
}

.device-dot.offline {
    background: var(--danger);
}

/* ============ TABLES ============ */

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1.5px solid var(--border);
    padding: 14px 16px;
    background: #fafbfc;
}

.table td {
    vertical-align: middle;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.83rem;
}

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

.table tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

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

/* ============ EMPTY STATE ============ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.8rem;
    margin-bottom: 16px;
    opacity: 0.25;
    color: var(--primary);
}

.empty-state p {
    font-size: 0.88rem;
    margin-bottom: 0;
}

/* ============ AUTH PAGES — SPLIT SCREEN ============ */

.auth-page {
    display: flex;
    min-height: 100vh;
}

/* -- Left Panel -- */

.auth-left {
    flex: 1;
    background: #f0f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
}

.auth-left-content {
    max-width: 420px;
    width: 100%;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.auth-brand-icon {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.auth-brand-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

.auth-headline {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    letter-spacing: -0.025em;
    margin-bottom: 40px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.auth-feature-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid var(--border);
}

.auth-feature strong {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}

/* -- Right Panel -- */

.auth-right {
    flex: 0 0 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 380px;
    animation: authFadeIn 0.4s ease;
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.auth-mobile-brand .auth-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
}

.auth-mobile-brand span {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.auth-form-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.auth-form-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

.auth-form-body .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-form-body .input-icon-wrapper {
    position: relative;
}

.auth-form-body .input-icon-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-form-body .input-icon-wrapper .form-control {
    padding-left: 42px;
}

.auth-form-body .input-icon-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.auth-form-body .form-control {
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    border: 1.5px solid var(--border);
    background-color: #fafbfc;
    transition: all 0.2s ease;
}

.auth-form-body .form-control:hover {
    border-color: #d1d5db;
    background-color: #f5f6f8;
}

.auth-form-body .form-control:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.auth-form-body .form-control::placeholder {
    color: #b8bcc4;
}

.auth-form-body .btn-primary {
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    background: var(--primary);
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
    transition: all 0.2s ease;
}

.auth-form-body .btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.auth-form-body .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.auth-form-footer {
    text-align: center;
    margin-top: 28px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-form-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-form-footer a:hover {
    text-decoration: underline;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-copyright {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 520px;
    text-align: center;
    font-size: 0.68rem;
    color: var(--text-light);
    padding: 10px 0;
}

/* -- Auth Responsive -- */

@media (max-width: 960px) {
    .auth-page {
        flex-direction: column;
    }
    .auth-left {
        display: none;
    }
    .auth-right {
        flex: 1;
        min-height: 100vh;
        background: #f8fafe;
    }
    .auth-mobile-brand {
        display: flex;
    }
    .auth-form-wrapper {
        max-width: 400px;
    }
    .auth-copyright {
        width: 100%;
    }
}

/* ============ TOAST ============ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-msg {
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 0.83rem;
    font-weight: 500;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    animation: toastIn 0.3s ease;
    max-width: 380px;
    backdrop-filter: blur(8px);
}

.toast-msg.toast-success {
    background: var(--success);
}

.toast-msg.toast-error {
    background: var(--danger);
}

.toast-msg.toast-info {
    background: var(--primary);
}

.toast-msg.toast-warning {
    background: var(--warning);
}

.toast-msg.toast-hide {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ============ MODAL ============ */

.modal-backdrop.show {
    backdrop-filter: blur(4px);
}

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.02);
    animation: modalSlideUp 0.25s ease;
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 24px;
}

.modal-header .modal-title {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.modal-body {
    padding: 24px;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ MISC ============ */

.page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-desc {
    color: var(--text-muted);
    font-size: 0.83rem;
    margin: 0;
    line-height: 1.5;
}

.token-display {
    background: #f8f9fb;
    padding: 16px 18px;
    border-radius: 10px;
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    font-size: 0.8rem;
    word-break: break-all;
    user-select: all;
    border: 1.5px solid var(--border);
    color: var(--primary);
    letter-spacing: 0.3px;
}

.char-counter {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 6px;
}

/* Country code picker */
.country-code-select {
    max-width: 120px;
    flex: 0 0 120px;
    font-size: 0.84rem;
    padding: 10px 28px 10px 12px;
    border-right: none;
    border-radius: 10px 0 0 10px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.country-code-select:focus {
    border-right: none;
    z-index: 3;
}

.input-group .country-code-select + .form-control {
    border-left: 1px solid var(--border);
    border-radius: 0 10px 10px 0;
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-light);
    background: none;
    border: none;
    padding: 0;
    font-size: 1rem;
}

.password-toggle:hover {
    color: var(--text-muted);
}

/* ============ INBOX / CHAT ============ */

.inbox-container {
    display: flex;
    gap: 16px;
    height: calc(100vh - 170px);
}

.inbox-sidebar {
    width: 340px;
    flex-shrink: 0;
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inbox-sidebar-header {
    padding: 18px 18px 0;
    flex-shrink: 0;
}

.inbox-sidebar-header h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.inbox-search {
    position: relative;
    margin-bottom: 14px;
}

.inbox-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.82rem;
}

.inbox-search input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 9px 12px 9px 34px;
    font-size: 0.82rem;
    background: var(--bg);
    transition: all 0.2s ease;
    outline: none;
}

.inbox-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    background: white;
}

.inbox-conv-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.conversation-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 72px;
    right: 18px;
    height: 1px;
    background: var(--border-light);
}

.conversation-item:hover {
    background: rgba(37, 99, 235, 0.03);
}

.conversation-item.active {
    background: var(--primary-light);
    border-left-color: var(--primary);
}

.conv-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    font-size: 1.05rem;
}

.conversation-item.active .conv-avatar {
    background: linear-gradient(135deg, var(--primary), #3B5FC7);
    color: white;
}

.conv-name {
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--text);
}

.conv-preview {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
    max-width: 200px;
}

.conv-time {
    font-size: 0.68rem;
    color: var(--text-light);
    white-space: nowrap;
}

.conv-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

/* Chat panel */
.chat-panel {
    flex: 1;
    min-width: 0;
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    background: white;
}

.chat-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #3B5FC7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.chat-header-info h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.chat-header-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.chat-thread {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #f8fafb;
    background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.025) 1px, transparent 0);
    background-size: 20px 20px;
}

.chat-date-sep {
    text-align: center;
    margin: 16px 0;
}

.chat-date-sep span {
    background: white;
    border: 1px solid var(--border-light);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.chat-msg {
    margin-bottom: 4px;
    display: flex;
}

.chat-msg.outbound {
    justify-content: flex-end;
}

.chat-msg.inbound {
    justify-content: flex-start;
}

.chat-msg-inner {
    max-width: 65%;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.84rem;
    line-height: 1.5;
    overflow-wrap: break-word;
}

.chat-outbound {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

.chat-inbound {
    background: white;
    color: var(--text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
}

.chat-meta {
    font-size: 0.66rem;
    color: var(--text-light);
    margin-top: 3px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-msg.outbound .chat-meta {
    justify-content: flex-end;
}

.chat-status {
    font-size: 0.72rem;
}

.chat-status.status-delivered,
.chat-status.status-sent { color: var(--primary); }
.chat-status.status-pending,
.chat-status.status-queued,
.chat-status.status-sending { color: var(--text-light); }
.chat-status.status-failed { color: var(--danger); }

.chat-reply-bar {
    padding: 14px 18px;
    border-top: 1px solid var(--border-light);
    background: white;
    flex-shrink: 0;
}

.chat-reply-bar .input-group {
    background: var(--bg);
    border-radius: 24px;
    border: 1.5px solid var(--border);
    overflow: hidden;
    transition: all 0.2s ease;
}

.chat-reply-bar .input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    background: white;
}

.chat-reply-bar .form-control {
    border: none;
    background: transparent;
    padding: 11px 18px;
    font-size: 0.85rem;
    box-shadow: none !important;
}

.chat-reply-bar .btn {
    border: none;
    border-radius: 0 22px 22px 0;
    padding: 10px 18px;
}

.chat-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-empty-inner {
    text-align: center;
    padding: 40px 20px;
}

.chat-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary);
    font-size: 1.4rem;
}

@media (max-width: 991px) {
    .inbox-container { flex-direction: column; height: auto; }
    .inbox-sidebar { width: 100%; height: 300px; }
    .chat-panel { height: calc(100vh - 540px); min-height: 400px; }
}

/* ============ SETTINGS ============ */

.bg-light-custom {
    background: var(--bg);
}

/* ============ SCROLLBAR ============ */

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============ SELECTION ============ */

::selection {
    background: rgba(37, 99, 235, 0.15);
    color: inherit;
}

/* ============ LINKS ============ */

a {
    transition: color 0.15s ease;
}

/* ============ LANDING PAGE ============ */

/* ---- Landing Page ---- */

.landing-page {
    min-height: 100vh;
    background: #fafbfe;
}

/* Nav */
.landing-nav {
    padding: 14px 24px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.2s ease;
}
.landing-nav-scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.landing-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.landing-logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.landing-logo-text {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}
.landing-nav-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}
.landing-nav-link:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Shared section layout */
.landing-section {
    padding: 80px 24px;
}
.landing-section-alt {
    background: white;
}
.landing-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.landing-section-header {
    text-align: center;
    margin-bottom: 48px;
}
.landing-section-label {
    display: inline-block;
    padding: 5px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}
.landing-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.landing-section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Button sizes */
.landing-btn-lg {
    padding: 12px 32px !important;
    font-size: 0.9rem !important;
}

/* Hero */
.landing-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 24px 80px;
    text-align: center;
}
.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.landing-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}
.landing-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}
.landing-hero-checks {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}
.landing-hero-checks li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
}
.landing-hero-checks svg {
    color: var(--success);
    flex-shrink: 0;
}

/* Hero Split Layout */
.landing-hero-split {
    text-align: left;
}
.landing-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 40px;
}
.landing-hero-text {
    max-width: 520px;
}

/* Animated SMS Demo */
.landing-hero-demo {
    display: flex;
    justify-content: center;
}
.landing-demo-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}
.landing-demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f9fafb;
    border-bottom: 1px solid var(--border-light);
}
.landing-demo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.landing-demo-header-text {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}
.landing-demo-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--success);
    font-weight: 500;
}
.landing-demo-status-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    animation: demoPulse 2s ease-in-out infinite;
}
@keyframes demoPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.landing-demo-field {
    padding: 12px 20px 0;
}
.landing-demo-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.landing-demo-input {
    background: #f9fafb;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    min-height: 40px;
    display: flex;
    align-items: center;
}
.landing-demo-input-msg {
    min-height: 64px;
    align-items: flex-start;
    line-height: 1.5;
}
.landing-demo-cursor {
    color: var(--primary);
    font-weight: 300;
    animation: cursorBlink 0.8s step-end infinite;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.landing-demo-send {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 14px 20px;
    padding: 10px;
    background: #e5e7eb;
    color: #374151;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: default;
    transition: all 0.3s ease;
}
.landing-demo-send-active {
    transform: scale(0.96);
    box-shadow: 0 0 0 4px rgba(229, 231, 235, 0.4);
}
.landing-demo-delivery {
    margin: 14px 20px;
    padding: 14px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}
.landing-demo-delivery-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.landing-demo-delivery-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    flex-shrink: 0;
}
.landing-demo-delivery-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}
.landing-demo-delivery-phone {
    display: block;
    font-size: 0.68rem;
    color: var(--text-light);
}
.landing-demo-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}
.landing-demo-badge-sending {
    background: var(--warning-light);
    color: var(--warning);
}
.landing-demo-badge-delivered {
    background: var(--success-light);
    color: var(--success);
}
.landing-demo-delivery-msg {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.landing-demo-stats {
    display: flex;
    border-top: 1px solid var(--border-light);
}
.landing-demo-stat-item {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    border-right: 1px solid var(--border-light);
}
.landing-demo-stat-item:last-child {
    border-right: none;
}
.landing-demo-stat-val {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}
.landing-demo-stat-lbl {
    display: block;
    font-size: 0.65rem;
    color: var(--text-light);
    margin-top: 1px;
}

/* How It Works Steps */
.landing-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}
.landing-step {
    text-align: center;
    max-width: 260px;
    padding: 0 20px;
    position: relative;
}
.landing-step-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin: 0 auto 18px;
}
.landing-step h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.landing-step p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}
.landing-step-connector {
    display: flex;
    align-items: center;
    color: var(--border);
    padding-top: 60px;
    flex-shrink: 0;
}

/* Cost Comparison */
.landing-comparison {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    max-width: 820px;
    margin: 0 auto;
}
.landing-comparison-card {
    flex: 1;
    max-width: 360px;
    background: #fafbfe;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
}
.landing-comparison-highsms {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.1);
}
.landing-comparison-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.landing-comparison-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.landing-comparison-tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--border-light);
    color: var(--text-muted);
}
.landing-comparison-tag-primary {
    background: var(--primary-light);
    color: var(--primary);
}
.landing-comparison-price {
    margin-bottom: 24px;
}
.landing-comparison-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    display: block;
}
.landing-comparison-amount-primary {
    color: var(--primary);
}
.landing-comparison-per {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.landing-comparison-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
}
.landing-comparison-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.82rem;
    color: var(--text-muted);
}
.landing-comparison-row:last-child {
    border-bottom: none;
}
.landing-comparison-cost {
    font-weight: 600;
    color: var(--text);
}
.landing-comparison-cost-green {
    color: var(--success);
}
.landing-comparison-extras {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-light);
}
.landing-comparison-extras-green {
    color: var(--success);
    font-weight: 500;
}
.landing-comparison-vs {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    padding: 0 20px;
}

/* Savings callout */
.landing-savings {
    text-align: center;
    margin-top: 40px;
    padding: 28px;
    background: var(--primary-light);
    border-radius: 14px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.landing-savings-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.landing-savings-amount {
    display: block;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0;
    letter-spacing: -0.02em;
}

/* Features Grid */
.landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.landing-feature-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 22px;
    text-align: left;
    transition: all 0.2s ease;
}
.landing-feature-card:hover {
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.06);
    transform: translateY(-2px);
}
.landing-feature-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 16px;
}
.landing-feature-icon-ghl {
    background: rgba(5, 150, 105, 0.08);
    color: var(--success);
}
.landing-feature-card h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.landing-feature-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Social Proof */

/* GHL Integration Section */
.landing-ghl-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.landing-ghl-card {
    background: white;
    border: 1px solid rgba(5, 150, 105, 0.15);
    border-radius: 14px;
    padding: 28px 22px;
    text-align: left;
    transition: all 0.2s ease;
}
.landing-ghl-card:hover {
    border-color: rgba(5, 150, 105, 0.3);
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.08);
    transform: translateY(-2px);
}
.landing-ghl-card h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.landing-ghl-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Social Proof */
.landing-social-proof {
    padding: 28px 24px;
    background: white;
    border-bottom: 1px solid var(--border-light);
}
.landing-social-proof-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}
.landing-social-proof-stat {
    text-align: center;
}
.landing-social-proof-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.landing-social-proof-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Single Pricing Card */
.landing-pricing-single {
    display: flex;
    justify-content: center;
    max-width: 420px;
    margin: 0 auto;
}
.landing-pricing-single .landing-pricing-card {
    width: 100%;
}

/* Pricing */
.landing-pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 36px;
}
.landing-pricing-toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.landing-pricing-toggle-active {
    color: var(--text);
    font-weight: 600;
}
.landing-pricing-switch {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-block;
}
.landing-pricing-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.landing-pricing-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border-light);
    border-radius: 26px;
    transition: background 0.3s;
}
.landing-pricing-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.landing-pricing-switch input:checked + .landing-pricing-slider {
    background: var(--primary);
}
.landing-pricing-switch input:checked + .landing-pricing-slider::before {
    transform: translateX(22px);
}
.landing-pricing-save-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
    background: #dcfce7;
    padding: 3px 10px;
    border-radius: 20px;
}
.landing-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.landing-pricing-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 18px;
    padding: 36px 28px;
    position: relative;
    transition: border-color 0.2s;
}
.landing-pricing-card-popular {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.1);
}
.landing-pricing-popular-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}
.landing-pricing-devices {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}
.landing-pricing-guarantee {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 20px;
}
.landing-pricing-header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-light);
}
.landing-pricing-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.landing-pricing-price {
    margin: 12px 0 8px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}
.landing-pricing-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
}
.landing-pricing-period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}
.landing-pricing-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}
.landing-pricing-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}
.landing-pricing-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text);
}
.landing-pricing-feature svg {
    color: var(--success);
    flex-shrink: 0;
}

/* FAQ */
.landing-faq {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.landing-faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.landing-faq-item.open {
    border-color: rgba(37, 99, 235, 0.2);
}
.landing-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.landing-faq-question svg {
    flex-shrink: 0;
    color: var(--text-light);
    transition: transform 0.2s ease;
}
.landing-faq-item.open .landing-faq-question svg {
    transform: rotate(180deg);
}
.landing-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.landing-faq-item.open .landing-faq-answer {
    max-height: 300px;
}
.landing-faq-answer p {
    padding: 0 22px 18px;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Final CTA */
.landing-cta {
    padding: 80px 24px;
    text-align: center;
    background: linear-gradient(135deg, #eff6ff 0%, #fafbfe 100%);
}
.landing-cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.landing-cta-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* Legal & Contact Pages */
.landing-legal-page {
    padding: 60px 24px 80px;
}
.landing-legal-inner {
    max-width: 720px;
    margin: 0 auto;
}
.landing-legal-inner h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.landing-legal-updated {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 36px;
}
.landing-legal-inner h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 32px;
    margin-bottom: 12px;
}
.landing-legal-inner h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 20px;
    margin-bottom: 8px;
}
.landing-legal-inner p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}
.landing-legal-inner ul {
    padding-left: 20px;
    margin-bottom: 12px;
}
.landing-legal-inner li {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 6px;
}
.landing-legal-inner a {
    color: var(--primary);
}
.landing-contact-card {
    text-align: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 36px;
    margin-top: 32px;
}
.landing-contact-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin: 0 auto 20px;
}
.landing-contact-card h2 {
    margin-top: 0 !important;
    margin-bottom: 8px;
}
.landing-contact-card p {
    max-width: 400px;
    margin: 0 auto 24px;
}
.landing-contact-email {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 12px 32px;
    background: var(--primary-light);
    border-radius: 10px;
    transition: all 0.2s ease;
}
.landing-contact-email:hover {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-hover);
}

/* Footer */
.landing-footer {
    background: #111827;
    color: #d1d5db;
    padding: 56px 24px 32px;
}
.landing-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}
.landing-footer-col h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}
.landing-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.landing-footer-col ul li a {
    font-size: 0.82rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}
.landing-footer-col ul li a:hover {
    color: #ffffff;
}
.landing-footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #1f2937;
}
.landing-footer-bottom p {
    margin: 0;
    color: #6b7280;
    font-size: 0.78rem;
}

/* ---- Landing Responsive ---- */
@media (max-width: 992px) {
    .landing-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .landing-hero-split {
        text-align: center;
    }
    .landing-hero-text {
        max-width: 100%;
    }
    .landing-hero-text .d-flex {
        justify-content: center;
    }
    .landing-demo-card {
        max-width: 380px;
    }
    .landing-comparison {
        flex-direction: column;
        align-items: center;
    }
    .landing-comparison-card {
        max-width: 100%;
        width: 100%;
    }
    .landing-comparison-vs {
        padding: 16px 0;
    }
    .landing-ghl-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .landing-nav-links {
        display: none !important;
    }
    .landing-title {
        font-size: 2rem;
    }
    .landing-hero {
        padding: 50px 20px 60px;
    }
    .landing-section {
        padding: 60px 20px;
    }
    .landing-section-title {
        font-size: 1.6rem;
    }
    .landing-features {
        grid-template-columns: repeat(2, 1fr);
    }
    .landing-steps {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .landing-step-connector {
        padding-top: 0;
        transform: rotate(90deg);
    }
    .landing-cta {
        padding: 60px 20px;
    }
    .landing-cta-title {
        font-size: 1.6rem;
    }
    .landing-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    .landing-social-proof-stats {
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .landing-title {
        font-size: 1.6rem;
    }
    .landing-features {
        grid-template-columns: 1fr;
    }
    .landing-comparison-card {
        padding: 24px 20px;
    }
    .landing-pricing-card {
        padding: 28px 22px;
    }
    .landing-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ============ CARD HEADER ============ */

.card-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-light);
}

.card-header-bar h6 {
    font-weight: 600;
    margin: 0;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header-bar .card-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============ DEVICE CARDS ============ */

.device-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.device-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    transition: all 0.2s ease;
}

.device-card:hover {
    border-color: rgba(37, 99, 235, 0.15);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}

.device-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.device-card-name {
    display: flex;
    align-items: center;
    gap: 14px;
}

.device-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.device-card-name h6 {
    font-weight: 600;
    margin: 0 0 3px;
    font-size: 0.95rem;
}

.device-card-name small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.device-card-stats {
    display: flex;
    background: var(--bg);
    border-radius: 12px;
    padding: 18px 0;
}

.device-stat {
    flex: 1;
    text-align: center;
    border-right: 1px solid var(--border);
}

.device-stat:last-child {
    border-right: none;
}

.device-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.device-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============ TIPS BOX ============ */

.tips-box {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    padding: 20px;
}

.tips-box-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #1E40AF;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.tips-box li {
    font-size: 0.8rem;
    color: #1E3A5F;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.tips-box li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3B82F6;
}

/* Warning variant */
.tips-box.tips-warning {
    background: #FFFBEB;
    border-color: #FDE68A;
}

.tips-box.tips-warning .tips-box-title {
    color: #92400E;
}

.tips-box.tips-warning li {
    color: #78350F;
}

.tips-box.tips-warning li::before {
    background: #F59E0B;
}

/* ============ CODE BLOCK ============ */

.code-block {
    background: #1E293B;
    border-radius: 10px;
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.code-block pre {
    margin: 0;
    font-size: 0.78rem;
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', monospace;
    color: #E2E8F0;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}

.code-block .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 0.7rem;
    background: rgba(255,255,255,0.1);
    color: #94A3B8;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.code-block .copy-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ============ SECTION HEADER ============ */

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.section-header-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-header h6 {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
}

/* ============ FILTER BAR ============ */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.filter-bar-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.filter-bar .form-select {
    max-width: 150px;
    font-size: 0.82rem;
    padding: 8px 30px 8px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
}

/* ============ EMPTY STATE ICON ============ */

.empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin: 0 auto 16px;
}

/* ============ SETTINGS SECTION ============ */

.settings-card {
    padding: 24px;
    margin-bottom: 20px;
}

.settings-card .settings-divider {
    border: 0;
    border-top: 1px solid var(--border-light);
    margin: 20px 0;
}

.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.account-row:last-child {
    border-bottom: none;
}

.account-row-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.account-row-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

/* ============ RECENT MSG ITEM ============ */

.recent-msg {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.recent-msg:last-child {
    border-bottom: none;
}

.recent-msg-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.recent-msg-avatar.outbound { background: var(--primary-light); color: var(--primary); }
.recent-msg-avatar.inbound { background: var(--success-light); color: var(--success); }

.recent-msg-info {
    flex: 1;
    min-width: 0;
}

.recent-msg-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.recent-msg-number {
    font-weight: 500;
    font-size: 0.84rem;
}

.recent-msg-body {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* ============ UPLOAD ZONE ============ */

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 36px 24px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #fafbfe;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.03);
    transform: translateY(-1px);
}

.upload-zone i {
    display: block;
}

/* ============ PRICING CARD ============ */

.pricing-card {
    padding: 28px 24px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.pricing-card.pricing-featured {
    border: 2px solid var(--primary);
}

.pricing-card.pricing-featured::before {
    content: 'Current';
    position: absolute;
    top: 12px;
    right: -28px;
    background: var(--primary);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 32px;
    transform: rotate(45deg);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pricing-tier {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.03em;
}

.pricing-period {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.pricing-features {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    margin-bottom: 24px;
}

.pricing-features div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features div::before {
    content: '\F26A';
    font-family: 'bootstrap-icons';
    font-size: 0.72rem;
    color: var(--success);
    flex-shrink: 0;
}

/* ============ WARMUP SCHEDULE ============ */

.warmup-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    text-align: center;
}

.warmup-week {
    background: var(--bg);
    border-radius: 12px;
    padding: 20px 14px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.warmup-week:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
    transform: translateY(-2px);
}

.warmup-week-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.warmup-week-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.warmup-week-unit {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============ FORM SWITCH CUSTOM ============ */

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

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    border-color: var(--primary);
}

/* ============ DIRECTION PILL ============ */

.direction-pill {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.direction-pill.outbound {
    background: var(--primary-light);
    color: var(--primary);
}

.direction-pill.inbound {
    background: var(--success-light);
    color: var(--success);
}

/* ============ API ENDPOINT ROW ============ */

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    transition: all 0.15s ease;
}

.api-endpoint:hover {
    border-color: var(--border);
    background: #f5f6fa;
}

.api-method {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

.api-method.post { color: var(--success); background: var(--success-light); }
.api-method.get { color: var(--primary); background: var(--primary-light); }

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .page-loader {
        left: 0;
    }
    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }
    .topbar {
        left: 0;
        padding: 14px 16px;
    }
}
