
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f7fb;
    color: #172033;
    min-height: 100vh;
}

.navbar {
    min-height: 76px;
    padding: 16px 7%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e8ebf2;
    box-shadow: 0 3px 15px rgba(20, 35, 70, 0.04);
}

.logo {
    color: #173d75;
    font-size: 21px;
    font-weight: 800;
    text-decoration: none;
}

.back-link {
    color: #315b91;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.back-link:hover {
    color: #087e8b;
}

.container {
    width: min(100% - 36px, 1000px);
    margin: 0 auto;
    padding: 56px 0 80px;
}

.page-header {
    margin-bottom: 30px;
}

.eyebrow {
    display: inline-block;
    color: #087e8b;
    background: #e0f7f5;
    border-radius: 30px;
    padding: 7px 13px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    margin-bottom: 15px;
}

.page-header h1 {
    font-size: clamp(28px, 5vw, 40px);
    line-height: 1.2;
    margin-bottom: 12px;
    color: #142744;
}

.page-header p {
    color: #68758b;
    font-size: 16px;
    line-height: 1.7;
}

.status {
    padding: 17px 20px;
    background: #ffffff;
    border: 1px solid #e5eaf2;
    border-radius: 14px;
    color: #64748b;
    margin-bottom: 20px;
    font-size: 14px;
}

.chat-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
    gap: 20px;
}

.chat-card {
    background: #ffffff;
    border: 1px solid #e7ebf3;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 28px rgba(28, 46, 82, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(28, 46, 82, 0.1);
}

.chat-card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.chat-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: #e8f1ff;
    border-radius: 15px;
    font-size: 25px;
}

.chat-card h2 {
    font-size: 19px;
    line-height: 1.4;
    color: #172b4d;
    overflow-wrap: anywhere;
}

.chat-card p {
    color: #718096;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.chat-status {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 10px;
    background: #e5f8ed;
    color: #187346;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

.open-chat-btn,
.primary-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 13px 18px;
    width: 100%;
    min-height: 46px;
    background: #1769e0;
    color: #ffffff;
    border: none;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.open-chat-btn:hover,
.primary-btn:hover {
    background: #1054b8;
}

.empty-state {
    text-align: center;
    background: #ffffff;
    border: 1px solid #e7ebf3;
    border-radius: 20px;
    padding: 48px 24px;
    box-shadow: 0 8px 28px rgba(28, 46, 82, 0.04);
}

.empty-state[hidden] {
    display: none !important;
}

.empty-icon {
    font-size: 55px;
    margin-bottom: 18px;
}

.empty-state h2 {
    color: #172b4d;
    font-size: 25px;
    margin-bottom: 12px;
}

.empty-state p {
    color: #718096;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.empty-state .primary-btn {
    width: auto;
    max-width: 100%;
}

.error-status {
    color: #a83232;
    background: #fff2f2;
    border-color: #ffd6d6;
}

@media (max-width: 600px) {
    .navbar {
        padding: 15px 18px;
        min-height: 66px;
    }

    .logo {
        font-size: 17px;
    }

    .back-link {
        font-size: 13px;
    }

    .container {
        width: calc(100% - 28px);
        padding-top: 36px;
    }

    .page-header p {
        font-size: 14px;
    }

    .chat-card {
        padding: 20px;
    }

    .empty-state {
        padding: 36px 18px;
    }
}
