/* Reset & Core Page Variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #000000;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Structural Wrapper */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Top Branding Elements */
.logo-container {
    text-align: center;
    margin-bottom: 24px;
}

/* Fixed sizing for the Node Systems SVG */
.corp-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
}

.logo-container h2 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #ffffff;
}

/* The Matte Login Card Widget */
.login-card {
    background-color: #0d0d0d;
    border: 1px solid #1f1f1f;
    border-radius: 16px;
    width: 100%;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}

.login-card h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 0.85rem;
    color: #8a8a8a;
    margin-bottom: 28px;
    line-height: 1.4;
}

/* Input Block Control */
.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #a3a3a3;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input {
    background-color: #141414;
    border: 1px solid #262626;
    border-radius: 8px;
    color: #ffffff;
    padding: 12px 14px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

/* Glow effects match your custom brand color */
.input-group input:focus {
    border-color: #5c21f3;
    background-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(92, 33, 243, 0.2);
}

/* Interactive Authorization Button */
.submit-btn {
    background-color: #5c21f3;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #4312c9;
}

/* System Security Footer */
.footer-text {
    margin-top: 30px;
    text-align: center;
    padding: 0 10px;
}

.footer-text p {
    font-size: 0.75rem;
    color: #525252;
    line-height: 1.4;
}
/* ==========================================================================
   SOGo Unified Corporate Theme Transformation
   ========================================================================== */

