/* ---------------------------------------------------
Modern Responsive Navigation
---------------------------------------------------------*/
@media (max-width: 991px) {
    .show-md {
        display: flex !important;
    }

    .main-header.modern-nav .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-header.modern-nav .nav-wrapper {
        padding: 0.75rem 0;
    }

    .main-header.modern-nav .logo-section {
        width: 100%;
        justify-content: space-between;
    }

    .main-header.modern-nav .logo {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
    }

    .hide-md {
        display: none !important;
    }

    /* Modern Mobile Menu Navigation */
    .mobile-menu .hdr-nav-mobile {
        padding: 2rem 0;
    }

    .mobile-menu .hdr-nav-mobile ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu .hdr-nav-mobile ul li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-menu .hdr-nav-mobile ul li:last-child {
        border-bottom: none;
    }

    .mobile-menu .hdr-nav-mobile ul li a {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.5rem;
        color: #171717;
        font-size: 16px;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }

    .mobile-menu .hdr-nav-mobile ul li a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 4px;
        background: var(--brand-green);
        transform: scaleY(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu .hdr-nav-mobile ul li a:hover,
    .mobile-menu .hdr-nav-mobile ul li a:active {
        background: rgba(97, 206, 112, 0.08);
        color: var(--brand-green);
        padding-left: 2rem;
    }

    .mobile-menu .hdr-nav-mobile ul li a:hover::before {
        transform: scaleY(1);
    }

    .mobile-menu .hdr-nav-mobile ul li a i {
        font-size: 18px;
        width: 24px;
        text-align: center;
        opacity: 0.8;
    }

    /* Mobile Menu Header */
    .mobile-menu-header {
        padding: 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(135deg, rgba(97, 206, 112, 0.05) 0%, transparent 100%);
    }

    .mobile-menu-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
        color: #171717;
    }

    .mobile-menu-close {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        background: rgba(0, 0, 0, 0.05);
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: #171717;
        transition: all 0.3s ease;
    }

    .mobile-menu-close:hover {
        background: rgba(220, 53, 69, 0.1);
        color: var(--danger-red);
        transform: rotate(90deg);
    }

    .progress-bar {
        width: 100%;
    }

    .preview-image-wrapper {
        width: 100%;
        margin: 30px auto;
        position: relative;
        display: block;
        height: 200px;
    }
}


