/* Email Accounts Page Specific Styles */

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-left {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.toolbar-right {
    display: flex;
    gap: 12px;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 14px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #0f172a;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 8px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #334155;
    color: #e2e8f0;
}

.btn-icon.mailbox:hover {
    color: #8b5cf6;
}

.btn-icon.edit:hover {
    color: #3b82f6;
}

.btn-icon.delete:hover {
    color: #ef4444;
}

/* Slide-in Form Panel */
.form-panel {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100vh;
    background: #1e293b;
    border-left: 1px solid #334155;
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

.form-panel.active {
    right: 0;
}

.form-panel-header {
    padding: 24px;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #1e293b;
    z-index: 10;
}

.form-panel-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #e2e8f0;
}

.btn-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: #334155;
    color: #e2e8f0;
}

.form-panel-body {
    padding: 24px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    background: #1e293b;
}

.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.form-help {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    margin: 0;
    text-transform: none;
    font-weight: normal;
    cursor: pointer;
}

/* Form Section */
.form-section {
    margin-bottom: 32px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #334155;
}

/* OAuth Button */
.oauth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.oauth-button:hover {
    background: #f9fafb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.oauth-button img {
    width: 20px;
    height: 20px;
}

.oauth-divider {
    text-align: center;
    color: #64748b;
    font-size: 12px;
    margin: 20px 0;
    position: relative;
}

.oauth-divider::before,
.oauth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #334155;
}

.oauth-divider::before {
    left: 0;
}

.oauth-divider::after {
    right: 0;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #334155;
    position: sticky;
    bottom: 0;
    background: #1e293b;
}

.form-actions .btn {
    flex: 1;
}

/* Connection Status */
.connection-status {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.connection-status.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.connection-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.connection-status.testing {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* Hidden fields */
.hidden {
    display: none !important;
}
