/* ============================================================
   KANUPAPA - BASE & DESIGN SYSTEM (base.css)
   Design tokens, resets, auth screen, contact list & sheets
   ============================================================ */

:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.88);
    --accent-primary: #3b82f6;
    --accent-primary-hover: #2563eb;
    --accent-success: #10b981;
    --accent-success-hover: #059669;
    --accent-danger: #ef4444;
    --accent-danger-hover: #dc2626;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.12);
    --focus-glow: #38bdf8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

body, html {
    width: 100%;
    max-width: 100vw;
    height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

.nav-item:focus, .nav-item:focus-visible {
    outline: 3px solid var(--focus-glow) !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.8) !important;
    transform: scale(1.02);
}

.app-container {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0f172a 100%);
}

.top-bar {
    width: 100%;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.nav-back-btn {
    background: rgba(30, 41, 59, 0.9);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 0.2rem;
}

.nav-back-btn:hover, .nav-back-btn:focus {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
    transform: scale(1.05);
}

.btn-back {
    background: rgba(30, 41, 59, 0.9);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-back:hover, .btn-back:focus {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.lang-select {
    background: rgba(30, 41, 59, 0.9);
    color: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.lang-select:focus, .lang-select:hover {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge.online {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
}

.view {
    width: 100%;
    height: calc(100vh - 65px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

/* Splash Screen */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #090d16;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.splash-logo {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

.splash-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
}

.splash-subtitle {
    font-size: 1rem;
    color: #94a3b8;
    margin-top: 0.3rem;
    margin-bottom: 1.5rem;
}

.splash-loader {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Role & Account Selector Card */
.role-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.2rem 2rem;
    width: 92%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
}

.account-select-wrap {
    width: 100%;
    text-align: left;
    margin-bottom: 1.5rem;
}

.field-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 0.5rem;
}

.auth-verified-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.45);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.8rem;
}

.verified-user-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.verified-icon {
    font-size: 1.4rem;
}

.verified-text {
    display: flex;
    flex-direction: column;
}

.verified-label {
    font-size: 0.75rem;
    color: #a7f3d0;
    font-weight: 500;
}

.verified-email {
    font-size: 0.95rem;
    color: #ffffff;
    word-break: break-all;
}

.btn-switch-user {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-switch-user:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
}

.email-input-row {
    width: 100%;
}

.device-prompt {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.role-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.btn {
    width: 100%;
    padding: 0.95rem 1.2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #475569;
    color: white;
}

.btn-secondary:hover {
    background: #334155;
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #047857;
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
}

.btn-danger:hover {
    background: var(--accent-danger-hover);
}

.btn-call {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Main Layout */
.main-layout {
    width: 95%;
    max-width: 1100px;
    height: 88%;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
}

.panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(16px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    min-height: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.8rem;
    flex-shrink: 0;
}

.user-account-header {
    display: flex;
    align-items: center;
}

.account-badge {
    font-size: 0.85rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-weight: 600;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: #38bdf8;
}

.contacts-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.4rem;
}

.section-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
}

.section-title {
    font-size: 0.95rem;
    color: #38bdf8;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.sub-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.4);
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.avatar-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.presence-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #1e293b;
}

.presence-dot.green { background: #10b981; }
.presence-dot.gray { background: #64748b; }

.contact-details h4 {
    font-size: 0.95rem;
    color: #f8fafc;
    margin-bottom: 0.15rem;
}

.contact-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-contact-call {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.btn-contact-call:hover {
    transform: scale(1.05);
}

/* Add Contact Form */
.add-contact-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px dashed rgba(56, 189, 248, 0.4);
}

.add-contact-title {
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
    color: #38bdf8;
    font-weight: 700;
}

.add-contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.input-field {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.9);
    color: white;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.input-field:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #e2e8f0;
    cursor: pointer;
    padding: 0.15rem 0;
}

.btn-save {
    padding: 0.7rem;
    font-size: 0.95rem;
    border-radius: 10px;
}

/* Chat & Voice Panel */
.chat-panel {
    background: var(--card-bg);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.msg-hint {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #cbd5e1;
}


/* Mobile Responsive (Portrait & Small Screens) */
@media (max-width: 768px), (pointer: coarse) and (orientation: portrait) {
    body, html {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
        width: 100% !important;
        max-width: 100vw !important;
    }

    body.in-call, html.in-call {
        overflow: hidden !important;
        height: 100vh !important;
        height: 100dvh !important;
    }

    .app-container {
        height: auto !important;
        min-height: 100vh;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        overflow-y: auto;
    }

    body.in-call .app-container {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }

    /* Compact Mobile Top Bar: Never Overflows */
    .top-bar {
        padding: 0.45rem 0.65rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        gap: 0.4rem !important;
        overflow: hidden !important;
    }

    .logo {
        gap: 0.35rem !important;
        font-size: 1.05rem !important;
        min-width: 0 !important;
        flex-shrink: 1 !important;
    }

    .logo-text {
        font-size: 1rem !important;
        white-space: nowrap !important;
    }

    .logo-img {
        height: 26px !important;
        width: auto !important;
    }

    .nav-back-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 1rem !important;
        margin-right: 0 !important;
    }

    .top-bar-actions {
        gap: 0.35rem !important;
        flex-shrink: 0 !important;
        align-items: center !important;
    }

    /* Icon-only buttons on mobile so header fits comfortably */
    #txt-admin-btn,
    #txt-account-btn {
        display: none !important;
    }

    #btn-admin-portal,
    #btn-open-account {
        padding: 5px 8px !important;
        font-size: 0.95rem !important;
        min-width: 32px !important;
        height: 32px !important;
        justify-content: center !important;
        border-radius: 8px !important;
    }

    .lang-select {
        padding: 0.3rem 0.45rem !important;
        font-size: 0.78rem !important;
        max-width: 86px !important;
        border-radius: 6px !important;
    }

    #status-text {
        display: none !important;
    }

    #status-badge {
        padding: 0.35rem 0.5rem !important;
        border-radius: 9999px !important;
        gap: 0 !important;
    }

    #status-badge .dot {
        width: 9px !important;
        height: 9px !important;
        margin: 0 !important;
    }

    /* Mobile Views & 1-Column Layout */
    .view {
        height: auto !important;
        min-height: calc(100vh - 58px) !important;
        padding: 0.6rem 0.5rem !important;
        align-items: flex-start !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    body.in-call #video-call-view {
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        padding: 0 !important;
        align-items: center !important;
    }

    .main-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        gap: 0.85rem !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .panel {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 14px !important;
        padding: 0.85rem !important;
        box-sizing: border-box !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
    }

    /* Panel Header: Stacks cleanly without horizontal stretch */
    .panel-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding-bottom: 0.6rem !important;
        margin-bottom: 0.6rem !important;
    }

    .user-account-header {
        width: 100% !important;
    }

    .account-badge {
        width: 100% !important;
        border-radius: 8px !important;
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 6px !important;
        box-sizing: border-box !important;
        word-break: break-all !important;
    }

    .account-badge .id-badge {
        margin-left: 0 !important;
    }

    #btn-change-account {
        align-self: flex-start !important;
        padding: 5px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Contact Cards: Full-width stacked layout with thumb-friendly buttons */
    .contact-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 0.85rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .contact-info {
        width: 100% !important;
        gap: 0.7rem !important;
    }

    .contact-details {
        min-width: 0 !important;
        flex: 1 !important;
    }

    .contact-details h4 {
        font-size: 0.95rem !important;
        word-break: break-word !important;
        flex-wrap: wrap !important;
    }

    .contact-role {
        font-size: 0.76rem !important;
        line-height: 1.4 !important;
    }

    .contact-actions {
        width: 100% !important;
        margin-top: 2px !important;
    }

    .call-btn-group {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }

    .btn-contact-call {
        flex: 1 !important;
        width: 50% !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 10px 8px !important;
        font-size: 0.92rem !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
    }

    /* Chat / Notepad Panel on Mobile */
    .chat-panel {
        min-height: 280px !important;
    }

    .section-box {
        padding: 0.8rem !important;
    }

    .caption-input-row {
        padding: 8px !important;
        gap: 6px !important;
    }

    .caption-input {
        font-size: 0.88rem !important;
        padding: 8px 10px !important;
    }

    #btn-main-send {
        padding: 8px 14px !important;
        font-size: 0.88rem !important;
    }


