body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    display: flex;
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar .logo {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
}

.sidebar nav ul li {
    margin-bottom: 15px;
}

.sidebar nav ul li a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background-color: #34495e;
}

.btn-compose {
    display: block;
    background-color: #3498db;
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 30px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-compose:hover {
    background-color: #2980b9;
}

/* Content Area */
.content {
    flex-grow: 1;
    background-color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Scroll inside listings */
}

/* Inbox Listing */
.message-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.message-item {
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.1s;
}

.message-item:hover {
    background-color: #f9f9f9;
}

.message-item.unread {
    font-weight: bold;
    background-color: #fffdf5;
}

.message-sender {
    width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 20px;
}

.message-subject {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-date {
    width: 150px;
    text-align: right;
    font-size: 0.9em;
    color: #666;
}

/* Message View */
.message-view {
    padding: 40px;
    overflow-y: auto;
    height: 100%;
}

.message-header {
    border-bottom: 1px solid #eee;
    padding: 20px;
}

.message-header h2 {
    margin: 0 0 10px 0;
}

.meta-info {
    color: #666;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
}

.message-body {
    line-height: 1.6;
    font-family: inherit;
}

/* Compose Form */
.compose-form {
    padding: 40px;
    max-width: 800px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
}

textarea.form-control {
    height: 300px;
    resize: vertical;
}

.btn-send {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-send:hover {
    background-color: #27ae60;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
}

.btn-sm {
    text-decoration: none;
    color: #333;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 0.9em;
}

.btn-sm:hover {
    background-color: #f1f1f1;
}

.btn-sm.disabled {
    color: #aaa;
    border-color: #eee;
    pointer-events: none;
}
