* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #faf7fb;
    color: #2c2430;
}

a {
    text-decoration: none;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f6d7ee, #fff7e6, #e6f4ff);
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.logo {
    font-size: 28px;
    font-weight: 900;
    color: #a83f8f;
    margin-bottom: 8px;
}

.auth-card h1 {
    margin: 10px 0;
    font-size: 32px;
}

.auth-card p {
    color: #746a78;
    margin-bottom: 22px;
}

label {
    display: block;
    margin: 14px 0 7px;
    font-weight: 700;
}

input, textarea, select {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd3df;
    border-radius: 14px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.btn {
    display: inline-block;
    border: none;
    background: #a83f8f;
    color: white;
    padding: 13px 20px;
    border-radius: 16px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 18px;
}

.btn.full {
    width: 100%;
}

.btn.secondary {
    background: #2c2430;
}

.small-link {
    display: block;
    margin-top: 18px;
    color: #a83f8f;
    font-weight: 700;
    text-align: center;
}

.error {
    background: #ffe8e8;
    color: #a02828;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.success {
    background: #e8fff1;
    color: #18713f;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.app-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #2c2430;
    color: white;
    padding: 28px 22px;
}

.sidebar .logo {
    color: white;
    margin-bottom: 30px;
}

.sidebar a {
    display: block;
    color: #f2d9ef;
    padding: 13px 14px;
    border-radius: 14px;
    margin-bottom: 8px;
    font-weight: 700;
}

.sidebar a:hover,
.sidebar a.active {
    background: #a83f8f;
    color: white;
}

.main {
    padding: 34px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
}

.topbar h1 {
    font-size: 34px;
}

.user-pill {
    background: white;
    border-radius: 100px;
    padding: 12px 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    font-weight: 800;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 28px;
}

.card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.07);
}

.card .icon {
    font-size: 42px;
    margin-bottom: 14px;
}

.card h3 {
    margin-bottom: 8px;
}

.card p {
    color: #746a78;
}

.panel {
    background: white;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.07);
    margin-bottom: 24px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.table th,
.table td {
    text-align: left;
    border-bottom: 1px solid #eee5ef;
    padding: 14px 10px;
}

.chat-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
}

.people-list {
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.07);
}

.person {
    display: block;
    padding: 13px;
    border-radius: 14px;
    color: #2c2430;
    font-weight: 700;
}

.person:hover,
.person.active {
    background: #f7e5f4;
    color: #a83f8f;
}

.messages {
    height: 420px;
    overflow-y: auto;
    padding: 18px;
    background: #faf7fb;
    border-radius: 18px;
    margin-bottom: 16px;
}

.message-row {
    margin-bottom: 12px;
}

.message-bubble {
    display: inline-block;
    max-width: 75%;
    padding: 12px 14px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 5px 16px rgba(0,0,0,0.05);
}

.message-row.mine {
    text-align: right;
}

.message-row.mine .message-bubble {
    background: #a83f8f;
    color: white;
}

.message-meta {
    font-size: 12px;
    opacity: 0.75;
    margin-bottom: 4px;
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-form input {
    flex: 1;
}

.chat-form .btn {
    margin-top: 0;
}

@media (max-width: 850px) {
    .app-layout,
    .chat-layout,
    .cards {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