/* Explicit Role Overrides: Mobile vs TV */
body.role-mobile .main-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    gap: 0.85rem !important;
}

body.role-mobile .contact-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
}

body.role-mobile .call-btn-group {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
}

body.role-mobile .btn-contact-call {
    flex: 1 !important;
    width: 50% !important;
    justify-content: center !important;
}

body.role-tv .main-layout {
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr !important;
    gap: 1.5rem !important;
    height: 88% !important;
    width: 95% !important;
    max-width: 1100px !important;
}

body.role-tv .contact-card {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
}

body.role-tv .panel-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
}

body.role-tv #txt-admin-btn,
body.role-tv #txt-account-btn,
body.role-tv #status-text {
    display: inline !important;
}

body.role-tv .call-btn-group {
    width: auto !important;
}

body.role-tv .btn-contact-call {
    width: auto !important;
    flex: initial !important;
}

@media (max-width: 900px) and (orientation: landscape) {
    .control-btn .btn-lbl {
        display: none !important;
    }
    .video-overlay-controls {
        bottom: 0.7rem;
        left: 50%;
        transform: translateX(-50%);
        gap: 0.55rem;
        padding: 4px 12px;
    }
    .control-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .control-btn.btn-danger {
        width: 42px;
        height: 42px;
    }
    .pip-container {
        top: 0.6rem;
        right: 0.6rem;
        left: auto;
        width: 95px;
        height: 70px;
        border-radius: 10px;
    }
    .call-timer {
        top: 0.6rem;
        left: 0.6rem;
        bottom: auto;
        font-size: 0.82rem;
        padding: 3px 10px;
    }
    .mobile-incall-caption-bar {
        bottom: 3.8rem;
        width: 75%;
    }
}

