/* O-Mail | Orzatty Corporate Theme (Material Design 3) */

:root {
    /* Color Palette M3 - Refined Corporate Blue/Gray */
    --md-sys-color-primary: #0A58CA;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #D3E3FD;
    --md-sys-color-on-primary-container: #041E49;
    
    --md-sys-color-secondary: #535F70;
    --md-sys-color-on-secondary: #FFFFFF;
    
    --md-sys-color-background: #F8F9FA;
    --md-sys-color-on-background: #1A1C1E;
    
    --md-sys-color-surface: #FFFFFF;
    --md-sys-color-on-surface: #1A1C1E;
    --md-sys-color-surface-variant: #E1E2E8;
    --md-sys-color-on-surface-variant: #44474E;
    
    --md-sys-color-outline: #74777F;
    --md-sys-color-error: #BA1A1A;
    
    /* Typography */
    --md-sys-typescale-font: 'Roboto', system-ui, sans-serif;
    
    /* Elevation */
    --md-sys-elevation-level1: 0 1px 2px 0 rgba(0,0,0,0.1), 0 1px 3px 1px rgba(0,0,0,0.06);
    --md-sys-elevation-level2: 0 1px 2px 0 rgba(0,0,0,0.1), 0 2px 6px 2px rgba(0,0,0,0.06);

    /* Shape */
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--md-sys-typescale-font);
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    height: 100vh;
    overflow: hidden;
}

/* App Layout Grid */
.o-mail-app {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
}

/* Sidebar M3 */
.sidebar {
    background-color: var(--md-sys-color-surface);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid var(--md-sys-color-surface-variant);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--md-sys-color-primary);
    padding-left: 12px;
}
.logo h2 {
    font-size: 22px;
    font-weight: 500;
}

/* M3 FAB (Floating Action Button) styled as a standard button */
.m3-button-primary {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border: none;
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.m3-button-primary:hover {
    background-color: #C2D7FA; /* Hand-adjusted hover */
    box-shadow: var(--md-sys-elevation-level1);
}

/* Navigation Links */
.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--md-sys-shape-corner-full);
    cursor: pointer;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    transition: background-color 0.2s, color 0.2s;
}

.nav-links li:hover {
    background-color: var(--md-sys-color-surface-variant);
}

.nav-links li.active {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

/* Main Content */
.content-area {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.top-bar {
    height: 64px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--md-sys-color-surface);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--md-sys-color-surface-variant);
    padding: 8px 16px;
    border-radius: var(--md-sys-shape-corner-full);
    width: 600px;
    gap: 12px;
}

.search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    color: var(--md-sys-color-on-surface);
    outline: none;
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    cursor: pointer;
}

/* Inbox List Area */
.inbox-container {
    flex: 1;
    overflow-y: auto;
    background-color: var(--md-sys-color-background);
    padding: 16px;
}

.email-list {
    background-color: var(--md-sys-color-surface);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-level1);
    border: 1px solid var(--md-sys-color-surface-variant);
    overflow: hidden;
}

.email-item {
    display: grid;
    grid-template-columns: 200px 1fr 100px;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--md-sys-color-surface-variant);
    cursor: pointer;
    align-items: center;
}

.email-item:hover {
    background-color: rgba(0,0,0,0.02);
    box-shadow: inset 2px 0 0 0 var(--md-sys-color-primary);
}

.email-item:last-child {
    border-bottom: none;
}

.email-item.unread {
    font-weight: 700;
    background-color: var(--md-sys-color-surface);
}

.email-item .sender {
    color: var(--md-sys-color-on-surface);
}

.email-item .subject {
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item .snippet {
    display: inline;
    color: var(--md-sys-color-outline);
    font-weight: 400;
    margin-left: 8px;
}

.email-item .date {
    text-align: right;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
}

.hidden {
    display: none !important;
}
