/* IMAP Module - Premium Soft Design */
/* All classes prefixed with 'imap-' for uniqueness */

body {
    padding: 0;
    margin: 0;
}

.imapSection {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(to bottom, #fafbfc 0%, #f0f2f5 100%);
    min-height: 100vh;
    padding: 30px 20px;
}

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

.imap-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.imap-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    background: white;
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.imap-logo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.imap-logo:hover {
    transform: scale(1.05);
}

.imap-logo-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.imap-nav {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.imap-nav-btn {
    padding: 10px 22px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #fafbfc;
    color: #586069;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.imap-nav-btn:hover {
    background: white;
    border-color: #d1d5da;
    color: #24292e;
}

.imap-nav-btn-active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Theme Toggle */
.imap-theme-toggle {
    padding: 10px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #fafbfc;
    color: #586069;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    position: relative;
}

.imap-theme-toggle:hover {
    background: white;
    border-color: #d1d5da;
    color: #24292e;
}

.imap-theme-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    transition: all 0.3s ease;
}

.imap-theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.imap-theme-icon-moon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

/* Dark mode active state */
.lagom-dark-mode .imap-theme-icon-sun {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

.lagom-dark-mode .imap-theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Language Selector - Custom Dropdown */
.imap-lang-dropdown {
    position: relative;
}

.imap-lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #fafbfc;
    color: #586069;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-width: 100px;
}

.imap-lang-btn:hover {
    background: white;
    border-color: #d1d5da;
    color: #24292e;
}

.imap-lang-dropdown.active .imap-lang-btn {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.imap-lang-flag {
    font-size: 18px;
    line-height: 1;
}

.imap-lang-code {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.imap-lang-arrow {
    width: 16px;
    height: 16px;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.imap-lang-dropdown.active .imap-lang-arrow {
    transform: rotate(180deg);
}

.imap-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

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

.imap-lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    color: #24292e;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.imap-lang-option:hover {
    background: #f6f8fa;
}

.imap-lang-option.active {
    background: #f0f4ff;
    color: #667eea;
    font-weight: 600;
}

.imap-lang-name {
    flex: 1;
}

/* Dark Mode Support */
.lagom-dark-mode .imap-lang-btn {
    background: #1a1d24;
    border-color: #30363d;
    color: #c9d1d9;
}

.lagom-dark-mode .imap-lang-btn:hover {
    background: #21262d;
    border-color: #484f58;
}

.lagom-dark-mode .imap-lang-dropdown.active .imap-lang-btn {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.lagom-dark-mode .imap-lang-menu {
    background: #21262d;
    border-color: #30363d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.lagom-dark-mode .imap-lang-option {
    background: #21262d;
    color: #c9d1d9;
}

.lagom-dark-mode .imap-lang-option:hover {
    background: #30363d;
}

.lagom-dark-mode .imap-lang-option.active {
    background: #1e2a3a;
    color: #8b9eff;
}

/* Title Section */
.imap-title-section {
    text-align: center;
    margin-bottom: 35px;
}

.imap-main-title {
    font-size: 44px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.imap-subtitle {
    font-size: 15px;
    color: #6a737d;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* Pricing Section */
.imap-pricing-section {
    max-width: 850px;
    margin: 0 auto 35px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.imap-pricing-section.imap-closing {
    animation: slideUp 0.3s ease forwards;
}

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

.imap-pricing-card {
    background: linear-gradient(135deg, #fff9f0 0%, #fff5e8 100%);
    border: 1px solid #ffe4c4;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(255, 200, 124, 0.15);
}

.imap-pricing-text {
    font-size: 14px;
    color: #5a4a3a;
    margin-bottom: 10px;
    line-height: 1.6;
}

.imap-pricing-options {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin: 24px 0;
}

.imap-pricing-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #5a4a3a;
    padding: 12px 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.imap-pricing-option:has(input:checked) {
    border-color: #f59e0b;
    background: #fffbf5;
}

.imap-pricing-option:hover {
    border-color: #fbbf24;
}

.imap-pricing-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #f59e0b;
}

.imap-buy-btn {
    display: block;
    margin: 24px auto;
    padding: 14px 48px;
    background: linear-gradient(to bottom, #fbbf24, #f59e0b);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.imap-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
}

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

.imap-pricing-footer {
    font-size: 13px;
    color: #5a4a3a;
    text-align: center;
    margin: 18px 0;
    line-height: 1.6;
}

.imap-pricing-vat {
    font-size: 12px;
    color: #6a5a4a;
    line-height: 1.6;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #ffe4c4;
}

.imap-vat-input {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 12px auto;
    padding: 10px 14px;
    border: 1px solid #e5d5c5;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    transition: all 0.2s ease;
}

.imap-vat-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Main Content */
.imap-main-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Mailbox */
.imap-mailbox {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.imap-mailbox:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.imap-mailbox-header {
    padding: 20px 26px;
    color: white;
    font-weight: 600;
}

.imap-mailbox-source .imap-mailbox-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.imap-mailbox-destination .imap-mailbox-header {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.imap-mailbox-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.imap-mailbox-body {
    padding: 26px;
}

/* Form Groups */
.imap-form-group {
    margin-bottom: 20px;
}

.imap-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #24292e;
}

.imap-label-icon {
    font-size: 15px;
    opacity: 0.7;
}

.imap-label-text {
    color: #586069;
}

.imap-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fafbfc;
    color: #24292e;
}

.imap-input:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.imap-mailbox-destination .imap-input:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.08);
}

/* Checkboxes */
.imap-checkbox-group {
    margin-top: 16px;
}

.imap-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 9px;
    border-radius: 8px;
}

.imap-checkbox-label:hover {
    background: #f6f8fa;
}

.imap-checkbox {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #6366f1;
    margin-top: 2px;
}

.imap-checkbox-text {
    font-size: 13px;
    color: #586069;
    line-height: 1.5;
}

.imap-checkbox-special {
    background: #fff9f0;
    border: 1px solid #ffe4c4;
    border-radius: 10px;
    padding: 14px;
    margin-top: 16px;
}

.imap-checkbox-special:hover {
    background: #fff5e8;
}

/* Middle Section */
.imap-middle-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
    min-width: 280px;
}

.imap-toggle-btn {
    padding: 11px 22px;
    background: white;
    border: 1px solid #d1d5da;
    border-radius: 8px;
    color: #586069;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.imap-toggle-btn:hover {
    background: #f6f8fa;
    border-color: #959da5;
}

.imap-swap-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.2);
}

.imap-swap-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

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

.imap-swap-icon {
    width: 18px;
    height: 18px;
}

.imap-info-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-left: 3px solid #10b981;
}

.imap-info-text {
    font-size: 13px;
    color: #24292e;
    margin-bottom: 8px;
    line-height: 1.6;
}

.imap-info-text:last-child {
    margin-bottom: 0;
}

.imap-info-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.imap-info-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Tooltip */
.imap-tooltip {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 13px;
    border-radius: 8px;
    font-size: 12px;
    margin-top: 16px;
    line-height: 1.5;
}

/* Extra Parameters */
.imap-extra-params {
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 100px;
        transform: translateY(0);
    }
}

