/* MailBees Shared Styles */

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

body {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: #2d3748;
}

/* Purple Header Styles */
.mailguard-header {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.2);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    max-width: 1920px;
    margin: 0 auto;
    height: 70px;
}

/* Brand Section */
.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    transition: opacity 0.2s;
}

.brand-link:hover {
    opacity: 0.9;
}

.brand-logo {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.page-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

/* Search Section */
.header-search {
    flex: 1;
    max-width: 600px;
    margin: 0 32px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 8px 16px;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
}

.search-container:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-icon {
    margin-right: 8px;
    opacity: 0.7;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 14px;
    outline: none;
    padding: 4px 0;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Actions Section */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-action-item {
    position: relative;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.user-btn {
    padding: 6px 12px;
    min-width: 120px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.dropdown-arrow {
    opacity: 0.7;
    font-size: 12px;
    transition: transform 0.2s;
}

.user-dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}

/* Notification Button */
.notification-btn {
    position: relative;
    padding: 8px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    min-width: 220px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 8px;
}

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

.dropdown-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-icon {
    opacity: 0.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 8px 16px;
        height: 60px;
    }

    .header-search {
        display: none;
    }

    .brand-text {
        font-size: 18px;
    }

    .user-info {
        display: none;
    }

    .user-btn {
        min-width: auto;
        padding: 6px 8px;
    }

    .page-title {
        display: none;
    }
}

/* Utility classes */
.d-none {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Form elements */
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-control::placeholder {
    color: #cbd5e0;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.is-invalid {
    border-color: #e53e3e;
    background: #fed7d7;
}

.invalid-feedback {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}

/* Button styles */
.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error messages */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #feb2b2;
    font-size: 14px;
}

.success-message {
    background: #c6f6d5;
    color: #2f855a;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #9ae6b4;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 30px 20px;
    }
}