:root {
    /* SOGo Native Muted Material Palette */
    --sogo-teal: #4a7e7a;          /* Top branding bar */
    --sogo-sidebar-bg: #e0e0e0;    /* Left directory pane background */
    --sogo-active-item: #ffffff;   /* Selection block state */
    --border-color: #d8d8d8;       
    --text-primary: #212121;       
    --text-secondary: #757575;     
    --hover-bg: #eeeeee;
    --focus-accent: #4caf50;       /* SOGo green accent points */
    
    --ribbon-height: 64px;         /* SOGo uses a taller modern header */
    --rail-width: 56px;
    --folder-width: 240px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

body.outlook-body {
    font-family: Roboto, "Segoe UI", sans-serif;
    color: var(--text-primary);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.lucide {
    width: 20px;
    height: 20px;
    stroke-width: 1.75;
    color: var(--text-secondary);
    vertical-align: middle;
}

/* ==========================================================================
   Top Global Header Bar (SOGo Branding Look)
   ========================================================================== */
.outlook-top-ribbon {
    height: var(--ribbon-height);
    background-color: var(--sogo-teal);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    width: 100vw;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.ribbon-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ribbon-waffle {
    cursor: pointer;
    color: white !important;
}

.app-title {
    font-weight: 500;
    font-size: 1.15rem;
    letter-spacing: 0.3px;
}

.ribbon-search {
    flex: 0 1 500px;
}

.ribbon-search input {
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 0 14px;
    color: white;
    font-size: 0.9rem;
}

.ribbon-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.ribbon-search input:focus {
    background-color: rgba(255, 255, 255, 0.25);
    outline: none;
}

.ribbon-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ribbon-icon {
    color: white !important;
    cursor: pointer;
}

/* User identity header presentation card styling */
.user-profile-header-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 16px;
}

.user-meta-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-display-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.user-email-string {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}
/* ==========================================================================
   SOGo Unified Corporate Theme - Dynamic Theme Matrix
   ========================================================================== */

:root {
    /* SOGo Native Theme Signature Core */
    --sogo-teal: #4a7e7a;          
    --focus-accent: #4caf50;       
    --ribbon-height: 64px;         
    --rail-width: 56px;
    --folder-width: 240px;

    /* LIGHT MODE CONFIGURATION */
    --app-bg: #ffffff;
    --rail-bg: #ffffff;
    --folder-pane-bg: #e0e0e0;    
    --sogo-active-item: #ffffff;   
    --border-color: #d8d8d8;       
    --text-primary: #212121;       
    --text-secondary: #757575;     
    --hover-bg: #eeeeee;
}

[data-theme="dark"] {
    /* DARK MODE CONFIGURATION */
    --app-bg: #121212;
    --rail-bg: #1e1e1e;
    --folder-pane-bg: #2d2d2d;    
    --sogo-active-item: #3d3d3d;   
    --border-color: #444444;       
    --text-primary: #e0e0e0;       
    --text-secondary: #aaaaaa;     
    --hover-bg: #333333;
}

/* Global Reset Rules */
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

body.outlook-body {
    font-family: Roboto, "Segoe UI", sans-serif;
    color: var(--text-primary);
    background-color: var(--app-bg);
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.lucide {
    width: 20px;
    height: 20px;
    stroke-width: 1.75;
    color: var(--text-secondary);
    vertical-align: middle;
}

/* ==========================================================================
   Top Global Header Bar Layout
   ========================================================================== */
.outlook-top-ribbon {
    height: var(--ribbon-height);
    background-color: var(--sogo-teal);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    width: 100vw;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
}

.ribbon-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ribbon-waffle {
    cursor: pointer;
    color: white !important;
}

.app-title {
    font-weight: 500;
    font-size: 1.15rem;
    letter-spacing: 0.3px;
}

.ribbon-search {
    flex: 0 1 500px;
}

.ribbon-search input {
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 0 14px;
    color: white;
    font-size: 0.9rem;
}

.ribbon-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.ribbon-search input:focus {
    background-color: rgba(255, 255, 255, 0.25);
    outline: none;
}

.ribbon-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ribbon-icon {
    color: white !important;
    cursor: pointer;
}

.user-profile-header-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 16px;
}

.user-meta-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-display-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.user-email-string {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ==========================================================================
   Main App Structural Container Layout
   ========================================================================== */
.outlook-app-layout {
    display: flex;
    width: 100vw;
    height: calc(100vh - var(--ribbon-height));
    overflow: hidden;
}

/* COLUMN 1: Main SOGo Module Utility Rail Switcher */
.app-switcher-rail {
    width: var(--rail-width);
    background-color: var(--rail-bg); 
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    flex-shrink: 0;
}

.rail-icon-btn {
    width: 42px;
    height: 42px;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.rail-icon-btn:hover {
    background-color: var(--hover-bg);
}

.rail-icon-btn.active {
    background-color: rgba(74, 126, 122, 0);
}

.rail-icon-btn.active .lucide {
    color: var(--sogo-teal);
    stroke-width: 2.25;
}

/* COLUMN 2: SOGo-Styled Folder / Module Directory Tree Drawer */
.navigation-folder-pane {
    width: var(--folder-width);
    background-color: var(--folder-pane-bg); 
    border-right: 1px solid var(--border-color);
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-shrink: 0;
}

/* SOGo floating round action button aesthetic adaptation */
.new-message-btn {
    background-color: var(--focus-accent);
    color: white;
    border: none;
    border-radius: 24px;
    height: 40px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.new-message-btn:hover {
    background-color: #43a047;
}

.new-message-btn .lucide {
    color: white;
}

.folder-header-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding-left: 12px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.folder-links-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.folder-links-list a:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.folder-links-list a.active {
    background-color: var(--sogo-active-item);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    color: var(--text-primary);
}

.folder-links-list a.active .lucide {
    color: var(--sogo-teal);
}

.link-label-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.badge-count {
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 10px;
    color: var(--text-secondary);
}

/* COLUMN 3: Right Side Live Framework Workspace */
.outlook-split-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    background-color: var(--app-bg); 
}

.split-reading-pane {
    flex: 1;
    height: 100%;
    background-color: var(--app-bg); 
    position: relative;
}

.pane-placeholder-msg {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-secondary);
}

.pane-placeholder-msg.hidden {
    display: none;
}

.placeholder-icon-wrapper {
    margin-bottom: 16px;
}

.placeholder-icon-wrapper .lucide {
    width: 56px;
    height: 56px;
    color: var(--sogo-teal);
    opacity: 0.6;
}

#outlook-app-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
    background-color: #ffffff; /* Ensures inner workspace frames mount onto clean white backgrounds */
}

#outlook-app-frame.active {
    display: block;
}

/* Utility Theme Toggle Button Layout Styling */
.theme-toggle-btn {
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Global Transitions for smooth shifting between modes */
.app-switcher-rail, 
.navigation-folder-pane, 
.outlook-split-workspace, 
.split-reading-pane, 
.folder-links-list a,
body,
.lucide {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.1s ease;
}
/* ==========================================================================
   Email Stream & Interactive Message Segment Styles
   ========================================================================== */
.email-stream-panel {
    width: 360px;
    background-color: var(--rail-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.stream-header-controls {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    display: flex;
    align-items: center;
}

.search-inline-icon {
    position: absolute;
    left: 26px;
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

.stream-filter-input {
    width: 100%;
    height: 34px;
    background-color: var(--hover-bg);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0 12px 0 36px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.stream-filter-input:focus {
    outline: none;
    border-color: var(--sogo-teal);
    background-color: var(--app-bg);
}

.email-items-list {
    flex: 1;
    overflow-y: auto;
}

.email-row-item {
    display: flex;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    gap: 12px;
    position: relative;
}

.email-row-item:hover {
    background-color: var(--hover-bg);
}

.email-row-item.active {
    background-color: rgba(192, 38, 211, 0.08);
}

.email-row-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--sogo-teal);
}

.email-row-item.unread .sender-title,
.email-row-item.unread .email-subject {
    font-weight: 700;
}

.email-row-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.email-row-content {
    flex: 1;
    min-width: 0;
}

.email-row-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3px;
}

.sender-title {
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.email-subject {
    font-size: 0.82rem;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-snippet {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}