
:root {
    --cream: #FFF9F0;
    --emerald: #087B52;
    --lime: #D8F36A;
    --coral: #FF725E;
    --lavender: #B8A5FF;
    --ink: #17231D;
    --gray: #737D74;
    --border: #EAE9E1;
    --white: #FFFFFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: #F8F8F5;
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

/* APP */

.support-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */

.support-header {
    height: 76px;
    padding: 0 4%;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: "Lexend", sans-serif;
    font-size: 19px;
    font-weight: 800;
}

.brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.brand-dot,
.page-heading h1 span {
    color: var(--emerald);
}

.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--gray);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--emerald);
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--emerald);
    color: white;
    font-weight: 700;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-info strong {
    font-size: 11px;
}

.profile-info span {
    font-size: 10px;
    color: var(--gray);
}

/* MAIN */

.support-main {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 35px 4% 0;
    flex: 1;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.eyebrow {
    color: var(--emerald);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.page-heading h1 {
    margin-top: 7px;
    font-family: "Lexend", sans-serif;
    font-size: 28px;
    font-weight: 600;
}

.page-heading p {
    margin-top: 7px;
    color: var(--gray);
    font-size: 12px;
}

.back-button {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: white;
    font-size: 11px;
    font-weight: 600;
}

.back-button:hover {
    color: var(--emerald);
    border-color: var(--emerald);
}

/* SUMMARY */

.inbox-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 22px;
}

.summary-card {
    padding: 16px 19px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.summary-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--gray);
}

.summary-card strong {
    font-family: "Lexend", sans-serif;
    font-size: 23px;
}

/* INBOX CONTAINER */

.inbox-container {
    min-height: 610px;
    height: min(68vh, 760px);
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: grid;
    grid-template-columns: 285px minmax(250px, 1fr) 235px;
    overflow: hidden;
}

/* LEFT PANEL */

.conversation-sidebar {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.inbox-heading {
    padding: 21px 17px 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inbox-heading h2 {
    font-family: "Lexend", sans-serif;
    font-size: 17px;
}

.inbox-heading p {
    margin-top: 5px;
    color: var(--gray);
    font-size: 10px;
}

.more-button,
.chat-options {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 7px;
    font-size: 18px;
}

.search-box {
    height: 36px;
    margin: 0 15px 16px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F8F8F5;
    border: 1px solid var(--border);
    border-radius: 7px;
}

.search-box span {
    color: var(--gray);
    font-size: 18px;
}

.search-box input {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 10px;
}

.inbox-filters {
    padding: 0 15px 13px;
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border);
}

.filter-tab {
    padding: 7px 10px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--gray);
    font-size: 10px;
}

.filter-tab.active {
    color: var(--emerald);
    background: #E9F1E9;
    font-weight: 700;
}

.conversation-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.empty-inbox {
    max-width: 210px;
    text-align: center;
}

.empty-icon,
.empty-chat-icon,
.details-icon {
    display: grid;
    place-items: center;
    background: #F0EFE7;
    color: var(--emerald);
}

.empty-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 15px;
    border-radius: 13px;
    font-size: 22px;
}

.empty-inbox strong {
    font-size: 12px;
}

.empty-inbox p {
    margin-top: 8px;
    color: var(--gray);
    font-size: 10px;
    line-height: 1.7;
}

/* CENTER PANEL */

.message-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.message-empty-state {
    margin: auto;
    max-width: 330px;
    padding: 25px;
    text-align: center;
}

.empty-chat-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 20px;
    border-radius: 19px;
    font-size: 26px;
}

