/* Professional Enterprise Webmail - Modern Clean Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional Orange Palette */
    --primary: #f97316;
    --primary-hover: #ea580c;
    --primary-light: #fed7aa;
    --primary-ultra-light: #fff7ed;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --sidebar-width: 260px;
    --radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Top Navigation Bar */
.top-nav {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-900);
    margin-right: 40px;
}

.nav-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.nav-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.nav-tab:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-tab.active {
    background: var(--primary-ultra-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-account-switcher {
    margin-left: auto;
    margin-right: 20px;
}

.account-dropdown {
    padding: 6px 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}

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

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

.nav-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Action Bar */
.action-bar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 24px;
    display: flex;
    gap: 8px;
    align-items: center;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 999;
}

.action-btn-primary {
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}

.action-btn-primary:hover {
    background: var(--primary-hover);
}

.action-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}

.action-btn:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-bar-right {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

/* Main Container */
#webmail-root {
    display: flex;
    height: 100vh;
    padding-top: 128px;
}

/* Sidebar */
.webmail-sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 128px);
    overflow-y: auto;
}

.sidebar-section {
    padding: 16px 12px 8px 12px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    padding: 0 12px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.folder-list {
    padding: 0 4px;
}

.folder-item {
    padding: 10px 12px;
    margin: 1px 0;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--gray-700);
    transition: all 0.15s;
}

.folder-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.folder-item.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.folder-icon {
    margin-right: 10px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.folder-badge {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    min-width: 22px;
    text-align: center;
}

.folder-item.active .folder-badge {
    background: white;
    color: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid var(--gray-200);
}

.sidebar-footer button {
    width: 100%;
    padding: 10px;
    margin: 4px 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s;
}

.sidebar-footer button:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

/* Email List Container */
.email-list-container {
    width: 380px;
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 128px);
    resize: horizontal;
    overflow: auto;
    min-width: 320px;
    max-width: 600px;
}

.email-list-header {
    padding: 20px 20px 16px 20px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
}

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

.email-list-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
}

.email-list-filters {
    display: flex;
    gap: 6px;
}

.filter-btn {
    padding: 6px 12px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    color: var(--gray-600);
    transition: all 0.15s;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary);
    background: var(--primary-ultra-light);
    color: var(--primary);
}

.search-box {
    padding: 0 20px 16px 20px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-900);
    transition: all 0.15s;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%236b7280"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: 14px center;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
}