/* ============================================================
   ACCOUNT SETTINGS MODAL & 5-SLOT DEVICE MANAGER STYLES
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.account-modal-card {
    background: rgba(18, 26, 47, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header-row {
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.6);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    font-size: 1.2rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.4);
}

.account-tabs-bar {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
}

.account-tabs-bar::-webkit-scrollbar {
    display: none;
}

.acc-tab-btn {
    flex: 0 0 auto;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: all 0.2s;
}

.acc-tab-btn:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.04);
}

.acc-tab-btn.active {
    color: #818cf8;
    border-bottom-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

.account-tab-body {
    padding: 1.2rem;
    overflow-y: auto;
    flex: 1;
}

/* Hero Avatar in Profile Modal */
.profile-hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.profile-avatar-wrapper {
    position: relative;
    cursor: pointer;
    margin-top: 4px;
    transition: transform 0.15s ease;
}

.profile-avatar-wrapper:active {
    transform: scale(0.96);
}

.profile-hero-avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(56, 189, 248, 0.25));
    border: 3px solid #38bdf8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    overflow: hidden;
    user-select: none;
}

.profile-hero-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-edit-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #0284c7;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.profile-avatar-hint {
    font-size: 0.8rem;
    color: #38bdf8;
    cursor: pointer;
    font-weight: 500;
    margin-top: -4px;
    transition: opacity 0.15s ease;
}

.profile-avatar-hint:hover {
    text-decoration: underline;
}

