:root {
    --primary-color: rgb(157, 157, 189);
    --primary-hover: rgb(184, 184, 215);
    --secondary-color: #4b5563;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --border-color: #e2e8f0;
    --hover-color: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --link-color: rgb(0, 0, 255);
    --shadow-1: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-2: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-3: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition-speed: 0.2s;
}

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

body {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.section {
    height: 100vh;
}

/* Login Styles */
.login-container {
    max-width: 450px;
    margin: 100px auto;
    padding: 48px 40px 36px;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow-2);
    animation: fadeIn 0.3s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.logo-container i {
    font-size: 32px;
    color: var(--primary-color);
}

.brand-name {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

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

.form-group {
    margin-bottom: 24px;
    position: relative;
}

input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all var(--transition-speed);
    background-color: var(--surface-color);
}

input:focus {
    outline: none;
}

input:hover {
    border-color: var(--text-secondary);
}

.form-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.forgot-password {
    color: var(--link-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    align-self: flex-start;
}

.forgot-password:hover {
    text-decoration: underline;
}

.guest-text {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}

.guest-text:hover {
    text-decoration: underline;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
}

.create-account {
    color: var(--link-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.create-account:hover {
    text-decoration: underline;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    min-width: 100px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-1);
}

.login-footer {
    max-width: 450px;
    margin: 0 auto;
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.language-selector select {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
}

.language-selector select:focus {
    outline: none;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    color: var(--text-primary);
}

.logo i {
    color: var(--primary-color);
    margin-top: 2px;
}

.logo span {
    color: var(--primary-color);
}

.header-center {
    flex: 1;
    max-width: 500px;
    margin: 0 32px;
}

.search-bar {
    background-color: var(--hover-color);
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.search-bar:focus-within {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-1);
}

.search-bar input {
    background: transparent;
    border: none;
    padding: 8px;
    width: 100%;
    font-size: 16px;
}

.search-options {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.search-options:hover {
    background-color: var(--hover-color);
}

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

/* Main Content Layout */
.main-content {
    display: flex;
    flex: 1;
    height: calc(100vh - 64px);
    overflow: hidden;
    position: relative;
}

/* Sidebar Styles */
.sidebar {
    width: 256px;
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    overflow-y: auto;
    transition: width var(--transition-speed) ease;
    position: relative;
}

.sidebar.collapsed {
    width: 72px;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item {
    padding: 0;
    justify-content: center;
}

.sidebar.collapsed .nav-item i {
    margin: 0;
}

.sidebar.collapsed .badge {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 16px;
    text-align: center;
}

.sidebar.collapsed .sidebar-footer {
    display: none;
}

.sidebar-footer .developer-info {
    font-size: 14px;
    color: var(--text-secondary);
}

.sidebar-footer .developer-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar-footer .developer-info a:hover {
    text-decoration: underline;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    height: 48px;
    border: none;
    background: none;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    border-radius: 0 24px 24px 0;
    margin-right: 8px;
    transition: all var(--transition-speed);
    position: relative;
}

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

.nav-item.active {
    background-color: #e8f0fe;
    color: var(--primary-color);
    font-weight: 500;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
}

.sidebar-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

.sidebar-label {
    padding: 8px 24px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Email List Styles */
.email-list {
    flex: 1;
    background-color: var(--surface-color);
    display: flex;
    flex-direction: column;
}

.email-list-header {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.email-list-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-list-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Email Item Styles */
.emails-list {
    overflow-y: scroll;
}

.email-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

.email-item:hover {
    background-color: var(--hover-color);
    box-shadow: var(--shadow-1);
    z-index: 1;
}

.email-checkbox {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.email-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.email-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.sender {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subject {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.timestamp {
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.preview {
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Email Details Modal */
.email-details {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.email-details .modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.email-details-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-color);
}

.email-details-actions .left-actions,
.email-details-actions .right-actions {
    display: flex;
    gap: 8px;
}

.email-details-actions .icon-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.email-details-actions .icon-button:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

.email-details-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.conversation-message {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.email-details-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.email-details-header .subject {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.email-details-header .from,
.email-details-header .to {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    color: var(--text-secondary);
}

.email-details-header .from strong,
.email-details-header .to strong {
    color: var(--text-primary);
    min-width: 60px;
}

.email-details-header .date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
}

.email-body {
  line-height: 1.6;
  font-size: 14px;
  color: var(--text-primary);
}

.markdown-preview {
  padding: 16px;
  background-color: var(--surface-color);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  overflow-y: auto;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
}

.email-body h1,
.email-body h2,
.email-body h3,
.email-body h4,
.email-body h5,
.email-body h6 {
  margin-top: 1.2em;
  margin-bottom: 0.5em;
}

.email-body p {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

.email-body ul,
.email-body ol {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
  padding-left: 1.5em;
}

.email-body li {
  margin-bottom: 0.25em;
}

.email-body blockquote {
  margin: 1em 0;
  padding-left: 1em;
}

.email-body pre {
  margin: 1em 0;
  padding: 0.75em;
  overflow-x: auto;
}

.email-body code {
  padding: 0 0.25em;
}

.email-body hr {
  margin: 1.5em 0;
}

.email-body table {
  border-collapse: collapse;
  margin-top: 1em;
  margin-bottom: 1em;
}

.email-body th,
.email-body td {
  padding: 0.5em;
}

.email-body a {
  text-decoration: none;
  transition: text-decoration 0.2s ease;
  color: var(--link-color);
}

.email-body a:hover {
  text-decoration: underline;
  opacity: 0.6;
}

.email-body a:visited {
    color: var(--link-color);
}

.email-attachments {
    margin-top: 24px;
    padding-top: 16px;
}

.email-attachments .attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: var(--surface-color);
    margin-bottom: 8px;
}

.email-attachments .attachment-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-attachments .attachment-info {
    flex: 1;
}

.email-attachments .attachment-name {
    font-weight: 500;
    color: var(--text-primary);
}

.email-attachments .attachment-size {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.email-attachments .attachment-actions {
    display: flex;
    gap: 8px;
}

.email-attachments .attachment-actions button {
    padding: 8px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.email-attachments .attachment-actions button:hover {
    background: var(--hover-color);
    color: var(--text-primary);
}

/* Icon Button Styles */
.icon-button {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
}

.icon-button:hover {
    background-color: var(--hover-color);
    color: var(--text-primary);
}

.icon-button:active {
    background-color: var(--border-color);
}

.icon-button i {
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Specific icon button styles */
#menu-toggle {
    margin-right: 8px;
}

.search-options {
    padding: 4px;
    width: 32px;
    height: 32px;
}

.compose-actions .icon-button {
    width: 36px;
    height: 36px;
}

.compose-actions .icon-button i {
    font-size: 16px;
}

/* Header specific icon buttons */
.header-right .icon-button {
    margin-left: 4px;
}

/* Email list specific icon buttons */
.email-list-actions .icon-button {
    width: 36px;
    height: 36px;
}

.email-list-actions .icon-button i {
    font-size: 16px;
}

/* Modal specific icon buttons */
.modal-actions .icon-button {
    width: 32px;
    height: 32px;
}

.modal-actions .icon-button i {
    font-size: 16px;
}

/* Button Styles */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 18px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-primary i {
    font-size: 14px;
}

/* Minimized state styles */
.compose-modal.minimized .modal-content {
    display: none;
}

.compose-modal.minimized .compose-header {
    border-radius: 8px 8px 0 0;
    cursor: pointer;
}

/* Compose Modal Styles */
.compose-modal {
    position: fixed;
    bottom: 0;
    right: 30px;
    width: 500px;
    height: 500px;
    background: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.2s ease;
}

.compose-modal.maximized {
    width: 100vw;
    height: 100vh;
    right: 0;
    bottom: 0;
    border-radius: 8px;
}

.compose-modal.minimized {
    height: 40px;
    overflow: hidden;
}

.compose-modal.maximized .modal-content {
    margin: 5vh 5vw;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.modal-content {
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow-y: auto;
}
.modal-content.full {
    height: 100%;
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #f2f6fc;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e0e0e0;
}

.compose-title {
    font-weight: 500;
    color: #202124;
    font-size: 14px;
}

.compose-actions {
    display: flex;
    gap: 4px;
}

.compose-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0;
    overflow: hidden;
}

.compose-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.field-label {
    min-width: 60px;
    color: #5f6368;
    font-size: 14px;
}

.compose-field input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #202124;
    padding: 4px 0;
    background: transparent;
}

.editor-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    border: none;
    outline: none;
    font-size: 14px;
    line-height: 1.6;
    color: #202124;
    background: transparent;
    resize: none;
    font-family: inherit;
    white-space: pre-wrap;
}

.editor-content:focus {
    outline: none;
}

/* Compose Footer Styles */
.compose-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.compose-actions-left,
.compose-actions-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Attachment Styles */
.attachment-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.attachment-preview .file-info {
    flex: 1;
    font-size: 12px;
    color: #5f6368;
}

.attachment-preview .remove-attachment {
    color: #5f6368;
    cursor: pointer;
    padding: 4px;
}

.attachment-preview .remove-attachment:hover {
    color: #d93025;
}

/* Send Button Styles */
.btn-send {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 18px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-send:hover {
    background: var(--primary-hover);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-send i {
    font-size: 14px;
}

/* User Menu Styles */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.user-menu-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
}

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

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 500;
    color: var(--text-color);
}

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

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

.dropdown-items {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dropdown-item i {
    width: 20px;
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -256px;
        top: 64px;
        bottom: 0;
        z-index: 100;
        transition: left 0.3s;
    }

    .sidebar.visible {
        left: 0;
    }

    .email-details .modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    .compose-modal {
        width: 100%;
        right: 0;
        height: 100vh;
        border-radius: 0;
    }

    .compose-modal.maximized {
        width: 100%;
        height: 100vh;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    .compose-modal.maximized .modal-content {
        margin: 0;
        box-shadow: none;
        border-radius: 8px;
    }

    .compose-actions-left {
        flex-wrap: wrap;
    }

    .header-center {
        margin: 0 16px;
    }

    .search-bar {
        padding: 4px 8px;
    }

    .editor-toolbar {
        overflow-x: auto;
        padding: 4px 8px;
    }

    .editor-toolbar-group {
        padding: 0 2px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 1100;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toast.success {
    background-color: #4caf50;
}

.toast.error {
    background-color: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--text-tertiary);
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
    max-width: 300px;
    line-height: 1.5;
}

.icon-button.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.email-item.selected {
    background-color: var(--hover-color);
}

/* User Details Modal */
.user-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    max-height: 100vh;
    height: 100%;
}

.user-details-modal .modal-content {
    background: white;
    padding: 32px;
    margin: 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: slideUp 0.3s ease-out;
    position: relative;
    border: 1px solid var(--border-color);
    overflow-y: auto;
}

.user-details-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.user-details-modal .modal-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.user-details-modal form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.user-details-modal .form-group {
    margin: 0;
}

.user-details-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-details-modal .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: var(--background-color);
}

.user-details-modal .form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: white;
}

.user-details-modal .form-group input::placeholder {
    color: var(--text-secondary);
}

.user-details-modal .form-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.user-details-modal .btn-primary {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 120px;
}

.close-modal {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    padding: 0;
}

.user-details-modal .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Search empty state */
.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
}

.search-empty-state i {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.search-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Email Suggestions */
.recipients-container {
    position: relative;
    flex: 1;
}

.email-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.email-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.email-suggestion:hover {
    background-color: var(--hover-color);
}

/* Unread email styling */
.email-item.unread {
    background-color: rgba(37, 99, 235, 0.05);
    border-left: 3px solid var(--primary-color);
}

.email-item.unread .sender {
    font-weight: 600;
    color: var(--text-primary);
}

.email-item.unread .subject {
    font-weight: 600;
    color: var(--text-primary);
}

.email-item.unread:hover {
    background-color: rgba(37, 99, 235, 0.08);
}

/* SSO Button Styles */
.sso-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.sso-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--surface-color);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-decoration: none;
}

.sso-button:hover {
    background-color: var(--hover-color);
    border-color: var(--text-secondary);
    box-shadow: var(--shadow-1);
}

.sso-button:active {
    transform: translateY(1px);
}

.sso-button i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.primary-sso {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.primary-sso:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
}

.divider span {
    background-color: var(--surface-color);
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 90%;
  width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  animation: fadeIn 0.3s ease-out;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid #6e717a;
  color: var(--text-primary, #333);
  font-size: 14px;
  box-sizing: border-box;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.alert i {
  font-size: 20px;
}

.alert p {
  margin: 0;
  flex: 1;
}

.alert button.dismiss {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
  padding: 0;
  line-height: 1;
}

.alert.success {
  background-color: rgba(76, 175, 80, 0.15);
  color: #017505;
}

.alert.error {
  background-color: rgba(244, 67, 54, 0.15);
  color: #980a00;
}

.alert.warning {
  background-color: rgba(255, 193, 7, 0.15);
  color: #866400;
}

.alert.info {
  background-color: rgba(33, 150, 243, 0.15);
  color: #035ba2;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