/* Email List */
.email-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.email-item {
    padding: 14px 16px;
    margin: 4px 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.email-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.email-item.active {
    border-color: var(--primary);
    background: var(--primary-ultra-light);
}

.email-item.unread {
    background: white;
    border-left: 3px solid var(--primary);
}

.email-item.unread .email-sender,
.email-item.unread .email-subject {
    font-weight: 600;
}

.email-sender-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.email-sender {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
}

.email-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-time {
    font-size: 12px;
    color: var(--gray-500);
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    color: var(--gray-400);
    transition: all 0.15s;
}

.star-btn:hover {
    color: var(--primary);
}

.star-btn.starred {
    color: var(--primary);
}

.email-subject {
    font-size: 13px;
    color: var(--gray-900);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-preview {
    font-size: 13px;
    color: var(--gray-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-labels {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.email-label {
    padding: 2px 8px;
    background: var(--info);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Email View */
.email-view-container {
    flex: 1;
    background: white;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 128px);
    overflow: hidden;
}

.email-view-header {
    padding: 28px 32px;
    border-bottom: 1px solid var(--gray-200);
    background: white;
}

.email-view-subject {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
    line-height: 1.4;
}

.email-view-from {
    display: flex;
    align-items: center;
    gap: 14px;
}

.email-view-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.email-view-from-details {
    flex: 1;
}

.email-view-from-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.email-view-from-email {
    font-size: 13px;
    color: var(--gray-600);
}

.email-view-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 12px;
}

.email-actions {
    padding: 12px 32px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    gap: 8px;
    background: var(--gray-50);
}

.email-view-body {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-700);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-500);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 6px;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.spinner {
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.6s linear infinite;
}

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

/* Toast */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    background: white;
    border: 1px solid var(--gray-200);
    padding: 14px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3000;
    min-width: 300px;
    border-left: 3px solid var(--primary);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

/* Compose Modal */
.compose-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.compose-window {
    background: white;
    border-radius: 12px;
    width: 92%;
    max-width: 1100px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.compose-header {
    padding: 18px 28px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    border-radius: 12px 12px 0 0;
}

.compose-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.close-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.close-btn:hover {
    background: white;
    color: var(--gray-900);
}

.compose-fields {
    padding: 0;
}

.compose-field {
    display: flex;
    align-items: center;
    padding: 14px 28px;
    border-bottom: 1px solid var(--gray-200);
}

.compose-field label {
    width: 70px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.compose-field input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 4px;
    color: var(--gray-900);
}

.compose-field input:focus {
    outline: none;
}

.compose-toolbar {
    padding: 10px 28px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    gap: 4px;
    background: var(--gray-50);
}

.toolbar-btn {
    padding: 6px 10px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-600);
    transition: all 0.15s;
}

.toolbar-btn:hover {
    border-color: var(--gray-300);
    background: var(--gray-100);
}

.compose-body {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
}

.compose-textarea {
    width: 100%;
    min-height: 360px;
    border: none;
    background: transparent;
    resize: vertical;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.7;
    color: var(--gray-900);
}

.compose-textarea:focus {
    outline: none;
}

.compose-footer {
    padding: 18px 28px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    border-radius: 0 0 12px 12px;
}

.send-btn {
    padding: 10px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.send-btn:hover {
    background: var(--primary-hover);
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.login-box {
    background: white;
    padding: 44px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.login-logo p {
    color: var(--gray-600);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-900);
    transition: all 0.15s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.login-btn:hover {
    background: var(--primary-hover);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Priority Badges */
.priority-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.priority-badge.urgent {
    background: var(--danger);
    color: white;
}

.priority-badge.high {
    background: var(--warning);
    color: white;
}

.priority-badge.normal {
    background: var(--success);
    color: white;
}

.priority-badge.low {
    background: var(--gray-200);
    color: var(--gray-700);
}

.priority-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.priority-indicator.urgent {
    background: var(--danger);
}

.priority-indicator.high {
    background: var(--warning);
}

.requires-response-badge {
    padding: 2px 6px;
    background: var(--info);
    color: white;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
}

.deadline-badge {
    padding: 2px 6px;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
}

.priority-section {
    padding: 14px 16px;
    background: var(--primary-ultra-light);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 8px;
}

.priority-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.priority-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.priority-stat-icon {
    font-size: 18px;
}

.priority-stat-info {
    display: flex;
    flex-direction: column;
}

.priority-stat-label {
    font-size: 10px;
    color: var(--gray-600);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.priority-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.analyze-btn {
    padding: 7px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.analyze-btn:hover {
    background: var(--primary-hover);
}

/* Navigation Tabs */
.app-tabs {
    display: flex;
    gap: 4px;
    padding: 0 24px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
}

.app-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-tab:hover {
    color: var(--gray-900);
    background: var(--gray-50);
}

.app-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Contacts */
.contacts-container {
    display: flex;
    height: 100%;
}

.contacts-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--gray-200);
    padding: 20px 16px;
}

.contacts-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contacts-header {
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.contacts-header .search-bar {
    flex: 1;
    position: relative;
}

.contacts-header .search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.view-toggle {
    display: flex;
    gap: 4px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 2px;
}

.view-btn {
    padding: 6px 10px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.15s;
}

.view-btn:hover {
    background: var(--gray-100);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.contacts-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.contacts-content.list-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contacts-content.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.contact-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.15s;
}

.contact-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.contact-info {
    flex: 1;
}

.contact-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.contact-info p {
    font-size: 13px;
    color: var(--gray-600);
    margin: 2px 0;
}

.contact-info .company {
    color: var(--gray-500);
    font-size: 12px;
}

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

.icon-btn {
    padding: 8px;
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.15s;
}

.icon-btn:hover {
    background: var(--gray-100);
    border-color: var(--primary);
    color: var(--primary);
}

.group-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.group-item {
    padding: 10px 12px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
    transition: all 0.15s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.group-item:hover {
    background: var(--gray-100);
}

.group-item.active {
    background: var(--primary);
    color: white;
}

.group-item .count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    background: var(--gray-200);
    border-radius: 12px;
}

.group-item.active .count {
    background: white;
    color: var(--primary);
}

.add-group {
    color: var(--gray-500);
    font-size: 13px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.newsletter-step {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.newsletter-step h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.recipient-selector {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
}

.selected-count {
    text-align: center;
    padding: 20px;
}

.selected-count h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin: 10px 0;
}

.button-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.newsletter-preview {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.preview-header, .preview-footer {
    padding: 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.preview-body {
    padding: 16px;
}

.newsletter-editor {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

/* Calendar */
.calendar-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.calendar-header {
    padding: 20px 24px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-navigator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.calendar-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.calendar-grid {
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Utility Classes */
.w-full {
    width: 100%;
}

.mb-4 {
    margin-bottom: 16px;
}

.btn-secondary {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
    justify-content: center;
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}
