* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f6f8fc;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #333;
}

.logo i {
    color: #2c3e50;
}

.btn-compose {
    background-color: #c2e7ff;
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    transition: box-shadow 0.2s;
}

.btn-compose:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.nav-folders {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-folders a {
    text-decoration: none;
    color: #444;
    padding: 10px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.2s;
}

.nav-folders a:hover {
    background-color: #f1f3f4;
}

.nav-folders a.active {
    background-color: #d3e3fd;
    font-weight: bold;
    color: #001d35;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: 64px;
    background-color: #fff;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
}

.search-box {
    background-color: #f1f3f4;
    padding: 10px 20px;
    border-radius: 25px;
    width: 60%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
}

.content-area {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Email List */
.email-list {
    width: 400px;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.email-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background 0.2s;
}

.email-item:hover {
    background-color: #f8f9fa;
    box-shadow: inset 1px 0 0 #0b57d0;
}

.email-item.unread {
    font-weight: bold;
}

.email-item.active {
    background-color: #e8f0fe;
}

.email-item .from {
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

.email-item .subject {
    font-size: 0.85rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Email Viewer */
.email-viewer {
    flex: 1;
    background-color: #fff;
    overflow-y: auto;
    padding: 30px;
}

.viewer-header {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.viewer-header h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.viewer-info {
    display: flex;
    justify-content: space-between;
}

.viewer-info .from-info b {
    display: block;
}

.viewer-body {
    line-height: 1.6;
    color: #333;
}

.no-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #777;
}

.no-selection i {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px 20px;
    background-color: #f2f6fc;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
}

.modal-header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

#compose-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#compose-form input, #compose-form textarea {
    width: 100%;
    padding: 10px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    outline: none;
    font-size: 1rem;
}

#compose-form textarea {
    height: 300px;
    resize: none;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #f1f3f4;
    text-align: right;
}

.btn-send {
    background-color: #0b57d0;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}

.btn-send:hover {
    background-color: #0842a0;
}
