/* Basic Reset */
/* * { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: #f4f7f6; } */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
:root {
    --page-bg: #a00a0a; /* यह डिफ़ॉल्ट बैकग्राउंड है */
}

main {
    /* डिफ़ॉल्ट बैकग्राउंड */
    background: var(--main-bg, #ffffff); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: local; /* या scroll, SPA के लिए 'fixed' से बेहतर है */ 
    transition: background-image 0.4s ease-in-out, background-color 0.4s ease-in-out;
    min-height: 100vh; /* सुनिश्चित करें कि यह पूरी स्क्रीन कवर करे */
}

html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; }
/* Fixed Header */
header {
    background: #007bff; 
    color: rgb(0, 0, 0); 
    height: 60px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 1000;
}

/* हेडर के मुख्य कंटेनर को फ्लेक्स बनाएँ */
.top-header {
    height: 60px; /* अपनी जरूरत अनुसार हाइट दें */
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between; /* लोगो बाएं और आईडी दाएं करने के लिए */
    align-items: center;
    padding: 10px 20px;
    background-color: #f8f9fa; /* अपनी थीम के अनुसार बदलें */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* आईडी और आइकॉन वाले सेक्शन की स्टाइलिंग */
.header-details {
    display: flex;
    flex-direction: row !important; /* इसे रो में ही रखें */
    align-items: center;
    gap: 10px; /* एलिमेंट्स के बीच की दूरी */
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    justify-content: flex-end !important; /* दाईं ओर चिपकाएं */
    width: auto;
}

.user-text-data {
    display: flex;
    flex-direction: column;
    text-align: right; /* टेक्स्ट को दाईं तरफ अलाइन करें */
}

.user-photo-container {
    display: block !important;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* फोटो को गोल बनाने के लिए */
    overflow: hidden;
    border: 2px solid #007bff; /* फोटो के चारों ओर नीला बॉर्डर */
    flex-shrink: 0; /* फोटो को दबने से रोकने के लिए */
    margin-bottom: 0px;
}

.user-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* फोटो को बिना खींचे फिट करने के लिए */
}
/* आइकॉन को टेक्स्ट के साथ अलाइन करने के लिए */
.header-details .material-icons {
    font-size: 18px;
    margin-right: 5px;
    vertical-align: middle;
    color: #007bff; /* आइकॉन का रंग */
}

/* छोटे मैसेज (else वाला हिस्सा) के लिए */
.header-right-info {
    display: flex;
    align-items: center;
}

.user-info, .user-id {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
}

.separator {
    color: #ccc;
    font-weight: bold;
}

/* ------------------ header Logo ---------------------------  */

/* .header-logo-container {
    width: 35px;  
    height: 35px;
    border-radius: 50%; 
    background: #fff; 
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 2px solid #6366f1; 
} */

.header-logo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* इमेज को बिना स्ट्रेच किए फिट करेगा */
}

/* हेडर लेफ्ट का अलाइनमेंट ठीक करें */
.header-left {
    display: flex;
    align-items: center;
    gap: 5px; /* लोगो और नाम के बीच की दूरी */
}



/* -------------------------  */
.wrapper { display: flex; flex: 1; margin-top: 60px; height: calc(100vh - 60px); }

/* Left Sidebar (Desktop) */
nav {
    background: #ffffff; width: 250px; border-right: 1px solid #ddd;
    overflow-y: auto; transition: 0.3s;
}
nav ul { list-style: none; padding: 10px; }
nav ul li { 
    padding: 15px; margin-bottom: 5px; cursor: pointer;
    border-radius: 8px; color: #333; font-weight: 500;
}