/* Account Info & ID Box */
.profile-id-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.profile-id-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-id-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.profile-id-val {
    font-size: 0.92rem;
    color: #f1f5f9;
}

.profile-id-val.kpid-val {
    color: #38bdf8;
    font-family: monospace, sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
}

.profile-field-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.profile-field-label {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-save-profile {
    width: 100%;
    padding: 11px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 4px;
}

/* Avatar & Photo Picker Modal */
.avatar-picker-modal-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: modalPop 0.2s ease-out;
}

.avatar-picker-modal-body {
    padding: 16px 20px 20px 20px;
}

.btn-upload-photo-choice {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(56, 189, 248, 0.12);
    border: 1.5px dashed #38bdf8;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn-upload-photo-choice:hover {
    background: rgba(56, 189, 248, 0.2);
}

.btn-upload-photo-choice:active {
    transform: scale(0.98);
}

.avatar-picker-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 16px 0 12px 0;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
}

.avatar-picker-divider::before,
.avatar-picker-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar-picker-divider span {
    padding: 0 10px;
}

/* 5 Slots Grid */
.slots-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slot-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.slot-card.active-slot {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.05);
}

.slot-card.empty-slot {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.1);
    opacity: 0.75;
}

.slot-info-col {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slot-badge-type {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: monospace;
}

.badge-tv {
    background: rgba(6, 182, 212, 0.2);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.35);
}

.badge-mobile {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-web {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.slot-dev-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-light);
}

.slot-dev-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Avatar Selector */
.avatar-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 16px;
}

.avatar-choice-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-choice-btn:hover {
    transform: scale(1.1);
    background: rgba(99, 102, 241, 0.2);
}

.avatar-choice-btn.selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* PIN Lock Screen Overlay */
.pin-lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 30%, #1e1b4b 0%, #0f172a 100%);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
}

.pin-lock-box {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    padding: 2rem 1.8rem;
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.pin-avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.25);
    border: 2px solid #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.4);
}

.pin-dots-display {
    display: flex;
    gap: 10px;
    margin: 8px 0;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    transition: all 0.18s;
}

.pin-dot.filled {
    background: #6366f1;
    border-color: #818cf8;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
    transform: scale(1.1);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    margin-top: 6px;
}

.pin-key {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-light);
    font-size: 1.4rem;
    font-weight: 700;
    padding: 12px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.pin-key:hover, .pin-key:focus {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-2px);
}

.pin-key:active {
    transform: scale(0.95);
}

/* Embedded Admin Modal Overlay */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 29, 0.95);
    backdrop-filter: blur(16px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

.admin-modal-bar {
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-iframe {
    width: 100%;
    flex: 1;
    border: none;
    background: transparent;
}

/* ========================================================
   VOICE / AUDIO CALL OVERLAY & CALL BUTTONS
   ======================================================== */
.audio-call-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.audio-caller-avatar-circle {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.4);
    margin-bottom: 1.5rem;
}

.audio-avatar-emoji {
    font-size: 3.8rem;
    z-index: 2;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.7);
    animation: audioPulse 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-ring-2 {
    animation-delay: 0.75s;
}

@keyframes audioPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.65);
        opacity: 0;
    }
}

.audio-call-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 0.5rem 0;
    letter-spacing: 0.5px;
}

.audio-call-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
}

.audio-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: audioDotBlink 1.4s infinite;
}

@keyframes audioDotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.call-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-contact-call.btn-call-audio {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    border: 1px solid rgba(14, 165, 233, 0.45) !important;
    color: white !important;
    font-weight: 600;
}

.btn-contact-call.btn-call-video {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
    color: white !important;
    font-weight: 600;
}

/* ========================================================
   WHATSAPP MOBILE DESIGN SYSTEM (PLAY STORE READY)
   ======================================================== */

.mobile-only-btn {
    display: none;
}

