* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f0f2f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.pro-header {
    background-color: #111b21;
    color: #fff;
    padding: 10px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-tabs {
    display: flex;
    gap: 30px;
}

.nav-tab {
    cursor: pointer;
    padding: 10px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
    color: #aebac1;
}

.nav-tab:hover { color: #fff; }
.nav-tab.active {
    color: #fff;
    border-bottom-color: #00a884;
}

.app-container {
    flex: 1;
    width: 100%;
    display: flex;
    overflow: hidden;
}

.tab-section {
    display: none;
    width: 100%;
    height: 100%;
}

.tab-section.active {
    display: flex;
}

/* Sidebar overrides for Pro */
.action-btn {
    background-color: #00a884;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    margin: 10px;
}

/* Sidebar */
.sidebar {
    width: 30%;
    min-width: 300px;
    background-color: #fff;
    border-right: 1px solid #e9edef;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    height: 60px;
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #cbd5e0;
}

.sidebar-actions .icon {
    font-size: 20px;
    margin-left: 20px;
    color: #54656f;
    cursor: pointer;
}

.search-container {
    padding: 8px 12px;
}

.search-bar {
    background-color: #f0f2f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.search-bar input {
    background: transparent;
    border: none;
    padding: 8px;
    width: 100%;
    outline: none;
    font-size: 14px;
}

.contact-list {
    flex: 1;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.2s;
}

.contact-item:hover {
    background-color: #f5f6f6;
}

.contact-item.active {
    background-color: #f0f2f5;
}

.contact-info {
    margin-left: 12px;
    flex: 1;
    overflow: hidden;
}

.contact-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-name {
    font-weight: 500;
    color: #111b21;
}

.contact-time {
    font-size: 12px;
    color: #667781;
}

.contact-preview {
    font-size: 14px;
    color: #667781;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #efeae2;
    position: relative;
}

.chat-welcome {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    background-color: #f8fafb;
    border-bottom: 6px solid #25d366;
}

.chat-welcome h1 {
    font-weight: 300;
    color: #41525d;
    margin-bottom: 15px;
}

.chat-welcome p {
    color: #667781;
}

.chat-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    height: 60px;
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid #e9edef;
}

.header-avatar {
    width: 40px;
    height: 40px;
}

.chat-info {
    margin-left: 15px;
}

.chat-info h2 {
    font-size: 16px;
    font-weight: 500;
    color: #111b21;
}

.chat-info .status {
    font-size: 13px;
    color: #667781;
}

.message-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-repeat: repeat;
}

.message {
    max-width: 65%;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14.2px;
    position: relative;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, .13);
}

.message.incoming {
    align-self: flex-start;
    background-color: #fff;
    border-top-left-radius: 0;
}

.message.outgoing {
    align-self: flex-end;
    background-color: #dcf8c6;
    border-top-right-radius: 0;
}

.message-text {
    color: #111b21;
}

.message-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.message-time {
    font-size: 11px;
    color: #667781;
}

.status-icon {
    font-size: 14px;
    color: #667781;
}

.status-sent .status-icon { color: #8696a0; }
.status-delivered .status-icon { color: #8696a0; }
.status-read .status-icon { color: #53bdeb; }
.status-failed .status-icon { color: #ef4444; }

.contact-item.new-update {
    animation: flash-update 1.5s ease-out;
}

@keyframes flash-update {
    0% { background-color: #dcf8c6; }
    100% { background-color: transparent; }
}

.footer-icon {
    font-size: 24px;
    color: #54656f;
    margin-right: 15px;
    cursor: pointer;
}

#message-input {
    flex: 1;
    background-color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    outline: none;
    font-size: 15px;
}

.send-btn {
    background: transparent;
    border: none;
    color: #54656f;
    margin-left: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Dashboard & Forms */
.dashboard-card {
    background: #fff;
    margin: 40px auto;
    width: 90%;
    max-width: 800px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #54656f;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9edef;
    border-radius: 8px;
    outline: none;
}

.btn-primary {
    background: #00a884;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.mapping-area {
    margin-top: 30px;
    border-top: 1px solid #e9edef;
    padding-top: 20px;
}

.mapping-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.mapping-row span { width: 100px; font-weight: 500; }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.btn-secondary {
    background: #f0f2f5;
    color: #54656f;
    border: 1px solid #e9edef;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #e9edef;
}

.hidden {
    display: none !important;
}