nav ul li.active { background: #007bff; color: white; border-bottom: 3px solid #45d90f; }
.nav-center-btn .plus-icon {
    display: inline-flex !important; /* वेब व्यू में + आइकन दिखाएँ */
}

.nav-center-btn .nav-label {
    display: inline-block !important; /* वेब व्यू में नाम दिखाएँ */
}
/* डेस्कटॉप पर गोल बटन को सामान्य बटन जैसा दिखाने के लिए (यदि आवश्यक हो) */
nav ul li.nav-center-btn {
    width: auto !important;
    height: auto !important;
    border-radius: 8px !important;
    top: -10px !important;
    padding: 12px 15px !important;
}

/* Main Content */
main { flex: 1; overflow-y: auto; padding: 0px; background: #ffffff; }

/* सभी पेज-कंटेंट को छिपाना और दिखाना */
.page-content {
    display: none;
    width: 100%;
}

.page-content.active {
    display: block !important; /* इसे ब्लॉक रखें ताकि स्टिकी काम करे */
}

.inner-title {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0;
    background: #ffffff; /* बैकग्राउंड जरूरी है */
    padding: 6px 10px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 2px solid #eee;
    z-index: 1000;
    display: flex;
    justify-content: space-between; /* नाम बाईं ओर और सर्च दाईं ओर */
    align-items: center;
    gap: 10px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 200px; /* मोबाइल के हिसाब से सही चौड़ाई */
}

#memberSearch {
    width: 100%;
    padding: 8px 35px 8px 12px; /* दाईं ओर 35px जगह छोड़ी आइकन के लिए */
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}


.search-icon-btn {
    position: absolute;
    right: 12px;
    font-size: 16px;
    color: #666;
    pointer-events: none; /* ताकि आइकन पर क्लिक करने पर भी सर्च बॉक्स काम करे */
    display: block !important;
}


#memberSearch:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0,123,255,0.2);
}
/* कंटेंट के लिए साइड पैडिंग यहाँ दें */
.member-list, .page-content p {
    padding: 0px 0px;
}