.btn-icon-topbar {
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 1.25rem;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.btn-icon-topbar:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Top Bar Sub-views (Default vs Active Search) */
.topbar-default-view {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.topbar-search-view {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    animation: fadeInMenu 0.15s ease-out;
}

.topbar-search-back-btn {
    background: transparent;
    border: none;
    color: #38bdf8;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.12s ease;
}

.topbar-search-back-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.topbar-search-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.topbar-search-input {
    width: 100%;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 7px 34px 7px 14px;
    color: #f8fafc;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topbar-search-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.topbar-search-input::placeholder {
    color: #94a3b8;
}

.btn-clear-search {
    position: absolute;
    right: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #cbd5e1;
    font-size: 0.85rem;
    cursor: pointer;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fullscreen Backdrop & 3-Dots Dropdown Menu */
.mobile-menu-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.3) !important;
    z-index: 99998 !important;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-backdrop.hidden {
    display: none !important;
}

.mobile-dropdown-menu {
    position: fixed !important;
    top: 54px !important;
    right: 12px !important;
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85) !important;
    padding: 6px 0 !important;
    min-width: 240px !important;
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-user-select: none;
    user-select: none;
}

.mobile-dropdown-menu.hidden {
    display: none !important;
    visibility: hidden !important;
}

.mobile-dropdown-menu:not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: fadeInMenu 0.12s ease-out;
}

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mobile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    font-size: 0.92rem;
    font-weight: 500;
    color: #f1f5f9;
    cursor: pointer;
    transition: background 0.12s ease;
    user-select: none;
}

.mobile-dropdown-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-dropdown-item.text-danger {
    color: #f87171;
}

.mobile-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

/* WhatsApp Filter Bar (2 Balanced Rows - Universal: Web, Mobile, TV) */
.mobile-search-section {
    display: flex;
    flex-direction: column;
    background: #0f172a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
}

.filter-pills-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 8px 10px 8px 10px;
}

.filter-pills-row {
    display: flex;
    gap: 6px;
    width: 100%;
}

.filter-pills-row .filter-pill {
    flex: 1;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px 4px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    user-select: none;
}

.filter-pills-row .filter-pill.active {
    background: #00a884;
    color: #ffffff;
    border-color: #00a884;
    box-shadow: 0 2px 8px rgba(0, 168, 132, 0.35);
}

.filter-pills-row .filter-pill:focus,
.filter-pills-row .filter-pill.nav-item:focus {
    outline: none !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5) !important;
}

/* Feature Row (Row 3: Group Call, Meeting, Directory) */
.filter-pills-row.row-features .feature-pill {
    background: rgba(30, 41, 59, 0.85);
    color: #cbd5e1;
    border: 1px solid rgba(56, 189, 248, 0.22);
    font-size: 0.82rem;
    font-weight: 600;
}

.filter-pills-row.row-features .feature-pill:hover,
.filter-pills-row.row-features .feature-pill.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

/* Mobile Single-Row Dropdown Filter Bar */
.mobile-filter-bar {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    width: 100%;
    box-sizing: border-box;
    background: #0f172a;
}

.mobile-filter-select-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.mobile-filter-dropdown {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 20px;
    padding: 8px 30px 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.mobile-filter-dropdown:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.mobile-dropdown-chevron {
    position: absolute;
    right: 12px;
    pointer-events: none;
    color: #94a3b8;
    font-size: 0.82rem;
}

.mobile-filter-bar .btn-directory-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(14, 165, 233, 0.35));
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.mobile-filter-bar .btn-directory-tab:active,
.mobile-filter-bar .btn-directory-tab.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

@media (max-width: 768px) {
    .mobile-filter-bar {
        display: flex;
    }
    .desktop-filter-pills {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-filter-bar {
        display: none !important;
    }
    .desktop-filter-pills {
        display: flex;
    }
}

/* Business & Professional Services Directory Styles */
.directory-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #0f172a;
    flex: 1;
    overflow-y: auto;
}

