/* Layout Styles - App Container, Header, Sidebar, Main Content */

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background 0.2s;
}

.menu-btn:hover {
    background: var(--hover-bg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
}

.logo-text {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-email {
    font-size: 14px;
    color: var(--text-secondary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* Main Wrapper */
.main-wrapper {
    display: flex;
    flex: 1;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 256px;
    background: var(--sidebar-bg);
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    transition: width 0.2s;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 72px;
}

.compose-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 12px 16px;
    padding: 16px 24px;
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: box-shadow 0.2s, background 0.2s;
}

.compose-btn:hover {
    box-shadow: var(--shadow-md);
    background: #fafafb;
}

.compose-btn svg {
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    height: 32px;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    margin: 2px 0;
}

.nav-item:hover {
    background: var(--hover-bg);
}

.nav-item.active {
    background: var(--active-bg);
    color: var(--primary-color);
}

.nav-item svg {
    flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .storage-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: var(--text-muted);
}

.badge {
    margin-left: auto;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.main-content-inner {
    padding: 24px 32px;
    max-width: 95%;
    width: 100%;
}