.member-card { background: #fff; padding: 10px; border-radius: 10px; margin-bottom: 0px; border: 1px solid #eee; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
/* टाइटल के नीचे वाले कंटेंट के लिए पैडिंग */
.content-body, .member-list {
    padding: 3px;
}


/* बटन और सर्च को एक लाइन में रखने के लिए */
.header-actions { display: flex; align-items: center; gap: 10px; }

.add-btn {
    width: 30px; height: 30px; border-radius: 50%; background: #0c469c;
    color: white; border: none; font-size: 24px; font-weight: bold;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.356); transition: 0.3s;
}
.add-btn:hover { background: #218838; transform: scale(1.1); }

/* Login form  */

.login-page-wrapper {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(rgba(61, 60, 60, 0.534), rgba(255, 255, 255, 0.5)), 
                url('../images/assets/N8.gif') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.9);
    padding: 50px 30px 30px 30px;
    border-radius: 15px;
    position: relative;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-wrapper {
    position: absolute;
    top: 0; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 90px; height: 90px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border: 2px solid #6366f1; /* आपकी बटन की थीम से मैच करती बॉर्डर */
}

.logo-wrapper img { width: 60px; object-fit: contain; }

h2 { text-align: center; margin-bottom: 25px; color: #333; }

.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #444; }
.input-group input {
    width: 100%; padding: 14px; border-radius: 12px;
    border: 1px solid #ddd; outline: none; font-size: 16px;
}

.login-btn {
    width: 100%; padding: 14px; background: #6366f1; color: #fff;
    border: none; border-radius: 12px; font-size: 16px; font-weight: bold;
    cursor: pointer; transition: 0.3s;
}

.login-btn:hover { background: #4f46e5; transform: translateY(-2px); }

/* डेटपिकर को मॉडल के ऊपर दिखाने के लिए */
.datepicker {
    z-index: 1100 !important; 
}


@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Mobile View (Swipeable Nav) */
@media (max-width: 768px) {
/* नेविगेशन लिस्ट को फ्लेक्स रखें */
    nav {
        overflow: visible !important; /* बटन को कटने से रोकने के लिए */
        height: 60px;
        background: #fff;
        position: fixed;
        bottom: 0;
        width: 100%;
        z-index: 1200;
        border-top: 1px solid #eee;
    }

    nav ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
        padding: 0;
        margin: 0;
        list-style: none;
        overflow: visible !important;
    }

    /* गोल सेंटर बटन - केवल एक बार लिखें */
    nav ul li.nav-center-btn {
        position: relative;
        top: -25px; /* बटन को ऊपर उठाएं */
        width: 65px !important;
        height: 65px !important;
        background: #007bff !important;
        color: white !important;
        border-radius: 50% !important;
        display: flex !important;
        justify-content: center;
        align-items: center;
        border: 5px solid #fff; 
        box-shadow: 0 0px 12px rgb(0 0 0 / 100%); 
        z-index: 1001;
        transition: transform 0.2s ease;
    }

    nav ul li.nav-center-btn:active {
        transform: scale(0.9); /* क्लिक करने पर छोटा सा इफेक्ट */
    }
    nav ul li.nav-center-btn.active { background: #007bff; color: white; border: 3px solid #45d90f; border-bottom: 3px solid #ffffff; }
    .nav-center-btn .nav-label {
        display: none !important; 
    }

    /* मोबाइल पर केवल आइकन दिखाएं */
    .nav-center-btn .plus-icon {
        display: flex !important;
        font-size: 30px; /* मोबाइल पर आइकन बड़ा */
        margin-right: 0;
    }

    /* सामान्य बटनों के लिए स्टाइल */
    nav ul li:not(.nav-center-btn) {
        background: transparent;
        color: #666;
        font-size: 12px;
        flex: 1;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* एक्टिव बटन की स्टाइल */
    nav ul li.active:not(.nav-center-btn) {
        color: #007bff !important;
        position: relative;
    }

    /* एक्टिव टेक्स्ट के नीचे ऑरेंज लाइन (::after का उपयोग बेहतर है) */
    nav ul li.active::after {
        content: "";
        position: absolute;
        bottom: -2px;
        width: 20px;
        height: 3px;
        background: #ff9d00;
        border-radius: 10px;
    }

    .wrapper { 
        margin-top: 60px; /* डेस्कटॉप के बराबर रखें */
    }
   
    main { height: calc(100vh - 125px); margin-bottom: 75px;  touch-action: pan-y; 
        overflow-x: hidden; padding: 0; /* यहाँ भी पैडिंग 0 रखें */ }

    .inner-title {
        display: flex !important;
        flex-direction: row !important; /* जबरदस्ती एक लाइन में रखने के लिए */
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 6px 10px; /* मोबाइल पर पैडिंग थोड़ी कम */
    }

    .inner-title span {
        font-size: 18px; /* मोबाइल पर टेक्स्ट थोड़ा छोटा */
        white-space: nowrap; /* टेक्स्ट को टूटने से बचाएगा */
        font-weight: bold;
    }

    .search-container {
        flex: 1; /* सर्च बॉक्स बची हुई जगह ले लेगा */
        max-width: 180px; /* मोबाइल पर सर्च बॉक्स की चौड़ाई सीमित करें */
    }
    #memberSearch {
        padding: 6px 30px 6px 10px; /* मोबाइल पर पैडिंग थोड़ी कम करें */
        font-size: 13px;
    }
    .search-icon {
        right: 8px;
    }
    .modal-dialog {
        max-width: 500px; /* डेस्कटॉप पर एक सही चौड़ाई */
        margin: auto;
    }

}

/* ---------------------- Chate list ------------------------  */
.chat-list-container {
    width: 100%;
    max-width: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 10px 10px;
    
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 10px; 
    padding: 5px 5px;
    border-bottom: 1px solid #eeeeee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-item:hover {
    background-color: #fafafa;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.chat-content {
    flex-grow: 1;
    min-width: 0;
}

.name-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.name {
    font-weight: bold;
    color: #1c1e21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    color: white;
    font-weight: bold;
}

.orange {
    background-color: #ff9800; /* +4 बैज के लिए रंग */
}

.pending {
    background-color: #9e9e9e; /* Pending बैज के लिए रंग */
}

.last-message {
    color: #65676b;
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.meta-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 12px;
    text-align: right;
}

.time {
    font-size: 12px;
    color: #65676b;
    margin-bottom: 4px;
}

.unread-count {
    background-color: #0084ff;
    color: white;
    border-radius: 5%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 12px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(6, 6, 6, 0.384);
    display: inline-block; /* ताकि पैडिंग सही काम करे */
    vertical-align: middle;
}


/* --- नया फॉर्म स्टाइलिंग (Update Form के लिए) --- */

.form-group {
    display: flex;           /* फ्लेक्सबॉक्स चालू करें */
    align-items: center;     /* वर्टिकल (ऊपर-नीचे से) बीच में अलाइन करें */
    margin-bottom: 3px;     /* दो लाइनों के बीच गैप */
}

.form-group label {
    display: flex;
    margin-bottom: 2px;
    font-weight: bold;
    color: #333;
    font-size: 13px;         /* लेबल का फोंट साइज */
    text-align: left;
}

.form-group select, 
.form-group input {
  flex: 1; /* बाकी बची जगह बॉक्स ले लेगा */
  width: 100%;
  max-width: 500px;  /* 500px से ज्यादा बड़ा नहीं होगा */
  padding: 2px 5px;;
  height: 30px;      /* बॉक्स की ऊँचाई */
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box; /* इससे इनपुट बॉक्स बाहर नहीं निकलेगा */
  font-size: 13px;   /* टेक्स्ट का साइज */
  display: flex; 
  
}

.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* पूरी स्क्रीन की ऊंचाई */
    background-color: white;
    z-index: 9999; /* इसे Navbar के z-index से ज्यादा रखें */
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* अगर कंटेंट बड़ा हो तो स्क्रॉल के लिए */
}

/* अगर आप चाहते हैं कि Modal Navbar के नीचे से शुरू हो */
.modal-below-nav {
    top: 60px; /* यहाँ अपने Navbar की ऊंचाई लिखें */
    height: calc(100vh - 60px);
}

/* Zoom-in Effect */
.modal.fade.zoom-modal .modal-dialog {
    transform: scale(0.5); /* शुरुआत में आधा साइज */
    transition: transform 0.3s ease-out;
}

.modal.show.zoom-modal .modal-dialog {
    transform: scale(1); /* खुलने पर पूरा साइज */
}

/* मोबाइल पर पूरी स्क्रीन सुनिश्चित करने के लिए (Z-index Fix) */
.modal {
    z-index: 2000; /* Navbar से ऊपर रखने के लिए */
}
.zoom-modal.fade .modal-dialog {
    transform: scale(0.7); /* शुरुआत में छोटा */
    transition: transform 0.3s ease-out;
}

.zoom-modal.show .modal-dialog {
    transform: scale(1); /* खुलने पर पूरा */
}


/* -------------------------------------------------  */
/* --- Desktop & Base Styles --- */
.header-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.company-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a237e; /* Professional Dark Blue */
    letter-spacing: -0.5px;
}

.profile-img-header {
    width: 42px;
    height: 42px;
    object-fit: cover;
    transition: transform 0.2s;
}

.profile-img-header:hover {
    transform: scale(1.05);
}

.status-indicator {
    width: 12px;
    height: 12px;
}

/* डेस्कटॉप के लिए */
.user-name {
    font-size: 14px;
}
.user-id {
    font-size: 11px;
}

/* --- App View / Mobile Responsive (Under 768px) --- */
@media (max-width: 767.98px) {
    .top-header {
        padding: 4px 0;
    }

    .header-logo {
        height: 35px; /* मोबाइल पर छोटा लोगो */
    }

    .company-name {
        font-size: 0.95rem; /* मोबाइल पर छोटा टेक्स्ट */
        max-width: 160px;   /* टेक्स्ट को सीमित करें */
    }

    .profile-img-header {
        width: 36px;
        height: 36px;
    }
        .user-text-data {
        /* नाम और आईडी को और छोटा करें ताकि जगह बनी रहे */
        max-width: 100px; 
    }
    
    .user-name {
        font-size: 13px; /* मोबाइल पर छोटा फोंट */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* नाम बड़ा होने पर ... दिखेगा */
    }

    .user-id {
        font-size: 12px;
        display: block;
    }

    /* लोगो और कंपनी नाम को थोड़ा सिकोड़ें ताकि यूजर इंफो फिट आ सके */
    .company-name {
        font-size: 0.85rem !important;
        max-width: 130px;
    }
}

/* बहुत छोटी स्क्रीन (iPhone SE/Fold) के लिए */
@media (max-width: 360px) {
    .company-name {
        font-size: 0.8rem;
        max-width: 120px;
    }
}

/* वह कंटेनर जिसके पीछे आप बैकग्राउंड लगाना चाहते हैं */
.profile-background-container {
    background-color: #7b1fa2; /* अगर SVG लोड नहीं होता है तो डिफ़ॉल्ट रंग */
    background-image: url('images/assets/wavy_background.svg'); /* यहाँ SVG का पाथ दें */
    background-size: cover; /* सुनिश्चित करता है कि डिज़ाइन पूरी तरह फिट हो जाए */
    background-position: center; /* डिज़ाइन को सेंटर में रखता है */
    position: relative; /* फोटो को सही जगह पर रखने के लिए ज़रूरी */
    height: 200px; /* ऊँचाई निर्धारित करें */
    /* आप यहाँ अपने मौजूदा हेडर की पैडिंग और मार्जिन जोड़ सकते हैं */
}