.directory-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #111e33;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    gap: 8px;
}

.btn-directory-back {
    background: rgba(30, 41, 59, 0.9);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.btn-directory-back:hover,
.btn-directory-back:active {
    background: #0284c7;
    color: #ffffff;
}

.directory-header-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.directory-distance-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
}

.directory-distance-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
}

.directory-distance-pills {
    display: flex;
    gap: 6px;
}

.dist-pill {
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.dist-pill:hover {
    color: #cbd5e1;
    border-color: rgba(56, 189, 248, 0.3);
}

.dist-pill.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 1px 6px rgba(2, 132, 199, 0.35);
}

.directory-filter-bar {
    padding: 10px 12px;
    background: rgba(19, 29, 46, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.directory-filter-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.directory-select {
    flex: 1;
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.directory-select option {
    background: #0f172a;
    color: #f1f5f9;
    padding: 6px;
}

.btn-register-service {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-register-service:hover {
    background: #10b981;
    color: #ffffff;
}

.directory-search-input-wrap {
    position: relative;
    width: 100%;
}

.directory-search-input {
    width: 100%;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 8px 30px 8px 12px;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
}

.directory-search-input:focus {
    border-color: #38bdf8;
}

.directory-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    min-height: 200px;
}

.directory-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.directory-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

.directory-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.directory-pro-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: #f8fafc;
}

.directory-pro-cat {
    font-size: 0.76rem;
    font-weight: 600;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-radius: 6px;
    padding: 2px 8px;
    align-self: flex-start;
}

.directory-pro-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: #94a3b8;
    align-items: center;
    flex-wrap: wrap;
}

.directory-pro-rating {
    color: #fbbf24;
    font-weight: 700;
}

.directory-pro-bio {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.directory-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.directory-action-btn {
    flex: 1;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease;
}

.btn-dir-call {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-dir-call:hover {
    background: #10b981;
    color: #fff;
}

.btn-dir-video {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.btn-dir-video:hover {
    background: #0284c7;
    color: #fff;
}

.btn-dir-chat {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-dir-chat:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* Pre-call Group Item Checkbox Row */
.group-select-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.group-select-item:hover,
.group-select-item.selected {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
}

.group-select-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-select-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #38bdf8;
    font-size: 0.95rem;
}

.group-select-text {
    display: flex;
    flex-direction: column;
}

.group-select-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f8fafc;
}

.group-select-sub {
    font-size: 0.75rem;
    color: #94a3b8;
}

.group-select-chk {
    width: 18px;
    height: 18px;
    accent-color: #38bdf8;
    cursor: pointer;
}

/* WhatsApp Unified Contact List (Universal: Web, Mobile, TV) */
.unified-mobile-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #0f172a;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

.wa-contact-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.12s ease, transform 0.12s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.wa-contact-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.wa-contact-row:focus,
.wa-contact-row.nav-item:focus {
    outline: none !important;
    background: rgba(56, 189, 248, 0.18) !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.45) !important;
}

.wa-contact-row:active {
    background: rgba(255, 255, 255, 0.08);
}

.wa-avatar-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
}

.wa-presence-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;
    border: 2px solid #0f172a;
}

.wa-presence-dot.online {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

.wa-info-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wa-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
}

