* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #1d1c1d;
    background: #ffffff;
    overflow: hidden;
}

button,
input,
textarea {
    font: inherit;
}

/* TOP BAR */

.top-bar {
    height: 44px;
    background: #3f0e40;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
}

.top-history {
    position: absolute;
    left: 365px;
    display: flex;
    gap: 8px;
}

.top-history button,
.top-profile button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
}

.top-search {
    width: 40%;
}

.top-search input {
    width: 100%;
    border: none;
    outline: none;
    border-radius: 6px;
    padding: 7px 12px;
    background: #5d2c5f;
    color: white;
}

.top-search input::placeholder {
    color: #ddd3dd;
}

.top-profile {
    position: absolute;
    right: 16px;
}

.profile-avatar,
.small-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #36c5f0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* APP LAYOUT */

.slack-app {
    display: grid;
    grid-template-columns: 48px 300px 1fr;
    height: calc(100vh - 44px);
}

/* LEFT ICON RAIL */

.icon-rail {
    background: #260027;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
}

.company-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: white;
    color: #3f0e40;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.rail-item {
    width: 100%;
    text-decoration: none;
    color: #ddd3dd;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    font-size: 10px;
    gap: 4px;
}

.rail-item:hover,
.rail-item.active {
    background: #4a154b;
    border-radius: 8px;
    color: white;
}

.rail-icon {
    font-size: 18px;
}

.rail-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.rail-bottom button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #5c3b5d;
    color: white;
    cursor: pointer;
}

/* WORKSPACE SIDEBAR */

.workspace-sidebar {
    background: #4a154b;
    color: white;
    overflow-y: auto;
    border-right: 1px solid #5f3560;
}

.workspace-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
}

.workspace-name h2 {
    font-size: 18px;
}

.workspace-actions {
    display: flex;
    gap: 6px;
}

.workspace-actions button {
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
}

.conversation-search {
    margin: 0 10px 10px;
    padding: 7px 10px;
    border: 1px solid #8b698c;
    border-radius: 5px;
    font-size: 13px;
    color: #e8dfe8;
}

.workspace-links {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #6b466c;
    padding-bottom: 10px;
}

.workspace-links a,
.channel-link,
.dm-link {
    color: #e5dbe5;
    text-decoration: none;
    padding: 5px 14px;
    font-size: 14px;
}

.workspace-links a:hover,
.channel-link:hover,
.dm-link:hover {
    background: #5d2c5f;
    color: white;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    padding-top: 10px;
}

.section-title {
    font-size: 13px;
    font-weight: bold;
    color: #cbbdcb;
    padding: 6px 14px;
}

.active-channel {
    background: #ffffff;
    color: #3f0e40;
    font-weight: bold;
}

.active-channel:hover {
    background: #ffffff;
    color: #3f0e40;
}

.online-dot,
.away-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 7px;
}

.online-dot {
    background: #2eb67d;
}

.away-dot {
    background: #ecb22e;
}

/* MAIN CHANNEL */

.channel-area {
    background: white;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.channel-header {
    min-height: 64px;
    border-bottom: 1px solid #dddddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
}

.channel-heading h1 {
    font-size: 18px;
    margin-bottom: 4px;
}

.channel-heading p {
    font-size: 12px;
    color: #616061;
}

.channel-actions {
    display: flex;
    gap: 8px;
}

.channel-actions button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
}

.channel-tabs {
    height: 40px;
    border-bottom: 1px solid #e3e3e3;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
}

.channel-tabs button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 10px 4px;
    font-size: 13px;
}

.channel-tabs .active-tab {
    border-bottom: 2px solid #611f69;
    font-weight: bold;
}

/* MESSAGE FEED */

.message-feed {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.date-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
}

.date-divider::before,
.date-divider::after {
    content: "";
    height: 1px;
    background: #dddddd;
    flex: 1;
}

.date-divider span {
    border: 1px solid #dddddd;
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 11px;
    margin: 0 10px;
    background: white;
}

.message {
    display: flex;
    gap: 10px;
    padding: 8px 18px;
}

.message:hover {
    background: #f8f8f8;
}

.message-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 6px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.avatar-blue {
    background: #36c5f0;
}

.avatar-purple {
    background: #611f69;
}

.avatar-green {
    background: #2eb67d;
}

.avatar-orange {
    background: #ecb22e;
}

.message-content {
    flex: 1;
}

.message-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}

.message-info strong {
    font-size: 14px;
}

.message-info span {
    font-size: 11px;
    color: #616061;
}

.message-content p {
    font-size: 14px;
    line-height: 1.35;
}

.reactions,
.message-reply {
    margin-top: 6px;
    font-size: 12px;
    color: #1264a3;
}

/* MESSAGE COMPOSER */

.message-composer {
    margin: 0 16px 12px;
    border: 1px solid #b5b5b5;
    border-radius: 8px;
    background: white;
}

.formatting-bar {
    display: flex;
    gap: 3px;
    padding: 6px 8px;
    border-bottom: 1px solid #eeeeee;
}

.formatting-bar button,
.composer-tools button,
.send-button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px 6px;
}

.message-composer textarea {
    width: 100%;
    min-height: 60px;
    border: none;
    outline: none;
    resize: none;
    padding: 10px 12px;
}

.composer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px 8px;
}

.composer-tools {
    display: flex;
    gap: 2px;
}

.send-button {
    background: #007a5a;
    color: white;
    border-radius: 4px;
    min-width: 34px;
}

.send-button:hover {
    background: #148567;
}




/* USER MESSAGE ACTIONS */

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.message-actions button {
    border: 1px solid #dddddd;
    background: white;
    color: #1264a3;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
}

.message-actions button:hover {
    background: #f4f4f4;
}

.delete-message {
    color: #d72b3f !important;
}



/* MESSAGE MENU */

.message-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.message-menu-wrapper {
    position: relative;
}

.menu-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    color: #616061;
    font-size: 18px;
    padding: 2px 8px;
    border-radius: 6px;
}

.menu-toggle:hover {
    background: #f1f1f1;
}

.message-menu {
    position: absolute;
    top: 28px;
    right: 0;
    min-width: 150px;
    background: white;
    border: 1px solid #dddddd;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    overflow: hidden;
}

.message-menu.hidden {
    display: none;
}

.message-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: white;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #1d1c1d;
}

.message-menu button:hover {
    background: #f8f8f8;
}

.message-menu .danger {
    color: #d72b3f;
}

.pinned-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #1264a3;
    background: #eef6fc;
    border-radius: 12px;
    padding: 3px 8px;
}

.reply-list {
    margin-top: 8px;
    border-left: 2px solid #e3e3e3;
    padding-left: 10px;
}

.reply-item {
    margin-top: 6px;
    background: #f8f8f8;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
}

.reply-item strong {
    margin-right: 6px;
}