.message-empty-state h2 {
    font-family: "Lexend", sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.message-empty-state p {
    margin-top: 10px;
    color: var(--gray);
    font-size: 11px;
    line-height: 1.8;
}

.message-note {
    display: inline-block;
    margin-top: 22px;
    color: #969D93;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* ACTIVE CHAT */

.active-conversation {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chat-header {
    min-height: 68px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-client {
    display: flex;
    align-items: center;
    gap: 11px;
}

.client-avatar,
.details-client-avatar {
    width: 37px;
    height: 37px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #E9F1E9;
    color: var(--emerald);
    font-weight: 700;
}

.chat-client div:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-client strong {
    font-size: 12px;
}

.chat-client span {
    font-size: 10px;
    color: var(--gray);
}

.chat-messages {
    flex: 1;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reply-form {
    display: flex;
    gap: 9px;
    padding: 13px;
    margin: 0 15px;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.reply-form input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 12px;
}

.reply-form button {
    width: 38px;
    height: 35px;
    border: none;
    border-radius: 7px;
    background: var(--emerald);
    color: white;
    font-size: 19px;
}

.reply-footer {
    padding: 8px 18px 12px;
    color: var(--gray);
    font-size: 9px;
}

/* DETAILS */

.details-panel {
    min-width: 0;
    border-left: 1px solid var(--border);
}

.details-heading {
    padding: 22px 16px;
    border-bottom: 1px solid var(--border);
}

.details-heading h3 {
    font-size: 12px;
}

.details-empty {
    padding: 30px 17px;
    text-align: center;
}

.details-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 14px;
    border-radius: 12px;
    font-size: 20px;
}

.details-empty strong {
    font-size: 11px;
}

.details-empty p {
    margin-top: 8px;
    color: var(--gray);
    font-size: 10px;
    line-height: 1.7;
}

.conversation-details {
    padding: 25px 17px;
    text-align: center;
}

.details-client-avatar {
    width: 55px;
    height: 55px;
    margin: 0 auto 12px;
    font-size: 18px;
}

.conversation-details h3 {
    font-size: 13px;
}

.details-client-label {
    margin-top: 5px;
    font-size: 8px;
    letter-spacing: 1px;
    color: var(--gray);
}

.detail-divider {
    height: 1px;
    margin: 23px 0;
    background: var(--border);
}

.detail-item {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.detail-item span {
    font-size: 9px;
    color: var(--gray);
}

.detail-item strong {
    font-size: 11px;
}

/* FOOTER */

.support-footer {
    min-height: 48px;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: #969D93;
    font-size: 9px;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--border);
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .inbox-container {
        grid-template-columns: 245px minmax(250px, 1fr);
    }

    .details-panel {
        display: none;
    }
}

@media (max-width: 700px) {
    .support-header {
        padding: 0 16px;
    }

    .header-center,
    .profile-info {
        display: none;
    }

    .support-main {
        padding: 25px 14px 0;
    }

    .page-heading h1 {
        font-size: 23px;
    }

    .inbox-summary {
        gap: 7px;
    }

    .summary-card {
        padding: 12px;
    }

    .summary-label {
        font-size: 7px;
    }

    .summary-card strong {
        font-size: 19px;
    }

    .inbox-container {
        height: auto;
        min-height: 650px;
        grid-template-columns: 1fr;
        grid-template-rows: 260px minmax(380px, 1fr);
    }

    .conversation-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .message-panel {
        min-height: 380px;
    }

    .support-footer {
        font-size: 8px;
    }

    .support-footer span:last-child {
        display: none;
    }
}

/* =========================================
   CURIOSE SUPPORT INBOX
   CONVERSATION LIST & CHAT MESSAGE STYLES
========================================= */

/* CONVERSATION LIST */

.conversation-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 10px;
    gap: 7px;
    overflow-y: auto;
}

.conversation-item {
    flex: 0 0 auto;
    min-height: 76px;
}

.conversation-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 13px;
    text-align: left;
    color: var(--ink);
    background: var(--white);
    border: 1px solid transparent;
    border-radius: 9px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.conversation-item:hover {
    background: #F8F8F5;
    border-color: var(--border);
}

.conversation-item.active {
    background: #E9F1E9;
    border-color: #D5E5D8;
}

.conversation-item-top,
.conversation-item-bottom {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.conversation-client-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 700;
}

.conversation-time {
    flex-shrink: 0;
    color: var(--gray);
    font-size: 9px;
}

.conversation-preview {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray);
    font-size: 10px;
}

.conversation-unread {
    flex-shrink: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 50px;
    background: var(--emerald);
    color: white;
    font-size: 9px;
    font-weight: 700;
}


/* CHAT MESSAGE AREA */

.chat-messages {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 22px;
    background: #FFFFFF;
}

.client-message,
.admin-message {
    width: 100%;
    max-width: 75%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.client-message {
    align-self: flex-start;
    align-items: flex-start;
}

.admin-message {
    align-self: flex-end;
    align-items: flex-end;
}

.message-sender {
    color: var(--gray);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.7px;
}

.message-bubble {
    max-width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.client-message .message-bubble {
    background: #F3F2ED;
    color: var(--ink);
    border: 1px solid var(--border);
    border-top-left-radius: 3px;
}

.admin-message .message-bubble {
    background: var(--emerald);
    color: white;
    border: 1px solid var(--emerald);
    border-top-right-radius: 3px;
}

.message-time {
    color: #969D93;
    font-size: 9px;
}


/* REPLY FORM */

.reply-form {
    flex-shrink: 0;
    background: white;
}

.reply-form button:hover {
    background: #066744;
}

.reply-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* EMPTY INBOX */

.conversation-list .empty-inbox {
    margin: auto;
}


/* RESPONSIVE CHAT BUBBLES */

@media (max-width: 700px) {
    .client-message,
    .admin-message {
        max-width: 90%;
    }

    .chat-messages {
        padding: 15px;
    }
}
/* =========================================
   CONTACT FORM INQUIRY VIEW
========================================= */

.active-contact-inquiry {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.contact-inquiry-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contact-inquiry-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.contact-inquiry-meta span,
.contact-inquiry-message span {
    color: var(--gray);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

.contact-inquiry-meta strong {
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-inquiry-message {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-inquiry-message p {
    padding: 16px;
    background: #F8F8F5;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.contact-reply-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 11px 16px;
    border-radius: 7px;
    background: var(--emerald);
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.contact-reply-button:hover {
    opacity: 0.9;
}
/* =========================================
   INBOX SOURCE TABS
========================================= */

.inbox-source-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    padding: 0 0 14px;
}

.source-tab {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: white;
    color: var(--gray);
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.source-tab:hover {
    border-color: var(--emerald);
    color: var(--emerald);
}

.source-tab.active {
    background: var(--emerald);
    border-color: var(--emerald);
    color: white;
}

/* =========================================
   CURIOSE ADMIN INBOX — LAYOUT FIXES
========================================= */

/* DESKTOP: THREE-COLUMN INBOX */

.inbox-container {
    width: 100%;
    min-width: 0;
    min-height: 610px;
    height: min(68vh, 760px);
    display: grid;
    grid-template-columns: minmax(220px, 285px) minmax(300px, 1fr) minmax(200px, 235px);
    overflow: hidden;
}

.conversation-sidebar,
.message-panel,
.details-panel {
    min-width: 0;
    min-height: 0;
}

.conversation-sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.conversation-list {
    min-height: 0;
    overflow-y: auto;
}

.message-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.details-panel {
    display: block;
    overflow-y: auto;
    border-left: 1px solid var(--border);
}

/* CONTACT INQUIRY */

.active-contact-inquiry {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
}

.contact-inquiry-content {
    width: 100%;
}

.contact-inquiry-meta strong,
.detail-item strong {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* PHONE NUMBER FIELDS */

#contact-client-phone,
#details-phone {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* STATUS AND DETAILS */

.conversation-details {
    width: 100%;
}

.detail-item {
    width: 100%;
}

/* MEDIUM DESKTOP */

@media (max-width: 1100px) and (min-width: 901px) {
    .inbox-container {
        grid-template-columns: minmax(205px, 235px) minmax(280px, 1fr) minmax(185px, 205px);
    }

    .conversation-details {
        padding: 22px 12px;
    }
}

/* TABLET */

@media (max-width: 900px) {
    .inbox-container {
        height: 700px;
        grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    }

    .details-panel {
        display: none;
    }
}

/* MOBILE */

@media (max-width: 700px) {
    .inbox-container {
        height: auto;
        min-height: 650px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 260px minmax(380px, 1fr);
    }

    .conversation-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .message-panel {
        min-height: 380px;
    }

    .contact-inquiry-content {
        padding: 20px;
    }

    .inbox-source-tabs {
        flex-wrap: wrap;
    }
}


/* Admin logout button */
.header-profile {
    gap: 14px;
}

.logout-button {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--text, #17231D);
    padding: 9px 13px;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.logout-button:hover {
    background: #F7F6F2;
    border-color: var(--emerald);
}

.logout-button:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .header-profile {
        gap: 8px;
    }

    .logout-button {
        padding: 7px 9px;
        font-size: 10px;
    }
}