.wa-contact-name {
    font-size: 0.98rem;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-status-snippet {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.81rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-actions-col {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.wa-chevron {
    color: #64748b;
    font-size: 1.1rem;
    font-weight: bold;
}

.wa-device-chip {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-weight: 600;
}

/* Floating Action Button (FAB) */
.fab-btn {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    font-size: 1.45rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
    cursor: pointer;
    z-index: 95;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fab-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

/* Device Picker Bottom Sheet Modal */
.device-picker-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: #111b21;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.7);
    padding: 12px 16px 24px 16px;
    z-index: 1001;
    overflow-y: auto;
    animation: slideUpSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sheet-drag-handle {
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 2px auto 14px auto;
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-person-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sheet-avatar-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.sheet-person-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
}

.sheet-person-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}

.sheet-section-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: #94a3b8;
    margin: 14px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.picker-devices-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.picker-device-card {
    display: flex;
    flex-direction: column;
    background: #18222d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    gap: 12px;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.picker-device-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.picker-dev-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.picker-dev-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.picker-dev-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.picker-dev-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-dev-id-badge {
    font-size: 0.74rem;
    font-family: monospace;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
    padding: 1px 7px;
    border-radius: 6px;
    white-space: nowrap;
}

.picker-dev-status-row {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.picker-device-actions {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
}

.picker-btn-call {
    flex: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 42px !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    border: none !important;
    cursor: pointer !important;
    transition: transform 0.1s ease, filter 0.15s ease !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.picker-btn-call:active {
    transform: scale(0.97) !important;
}

.picker-btn-call.btn-picker-audio {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
}

.picker-btn-call.btn-picker-video {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
}

.sheet-footer-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sheet-btn-row {
    display: flex;
    gap: 10px;
}

.btn-sheet-action {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-sheet-action.btn-sheet-danger {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

/* Contact Profile Modal / Sheet */
.contact-profile-sheet {
    max-width: 440px !important;
    width: 96% !important;
    background: #182234 !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 18px !important;
    padding: 14px 14px 16px 14px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85) !important;
}

.profile-sheet-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
}

.profile-device-tab {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    position: relative;
}

.profile-device-tab:hover {
    border-color: rgba(56, 189, 248, 0.5) !important;
    background: rgba(30, 41, 59, 0.9) !important;
}

.profile-device-tab.active {
    border-color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.2) !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.45) !important;
}

/* Glowing Live/Online Device Icon vs Dim Offline Icon */
.profile-device-tab.is-online .tab-dev-icon {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.9)) drop-shadow(0 0 14px rgba(56, 189, 248, 0.75));
    transform: scale(1.05);
}

.profile-device-tab.is-offline .tab-dev-icon {
    opacity: 0.35;
    filter: grayscale(0.9);
}

.profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-big-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: transform 0.15s ease;
}

.profile-big-avatar:active {
    transform: scale(0.95);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.wa-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.btn-change-avatar {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    border-radius: 14px;
    padding: 4px 10px;

    font-size: 0.95rem;
    padding: 8px 14px;
    outline: none;
    box-sizing: border-box;
}

.chat-text-input:focus {
    box-shadow: 0 0 0 1px #00a884;
}

.chat-send-btn {
    background: #00a884;
    border: none;
    color: #0b141a;
    font-size: 1.15rem;
    font-weight: 700;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 168, 132, 0.4);
    transition: transform 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}

.chat-send-btn:hover, .chat-send-btn:focus {
    transform: scale(1.08);
    outline: none;
}

/* Chat Attachment Popover Drawer (WhatsApp Style 📎) */
.chat-attach-drawer {
    background: #202c33;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    box-sizing: border-box;
    width: 100%;
    animation: slideUpAttach 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.chat-attach-grid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
}

.chat-attach-tile {
    background: transparent;
    border: none;
    color: #e9edef;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.15s ease, transform 0.15s ease;
}

.chat-attach-tile:hover, .chat-attach-tile:focus {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    outline: none;
}

.attach-icon-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.attach-bg-photos { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.attach-bg-docs { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.attach-bg-link { background: linear-gradient(135deg, #0ea5e9, #0284c7); }

/* File & Document Chat Bubble Card */
.chat-file-bubble {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 4px;
}

/* Web Link Chat Bubble Card */
.chat-link-bubble {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 4px;
}

/* Chat Empty State */
.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

/* Slideshow Modal */
.btn-slideshow-ctrl {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    padding: 6px 14px;