/* Add here all your CSS customizations */

/* DataTables search input should stay inside card on all list screens. */
.dataTables_wrapper .dataTables_filter {
    float: right;
    text-align: right;
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_filter label {
    width: auto !important;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dataTables_wrapper .dataTables_filter input {
    width: 220px !important;
    max-width: 100%;
    margin-left: 0 !important;
    box-sizing: border-box;
}

/* Mobile helpers: keep edit forms readable without overriding desktop theme layout. */
@media (max-width: 991.98px) {
    /* Keep list tables fully reachable on mobile without touching header layout. */
    .card .card-body .row > [class*="col-"] {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .card .card-body .table,
    .card .card-body table.dataTable {
        min-width: 720px;
    }

    .card .card-body .dataTables_wrapper {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .card .card-body .dataTables_wrapper table.dataTable {
        min-width: 720px !important;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        float: none !important;
        text-align: left !important;
    }

    .dataTables_wrapper .dataTables_filter label {
        width: 100% !important;
        display: block;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        margin-top: 6px;
    }

    .card .card-body .form-group.row {
        margin-left: 0;
        margin-right: 0;
    }

    .card .card-body .form-group.row > label,
    .card .card-body .form-group.row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .card .card-body .form-group.row > label {
        margin-bottom: 6px;
    }
}

/* Mobile login page helpers */
@media (max-width: 575.98px) {
    .body-sign {
        display: block;
        padding: 16px 10px;
    }

    .center-sign {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0 6px;
    }

    .center-sign .logo {
        float: none !important;
        display: block;
        text-align: center;
        margin: 0 auto 12px;
    }

    .center-sign .logo img {
        height: 56px;
        width: auto;
    }

    .card-sign .card-body {
        padding: 14px;
    }

    .card-title-sign h2 {
        font-size: 1rem;
    }

    .body-sign .row > [class*="col-sm-"] {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    .body-sign .row .text-end {
        text-align: left !important;
        margin-top: 10px;
    }

.body-sign .btn {
        width: 100%;
    }
}

.panel-form-card {
    border: 1px solid #e6e9ef;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.panel-form-body {
    max-width: 540px;
    margin: 0 auto;
    padding: 28px 24px 12px;
}

.panel-form-group {
    margin-bottom: 18px;
}

.panel-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.panel-form-alert {
    margin-bottom: 18px;
}

.panel-form-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px 24px;
}

.panel-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.panel-section-subtitle {
    margin: 4px 0 0;
    color: #64748b;
}

.panel-list-body {
    padding: 20px 24px 24px;
}

.profile-listing-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.profile-listing-item:first-child {
    padding-top: 0;
}

.profile-listing-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.profile-listing-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 16px;
    background: #f1f5f9;
}

.profile-listing-content {
    min-width: 0;
}

.profile-listing-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.profile-listing-top h3 {
    margin: 0;
    font-size: 17px;
    color: #111827;
}

.profile-listing-category {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
}

.profile-listing-price {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.profile-listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.profile-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.profile-status-chip.is-active {
    background: #dcfce7;
    color: #166534;
}

.profile-status-chip.is-passive {
    background: #fee2e2;
    color: #b91c1c;
}

.profile-status-chip.is-approved {
    background: #dbeafe;
    color: #1d4ed8;
}

.profile-status-chip.is-pending {
    background: #fef3c7;
    color: #92400e;
}

.profile-listing-date {
    color: #64748b;
    font-size: 12px;
}

.profile-listing-actions {
    display: flex;
    align-items: center;
}

.profile-listing-empty {
    min-height: 120px;
}

.message-panel {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.message-thread-list,
.message-thread-detail {
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    background: #ffffff;
    min-height: 560px;
}

.message-thread-list {
    padding: 14px;
    overflow: auto;
    resize: horizontal;
    max-width: 420px;
    min-width: 280px;
}

.message-thread-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    text-decoration: none;
    color: #1f2937;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.message-thread-item + .message-thread-item {
    margin-top: 10px;
}

.message-thread-item:hover,
.message-thread-item.is-active {
    background: #f8fafc;
    border-color: #d9e6ff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.message-thread-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

.message-thread-copy {
    min-width: 0;
    flex: 1;
}

.message-thread-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
    font-size: 12px;
    color: #64748b;
}

.message-thread-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.message-thread-copy p {
    margin: 0;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-thread-badge {
    display: inline-flex;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
}

.message-thread-detail {
    display: flex;
    flex-direction: column;
}

.message-detail-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e6e9ef;
}

.message-detail-header h3 {
    margin: 0;
    font-size: 20px;
    color: #0f172a;
}

.message-detail-header p {
    margin: 6px 0 0;
    color: #64748b;
}

.message-detail-body {
    padding: 20px 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    flex: 1;
    overflow: auto;
}

.message-bubble {
    max-width: 78%;
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.message-bubble.is-incoming {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.message-bubble.is-outgoing {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    margin-left: auto;
}

.message-bubble-text {
    color: #1e293b;
    white-space: pre-wrap;
}

.message-bubble-time {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.message-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    text-align: center;
    color: #64748b;
    padding: 24px;
}

.message-empty-detail {
    min-height: 100%;
}

.ilan-dropzone-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ilan-dropzone {
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    min-height: 240px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.ilan-dropzone:hover,
.ilan-dropzone.is-dragover {
    border-color: #60a5fa;
    box-shadow: 0 16px 36px rgba(59, 130, 246, 0.14);
    transform: translateY(-1px);
}

.ilan-dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.ilan-dropzone-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    text-align: center;
    color: #475569;
}

.ilan-dropzone.has-image .ilan-dropzone-copy {
    display: none;
}

.ilan-dropzone-copy strong {
    font-size: 18px;
    color: #0f172a;
}

.ilan-dropzone-copy p {
    margin: 8px 0 0;
}

.ilan-dropzone-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #2563eb;
    font-size: 24px;
    margin-bottom: 16px;
}

.ilan-dropzone-preview {
    display: none;
}

.ilan-dropzone-preview.has-image {
    display: block;
}

.ilan-dropzone-preview img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 16px;
}

.ilan-dropzone-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
}

.ilan-dropzone-file-name {
    color: #64748b;
}

.ilan-dropzone-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.ilan-detail-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.ilan-detail-preview-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    min-height: 120px;
}

.ilan-detail-preview-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.ilan-detail-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 0;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ilan-detail-preview-label {
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #334155;
    word-break: break-word;
}

.ilan-dropzone-file-chip {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .message-panel {
        grid-template-columns: 1fr;
    }

    .message-thread-list {
        resize: none;
        max-width: none;
    }

    .panel-form-body {
        max-width: none;
        padding-left: 16px;
        padding-right: 16px;
    }

    .panel-list-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .profile-listing-item {
        grid-template-columns: 1fr;
    }

    .profile-listing-image {
        width: 100%;
        height: 180px;
    }

    .profile-listing-top {
        flex-direction: column;
    }
}
