body{
    background-color: #f4f7f6;
    margin-top:20px;
}
.card {
    background: #fff;
    transition: .5s;
    border: 0;
    margin-bottom: 30px;
    border-radius: .55rem;
    position: relative;
    width: 100%;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 10%);
}
.chat-app .people-list {
    width: 280px;
    position: absolute;
    left: 0;
    top: 0;
    padding: 20px;
    z-index: 7
}

.chat-app .chat {
    margin-left: 280px;
    border-left: 1px solid #eaeaea
}

.people-list {
    -moz-transition: .5s;
    -o-transition: .5s;
    -webkit-transition: .5s;
    transition: .5s
}

.people-list .chat-list li {
    padding: 10px 15px;
    list-style: none;
    border-radius: 3px
}

.people-list .chat-list li:hover {
    background: #efefef;
    cursor: pointer
}

.people-list .chat-list li.active {
    background: #efefef
}

.people-list .chat-list li .name {
    font-size: 15px
}

.people-list .chat-list img {
    width: 45px;
    border-radius: 50%
}

.people-list img {
    float: left;
    border-radius: 50%
}

.people-list .about {
    float: left;
    padding-left: 8px
}

.people-list .status {
    color: #999;
    font-size: 13px
}

.chat .chat-header {
    position: sticky;
    top: 0;
    background-color: #ffffff !important;
    padding: 15px 20px;
    border-bottom: 2px solid #f4f7f6;
    z-index: 1000;
}

.chat .chat-header img {
    float: left;
    border-radius: 40px;
    width: 40px
}

.chat .chat-header .chat-about {
    float: left;
    padding-left: 10px
}

.chat .chat-history {
    padding: 20px;
    border-bottom: 2px solid #fff
}

.chat .chat-history ul {
    padding: 0
}

.chat .chat-history ul li {
    list-style: none;
    margin-bottom: 30px
}

.chat .chat-history ul li:last-child {
    margin-bottom: 0px
}

.chat .chat-history .message-data {
    margin-bottom: 15px
}

.chat .chat-history .message-data img {
    border-radius: 40px;
    width: 40px
}

.chat .chat-history .message-data-time {
    color: #434651;
    padding-left: 6px
}

.chat .chat-history .message {
    color: #444;
    padding: 18px 20px;
    line-height: 26px;
    font-size: 16px;
    border-radius: 7px;
    display: inline-block;
    position: relative;
    max-width: 55% !important;
}

.chat .chat-history .message:after {
    bottom: 100%;
    left: 7%;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border: 10px solid transparent;
    border-bottom-color: #fff;
    margin-left: -10px
}

.chat .chat-history .my-message {
    background: #efefef
}

.chat .chat-history .my-message:after {
    bottom: 100%;
    left: 30px;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border: 10px solid transparent;
    border-bottom-color: #efefef;
    margin-left: -10px
}

.chat .chat-history .other-message {
    background: #e8f1f3;
    text-align: right
}

.chat .chat-history .other-message:after {
    border-bottom-color: #e8f1f3;
    left: 93%
}

.chat .chat-message {
    padding: 20px
}

.online,
.offline,
.me {
    margin-right: 2px;
    font-size: 8px;
    vertical-align: middle
}

.online {
    color: #86c541
}

.offline {
    color: #e47297
}

.me {
    color: #1d8ecd
}

.float-right {
    float: right
}

.clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0
}

.ai-image {
    border-radius: 10px !important;
    max-width: 200px;
}

@media only screen and (max-width: 767px) {
    .chat-app .people-list {
        height: 465px;
        width: 100%;
        overflow-x: auto;
        background: #fff;
        left: -400px;
        display: none
    }
    .chat-app .people-list.open {
        left: 0
    }
    .chat-app .chat {
        margin: 0
    }
    .chat-app .chat .chat-header {
        border-radius: 0.55rem 0.55rem 0 0
    }
    .chat-app .chat-history {
        height: 300px;
        overflow-x: auto
    }
    .chat .chat-header {
        position: sticky;
        top: 0;
        background-color: #ffffff !important;
        padding: 15px 20px;
        border-bottom: 2px solid #f4f7f6;
        z-index: 1000;
    }

    .ai-image {
        width: 75% !important;
    }

    .chat .chat-history .message {
        max-width: 80% !important;
    }
}

@media only screen and (min-width: 768px) and (max-width: 992px) {
    .chat-app .chat-list {
        height: 650px;
        overflow-x: auto
    }
    .chat-app .chat-history {
        height: 600px;
        overflow-x: auto
    }
    .chat .chat-header {
        position: sticky;
        top: 0;
        background-color: #ffffff !important;
        padding: 15px 20px;
        border-bottom: 2px solid #f4f7f6;
        z-index: 1000;
    }

    .ai-image {
        width: 75% !important;
    }

    .chat .chat-history .message {
        max-width: 75% !important;
    }
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 1) {
    .chat-app .chat-list {
        height: 480px;
        overflow-x: auto
    }
    .chat-app .chat-history {
        height: calc(100vh - 350px);
        overflow-x: auto
    }
    .chat .chat-header {
        position: sticky;
        top: 0;
        background-color: #ffffff !important;
        padding: 15px 20px;
        border-bottom: 2px solid #f4f7f6;
        z-index: 1000;
    }

    .ai-image {
        width: 75% !important;
    }

    .chat .chat-history .message {
        max-width: 70% !important;
    }
}

.dropup {
    position: relative;
    display: inline-block;
}

.dropup-content {
    display: none;
    position: absolute;
    background-color: #28a745;
    max-width: 100%;
    bottom: 15px;
    z-index: 1;
    border-radius: 5px 5px;
}

.dropup-content a {
    color: #ffffff;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropup-content a:hover {background-color: #218838;}

.dropup:hover .dropup-content {
    display: block;
}

.dropdown-menu {
    max-height: 20rem;
    overflow-y: auto;
}

.dataTables_wrapper {
    overflow-x: auto;
}

.aspect-wrapper {
    display: flex;
    gap: 12px;
}

.aspect-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 12px; /* reduced */
    text-align: center;
    cursor: pointer;
    width: 95px;
    transition: 0.25s;
    background: #fff;
}

.aspect-card:hover {
    border-color: #28a745;
    color: #28a745;
}

.aspect-card input {
    display: none;
}

.aspect-card.active {
    border-color: #28a745;
}

.icon-box {
    color: #999;
    font-size: 26px;
    line-height: 1;
    margin-bottom: 2px; /* tighter spacing */
}

.landscape i {
    transform: rotate(90deg);
}

.ratio-text {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    line-height: 1.1;
}

.image-picker {
    margin-top: 16px;
}

.upload-box {
    border: 2px dashed #bbb;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    color: #666;
    display: inline-block;
    width: 180px;
    transition: 0.3s;
}

.upload-box:hover {
    border-color: #28a745;
    color: #28a745;
}

.upload-box input {
    display: none;
}

.upload-box i {
    font-size: 26px;
    display: block;
    margin-bottom: 6px;
}

.preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.preview-item {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    position: relative;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}