@media (max-width: 767px) {
    #inJobSidebarContent {
        flex: 1;
        overflow-y: auto;
        padding: 12px;
        overflow-x: hidden;
    }

    .google_drive_upload,
    .local_drive_upload {
        background: var(--surface-light);
    }

    .modern-inbox-sidebar {
        height: auto;
        max-height: none;
        box-shadow: none;
    }

    .modern-dropzone {
        background: var(--surface) !important;
    }

    .modern-dropzone {
        padding: 10px 16px;
    }


    .google_drive_upload,
    .local_drive_upload {
        width: calc(100% - 20px);
        bottom: 80px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .upload-modal-header {
        padding: 16px;
    }

    .upload-modal-body {
        padding: 16px;
        max-height: 50vh;
    }

    .modern-dropzone {
        padding: 30px 16px;
    }

    .connection-prompt {
        padding: 30px 16px;
    }

    .file-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .detail-value {
        padding: 0;
        margin: 0;
    }


    .modern-project-sidebar {
        padding: 5px;
    }

    .modern-attachments-section {
        display: none !important;
    }

    .chat-body {
        padding: 10px;
    }

    .djoblists {
        padding: 0px;
    }

    .chat-card {
        height: 100svh !important;
        border: none;
        border-radius: 0;
        box-sizing: border-box;
        overflow: hidden;
        padding: 0;
        margin: 0;
    }

    .pwa .chat-card {
        height: var(--app-height);
        border: none;
        border-radius: 0;
        box-sizing: border-box;
        overflow: hidden;
        padding: 0;
        margin: 0;
    }

    /* PWA: JS sets class on <html> as "is-pwa" (not "pwa").
       Constrain the inbox screen to the real app viewport height to avoid
       1-2px overflow / unwanted page scrollbars on Android. */
    .is-pwa .inbox-main-wrapper {
        height: var(--app-height, 100svh);
        overflow: hidden;
    }

    .is-pwa .chat-card {
        height: var(--app-height, 100svh) !important;
    }

    .prechat-brief {
        border-radius: 8px;
        border-color: #f0f0f0;
        padding: 1rem;
    }

    .progress-container {
        width: 180px;
        margin: auto;
    }

    .dashcontrol {
        padding: 10px 24px;
    }

    .control-form {
        margin: 5px 0 20px 0;
    }

    .form-control {
        width: 100%;
    }

    main {
        margin-top: 15px;
    }

    .progress-bar {
        display: block;
        margin: 20px auto;
        width: 100%;
        height: auto;
    }

    .progress-title {
        position: absolute;
        top: 0;
        left: 40px;
        margin-top: 0;
    }

    .progress-step {
        width: 30px;
        height: 30px;
        border: 2px solid #ccc;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        background-color: white;
        font-size: 14px;
        font-weight: bold;
        margin: 15px 0;
    }

    .signoff-content-area {
        background: #ffffff;
        padding: 30px 14px;
        margin: 0 0 40px 0;
        width: 100%;
    }

    .signoff_ack_list {
        margin-left: 0;
        margin-top: 5px;
    }

    .view-form .form-block-area {
        padding: 40px 10px;
    }

    .sign-off-gird {
        display: block;
        width: 100%;
        justify-content: space-between;
        margin: 10px 0;
    }

    .signoff-input-area {
        display: block;
        align-items: end;
        margin: 14px 0 0 0;
    }

    .singoff-grid-item {
        width: 100%;
    }

    #client_signature_preview img {
        max-width: 80%;
        max-height: 80px;
    }

    .sign-pad-area {
        margin-top: 30px;
    }

    #client_signature_preview {
        width: 100%;
        min-height: 30px;
    }

    .signoffpage .container {
        margin: 0;
        padding: 0;
    }

    .poponlylogo {
        position: absolute;
        top: 30px;
        left: 30px;
        z-index: 1;
    }

    .get_info {
        background: #fff;
        height: 100vh;
    }

    .get_info_field {
        width: 100%;
        margin: auto;
        border-radius: 0px;
    }

    .signoff-title {
        font-size: 16px;
        margin-bottom: 0px;
        color: #0da2e1;
        font-weight: 600;
    }

    .signoffpage .form-control {
        padding: 2px 18px;
    }

    .djoblists {
        width: 100%;
        height: 100%;
        overflow: none;
    }

    .dropzone input[type="file"] {
        width: 100%;
    }

    .google_drive_upload,
    .local_drive_upload {

        padding: 20px 20px 0 20px;
    }


    .kanban-column {
        max-height: none;
    }

    .global-btn,
    .secendary-btn,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
        max-width: fit-content;
        display: block;
        margin: 20px auto;
    }

    .inJobSidebar .inbox-sidebar {
        padding: 5px;
        border: none;
    }

    .projectInfoSidebar .inbox-sidebar {
        padding: 5px;
        border: none;
    }

    .chat-header {
        padding: 20px 15px;
    }

    .chat-footer {
        padding: 15px 15px;
    }

    .newmessage .badge {
        margin: 0;
        padding: 0;
    }

    .job-item .text-muted {
        font-size: 12px;
        line-height: 20px;
        padding: 0 0;
    }

    .job-item h6 {
        width: 220px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


    .file-bubble-group .filepreview {
        max-width: 80px;
        height: 80px;
    }

    .file-bubble-group .file-icon-circle {
        width: 80px;
        height: 80px;
    }

    .file-bubble.file-bubble-group {
        max-width: 80%;
    }

    .file-bubble-group .attachment_info {
        display: block;
        line-height: 17px;
        margin-top: 10px;
    }

    .design-brief-content {
        width: 100%;
    }

    .msg-incoming .bubble {
        max-width: 90%;
    }

}

@media (max-width: 400px) {
    #presenceStatus {
        width: 120px;
        height: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 12px;
    }
}