.imap-extra-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #d1d5da;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    color: #24292e;
}

.imap-extra-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Warning */
.imap-warning {
    background: white;
    padding: 16px 26px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 26px;
    border-left: 3px solid #f59e0b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-left: 3px solid #f59e0b;
}

.imap-warning p {
    font-size: 14px;
    color: #586069;
    line-height: 1.6;
}

/* ETA and Progress Section */
.imap-eta-section {
    margin-bottom: 25px;
}

.imap-eta-text {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #24292e;
    margin-bottom: 10px;
}

.imap-progress-bar {
    width: 100%;
    height: 32px;
    background: linear-gradient(90deg, #4ade80 0%, #06b6d4 100%);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.imap-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #0891b2 100%);
    transition: width 0.3s ease;
    position: relative;
}

.imap-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Action Buttons */
.imap-action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 26px;
}

.imap-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 36px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.imap-btn-sync {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.imap-btn-sync:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.imap-btn-stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.imap-btn-stop:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

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

.imap-btn-icon {
    font-size: 17px;
}

/* Swap Animation */
.imap-swapping {
    animation: swapAnimation 0.5s ease-in-out;
}

@keyframes swapAnimation {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(15px);
    }
}

/* Console Sections */
.imap-console-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.imap-console-box {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.imap-console-title {
    padding: 16px 20px;
    background: #f6f8fa;
    border-bottom: 1px solid #e1e4e8;
    font-size: 15px;
    font-weight: 600;
    color: #24292e;
    margin: 0;
}

.imap-console-content {
    padding: 20px;
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #586069;
    background: white;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Log Section */
.imap-log-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
}

.imap-log-title {
    padding: 16px 20px;
    background: #f0f9ff;
    border-bottom: 1px solid #bae6fd;
    font-size: 16px;
    font-weight: 600;
    color: #0c4a6e;
    margin: 0;
    text-align: center;
}

.imap-log-subtitle {
    padding: 12px 20px;
    background: #f6f8fa;
    border-bottom: 1px solid #e1e4e8;
    font-size: 13px;
    color: #586069;
    margin: 0;
    text-align: center;
}

.imap-log-content {
    padding: 20px;
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #24292e;
    background: #fafbfc;
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.imap-log-footer {
    padding: 12px 20px;
    background: #f6f8fa;
    border-top: 1px solid #e1e4e8;
    font-size: 13px;
    color: #586069;
    margin: 0;
    text-align: center;
}

/* Footer Navigation */
.imap-footer-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.imap-footer-btn {
    padding: 10px 28px;
    background: white;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    color: #586069;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.imap-footer-btn:hover {
    background: #f6f8fa;
    border-color: #d1d5da;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

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

/* Responsive */
@media (max-width: 1200px) {
    .imap-main-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .imap-middle-section {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .imap-console-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .imap-main-title {
        font-size: 36px;
    }

    .imap-action-buttons {
        flex-direction: column;
    }

    .imap-btn {
        width: 100%;
        justify-content: center;
    }

    .imap-header {
        flex-direction: column;
        text-align: center;
    }

    .imap-nav {
        margin-left: 0;
    }

    .imap-footer-nav {
        flex-direction: column;
    }

    .imap-footer-btn {
        width: 100%;
    }
}

/* Dark Mode */
.lagom-dark-mode .imapSection {
    background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 100%);
}

.lagom-dark-mode .imap-header {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lagom-dark-mode .imap-nav-btn {
    background: #1f1f2e;
    color: #a0a0b0;
    border-color: rgba(255, 255, 255, 0.08);
}

.lagom-dark-mode .imap-nav-btn:hover {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e8;
}

.lagom-dark-mode .imap-nav-btn-active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.lagom-dark-mode .imap-theme-toggle {
    background: #1f1f2e;
    border-color: rgba(255, 255, 255, 0.08);
    color: #a0a0b0;
}

.lagom-dark-mode .imap-theme-toggle:hover {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e8;
}

.lagom-dark-mode .imap-main-title {
    background: linear-gradient(135deg, #8b9aff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lagom-dark-mode .imap-subtitle {
    color: #a0a0b0;
}

/* Dark Mode - Pricing Section */
.lagom-dark-mode .imap-pricing-card {
    background: linear-gradient(135deg, #2a2520 0%, #2d2418 100%);
    border-color: rgba(245, 158, 11, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.lagom-dark-mode .imap-pricing-text {
    color: #c0b0a0;
}

.lagom-dark-mode .imap-pricing-option {
    background: #1f1f2e;
    color: #c0b0a0;
    border-color: rgba(255, 255, 255, 0.08);
}

.lagom-dark-mode .imap-pricing-option:has(input:checked) {
    border-color: #f59e0b;
    background: #2a2520;
}

.lagom-dark-mode .imap-pricing-option:hover {
    border-color: #fbbf24;
}

.lagom-dark-mode .imap-pricing-footer {
    color: #c0b0a0;
}

.lagom-dark-mode .imap-pricing-vat {
    color: #b0a090;
    border-top-color: rgba(245, 158, 11, 0.2);
}

.lagom-dark-mode .imap-vat-input {
    background: #1f1f2e;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e8;
}

.lagom-dark-mode .imap-vat-input:focus {
    border-color: #f59e0b;
    background: #2a2a3e;
}

/* Dark Mode - Mailboxes */
.lagom-dark-mode .imap-mailbox {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lagom-dark-mode .imap-mailbox:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.lagom-dark-mode .imap-mailbox-source .imap-mailbox-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.lagom-dark-mode .imap-mailbox-destination .imap-mailbox-header {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.lagom-dark-mode .imap-input-label {
    color: #e0e0e8;
}

.lagom-dark-mode .imap-label-text {
    color: #a0a0b0;
}

.lagom-dark-mode .imap-input {
    background: #1f1f2e;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e8;
}

.lagom-dark-mode .imap-input:focus {
    border-color: #6366f1;
    background: #2a2a3e;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.lagom-dark-mode .imap-mailbox-destination .imap-input:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.lagom-dark-mode .imap-input::placeholder {
    color: #606070;
}

.lagom-dark-mode .imap-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.03);
}

.lagom-dark-mode .imap-checkbox {
    accent-color: #8b5cf6;
}

.lagom-dark-mode .imap-checkbox-text {
    color: #a0a0b0;
}

.lagom-dark-mode .imap-checkbox-special {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.lagom-dark-mode .imap-checkbox-special:hover {
    background: rgba(245, 158, 11, 0.12);
}

/* Dark Mode - Middle Section */
.lagom-dark-mode .imap-toggle-btn {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.1);
    color: #a0a0b0;
}

.lagom-dark-mode .imap-toggle-btn:hover {
    background: #1f1f2e;
    border-color: rgba(255, 255, 255, 0.15);
}

.lagom-dark-mode .imap-swap-btn {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

.lagom-dark-mode .imap-swap-btn:hover {
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.lagom-dark-mode .imap-info-box {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.05);
    border-left-color: #10b981;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lagom-dark-mode .imap-info-text {
    color: #e0e0e8;
}

.lagom-dark-mode .imap-info-link {
    color: #8b9aff;
}

.lagom-dark-mode .imap-info-link:hover {
    color: #a78bfa;
}

.lagom-dark-mode .imap-tooltip {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Dark Mode - Extra Parameters */
.lagom-dark-mode .imap-extra-input {
    background: #1f1f2e;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e8;
}

.lagom-dark-mode .imap-extra-input:focus {
    border-color: #8b5cf6;
    background: #2a2a3e;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.lagom-dark-mode .imap-extra-input::placeholder {
    color: #606070;
}

/* Dark Mode - Warning */
.lagom-dark-mode .imap-warning {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.05);
    border-left-color: #f59e0b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lagom-dark-mode .imap-warning p {
    color: #a0a0b0;
}

/* Dark Mode - Action Buttons */
.lagom-dark-mode .imap-btn-sync {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.lagom-dark-mode .imap-btn-sync:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.lagom-dark-mode .imap-btn-stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.lagom-dark-mode .imap-btn-stop:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Dark Mode - Console Sections */
.lagom-dark-mode .imap-console-box {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lagom-dark-mode .imap-console-title {
    background: #1f1f2e;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: #e0e0e8;
}

.lagom-dark-mode .imap-console-content {
    background: #2a2a3e;
    color: #a0a0b0;
}

/* Dark Mode - Log Section */
.lagom-dark-mode .imap-log-section {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lagom-dark-mode .imap-log-title {
    background: rgba(6, 182, 212, 0.15);
    border-bottom-color: rgba(6, 182, 212, 0.3);
    color: #67e8f9;
}

.lagom-dark-mode .imap-log-subtitle {
    background: #1f1f2e;
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: #a0a0b0;
}

.lagom-dark-mode .imap-log-content {
    background: #1f1f2e;
    color: #e0e0e8;
}

.lagom-dark-mode .imap-log-footer {
    background: #1f1f2e;
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #a0a0b0;
}

/* Dark Mode - Footer Navigation */
.lagom-dark-mode .imap-footer-btn {
    background: #2a2a3e;
    border-color: rgba(255, 255, 255, 0.1);
    color: #a0a0b0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lagom-dark-mode .imap-footer-btn:hover {
    background: #1f1f2e;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Dark Mode - ETA and Progress */
.lagom-dark-mode .imap-eta-text {
    color: #e0e0e8;
}

.lagom-dark-mode .imap-progress-bar {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
}

.lagom-dark-mode .imap-progress-fill {
    background: linear-gradient(90deg, #4ade80 0%, #06b6d4 100%);
}

/* Custom Modal Styles */
.imap-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.imap-modal-overlay.imap-modal-show {
    display: flex;
}

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

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.imap-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.imap-modal-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.imap-modal-icon {
    font-size: 28px;
    line-height: 1;
}

.imap-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0;
    letter-spacing: 0.3px;
}

.imap-modal-body {
    padding: 28px;
}

.imap-modal-message {
    font-size: 15px;
    color: #24292e;
    line-height: 1.6;
    margin: 0;
}

.imap-modal-footer {
    padding: 14px 28px;
    background: #f6f8fa;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #e1e4e8;
}

.imap-modal-btn {
    padding: 11px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.imap-modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.imap-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.imap-modal-btn-secondary {
    background: white;
    color: #586069;
    border: 1px solid #d1d5da;
}

.imap-modal-btn-secondary:hover {
    background: #f6f8fa;
    border-color: #959da5;
}

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

/* Modal variants for different types */
.imap-modal-alert .imap-modal-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.imap-modal-alert .imap-modal-btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.imap-modal-alert .imap-modal-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.imap-modal-confirm .imap-modal-header {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.imap-modal-confirm .imap-modal-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.imap-modal-confirm .imap-modal-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.imap-modal-error .imap-modal-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.imap-modal-error .imap-modal-btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.imap-modal-error .imap-modal-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.imap-modal-success .imap-modal-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.imap-modal-success .imap-modal-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.imap-modal-success .imap-modal-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* Dark Mode - Modal */
.lagom-dark-mode .imap-modal-overlay {
    background: rgba(155, 155, 155, 0.3);
}

.lagom-dark-mode .imap-modal {
    background: #2a2a3e;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lagom-dark-mode .imap-modal-message {
    color: #e0e0e8;
}

.lagom-dark-mode .imap-modal-footer {
    background: #1f1f2e;
    border-top-color: rgba(255, 255, 255, 0.08);
}

.lagom-dark-mode .imap-modal-btn-secondary {
    background: #2a2a3e;
    color: #a0a0b0;
    border-color: rgba(255, 255, 255, 0.1);
}

.lagom-dark-mode .imap-modal-btn-secondary:hover {
    background: #1f1f2e;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .imap-modal {
        max-width: 95%;
        margin: 20px;
    }

    .imap-modal-header {
        padding: 20px 24px;
    }

    .imap-modal-body {
        padding: 24px;
    }

    .imap-modal-footer {
        padding: 10px 24px;
        flex-direction: column;
    }

    .imap-modal-btn {
        width: 100%;
    }
}

/* ============================================ */
/* RESPONSIVE DESIGN - HEADER & NAVIGATION */
/* ============================================ */

/* Tablet and below (max-width: 1024px) */
@media (max-width: 1024px) {
    .imap-header {
        gap: 12px;
        padding: 16px 20px;
    }

    .imap-nav {
        gap: 6px;
    }

    .imap-nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .imap-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .imap-middle-section {
        order: 2;
        min-width: auto;
    }

    .imap-console-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Mobile landscape and below (max-width: 768px) */
@media (max-width: 768px) {
    .imap-header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px;
    }

    .imap-logo {
        padding: 10px;
    }

    .imap-logo-icon {
        width: 28px;
        height: 28px;
    }

    .imap-nav {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
        gap: 8px;
    }

    .imap-nav-btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 13px;
    }

    .imap-theme-toggle {
        width: 40px;
        height: 40px;
    }

    .imap-lang-btn {
        min-width: 90px;
        padding: 10px 12px;
        font-size: 13px;
    }

    .imap-main-title {
        font-size: 32px;
    }

    .imap-subtitle {
        font-size: 14px;
    }

    .imap-pricing-card {
        padding: 20px;
    }

    .imap-pricing-options {
        flex-direction: column;
        gap: 12px;
    }

    .imap-action-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .imap-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile portrait (max-width: 480px) */
@media (max-width: 480px) {
    .imapSection {
        padding: 20px 12px;
    }

    .imap-header {
        padding: 12px;
        gap: 10px;
    }

    .imap-logo {
        padding: 8px;
    }

    .imap-logo-icon {
        width: 24px;
        height: 24px;
    }

    .imap-nav {
        flex-wrap: wrap;
        gap: 6px;
    }

    .imap-nav-btn {
        font-size: 12px;
        padding: 8px 10px;
    }

    .imap-theme-toggle {
        width: 38px;
        height: 38px;
    }

    .imap-lang-btn {
        padding: 8px 10px;
        font-size: 12px;
        min-width: auto;
    }

    .imap-lang-code {
        display: none;
    }

    .imap-lang-flag {
        font-size: 20px;
    }

    .imap-main-title {
        font-size: 28px;
    }

    .imap-subtitle {
        font-size: 13px;
    }

    .imap-mailbox-body {
        padding: 20px;
    }

    .imap-input-label {
        font-size: 12px;
    }

    .imap-input {
        font-size: 13px;
        padding: 10px 12px;
    }

    .imap-checkbox-text {
        font-size: 12px;
    }

    .imap-swap-btn {
        font-size: 12px;
        padding: 10px 16px;
    }

    .imap-toggle-btn {
        font-size: 12px;
        padding: 10px 16px;
    }

    .imap-info-box {
        padding: 16px;
    }

    .imap-info-text {
        font-size: 12px;
    }
}

/* Extra small devices (max-width: 360px) */
@media (max-width: 360px) {
    .imap-header {
        padding: 10px;
    }

    .imap-nav-btn {
        font-size: 11px;
        padding: 7px 8px;
    }

    .imap-main-title {
        font-size: 24px;
    }

    .imap-lang-menu {
        min-width: 160px;
    }

    .imap-lang-option {
        padding: 10px 12px;
        font-size: 13px;
    }

    .imap-theme-toggle {
        width: 36px;
        height: 36px;
    }
}
